Pin action versions, add Dependabot cooldown and npm release age - #217
Merged
Conversation
Addresses 15 Bastion SAST findings in this repo's CI and package config. Mutable action tags (13 findings, CWE-1357/353, OWASP A08). All 14 third-party `uses:` refs now name an exact version instead of a floating major or a branch: actions/checkout@v4 -> v4.4.0 actions/github-script@v6 -> v6.4.1 pnpm/action-setup@v4 -> v4.3.0 peter-evans/repository-dispatch@v2 -> v2.1.2 peter-evans/slash-command-dispatch@v3 -> v3.0.2 peter-evans/create-or-update-comment@v2 -> v2.1.1 cycjimmy/semantic-release-action@v4 -> v4.2.2 jwalton/gh-find-current-pr@master -> v1.3.5 Two were tracking branches rather than versions. semantic-release-action has no v4 tag, so `@v4` resolved to a branch head, which happens to equal tag v4.2.2 — identical code, no longer a moving ref. gh-find-current-pr@master is 2 commits ahead of its latest release, so v1.3.5 is a small change; its action.yml at that tag still provides the `state` input and `number` output this workflow uses. Dependabot cooldown (1 finding, CWE-829). `cooldown: default-days: 7` plus a github-actions ecosystem entry so the pins above get bumped rather than silently going stale. npm minimum release age (1 finding, CWE-829). `.npmrc` gains `min-release-age=7` as the rule asks, plus pnpm's `minimum-release-age=7`. Both are inert at the pinned pnpm 9.15.9 (the setting landed in pnpm 10.16 / npm 11.10) and take effect once the toolchain moves. Version tags stay mutable, so the tag findings do not satisfy the Semgrep github-actions-mutable-action-tag rule, which wants a 40-char SHA. That is a deliberate tradeoff. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
smendes
approved these changes
Aug 13, 2026
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.
Addresses all 15 high-severity Bastion SAST findings on this repo. Three rules.
1. Mutable action tags — 13 findings
CWE-1357 / CWE-353, OWASP A08. All 14 third-party
uses:refs now name an exact version:actions/checkout@v4@v4.4.0actions/github-script@v6@v6.4.1pnpm/action-setup@v4@v4.3.0peter-evans/repository-dispatch@v2@v2.1.2peter-evans/slash-command-dispatch@v3@v3.0.2peter-evans/create-or-update-comment@v2@v2.1.1cycjimmy/semantic-release-action@v4@v4.2.2jwalton/gh-find-current-pr@master@v1.3.5Two were tracking branches, not versions
cycjimmy/semantic-release-action@v4— that repo has nov4tag, so the ref resolved to a branch namedv4, i.e. a moving head on the action that cuts releases. Tagv4.2.2points at the identical commit (16ca923e), so this is behaviour-neutral.jwalton/gh-find-current-pr@master— the only ref where the pin is a genuine change: master sits 2 commits ahead of the latest release, sov1.3.5moves this onto published code. I checkedaction.ymlat that tag still provides thestateinput andnumberoutput this workflow uses.The commented-out
slackapi/slack-github-action@v1at line 183 was left alone.Why this doesn't clear the rule
Semgrep wants a 40-character commit SHA. Woosmap policy is exact version tags, so these are recorded as accepted risk in Bastion rather than fixed. Items 2 and 3 cover the same threat from the other direction.
2. Missing Dependabot cooldown — 1 finding
CWE-829.
cooldown: default-days: 7on the npm entry, plus agithub-actionsecosystem entry so the pins above get bumped rather than silently going stale. The github-actions entry is additive — happy to drop it if you'd rather not have action-bump PRs.3. Missing npm minimum release age — 1 finding
CWE-829.
.npmrcgainsmin-release-age=7as the rule asks, plusminimum-release-age=7, which is pnpm's spelling.Be aware this is inert today. All three workflows pin pnpm
9.15.9, and the setting landed in pnpm 10.16 / npm 11.10. Unknown keys are ignored by pnpm 9 so there's no risk in landing it now, and it activates the moment the toolchain moves — but if you want the delay actually enforced, pnpm needs bumping to ≥ 10.16. That's a toolchain upgrade, so I kept it out of a config-only change.Risk and rollback
Only
uses:refs,dependabot.ymland.npmrcchanged — no workflow inputs, triggers, or job logic. All six workflow files anddependabot.ymlverified as parseable YAML; all eight version tags confirmed to resolve upstream. The release, slash-command and schema-notification paths run post-merge rather than on this PR. Rollback isgit revertof this commit.🤖 Generated with Claude Code