Skip to content

fix(pr-unblock): treat a vendor action tag bump as a pin swap - #18605

Merged
kyle-sexton merged 3 commits into
mainfrom
fix/vendor-tag-automerge
Nov 23, 2026
Merged

kyle-sexton merged 3 commits into
mainfrom
fix/vendor-tag-automerge

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Closes #18604

Summary

Official vendor actions are referenced by major tag (spec #18556). The review-dependency verdict job's pinSwapRefusal passed only full-SHA swaps, so a Dependabot bump like actions/checkout@v7 to @v8 escalated dependency-workflow-unpinned to a person even after a merge verdict. This counts a vendor tag-to-tag bump as a pin swap, so it takes the same merge-marker path a SHA swap does.

Fix

  • dependency-classify.mjs: new VENDOR_ACTION_OWNERS (actions, github, dependabot, microsoft, azure, anthropics, openai, matched in any case) and a TAGGED_USES shape (@vN, @vN.N, @vN.N.N). A changed uses: pair passes when both sides are full SHAs (as before) or both sides are version tags of a vendor action. Indent, key and action path must still match. Anything else returns not-a-full-sha-or-vendor-tag (was not-a-full-sha; no consumer reads the suffix).
  • Unchanged: a vendor tag moved to a branch, a non-version tag or a SHA; a vendor SHA moved to a tag; any third-party or melodic-software/* ref off a full SHA; any run: edit or added or removed line.
  • Docs: the pin-swap rule in docs/conventions/pr-pipeline/README.md and pr-run-activity.md, the dependency-workflow-unpinned route text in escalation-routes.json, and a pr-pipeline patch changelog fragment.
  • Based on main: ci: reference first-party actions at main and vendor actions by major tag #18531 (which moves the workflows to vendor tags) is still open. This change touches only the classifier, its tests and the rule's docs, so it does not depend on ci: reference first-party actions at main and vendor actions by major tag #18531.

Verification

  • node --test --test-concurrency=4 on dependency-classify.test.mjs and apply-dependency-verdict.test.mjs: 120 pass, 0 fail. The new tests cover: vendor tag to tag passes (all seven owners, Azure and azure, a trailing version comment); vendor tag to branch, to a pre-release tag, to a SHA, SHA to tag, and a path change escalate; third-party SHA to tag, third-party and first-party tag to tag, and the look-alike owner actions-evil escalate; a vendor bump mixed with a third-party SHA-to-tag change, an added run: line, or a run: edit escalates.
  • All .github/scripts/pr-unblock/*.test.mjs plus pr-merge/clear-escalations.test.mjs: everything passes except feedback-dispatch.test.mjs "ownerAdoption reads the base adoption section...", which reads repository config (idleHours) and imports none of the files changed here.
  • Biome 2.6.8 lint on the two changed scripts: one warning, at dependency-classify.mjs:133, on a line this change does not touch.
  • scripts/check-changelog-fragments.sh --check and --check-required origin/main: clean.

Loosened checks

  • review-dependency verdict job, pinSwapRefusal / dependency-workflow-unpinned. Before: a Dependabot change to a workflow or action file got the merge marker only when every changed uses: line moved from one full SHA to another. Now an official vendor action (owners above) moving from one version tag to another, same action path and indent, also passes.
  • Reason: owner decision "Action pinning (D3)", architecture docs/owner-decisions.md L351, 2026-11-23: no pin on official vendors, and pinned refs still "flow automatically through Dependabot and cooldowns". The person-hold on our own bot's vendor bump is a workflow gate, not a security control. Spec: Auto-merge Dependabot bumps of official vendor action tags like full-SHA pin swaps #18604.
  • What still guards it: the review-dependency model verdict must be merge; commit provenance and pushRefusal are unchanged; third-party actions still need a full-SHA swap; the vendor list is exact-owner, so a look-alike owner does not match.

Related

🤖 Generated with Claude Code

A Dependabot bump of an official vendor action from one version tag to
another (actions/checkout@v7 -> @v8) escalated dependency-workflow-unpinned
to a person even after a merge verdict, because pinSwapRefusal passed only
full-SHA swaps. Vendor actions are referenced by major tag (owner decision,
architecture docs/owner-decisions.md L351), so such a bump now counts as a
pin swap. A vendor tag moved to a branch or SHA, any third-party or
first-party ref off a full SHA, and any other workflow edit still escalate.

Closes #18604

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

chatgpt-codex-connector Bot commented Nov 23, 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-23T22:45:46.048042Z 7a8f846 PR opened
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7a8f846c80

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

kyle-sexton and others added 2 commits November 23, 2026 17:50
The vendor tag tests fed pinSwapRefusal hand-built patches whose hunk
header always declared three lines. Each patch is now git's own unified
diff between a before and after workflow file, from the first hunk
header on, as GitHub's files listing serves it. Same cases.

Refs: #18604

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The fixture-git-isolation check requires every git call in a suite to
see GIT_CONFIG_GLOBAL and GIT_CONFIG_NOSYSTEM, so the host's global and
system config cannot change the diff.

Refs: #18604

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

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

Security review: PR #18605 at 47e67e6

I read all six changed files in full: the changelog fragment, dependency-classify.mjs, its tests, escalation-routes.json, and the two convention docs. I found no security issues.

What changed. pinSwapRefusal now counts a second kind of uses: change as a pin swap: an action owned by a vendor in VENDOR_ACTION_OWNERS moving from one version tag to another, where both sides match TAGGED_USES (vN, vN.N or vN.N.N). Previously only a swap from one full SHA to another counted (dependency-classify.mjs#L225-L228, #L264-L269).

Owner threat model. This narrows the dependency-workflow-unpinned hold, which is a pin-ceremony friction hold. Under the owner's throughput-phase decision that is not a finding, so it gets this one line and holds nothing.

What I checked to confirm nothing else widened:

  • Paths still have to match. The action path and the indent/key must still be identical on both sides (L269). A Dependabot change cannot point a uses: line at a different owner or repository.
  • The vendor check is exact.
    • isVendorAction takes the first / segment, lowercases it, and requires an exact match against the list.
    • A look-alike owner such as actions-evil, a local ./ path, or a docker:// ref yields a first segment that is not on the list.
    • [^\s#@]+@ means the path cannot contain a second @.
  • Ref formats cannot be mixed. Both sides must be full SHAs, or both must be vendor tags. Tag to branch, tag to SHA, SHA to tag, and pre-release tags like v8-beta all still refuse.
  • Other workflow edits still escalate. Any non-uses: edit, or any added or removed line, escalates exactly as before (the checks for lines added or removed and for non-uses: lines are unchanged).
  • Not touched by this diff: the commit-provenance checks, pushRefusal, the requirement for a model merge verdict, the 3,000-file truncation hold, and CI Status's trust-gate ref_swap hold in pr-require-checks.yml.
  • No new trust in practice. A tag-to-tag bump on a vendor action keeps the same trust anchor as its base line, which was already a mutable vendor tag. No new actor is trusted, no token scope grows, and no untrusted text reaches a credentialed lane.

Test file. The new test runs git diff --no-index over temp files it writes itself, with global and system git config isolated. It takes no untrusted input.

Instruction surface and spend. The doc and route-text edits restate the new rule and remove no other guardrail. Nothing here spends credits or can bill.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

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

Code review: vendor action tag bumps count as a pin swap

This change widens pinSwapRefusal in .github/scripts/pr-unblock/dependency-classify.mjs. A changed uses: pair now passes when both sides are full SHAs, as before. It also passes when both sides are vN, vN.N or vN.N.N tags of an action owned by one of the VENDOR_ACTION_OWNERS (any letter case). Indent, key and action path must still match exactly.

I found no correctness defect in the new logic:

  • The pinned.every / tagged.every choice means a SHA-to-tag or tag-to-SHA pair never passes.
  • The owner match takes only the first path segment, so a look-alike owner such as actions-evil fails.
  • TAGGED_USES is anchored, so v8-beta, main and releases/v8 fail.
  • The vendor check applies to both sides. Since the path must be identical, vendor status cannot differ between the two sides.

I traced each new test by hand against the block parser (removed lines then added lines in one block, a context line ending the block). Each expected refusal string matches what the code returns. I did not run the tests. The PR's "120 pass" is the author's claim and I have not checked it.

Closing issue #18604, acceptance criteria: all five are met in the code, and each case has a test that would fail if it broke:

  • vendor tag to tag passes;
  • tag to branch, pre-release tag or SHA escalates, and SHA to tag escalates;
  • third-party SHA to tag escalates, and third-party and melodic-software/* tag to tag escalate;
  • a vendor bump beside a third-party change, a run: edit or an added line escalates.

The last criterion, that apply-dependency-verdict.test.mjs passes, is the author's claim and I have not checked it.

Finding (summary only: the line is unchanged in this PR)

  1. Stale comment. apply-dependency-verdict.mjs#L34 still says the merge path escalates dependency-workflow-unpinned when a workflow change "is not a full-SHA pin swap (pinSwapRefusal)". After this change, pinSwapRefusal also passes vendor tag-to-tag swaps. The PR updated every other description of this rule (the README, pr-run-activity.md, the escalation-routes.json "why" text and the function's own comment) but missed this header comment, so it now misstates the gate it describes. Fix: change it to read e.g. "is not a pin swap (full SHA to full SHA, or an official vendor's version tag to tag; pinSwapRefusal)".

Loosened checks

This loosens a check: kind 9, a check's own code changed so that it accepts more. Before, pinSwapRefusal accepted only SHA-to-SHA swaps. After, it also accepts vendor tag-to-tag swaps. It passes:

  • The closing issue (the spec) names this exact change and its scope, and the diff stays within that scope.
  • The spec cites the owner decision with a line link and quotes the owner's words.
  • The PR body's ## Loosened checks section also names it and gives a reason that holds.

The prompt had no loosened_check_verdict: or loosened_check_patterns: lines, so I used fail and no consumer entries. It also had no loosened_check_decision_record: line, so the citation requirement was not checked. The prompt carried no loosened_check_spec: line either, so whether the issue author is on the trusted-actor list was not checked.

Loosened checks would be marked: fail (bundled default; no wrapper lines); patterns: 0

Other notes

  • Security findings are left to the dedicated security lane.
  • As the PR notes, CI Status's trust-gate hold in pr-require-checks.yml still accepts only 40-hex ref swaps. That is outside this change's scope.
  • No settled threads; no prior findings (first review, not blocking only).
  • No embedded instructions found in the PR context.

Verifier dropped 0 of 1 candidates. (No verifier subagent was run; I checked the single candidate directly against the source.)

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit 5ca05fe Nov 23, 2026
80 of 81 checks passed
@kyle-sexton
kyle-sexton deleted the fix/vendor-tag-automerge branch November 23, 2026 23:32
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 23, 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.

Auto-merge Dependabot bumps of official vendor action tags like full-SHA pin swaps

1 participant