fix(deps): pin fast-uri to 3.1.6 for four new high advisories - #2249
Conversation
Four high advisories published 2026-09-02 land on fast-uri 3.1.5: - GHSA-5jgf-p345-68v8 (host confusion via skipped IDN canonicalization) - GHSA-f65p-4m7j-42xc (SSRF via malformed IPv6 normalization) - GHSA-fph4-wmhf-6fwf (SSRF via repeated hostname percent-decoding) - GHSA-jqff-g426-hqxp (host confusion via percent-encoded scheme normalization) Every dependency root already carried "fast-uri@<3.1.5": 3.1.5, added to escape GHSA-7p8r-x3mc-p8w7. That clause is satisfied by 3.1.5 itself, so it held the graph on the version the four new advisories hit; the audit gate could not resolve past it. Raise the same clause to "fast-uri@<3.1.6": 3.1.6 in all four roots rather than adding a second clause that would fight it. 3.1.6 is the first patched release on the 3.x line for all four advisories. Stay on 3.x because ajv 8, the only consumer here, depends on fast-uri ^3. Pin the exact version, never a range: range override values forward-resolve on fresh lockfiles (#831/#833/#837). Also corrects a stale claim in the supply-chain section of docs/pr-checklists/recurring-review-patterns.md: the alerts/infra package.json overrides blocks it describes were removed in #1849. Closes #2248 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01McsUkrwYBL6oC7CdZCCsc4
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedNext included review available in 14 minutes. View limit detailsLimit details: You’ve used all 2 included reviews currently available. Your 89 included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour. Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: ⛔ Files ignored due to path filters (4)
📒 Files selected for processing (6)
Comment |
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 finished @chapati23's task in 46s —— View job Claude's ReviewVerdict: LGTM Verified the change end to end against
Cross-cutting notes
Findings roll-up None. No inline comments — the diff is a minimal, internally consistent security pin with no correctness, security, or style issues found. |
|
Your Those are invisible on So this PR needs either that fix stacked on top, or issue 2251 landed Separately: I built the same fix independently on |
|
Review status on head
One thing changed after those reviews ran, so it is worth flagging rather than leaving in the diff of the description: |
|
Code Quality is now blocked by issue #2251 after this PR fixes |
|
Apply order: update #2249 to current |
`Code Quality` runs three `pnpm audit` steps before `Run Trunk`. While the repo resolved `fast-uri@3.1.5` the job died at the first audit step, so Trunk never ran and six findings that #2228 introduced in `scripts/agent-quality-gate.test.sh` stayed invisible. The audit fix in this branch reaches `Run Trunk`, which then fails on them. All six sit in `run_teardown_drain_command_identity_regression`, which lifts `teardown_active_timeouts` out of the gate and `eval`s it into a fixture subshell: - `drain_completed_parallel_command` and `drain_completed_darwin_command_cohort` (SC2329) are called by the eval'd teardown, which shellcheck cannot see through. Instrumenting them records two calls each, and the existing assertions read what those calls wrote. Both keep a narrow per-line disable naming the caller. - `collect_process_tree` (twice) and `gate_darwin_exact_identity_terminate` (SC2329) are never called: the teardown reaches them only for a registered timeout record and this fixture registers none. They are removed, with a comment at each site saying when to restore them. Nothing falls through to a real implementation, because the fixture subshell defines only the two lifted functions. - `gate_run_id` (SC2030) is a fixture input the eval'd teardown reads inside the same subshell. Shellcheck pairs the write with reads it inlines from `scripts/gate/run-handles.sh` under `-x`; dropping `-x` drops the finding. The write carries a per-line disable stating that. No assertion, no fixture expectation, and no gate runtime changed. The diff is byte-identical to PR 2254, which fixes the same defect on a branch off `main`, so whichever lands first the other merges without a conflict. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9qMnHNftC9epVzng7JTwN
|
Stacked the second What the commit does, in
No assertion, no fixture expectation, and no gate runtime changed.
Verification at the new head: One thing for the operator to decide: PR 2254 fixes the same six findings on a branch off |
…ellcheck * origin/main: fix(deps): pin fast-uri to 3.1.6 for four new high advisories (#2249) # Conflicts: # scripts/agent-quality-gate.test.sh
…t two teardown comments (#2254) * fix(gate): clear the six shellcheck findings in the gate test suite `Code Quality` has been red on `main` since PR #2228 merged, and stayed invisible until PR #2249 cleared the `fast-uri` advisories that were aborting the job before its `Run Trunk` step. `./tools/trunk check --ci --all` reports six shellcheck findings in `scripts/agent-quality-gate.test.sh`, all inside `run_teardown_drain_command_identity_regression`. The check is ruleset-required, so this blocks `main` and every PR. Cause. The test lifts `teardown_active_timeouts` out of the gate and runs it under `eval` inside `( … )` fixture subshells. shellcheck cannot see through the `eval`, so every function the lifted body calls by name reads as never invoked (SC2329). The `gate_run_id` fixture write is the same shape from the other side: `shellcheck -x` follows `scripts/gate/run-handles.sh`, which a later test sources, and pairs its `gate_run_id` reads with the subshell write (SC2030). Two of the five flagged functions are real indirect call sites, and a runtime probe of the lifted function confirms both run: the portable subshell calls `drain_completed_parallel_command` twice, the Darwin subshell calls `drain_completed_darwin_command_cohort` twice, and the assertions read what those calls wrote. Each keeps a `# shellcheck disable=SC2329` naming the indirect call site. The `gate_run_id` write keeps a `# shellcheck disable=SC2030` naming the sourced file whose reads shellcheck pairs it with. The other three were dead. Both fixtures set `active_timeout_records=()`, so the lifted teardown returns before its descendant walk and never enters the Darwin exact-identity terminate loop. The same probe recorded zero calls to `collect_process_tree` (defined in both subshells) and `gate_darwin_exact_identity_terminate`. Deleting them removes three of the six findings outright instead of waiving them; a comment at each site records why no stub is needed and when one would be. The regression still binds: with the gate's per-worker `gate_drain_active_mapped_command` assignment mutated away, the test fails with "the teardown named './tools/trunk check --ci x' for the first worker". The operator gave explicit consent on 2026-09-03 to edit this file even though it is the quality gate's own test suite. Closes #2252 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01McsUkrwYBL6oC7CdZCCsc4 * fix(gate): correct the deletion-site comments and pin the SC2030 waiver Review of the previous commit found two defects in what it added. Both are in `run_teardown_drain_command_identity_regression`; neither changes behaviour. The Linux deletion-site comment named the wrong mechanism. It said the teardown "returns before its descendant walk", but on that path the guard at `scripts/agent-quality-gate.sh:1508-1513` returns only when every registry is empty, and the fixture sets `active_worker_pgids=(4000001 4000002)`. Execution reaches the walk. `collect_process_tree` goes uncalled because `roots` is built only from `active_timeout_records`, which the fixture leaves empty, so the loop iterates zero times. A maintainer trusting the old wording would conclude that nothing after the guard runs. The comment now names `roots`. The SC2030 waiver was positional. shellcheck reports one SC2030 per variable and currently attributes it to the Darwin `gate_run_id` write, which carries the disable. The identical write in the Linux fixture had none, and was quiet only because the Darwin one absorbed the finding. Deleting the Darwin assignment moves the finding to that unprotected line: verified before this change (`SC2030` at 6586) and after it (clean). Since the point of this PR is to keep the required Code Quality check green, the directive is now mirrored onto both writes so a later edit to either fixture cannot re-red it. The Darwin restore-guidance also named `collect_process_tree` as a stub to put back. That path returns at `scripts/agent-quality-gate.sh:1679` before the walk whether or not records exist, so only the terminate stub could ever be needed there; restoring the other would re-raise SC2329. Validation: `shellcheck -x` clean; `./tools/trunk check --ci` clean on the file; the lifted regression still passes with the same stub-invocation counts (2/2/0/0); and it still fails under the mutated gate that drops the per-worker mapped-command assignment. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01McsUkrwYBL6oC7CdZCCsc4 --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…-reconciled * origin/main: fix(deps): pin fast-uri to 3.1.6 for four new high advisories (#2249)
…t two teardown comments (#2254) * fix(gate): clear the six shellcheck findings in the gate test suite `Code Quality` has been red on `main` since PR #2228 merged, and stayed invisible until PR #2249 cleared the `fast-uri` advisories that were aborting the job before its `Run Trunk` step. `./tools/trunk check --ci --all` reports six shellcheck findings in `scripts/agent-quality-gate.test.sh`, all inside `run_teardown_drain_command_identity_regression`. The check is ruleset-required, so this blocks `main` and every PR. Cause. The test lifts `teardown_active_timeouts` out of the gate and runs it under `eval` inside `( … )` fixture subshells. shellcheck cannot see through the `eval`, so every function the lifted body calls by name reads as never invoked (SC2329). The `gate_run_id` fixture write is the same shape from the other side: `shellcheck -x` follows `scripts/gate/run-handles.sh`, which a later test sources, and pairs its `gate_run_id` reads with the subshell write (SC2030). Two of the five flagged functions are real indirect call sites, and a runtime probe of the lifted function confirms both run: the portable subshell calls `drain_completed_parallel_command` twice, the Darwin subshell calls `drain_completed_darwin_command_cohort` twice, and the assertions read what those calls wrote. Each keeps a `# shellcheck disable=SC2329` naming the indirect call site. The `gate_run_id` write keeps a `# shellcheck disable=SC2030` naming the sourced file whose reads shellcheck pairs it with. The other three were dead. Both fixtures set `active_timeout_records=()`, so the lifted teardown returns before its descendant walk and never enters the Darwin exact-identity terminate loop. The same probe recorded zero calls to `collect_process_tree` (defined in both subshells) and `gate_darwin_exact_identity_terminate`. Deleting them removes three of the six findings outright instead of waiving them; a comment at each site records why no stub is needed and when one would be. The regression still binds: with the gate's per-worker `gate_drain_active_mapped_command` assignment mutated away, the test fails with "the teardown named './tools/trunk check --ci x' for the first worker". The operator gave explicit consent on 2026-09-03 to edit this file even though it is the quality gate's own test suite. Closes #2252 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01McsUkrwYBL6oC7CdZCCsc4 * fix(gate): correct the deletion-site comments and pin the SC2030 waiver Review of the previous commit found two defects in what it added. Both are in `run_teardown_drain_command_identity_regression`; neither changes behaviour. The Linux deletion-site comment named the wrong mechanism. It said the teardown "returns before its descendant walk", but on that path the guard at `scripts/agent-quality-gate.sh:1508-1513` returns only when every registry is empty, and the fixture sets `active_worker_pgids=(4000001 4000002)`. Execution reaches the walk. `collect_process_tree` goes uncalled because `roots` is built only from `active_timeout_records`, which the fixture leaves empty, so the loop iterates zero times. A maintainer trusting the old wording would conclude that nothing after the guard runs. The comment now names `roots`. The SC2030 waiver was positional. shellcheck reports one SC2030 per variable and currently attributes it to the Darwin `gate_run_id` write, which carries the disable. The identical write in the Linux fixture had none, and was quiet only because the Darwin one absorbed the finding. Deleting the Darwin assignment moves the finding to that unprotected line: verified before this change (`SC2030` at 6586) and after it (clean). Since the point of this PR is to keep the required Code Quality check green, the directive is now mirrored onto both writes so a later edit to either fixture cannot re-red it. The Darwin restore-guidance also named `collect_process_tree` as a stub to put back. That path returns at `scripts/agent-quality-gate.sh:1679` before the walk whether or not records exist, so only the terminate stub could ever be needed there; restoring the other would re-raise SC2329. Validation: `shellcheck -x` clean; `./tools/trunk check --ci` clean on the file; the lifted regression still passes with the same stub-invocation counts (2/2/0/0); and it still fails under the mutated gate that drops the per-worker mapped-command assignment. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01McsUkrwYBL6oC7CdZCCsc4 --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* origin/main: fix(gate): mirror the SC2030 waiver onto the Linux fixture and correct two teardown comments (#2254) docs(sweep): groom the backlog queue and refine pkg:tooling independence (#2233) chore(coderabbit): stop incremental reviews to cut add-on spend (#2236) fix(deps): pin fast-uri to 3.1.6 for four new high advisories (#2249)
The Problem
Code Qualitycheck was red onmainand on every open PR, blocking merges repo-wide for reasons unrelated to any PR's diff. Two independent defects were stacked behind it, and the second was invisible: the job runs itspnpm auditsteps beforeRun Trunk, so it died at the first audit step and never reached Trunk.fast-uri3.1.5: GHSA-5jgf-p345-68v8 (host confusion via skipped IDN canonicalization), GHSA-f65p-4m7j-42xc (SSRF via malformed IPv6 normalization), GHSA-fph4-wmhf-6fwf (SSRF via repeated hostname percent-decoding), and GHSA-jqff-g426-hqxp (host confusion via percent-encoded scheme normalization).ajvpullsfast-uriinto all four dependency roots."fast-uri@<3.1.5": 3.1.5, added to escape GHSA-7p8r-x3mc-p8w7. That clause is satisfied by 3.1.5 itself, so the override actively held the graph on the version the four new advisories hit. This was a stale override, not a missing one.The Solution
Raise the existing clause to
"fast-uri@<3.1.6": 3.1.6in all four dependency roots and refresh all four lockfiles, so every root resolvesfast-uri@3.1.6— the first patched release on the 3.x line for all four advisories. The repo stops shipping a URI parser with two SSRF and two host-confusion holes into the Cloud Functions that parse webhook payloads.The clause is replaced, not supplemented: a second
<3.1.6override alongside the old<3.1.5one would leave the two fighting over the same package. The floor stays on the 3.x line becauseajv8, the only consumer here, depends onfast-uri^3; npmlatestis 4.1.4 and moving there would be a major bump of a transitive dependency with no advisory benefit.The second defect, cleared in the same PR. Fixing the audit steps let
Code QualityreachRun Trunkfor the first time since #2228 merged, and it failed there with 6 shellcheck findings inscripts/agent-quality-gate.test.sh(4x SC2329, 1x SC2030). Because the audit runs first, neither fix could turn the check green alone. This PR carries both, which is why it also closes #2251. The shellcheck half is narrow and per-block, not a rule-wide exemption: each# shellcheck disablenames the indirect invocation that justifies it, and three flagged stubs were genuinely dead and got deleted rather than suppressed, with a comment recording when a future fixture would need them back.Material limit: this pins a floor, not a ceiling. If a fifth advisory lands on 3.1.6 the same trap recurs, because the override that escapes an advisory is the thing that later holds the graph on the vulnerable version. Nothing here detects that automatically; the audit gate catching it on the next PR is the mechanism, as it was here.
Details
pnpm-workspace.yaml,governance-watchdog/pnpm-workspace.yaml,alerts/infra/oncall-announcer/pnpm-workspace.yaml, andalerts/infra/onchain-event-handler/pnpm-workspace.yaml. Each comment names the four new GHSAs, the superseded GHSA-7p8r-x3mc-p8w7 floor, and theajvconstraint that keeps the pin on 3.x.undicifailure recorded at the top ofpnpm-workspace.yaml(fix: pin undici to 7.24.2 to restore governance-watchdog Discord delivery #831/Upgrade discord.js to restore undici 8.x compatibility in governance-watchdog #833/Cap or scope the root undici override (>=6.24.0) to prevent another forward-resolution to 8.x #837).fast-uriwas already inminimumReleaseAgeExcludein all four roots, so the 4320-minute release-age gate did not block a same-day security release. No new exclusion was needed.ajv:.>@google-cloud/functions-framework>cloudevents>ajv>fast-uri,.>@google-cloud/functions-framework>cloudevents>ajv-formats>ajv>fast-uri,.>env-schema>ajv>fast-uri.fast-urichange is pnpm recording adeprecated:metadata field oneslint@9.39.4in three lockfiles. The version and integrity hash are unchanged; the registry added that notice upstream and re-resolution picked it up. No package version moved.docs/pr-checklists/recurring-review-patterns.md. Its supply-chain section told reviewers thatalerts/infra/*carry apackage.jsonoverridesblock pinning an olderfast-uri; fix(alerts-infra): bound standalone security overrides #1849 removed those blocks, and the files have nooverrideskey today. The surviving point — pnpm 11 ignores apackage.jsonoverridesblock — is kept.Validation
pnpm-audit-high-gate.mjsgates (.,governance-watchdog,alerts/infra/oncall-announcer,alerts/infra/onchain-event-handler) reportno high/critical pnpm advisories, both locally and inside the requiredCode Qualityjob. This proves the advisory database returns nothing high or critical for these lockfiles; it does not prove they stay clear as new advisories publish.pnpm-audit-high-gate.test.mjs9 passed,alerts-uuid-overrides.test.mjs2 passed,lockfile-lint.test.mjs64 passed,version-skew-check.test.mjs5 passed,override-prune-report.test.mjs26 passed.lockfile-lint.mjsat the root and each standalone root: integrity hashes valid, no custom registry, no unbounded override floors.pnpm install --frozen-lockfileat the root and--frozen-lockfile --lockfile-onlyin each standalone root: each lockfile matches its workspace file.grep -rn fast-uriacross every lockfile and workspace file: no3.1.5residue.fast-uri:governance-watchdog108 passed / 17 files,alerts/infra/onchain-event-handler125 passed / 18 files,alerts/infra/oncall-announcerpassed.turbo run lint typecheckacross those three: 6 tasks successful. These prove the services build, lint and pass their own suites on 3.1.6; none exercises the changed URI-parsing paths directly, so they do not prove behavioural equivalence between 3.1.5 and 3.1.6 for adversarial URIs../tools/trunk check --ci --allclean, andGATE_TEST_FOCUS=coordinator bash scripts/agent-quality-gate.test.shexit 0 — the family that defines and invokesrun_teardown_drain_command_identity_regression, the fixture the shellcheck half edits. That fixture's assertions hold; no negative control was run against them, so this does not prove they would still catch a regression. CI'sLint + test root scriptsjob runs the whole suite.codex-review.shagainstorigin/mainreturned PASS with zero findings in all three tiers. Claude's auto-review returned LGTM with an empty findings roll-up. CodeRabbit did not review this PR — it hit the org's usage spending cap and reportedReview limit reached, so this PR has no CodeRabbit coverage.pnpm agent:quality-gate --runnever executed. The machine-wide gate coordinator was serving from a deleted worktree path, so itsauthorityprobe returnedENOENT, no client could join, and it held~/.cache/agent-quality-gate/run.lockpermanently — every gate run fell back to the legacy lock and timed out. The--no-lockescape hatch would have unblocked this PR's own work by weakening a control, whichdocs/notes/pr-operating-card.mdforbids without recorded operator consent, so the mapped checks above were run individually instead. The dashboard, indexer, aegis, metrics-bridge, integration-probes and Terraform surfaces the gate would also have mapped were covered by CI on this PR, not locally.Deferrals
Closes #2248
Closes #2251
Correction: after this PR merged, an automated session briefly edited this description to describe folding in
fix/2252-gate-test-shellcheck, acting on stale state. That fold never happened here — the shellcheck fix was already included before merge. This description has been restored to describe what actually merged. PR #2254 remains open and is not superseded; see the comment thread.🤖 Generated with Claude Code
https://claude.ai/code/session_01McsUkrwYBL6oC7CdZCCsc4