Skip to content

feat(review): flag authorization each route must opt in to - #16423

Merged
kyle-sexton merged 1 commit into
mainfrom
feat/review-central-authorization-criterion
Nov 15, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
feat/review-central-authorization-criterion

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

No related issue: owner decision from a design interview on the security review criteria (2026-11-14), recorded outside this repository.

Summary

review:security-reviewer listed "missing authorization on endpoints" and nothing about where the decision is made. A change in which every route calls the role check itself passed, although the next route added without the call would be open.

  • The A01 row of the OWASP floor now also covers authorization that each route or handler must opt in to, with no central decision point and no default deny, even when every current route carries its check.
  • Source: OWASP Proactive Controls C1, "Use a single access control procedure or routine" and "Deny by Default".

Fix

  • plugins/review/agents/security-reviewer.md: one clause and one link in the A01 row. No other review file changes.
  • plugins/review/evals/qg-security-per-route-authorization-opt-in/: one outcome case, a branch adding three admin routes that each check the role inline.

Verification

  • claude plugin eval --scaffold, plugin arm only, 3 runs: 3 of 3 passed. Each run dispatched the security reviewer and reported the opt-in structure with a single-place fix.
  • No baseline arm was run: the prompt is a /review:quality-gate invocation.
  • validate-cases.py over plugins/review/evals: no FAIL; scripts/check-changelog-fragments.sh --check: valid.

Related

  • #16372 also changes plugins/review; it does not touch agents/security-reviewer.md's A01 row as of its head when this PR opened.

🤖 Generated with Claude Code

The security reviewer's A01 row now covers authorization with no
central decision point and no default deny, even when every current
route carries its check, per OWASP Proactive Controls C1.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 15, 2026 19:45
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T19:46:30.746740Z 1a94a6b Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 1a94a6bb7aa55f04317962c5df949d1df0eab007: read 9 of 9 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no security issues found

I read all 9 changed files in full.

What the change does

  • plugins/review/agents/security-reviewer.md: the A01 (Broken Access Control) row gets one more check. It now covers authorization that each route has to opt in to, with no central decision point and no default deny. This adds to the instruction surface and removes nothing, so no guardrail is deleted, narrowed or softened. The instruction-surface lens has nothing to check.
  • plugins/review/evals/qg-security-per-route-authorization-opt-in/: a new eval case with its YAML, prompt, graders and samples, plus scaffold.sh.
    • scaffold.sh writes fixed file contents with quoted heredocs (<<'JS'), so nothing expands inside them.
    • It runs git init and git remote add origin "$PWD" inside the eval's own scratch directory.
    • It reads no input from outside, uses no network and touches no credentials.
    • The Express code it writes is a deliberate test fixture and never runs in a trusted context.
  • .changes/review/...md: a changelog fragment only.

Trust controls and trusted paths

  • None of the changed files match the TRUSTED PATHS globs. The eval directory is qg-security-*, which plugins/review/evals/security-review-*/** does not match, and nothing under plugins/review/skills/security-review/** changes.
  • No plugin manifest changes, so there are no manifest lines.
  • No workflow, token, kill-switch or merge-hold file changes.

Embedded text: the PR description has no instructions aimed at this review lane.

Spend: the new eval case runs 3 times, with max_turns: 40 and timeout_seconds: 900, when plugin evals run. That uses prepaid API credit only and starts no billed resource, so it is not a hold.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 1a94a6bb7aa55f04317962c5df949d1df0eab007: read 9 of 9 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

I read every hunk of all 9 changed files in .claude-lane/pr.diff.

What changes

  • In plugins/review/agents/security-reviewer.md, the A01 row of the OWASP floor gets one new clause. The security reviewer should now flag authorization that each route has to opt in to, with no central decision point and no default deny. This applies even when every current route has its check. The row links to OWASP Proactive Controls C1.
  • A new eval case, qg-security-per-route-authorization-opt-in. Its scaffold builds a branch with three admin routes. Each route calls isAdmin(currentUser(req)) itself, and nothing on the router or the app enforces the check.
  • A changelog fragment with bump: minor. Adding a review criterion is a minor change, so the level is right.

What I checked

  • The eval matches the existing sibling case. It follows plugins/review/evals/qg-security-search-sqli in its case.yaml schema, its tool_used grader regex, its prompt frontmatter (runs, turns, timeout, tools) and its scaffold structure (origin remote and set-head).
  • The grader rejects the wrong answers. The flags-opt-in-authorization grader fails a review that only calls the duplication a style issue, and one that wrongly says an existing route lacks its check. Its pass and fail samples follow those rules.
  • The scaffold produces the intended defect. All three routes in admin.js check the role, and app.use(admin) applies no middleware. The only problem is that authorization is opt-in per route, which is what the case means to test.
  • The path-scoped rules are met.
    • .claude/rules/eval-case-transcripts.md: the case is synthetic and holds no transcript or identifying detail.
    • .claude/rules/skill-bodies-state-current-rules.md: the new A01 clause states our decision in our own words and links the source. It copies no volatile upstream value.
  • No plugin manifest changed, so there are no manifest checks.
  • Closing issue: there is none. The PR says it comes from an owner decision made outside the repository, so there are no acceptance criteria to check.
  • Embedded instructions: none in the PR context.
  • Verification: I could not run anything, so the eval run (3 of 3 passed), validate-cases.py and check-changelog-fragments.sh results are the author's claims and unverified.

Spend: the new eval case adds 3 runs per eval pass (up to 40 turns and 900 s each), paid from prepaid API credit. It is not a hold.

Verifier dropped 0 of 0 candidates.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit d71b6e3 Nov 15, 2026
77 of 78 checks passed
@kyle-sexton
kyle-sexton deleted the feat/review-central-authorization-criterion branch November 15, 2026 19:59
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant