T09 · Insecure Skill Coding Practices
- Location
src/evaluate.ts:114- Finding
HTTP transport and method restrictions can fail open
- Content
View full analysis
risk) const method = (sanitized.method ?? "GET").toUpperCase(); if (policy.http?.allowMethods && !policy.http.allowMethods.includes(method)) { reasons.push({ ruleId: "http.method.not.allowlisted", message: `HTTP method not allowlisted: ${method}` }); } } ``` Related normalization occurs at `src/normalize.ts:22-33`: ```ts if (type === "http_request") { const method = String(action.method ?? "GET").toUpperCase(); const url = String(action.url ?? ""); const u = new URL(url); return { type, method, url, host: u.hostname.toLowerCase(), headers: normalizeHeaders(action.headers), body: action.body }; } ``` ### Technical Analysis TLS enforcement tests the original URL string with a case-sensitive `startsWith("http://")` comparison rather than checking the parsed URL protocol. A URL such as `HTTP://api.github.com/...` can be accepted by the URL parser while bypassing this comparison. If its hostname is allowlisted, the action may receive a risk score of zero and be returned as `ALLOW`. The configured HTTP method allowlist is also not enforced as an allowlist. A non-allowlisted method only appends a reason. The risk scorer adds risk for `DELETE` ...[truncated 1365 chars]- Remediation
View remediation
