Repository navigation
feat(harness-ops): bound computed keys by provenance in the parser reader - #12867
Conversation
Lane-Activity: work-resolve-issue/resolve-issue
Lane-Activity: pr-unblock/address-feedback Lane-Thread: PRRT_kwDOTCGFQM6y-iFo
Lane-Activity: pr-unblock/resolve-conflicts
Lane-Activity: pr-unblock/fix-ci
The token broker refused a lane run on the previous head as workflow-modified (.github/workflows/pr-feedback-dispatch.yml). This commit changes no file.
…tion
A destructured key reads its member the way a computed read does, so
`const{[k]:f}=o` with `k` bounded to "eval" or "Function", a vm runner
or a getter definer now counts as that read counts, and a literal
`{eval:f}` or `{Function:F}` key counts too. Before this, the bounded
key passed both the constructor check and the member check.
The extraction reference and the changelog fragment now say that a
computed read whose key may spell one of those members counts wherever
it stands, inert or not, so an unknown-key `o[k]` that used to be
exempt is a function-constructor hit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed Security review: PR #12867, no security findingsI read every hunk of all 5 changed files: the harness-ops change fragment, What the change does. It changes the harness-ops inventory skill's offline static analyzer, which reads Claude Code's bundled JS. A new Trust boundary. This code does not decide who or what the automation trusts, and it holds no token or secret. It does not gate a merge, a kill switch, the token broker or any lane's input. Its input is the Claude Code bundle, and its output is an inventory report. The CI step that runs it ( Soundness checks on the new bounds (security-adjacent, and they hold up):
No embedded instructions in the PR context. Not past the round cap (0 prior rounds, cap 3). critical-findings: 0 |
|
claude-review reviewed Code review: PR #12867, which bounds computed keys by where their values come from in the parser readerResult: no blocking or advisory findings. I read every hunk of all 5 changed files. What I checked
Not independently verifiedThe test results in the PR body are the author's claims and I did not check them; this lane has no shell. That covers Security is left to the separate security lane. |
Refs: #5901
Supersedes #12665
Summary
Owner-login replacement for #12665, which the lanes App opened and pr-unblock left as
needs-session. This branch merges #12665's head (c8ede301c0207e53432f98876fa70e5d9f34579d) onto current main and fixes its two open review threads.#12665 is fix (a) from the 2026-11-03 host run: under
--reader=parser, in strict code, a computed read no longer counts as an unknown load or aFunctionreach when its key provably cannot spellrequireorconstructor. A newkeySpellsOfinparser_helper.cjsbounds keyskeyValuesOfleaves unknown (+,+=, templates, branches, variables, and parameters of a non-exported function only ever called directly). Sloppy code keeps the old known-values-only bounds. Fix (b) is not built; see Remaining work.Remaining work
inventory.py --reader compare --self-check --binary-onlyto count how many of 2.1.316's"*"modules still load an unnamed file, and whether Explore and Plandisallowed_toolsresolve fullychunk-bwpc82tt.js's export list (the newparameterValuesreason string tells it apart fromFlow.calls)Fix
#12665's changes (
parser_helper.cjs,test_parser_reader.py,test_reader_findings.py,reference/extraction.md, the harness-ops fragment), plus these fixes for its review threads:parser_helper.cjs:2346(claude-review, blocking): VALID, fixed. A destructured key bounded toevalorFunctionpassed both the constructor check (it cannot spellconstructor) and the computed-member check (which tookMemberExpressiononly), soconst{[k]:f}=owithkonly ever"eval"got no hit. A new check after the computed-member one gives a destructured key, literal or computed, that cannot spellconstructorthe same treatment:evalisindirect-eval,Functionisfunction-constructor, and a computed key that may spell a vm runner or__defineGetter__/__defineSetter__isvm-string-codeordefiner-escape(literal vm runner and getter definer keys were already counted by their own checks, so the new one skips them to avoid a double hit). Seven cases jointest_a_computed_key_counts_only_for_the_names_it_may_spell: the reviewer's two modules, a vm runner and a setter definer through a bounded destructured key, literal{eval:f}and{Function:F}, and a bounded key spelling neither (no hit).reference/extraction.md:527(claude-review, advisory): VALID, fixed. The sink paragraph now says a member read or destructured key that is or may spellevalorFunctioncounts, and that the inert-constructorexemption covers only a key that cannot also spelleval,Function, a vm runner or a getter definer, so an unknown-keyo[k]such asfor(k in o)if(o[k])is afunction-constructorhit. The fragment says the same and that the next host run's count of those hits can rise for that reason.Verification
const{[k]:f}=owith"eval", with"Function", with"runInThisContext", literal{eval:f}, literal{Function:F}); with it in place they pass.python3 plugins/harness-ops/skills/inventory/scripts/test_parser_reader.py: 77 tests OK (afterparser_reader.py --install). A first version also counted literal{__defineGetter__:g}, which double-counted an existing case; the check now leaves literal definer keys to their own check.test_reader_findings.py: 87 tests OK (5 skipped);test_inventory_under_parser.py: 312 OK;test_fixture_parse.py: 1 OK.check-affectedhook passed on this head.Related
do-not-mergeuntil this merges)🤖 Generated with Claude Code