Files
WRNexusJS/packages
ClintchizandClaude Opus 5 3867e7c183 fix(authz): audit getResource denials; fail closed on a malformed denies shape
guardPermission's getResource catch returned 403 directly, never reaching
decideFor -> decide -> finish, so the audit sink never saw it — an attacker
probing ids that make the resource loader throw got a clean 403 stream
invisible to the audit trail. The audit sink is now stashed on the
per-request RequestAuthz object (authzMiddleware already receives it via
AuthzResolverOptions), and the catch records an "allowed: false" event with
an opaque reason before returning the 403.

Also: the explicit-deny check sat outside decide()'s try/catch, and
deniedBy() guarded on denies.length rather than Array.isArray(denies). A
store returning denies as a bare string let new Set(denies) iterate
characters instead of the permission, so the deny matched nothing and was
silently discarded; a store omitting denies entirely threw straight out of
decide(). Both are now validated and handled inside the try, denying via the
same "Authorization store unavailable" path as any other store failure.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 02:10:11 +05:30
..
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30
2026-08-04 12:19:09 +05:30