Hono / Bun (TypeScript / Bun) · CWE-285
Hono / Bun: BFLA & Missing Function Auth (Adversarial PoC Verification)
Prove boundary crossing with paired positive/negative controls. Prevent standard authenticated accounts from calling admin or moderator endpoints. Tailored for Hono / Bun: Bind Zod validator middleware and timing-safe token comparisons per route.
Coverage ledger tracking key
surface:hono-bun::boundary:bfla-admin-escalation::angle:verification
Low-privilege role call against administrative route inventory
Risk boundary
// Unverified Hono / Bun path (CWE-285 · Adversarial PoC Verification)
// Handler accepts input without validating c.get('jwtPayload').Hardened guard
// Hardened Hono / Bun (CWE-285 · Adversarial PoC Verification)
// 1. Bind Zod validator middleware and timing-safe token comparisons per route
// 2. Enforce central role guards and re-check function permissions on every controller.Verification steps
- 01Seed coverage-ledger.json for every Hono / Bun handler touching BFLA & Missing Function Auth.
- 02Trace request parameters through c.get('jwtPayload') validation down to the sink.
- 03Verify with paired positive/negative evidence via owasp-web-audit.