Repository navigation
ci: move the ten reviewer lanes off the copied perl scrub onto the base-staged scope_redact.py - #22035
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Check that What this change shipsInventory (7 items) — 7 justifiedIntent: make every reviewer lane redact its published text through one tested, base-owned scrubber instead of 16 copied perl lines. This is a FIX (closes #10037).
[FIRST-PRINCIPLES-REVIEWED] df9c6d4 Description read[DESCRIPTION-READ] 542432764aad33cb3a927504d2d2bc64acf1be09b19d299d6926fc005d3f975c That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Check that a failing staged redactor (exit 1) blocks readiness on every lane at once, rather than leaving a lane silently missing. [DESIGN-REVIEWED] df9c6d4 Description read[DESCRIPTION-READ] f76298f685d8cb791fe7331eaeef14baab73b7437ca56f87add96fe01e62ea13 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
6dba247 to
5923a60
Compare
|
|
|
|
|
|
|
…se-staged scope_redact.py
5923a60 to
df9c6d4
Compare
|
|
|
Review-ready at df9c6d4: PR Readiness passed, all 103 checks green, and every Design, First Principles and Opus item has a disposition. Waiting only on a maintainer approval. Two calls are left for the maintainer, both in the description under For the maintainer to decide: the exit 11 on a GitHub token in a classified corpus field, and whether the separate |
Problem / Motivation
Goal: Every reviewer lane scrubs the text it publishes through the base-owned
scripts/scope_redact.py, and no copiedperl -i -pescrub is left under.github/workflows/.Ten reviewer workflows each carried a copied
perl -i -pecredential scrub (#10037). A copy that is wrong is wrong on every surface it guards, and a program inside arun:body cannot be tested. One copy already ate a JSON string's closing quote. #21795 put the two rules only the copies had (GitHub tokens, exact credential values) into the script, so the lanes can now move without losing any redaction.Why it matters
These lanes publish model-written text to public PR comments, job logs and artifacts, next to live AWS and GitHub credentials. With one tested scrubber, a fix lands once and a test sees it; with sixteen copies, nothing does.
Not a goal
perl -0777 -pescrub that cleans API error notes (for examplenote_read_failureinclaude-review.yml). It is a different scrubber with its own rules, and Migrate the ten reviewer lanes off the copied perl scrub to scripts/scope_redact.py #10037 does not name it.scripts/scope_redact.pyitself.What changed (motivation → approach → change)
perl -i -pelinespython3 "$REDACTOR" --mode text <file>git show "$BASE_SHA:scripts/scope_redact.py", staged once per laneCRED_VALUEperl loop--redact-envfor the three AWS variablesEach lane gains one
Stage the base-owned redactorstep before its first scrub, the way the Security Scope Review lanes stage theirs. The same-repo lanes check out at depth 2, so each one fetchesbase.shafirst;design-review.ymlandux-review.ymlnow callneed "$BASE_SHA"like the other three.Every lane gets the script's full rule set. For most that is the same rules plus GitHub tokens. The Codex first pass (
codex-review-output.mdincodex-review.yml) had only the key-id and assignment rules, so it also gains the ARN and 12-digit account rules. The change under review therefore cannot supply the program that scrubs its own output. Every scrubbed file here is prose, so every call uses--mode text. The[REDACTED-...]marker spellings are unchanged;test/test_scope_redact.pyalready pins them.Tests that run a lane's step now hand it the real script:
_step_envresolves the staged path toscripts/scope_redact.py, and the lane table marks those lanesneeds_redactorinstead ofneeds_perl. A new pin file,test/test_ai_review_workflows_lane_redactor.py, holds the shape: no copy left, staged from the base, every caller after the staging step and reading it, every call refuses, and the two credential lanes pass all three--redact-envnames.For the maintainer to decide
perl -0777 -peerror-note scrub. It stays as it is (see Not a goal). Say if you want it moved onto the script in a follow-up issue.Two low-severity notes on
scripts/scope_redact.pyitself, which this PR does not change. Local review raised them; say if either should become an issue:--mode textscrubs the whole file in one pass, so the assignment rule's\s*can cross a newline. A line ending inx-amz-security-token:would then rewrite the start of the next line. That fails closed (a marker grep misses), it does not leak.,, so a role name likerole/a,bkeeps,b. The account id is still redacted.Backwards compatibility
Compatible: the same files are scrubbed at the same steps with the same markers; a scrub that cannot run now fails the step instead of publishing the file.
Removes nothing: the copied perl lines are replaced by a call that applies the same rules and more, and no published surface or output field goes away.
Tests
test/test_ai_review_workflows_lane_redactor.py(new): the five pins above across all ten lanes, plus one per same-repo lane that the base commit is fetched before staging (red on design and UX without theirneed "$BASE_SHA").Determinism: the new file passed 5 repeated runs and one shuffled-order run (
shufof its node ids,-o addopts=""). It reads workflow files only.Scoped runs:
test/test_ai_review_workflows*.pyandtest/test_scope_redact*.py, 1608 passed. zizmor on the ten workflows reports the same findings as on main (5 high, 53 suppressed).Manual verification
N/A — unit coverage sufficient: the tests execute the changed
run:bodies with the real script, including the refusal branch.Related Issues
Closes #10037
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)