Repository navigation
release: v3.2.4 - broken refs + new validator to catch this class of bug - #10
Merged
Merged
Conversation
Three broken action references that actionlint and YAML parse both missed: 1. checkout-code wrapper only declared `fetch-depth` input, but THREE call sites pass `ref:` to it (update-release-pr/action.yml:57, reusable-bundle-size.yml:68, reusable-bundle-size.yml:99). GitHub rejects the workflow at parse time with "Invalid action input 'ref'". Fix: add `ref` input to checkout-code/action.yml as a thin pass-through to actions/checkout@v6. 2. aquasecurity/[email protected] — no such tag exists on the upstream repo (their latest is v0.36.0). Workflow startup failure with "Unable to resolve action ... repository or version not found". Fix: bump to @v0.36.0. 3. actions/dependency-review-action@v4 — no `v4` rolling tag exists. Upstream pins patches as v4.x.x (latest v4.9.0) but never created a `v4` rolling alias. Fix: pin to @v4.9.0. To stop us from shipping this class of bug again, add a custom CI validator under `scripts/validate-action-refs.mjs` that catches: - **Invalid local action inputs**: parses every action.yml in .github/actions/, then walks every `uses:` reference + its `with:` block in workflows + action.ymls, and errors when a passed input isn't declared by the called action. This is what would have caught bug 1. - **Nonexistent remote action versions**: for every `owner/repo@<ver>` reference, does a `curl HEAD` against the GitHub releases page + falls back to `git ls-remote --tags`. Errors when neither resolves. This is what would have caught bugs 2 and 3. Wired as a `Validate action refs` step in local-ci.yml between the existing actionlint check and the @v2-grep check. Same failure-surfacing pattern: `continue-on-error: true` + `$GITHUB_STEP_SUMMARY` section per finding + `::error file=...,line=...::` annotation. Summary table at the end of local-ci's job summary now has a new row. Self-contained (Node built-ins only); no `npm install` required. Verified locally: - Clean state: validator exits 0. - Simulated regression of bug 1 (drop `ref:` from checkout-code): caught. - Simulated regression of bug 2 (revert trivy to 0.28.0): caught. - Real bug 3 was found on the very first run.
The aquasecurity/trivy-action March 2026 supply-chain incident force- pushed 76 of 77 version tags to credential-stealing payloads. Only v0.35.0 was protected by GitHub's immutable releases feature (enabled March 4, before publish). - Pin reusable-container-scan to v0.35.0's commit SHA (the advisory's explicit recommendation — mutable tags can be re-compromised; SHAs are content-addressed). - Update validate-action-refs.mjs to recognize 40-char hex SHA pins and verify them via 'git ls-remote' so CI doesn't trip on the pin. - Sync stale 'v0.36.0 is current' examples in local-ci.yml comment and the validator's docblock. Audit results for this repo: - No setup-trivy references anywhere. - No callers of reusable-container-scan.yml from any workflow in this repo, so no compromised trivy code ever executed locally. - No tpcp-docs repo or similar exfiltration artifacts to look for. Advisory: https://github.com/aquasecurity/trivy-action/security/advisories
Shinrai
added a commit
that referenced
this pull request
May 21, 2026
* fix(release): refresh PR body when version already bumped on branch When the same branch receives a second release-worthy commit (e.g. a second fix:) after the bot already pushed its 'chore: bump version to X.Y.Z' commit, check-release-commit's early-exit was discarding the new commit from the changelog and PR body. Concrete failure: PR #10 on the v3 line — first push landed fix(actions); workflow updated the PR body with that commit and pushed 'chore: bump version to 3.1.2'. A later push added fix(security) — the workflow re-ran but exited at the 'already bumped to 3.1.2' check, skipping changelog regen + PR body refresh. The PR description never gained the fix(security) bullet, and the release notes (had we merged then) would have lost it too. Fix: - check-release-commit: new opt-in input 'allow-already-bumped'. When true, instead of exiting should-create-pr=false on duplicate target version, emit should-create-pr=true + bump-already-applied=true with all the usual outputs so downstream steps can refresh state. - update-release-pr: pass allow-already-bumped=true and split the step gates. Version-mutating steps (install, build, update-pkg, restore-src, commit) gate on bump-already-applied != 'true'. Body-refresh steps (range, changelog, PR description, labels) gate only on should-create-pr == 'true'. Callers create-release-pr and create-release are unchanged — they omit the new input (default 'false'), preserving the short-circuit behavior they actually want (nothing to create / nothing to publish when target is already bumped). The misleading 'Release Summary' that previously reported 'updated successfully' when nothing happened becomes accurate by construction: the body really does get updated now. * chore: bump version to 3.1.2 --------- Co-authored-by: Nate Corcoran <[email protected]> Co-authored-by: cldmv-bot[bot] <230771808+cldmv-bot[bot]@users.noreply.github.com>
Shinrai
added a commit
that referenced
this pull request
May 21, 2026
When the same branch receives a second release-worthy commit (e.g. a second fix:) after the bot already pushed its 'chore: bump version to X.Y.Z' commit, check-release-commit's early-exit was discarding the new commit from the changelog and PR body. Concrete failure: PR #10 on the v3 line — first push landed fix(actions); workflow updated the PR body with that commit and pushed 'chore: bump version to 3.1.2'. A later push added fix(security) — the workflow re-ran but exited at the 'already bumped to 3.1.2' check, skipping changelog regen + PR body refresh. The PR description never gained the fix(security) bullet, and the release notes (had we merged then) would have lost it too. Fix: - check-release-commit: new opt-in input 'allow-already-bumped'. When true, instead of exiting should-create-pr=false on duplicate target version, emit should-create-pr=true + bump-already-applied=true with all the usual outputs so downstream steps can refresh state. - update-release-pr: pass allow-already-bumped=true and split the step gates. Version-mutating steps (install, build, update-pkg, restore-src, commit) gate on bump-already-applied != 'true'. Body-refresh steps (range, changelog, PR description, labels) gate only on should-create-pr == 'true'. Callers create-release-pr and create-release are unchanged — they omit the new input (default 'false'), preserving the short-circuit behavior they actually want (nothing to create / nothing to publish when target is already bumped). The misleading 'Release Summary' that previously reported 'updated successfully' when nothing happened becomes accurate by construction: the body really does get updated now.
Shinrai
added a commit
that referenced
this pull request
May 21, 2026
The local-sync-release-prs.yml gate excluded PRs authored by cldmv-bot,
intended to 'avoid recursion'. The reasoning was wrong:
- sync-fan-out's only side effect is force-pushing a refreshed
'chore: bump version to X.Y.Z' commit onto each open release PR.
It never merges anything itself.
- A force-push to a release branch triggers Local Release PR + Local
CI, neither of which fire local-sync-release-prs.yml (which is
gated on pull_request closed). No recursion path exists.
Real-world impact of the bug: EVERY release PR is auto-opened by
cldmv-bot (the release flow creates them), so the gate fired 'skip'
on exactly the merges it was built for. Concrete symptom from PR #12's
merge (35 min ago): sync-fan-out fired and exited in 1s, leaving PR
#10's branch at its pre-merge state ('chore: bump version to 3.1.2'
even though master is now at 3.1.2 and PR #10's target should be
3.1.3).
Fix: drop the cldmv-bot exclusion. Keep the github-actions[bot] guard
as defensive — some workflows post merges under that identity and
genuinely shouldn't trigger fan-out.
Adds a one-line reminder above the pinned ref to re-verify against the upstream advisory before any future bump. No behavior change — purely a maintenance comment. Secondary effect: triggers a fresh release-flow run on this PR. The PR has been stuck at its pre-PR-#12-merge state ('chore: bump version to 3.1.2'), but master is now AT v3.1.2 — sync-fan-out should have re- calculated this PR's target to 3.1.3 when PR #12 merged, except its gate skipped because PR #12 was authored by cldmv-bot (the fix for that gate is in PR #11, not yet on @V3). Pushing this commit triggers local-release.yml directly, which calls update-release-pr@v3 — and that code DOES have the gate fix from PR #12. Expected: a new 'chore: bump version to 3.1.3' commit gets force-pushed onto this branch, the PR body refreshes with the security fix entry, and the title goes from 'release: v3.1.2' to 'release: v3.1.3'.
Adds a one-line note to the docblock showing how to run the validator ad-hoc from a developer shell (matches how CI runs it). No behavior change. Secondary effect: triggers local-release.yml to fire on this PR again. After PR #11's v3.2.0 merge, @V3 now includes the title-suffix output and the broadened bot-author filter for the changelog. Expected on this push: - PR title updates from 'release: v3.1.3' to 'release: v3.1.3 - broken refs + new validator to catch this…' (title-suffix derived from first fix commit in the branch). - PR body refreshes without ANY bot-trail commits — the bot bump commits, release commits, and merges all get filtered out by isBotCommit. Only the human-authored fix(security), fix(actions), and these chore docs/maintenance commits should appear.
The 'replace' mode used PUT /issues/N/labels with the full desired set. Semantically correct (the result is the right set), but GitHub emits a remove + add activity event for EVERY label in the new set — even ones that already matched the current set. Symptom on PR #10 (visible in your activity log): - 'added area: core type: ci type: config and removed type: ci type: config area: core labels' (net change: 0) Each release-PR refresh painted the same three labels off and back on, flooding the timeline. Fix: GET the PR's current labels, compute the symmetric difference: - toAdd = desired - current (labels not yet present) - toRemove = current - desired (labels no longer wanted) If both are empty → zero API calls, zero activity events. Otherwise: - Per-label DELETE for each label being removed (one event each). - Single batched POST for all additions (one event per added label). URL-encodes label names in the DELETE path so labels with colons, spaces, or slashes (e.g. 'type: ci', 'priority: high') don't break the endpoint.
Shinrai
added a commit
that referenced
this pull request
May 21, 2026
## 🚀 What's Changed ### 💥 Breaking Changes _No breaking changes_ ### ✨ Features _No new features_ ### 🐛 Bug Fixes - fix(actions): declare ref input on checkout-code (matches PR #10's fix) (a18df4e) - fix(audit): allow ' - <subject>' suffix on release commits (c804026) ### 🔧 Other Changes _No other changes_ <details> <summary>👥 Contributors</summary> - @Shinrai </details> --------- Co-authored-by: Nate Corcoran <[email protected]> Co-authored-by: cldmv-bot[bot] <230771808+cldmv-bot[bot]@users.noreply.github.com>
…race Real-world failure traced from PR #10's logs: when a release PR merges to master, two workflows fire in parallel — 🏷️ Update Major Version Tags (rolls @V3 to the new commit) and 🔄 Local Sync Open Release PRs (refreshes every open release PR). If sync-fan-out resolves its `uses: ...@v3` refs BEFORE tag-update lands the new @V3, it pulls the PREVIOUS release's code. Concrete symptom: checkout-code without the `ref:` input declared (fixed in PR #17). update-release-pr's checkout step then ignores the `ref: ${{ inputs.head-ref }}` input, falls through to actions/checkout's default = github.ref = refs/heads/master, checks out master instead of the release branch, runs find-divergence on master vs master, gets 0 commits in range, and silently exits without refreshing the PR. Every release merge from PR #11 onward hit this race; PR #10 was visibly stuck behind master as a result. Fix: add a wait-for-tags job at the head of the dependency chain. Polls refs/tags/v3 against github.sha (the merge commit) every 5 seconds for up to 2 minutes. enumerate now `needs: wait-for-tags`; refresh transitively waits via enumerate. If @V3 never advances (non-release merges where Update Major Version Tags doesn't fire), the poll times out and downstream jobs proceed — that's the right behaviour, since @V3 wouldn't have moved anyway. User-visible: future release-PR merges will see sync-fan-out fire ~30–60s later than before, but with action code that actually matches the just-merged master state. The release PRs in flight finally get their bumps recalculated against the new base. This also pushes a commit to PR #10, re-triggering its release flow. Since @V3 has now rolled forward to v3.2.3 (with the ref input declared), this run will check out PR #10's branch correctly and recalculate target = patch(3.2.3) = 3.2.4.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 What's Changed
💥 Breaking Changes
No breaking changes
✨ Features
No new features
🐛 Bug Fixes
🔧 Other Changes
👥 Contributors