diff --git a/.grype.yaml b/.grype.yaml index 706362184..bda777bb4 100644 --- a/.grype.yaml +++ b/.grype.yaml @@ -71,3 +71,38 @@ ignore: package: name: brace-expansion type: npm + + # GHSA-rgw5-rvv9-x895 (brace-expansion <5.0.9, HIGH) is a follow-on DoS + # affecting the same npm-vendored package and threat surface described above. + # AWF does not pass remote input to npm's brace expansion code. npm 12.0.1, + # the latest official release as of 2026-08-04, still bundles 5.0.7; retain + # this acceptance only until an official npm release bundles >=5.0.9. + - vulnerability: GHSA-rgw5-rvv9-x895 + package: + name: brace-expansion + type: npm + + # ── ip-address bundled inside the vendored npm CLI ─────────────────────────── + # + # GHSA-mwp4-54f8-5fhr (ip-address <=10.3.0 -> 10.3.1, HIGH): + # IPv4 octets with leading zeroes can be interpreted inconsistently, which + # can bypass an SSRF guard that trusts ip-address classification. + # + # Risk acceptance — NOT USED AS A SECURITY BOUNDARY: + # This copy is bundled inside the npm CLI, not an AWF application + # dependency. AWF's proxy, firewall, and network policy do not use it for + # address classification or SSRF decisions. npm is a local CLI in these + # images and its vendored copy is not exposed as a request handler. + # + # No official npm release contains the fix yet: npm 12.0.1, the latest + # release as of 2026-08-04, still bundles ip-address 10.2.0. Hand-patching + # npm's internal dependency tree would replace a verified upstream artifact + # with a locally modified distribution. + # + # Revisit: once an official npm release bundles ip-address >=10.3.1, update + # the npm tarball pin and SHA256 in all four container Dockerfiles and DELETE + # this entry. + - vulnerability: GHSA-mwp4-54f8-5fhr + package: + name: ip-address + type: npm diff --git a/src/docker-manager-string-utils.test.ts b/src/docker-manager-string-utils.test.ts index 9b899ed4d..67adb0d4c 100644 --- a/src/docker-manager-string-utils.test.ts +++ b/src/docker-manager-string-utils.test.ts @@ -110,5 +110,17 @@ describe('docker-manager string/network utilities', () => { it('should not strip scheme-like substrings in the middle', () => { expect(stripScheme('api.https.example.com')).toBe('api.https.example.com'); }); + + it('should strip query and fragment', () => { + expect(stripScheme('https://example.com/path?x=1#frag')).toBe('example.com'); + }); + + it('should strip credentials and port', () => { + expect(stripScheme('https://user:pass@example.com:8443/path')).toBe('example.com'); + }); + + it('should trim surrounding whitespace before processing', () => { + expect(stripScheme(' api.openai.com ')).toBe('api.openai.com'); + }); }); });