Skip to content

test(review): fix two qg-security-search-sqli grader misses found measuring #12241 - #12391

Merged
kyle-sexton merged 4 commits into
mainfrom
test/12241-review-handback-after-figure
Nov 2, 2026
Merged

kyle-sexton merged 4 commits into
mainfrom
test/12241-review-handback-after-figure

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: #12241

Summary

Fixes two qg-security-search-sqli grader misses found while measuring #12241, the before/after for the review handback that #12294 built. In both cases the reply named the SQL injection and its fix, but a grader failed it anyway. The PR changes only graders and their samples. The #12241 measurement is posted on the issue.

Fix

  • Three graders (cites-search-file, gives-parameterized-fix, names-sql-injection) failed a reply that named the injection and the fix. The trigger was the reply's limits line "No findings file written." Their no-findings exclusion (?:^|\n)[\s#*>|-]*No (?:security )?(?:findings|issues)\b matched it as a verdict. The exclusion now skips "No findings file", "No findings path" and "No findings artifact". A real "No findings." or "No security issues" verdict still fails.
  • gives-parameterized-fix now accepts "Bind a parameter" as the fix. Before, the leading verb group consumed "Bind", so no target alternative was left to match. A lookbehind alternative, (?<=\bbind )an? parameters?, closes this.
  • Each changed grader gains the failing reply's shape as a pass sample.
  • .changes/review/ patch fragment.

Verification

  • validate-cases.py plugins/review/evals: 0 FAIL.
  • Each grader was run, old and new pattern, on 7 real replies. Six came from the measured pair and one from the no-Write smoke. Only the target replies changed:
Reply Grader Old New
Smoke without Write ("No findings file written") cites-search-file, gives-parameterized-fix, names-sql-injection fail pass
Pair, after arm, run 1 ("Bind a parameter ...") gives-parameterized-fix fail pass
The other 5 pair replies, both arms all three unchanged unchanged
  • Not changed: in after-arm run 0, cites-search-file still fails. The reply names src/routes/search.js:9-17 and the injection, but the same table row also mentions products.js. The grader's products.js guard excludes that on purpose, so it was left as it is.
  • Runs: Claude Code 2.1.316, Sonnet 5.5, --allow-tools Bash Write, each pass VALID per run-validity.py --scaffolded.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 3 commits November 2, 2026 09:32
…" as a verdict

The no-findings exclusion in three qg-security-search-sqli graders matched
the limits line a quality-gate reply adds when its session cannot write the
reviewer's findings file (#12294), failing a reply that names the injection
and its parameterized fix. The exclusion now skips "No findings file",
"path" and "artifact"; a real "No findings." or "No security issues"
verdict still fails. Each grader gains that reply as a pass sample.

Refs: #12241

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A measured #12241 run named the fix as "Bind a parameter and escape the
LIKE wildcards"; the leading verb group consumed "Bind", so no target
alternative matched. A lookbehind alternative now accepts "bind a/an
parameter". The grader gains that reply as a pass sample.

Refs: #12241

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

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

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T14:59:57.473934Z edc8bb3 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

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #12391 (incremental, edc8bb3..def3a3c)

No security issues found.

Scope. I read every hunk of both files that changed since the last review:

  • plugins/review/evals/qg-security-search-sqli/graders/gives-parameterized-fix.md
  • plugins/review/evals/qg-security-search-sqli/samples/gives-parameterized-fix.json

Neither file matches a listed trusted path. The plugins/review/evals/security-review-*/** glob does not cover qg-security-search-sqli. The other 5 files have not changed since the last review.

What changed.

  • In the grader, the (?<=\bbind )an? parameters?\b alternative now has three negative lookbehinds: (?<!not bind ), (?<!n't bind ) and (?<!never bind ). A reply saying it "does not bind a parameter" no longer counts as giving the parameterized fix. This tightens the grader.
  • The samples file gains one fail sample: a negated "bind a parameter" reply that proposes escaping as the fix.

Why nothing is reported.

  • These are offline eval graders. They score how well a reviewer reports SQL injection in a fixture.
  • No changed line mints, scopes or reads a token or secret. None touches a workflow, permissions:, the trusted-actor list, the kill switch, the token broker or a merge hold.
  • No manifest, userConfig key, hook or MCP server changes. No standing instruction is deleted or softened.
  • The change makes eval scoring stricter. It opens no path to a leak, a compromise or a charge.

Prior findings. None. Rounds with findings: 0; cap: 3; past the cap: no.

Embedded text. The PR context contains no directives aimed at this lane.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on edc8bb328675bee20c9cbcec0e7d5d8f0f6b3af6; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review: PR #12391 (incremental, edc8bb32 → def3a3c2)

Scope: this round covers only the two files changed since the last review: the gives-parameterized-fix grader and its samples. I read both hunks in full. I have no shell, so I checked the regex by tracing it by hand and did not run it. The author's statement that validate-cases.py reports 0 FAIL is their claim, and I have not checked it.

Last round's finding is fixed. The bind a parameter alternative now reads (?<=\bbind )(?<!not bind )(?<!n''t bind )(?<!never bind )an? parameters?\b.

  • Inside the YAML single-quoted string, '' becomes ', so the second guard is n't bind .
  • All three lookbehinds are fixed-width and are checked at the same spot as the positive lookbehind, which is just before a/an.
  • They reject the following, cannot bind a parameter included, because its last characters are not bind :
    • does not bind a parameter
    • doesn't bind a parameter
    • never bind a parameter
  • The existing pass sample | Bind a parameter and escape the LIKE wildcards. still matches, because | is in front of Bind.

New fail sample. "The code does not bind a parameter; escape quotes in the term before concatenating." It is in the fail array, where it belongs. I traced it against the full pattern: after the verb group takes bind, no other target alternative can match in the next 60 characters. the term is not preceded by bind, and the text has no placeholder, prepared-statement or parameterize term. So this reply now fails, as the sample expects.

Settled threads and prior findings. The one earlier finding, about the negation guard, was resolved by the owner and the code now fixes it, so I am not raising it again. The round count is 1 of a cap of 3, so the cap does not apply.

Other checks.

  • No changed file in this round matches a trusted-path glob.
  • No manifest changed.
  • There is no closing issue: the PR body only says Refs: #12241.
  • The PR context and the thread text contain no instructions aimed at this lane.

No findings.

The lookbehind alternative started its target at "a", so the negation
lookbehinds checked only "bind " and a reply saying the code "does not
bind a parameter" passed. Negated lookbehinds for "not", "n't" and
"never" now precede it, and that reply is a fail sample.

Refs: #12241

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 1ee4a3d Nov 2, 2026
43 checks passed
@kyle-sexton
kyle-sexton deleted the test/12241-review-handback-after-figure branch November 2, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant