fix(security): bump adm-zip >=0.6.0 + exact host matching in mitm DNS test (#7732)

This commit is contained in:
Diego Rodrigues de Sa e Souza
2026-07-19 11:14:56 -03:00
committed by GitHub
parent 07b2cf9b7e
commit 3c30607d30
4 changed files with 10 additions and 8 deletions

View File

@@ -0,0 +1 @@
- fix(security): bump adm-zip to ^0.6.0 (dev transitive via promptfoo/onnxruntime-node) to clear the crafted-ZIP 4GB-allocation advisory, and tighten mitm DNS test host assertions to exact/suffix matching (CodeQL js/incomplete-url-substring-sanitization)

8
package-lock.json generated
View File

@@ -13072,14 +13072,14 @@
}
},
"node_modules/adm-zip": {
"version": "0.5.18",
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.18.tgz",
"integrity": "sha512-ufJnssQGbxzLNS1Ho9bCtX4rQKCCvoVuDLHoJyc3F9dOGDB4BkWs2Ci0kv53lqocAEQ/Cbi+I2XCsNYGqVYqng==",
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.6.0.tgz",
"integrity": "sha512-XleryMhbuksdKtofnWZ9Sk+4CUTbms4Mb/EU32SZwToAyZ5RgVos/ki8n+yr0LWHOGKuakbXTuuYNHLQjhddgg==",
"dev": true,
"license": "MIT",
"optional": true,
"engines": {
"node": ">=12.0"
"node": ">=14.0"
}
},
"node_modules/afinn-165": {

View File

@@ -406,6 +406,7 @@
},
"node-gyp": {
"undici": "^6.27.0"
}
},
"adm-zip": "^0.6.0"
}
}

View File

@@ -80,7 +80,7 @@ test("provisionDnsEntries: a failing agent/custom step does not stop the others
},
addHostsDns: async (hosts: string[]) => {
// Custom-hosts call must still happen even after default + agent errors.
if (hosts.includes("custom.example.com")) customCalled = true;
if (hosts.some((h) => h === "custom.example.com")) customCalled = true;
},
getAgentStates: () => [{ dns_enabled: true, agent_id: "__nonexistent_agent__" }] as never,
listEnabledCustomHosts: () => [{ host: "custom.example.com" }] as never,
@@ -205,8 +205,8 @@ test("provisionDnsEntries: canElevate() returning true proceeds with DNS provisi
},
addHostsDns: async (hosts: string[], sudoPassword: string) => {
capturedPasswords.push(sudoPassword);
if (hosts.some((h) => h.includes("googleapis.com"))) agentCalled = true;
if (hosts.includes("custom.example.com")) customCalled = true;
if (hosts.some((h) => h.endsWith(".googleapis.com"))) agentCalled = true;
if (hosts.some((h) => h === "custom.example.com")) customCalled = true;
},
canElevate: () => true,
getAgentStates: () => [{ dns_enabled: true, agent_id: "antigravity" }] as never,