review: security specialist checks authorization a route-guard read misses

Four access-control classes where the guard is correct and the object still
leaks: error pages composed outside the guard, ownership surviving a role
downgrade, list/detail/download paths checked as one, and a session mutated
before the identity-switch callback is validated.

Adopted to review/specialists/security.md only; the /cso hunk targeted a
bullet list that is now an OWASP/ASVS table.

Co-authored-by: EmilianoU26 <314541067+EmilianoU26@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
committed 2026-10-08 14:53:25 +00:00
1 parent 7d88f13f58
commit 574a0c8dbb
2 files changed
+14

No files matched your search

+10
View File
@@ -477,3 +477,13 @@ test('testing specialist treats negative assertions as decisions and catches one
['grep', 'negative assertions', 'old value'],
], 'testing specialist');
});
test('security specialist checks authorization paths a route-guard read misses', () => {
const auth = compact(between(readFileSync(join(root, 'review/specialists/security.md'), 'utf8'), '### Auth & Authorization Bypass', '\n### '));
expectMentions(auth, [
['error', 'renderer', 'outside', 'guard'],
['ownership', 'role', 'downgrade'],
['list', 'detail', 'download', 'separately'],
['session', 'before', 'validating', 'callback'],
], 'security specialist');
});