Files
OmniRoute/src
diegosouzapw b6d2f0f82b fix(api): reject revoked, deactivated, banned or expired keys on DELETE /v1/batches/delete-completed
The fail-closed gate added in #13262 authorized a presented key by row
EXISTENCE (getApiKeyMetadata); a revoked/deactivated/banned/expired key
still has a row and ran the sweep (CWE-613). The route now also requires
validateApiKey() — the one lifecycle gate — before choosing a scope, and
neither an unresolved nor an invalid key falls through to the session
branch. Both 401 bodies now go through buildErrorBody() (Hard Rule #12).

Found by the omni-code-sec battery on #12969 (SEC-B, SEC-E, SEC-F);
4 negative route tests added (revoked, deactivated, banned, expired —
the last one alongside a session cookie).

Refs #12969
2026-09-10 19:06:29 -03:00
..