Hono / Bun (TypeScript / Bun) · CWE-942
Hono / Bun: Permissive CORS + Credentials (Source & Boundary Audit)
Trace entrypoints to sinks and map coverage-ledger units. Prevent reflected Origin headers paired with Access-Control-Allow-Credentials: true. Tailored for Hono / Bun: Bind Zod validator middleware and timing-safe token comparisons per route.
Coverage ledger tracking key
surface:hono-bun::boundary:cors-credential-leak::angle:audit
ZAP 40040 / 10098 cross-domain misconfig audit
Risk boundary
// Unverified Hono / Bun path (CWE-942 · Source & Boundary Audit)
// Handler accepts input without validating c.get('jwtPayload').Hardened guard
// Hardened Hono / Bun (CWE-942 · Source & Boundary Audit)
// 1. Bind Zod validator middleware and timing-safe token comparisons per route
// 2. Validate origins against an exact static allowlist and never combine wildcard rules with cookies.Verification steps
- 01Seed coverage-ledger.json for every Hono / Bun handler touching Permissive CORS + Credentials.
- 02Trace request parameters through c.get('jwtPayload') validation down to the sink.
- 03Verify with paired positive/negative evidence via zap-baseline-passive.