T09 · Insecure Skill Coding Practices
- Location
SKILL.md:483- Finding
Unauthenticated Local Proxy Acts as an Arbitrary Agent-Signature Oracle
- Content
View full analysis
{ const id = ++rc, url = new URL(cReq.url), auth = url.host, p = url.pathname + url.search; const sig = signReq(cReq.method, auth, p); log(id, `HTTP ${cReq.method} ${auth}${p} → signed`); const h = { ...cReq.headers }; delete h["proxy-connection"]; delete h["proxy-authorization"]; Object.assign(h, sig); h.host = auth; const fn = url.protocol === "https:" ? httpsRequest : httpRequest; const pr = fn({ hostname: url.hostname, port: url.port || (url.protocol === "https:" ? 443 : 80), path: p, method: cReq.method, headers: h }, (r) => { cRes.writeHead(r.statusCode, r.headers); r.pipe(cRes); }); pr.on("error", (e) => { log(id, `Error: ${e.message}`); cRes.writeHead(502); cRes.end("Proxy error"); }); cReq.pipe(pr); }); server.listen(port, "127.0.0.1", () => { console.log(`openbotauth signing proxy on http://127.0.0.1:${port}`); console.log(` kid: ${obaKey.kid}`); if (jwksUrl) console.log(` Signature-Agent: ${jwksUrl}`); console.log("Every request ...[truncated 2632 chars]- Remediation
View remediation
