feat(harden): analyze workflow files and cover Bundler cooldown - #86
Merged
Merged
Conversation
R-SEC-09 reads as CodeQL over application code. A repository whose own language no analyzer supports is reported outside the rule, and nothing examines its workflows. Workflow files are source in an analyzed language: CodeQL ships `actions`, and zizmor reads the same files. Step 11 now counts them. A new rule was discarded. Three rules already require what a workflow analyzer checks. A rule requiring the tool would fail a repository that pins by hand and satisfies all three. The RubyGems reference gains Bundler's `cooldown` and the install-time execution R-SEC-15 excludes. Both were verified against Bundler 4.0.17's own manual pages and changelog. One correction rides along, found while writing the cooldown section. `bundle gem` ignores `/.bundle/`, so the frozen setting the reference told a reader to write is committed nowhere and reaches no CI checkout.
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 changed
actionslanguage has been generally available since April 2025, and default setup enables it only once workflow files sit on the default branch, while advanced setup needsactionsin the matrix.zizmor-actionv0.6.2, and maps its audits onto five rules this kit already owns:unpinned-uses,stale-action-refs, andimpostor-commitonto R-SEC-01,excessive-permissionsonto R-SEC-02,template-injection,github-env, anddangerous-triggersonto R-SEC-07,dependabot-cooldownonto R-SEC-14, anduse-trusted-publishingonto R-PUB-02.cooldown, which has existed since Bundler 4.0.13 and which no file here covered.bundle config set --local frozen truewrites the setting where a reviewer and CI can read it.Why this way
No new rule.
STANDARD.mdscores observable properties, and R-SEC-01, R-SEC-02, and R-SEC-07 already require what a workflow analyzer checks. A rule requiring the tool would fail a repository that pins by hand and satisfies all three, and would cost a rule-sources entry, a drift pass, and a site page for coverage R-SEC-09 already carries.zizmor is a GitHub-side recommendation and
references/gitlab.mdgains nothing. It reads GitHub Actions, Dependabot, and pre-commit configurations, and does not read.gitlab-ci.yml.The frozen correction shares a root cause with the cooldown section, so one fix covers both.
bundle gemgenerates a.gitignorewhose first line is/.bundle/. On a gem skeleton that file is committed nowhere, so the setting is invisible to a reviewer and absent from every checkout CI makes. That is also why the cooldown section prefers theGemfileform tobundle config set cooldown.Verification
Every Bundler claim comes from
bundle installandbundle configon Bundler 4.0.17 and from the Bundler changelog, read locally rather than from a documentation site. That is where the 4.0.13 introduction, the three precedence layers, thecreated_atdependency, and the 4.0.15 lockfile exemption come from. The/.bundle/ignore line was confirmed by generating a skeleton withbundle gem.The
zizmor-actionv0.6.2 SHA was resolved throughgh api repos/zizmorcore/zizmor-action/git/ref/tags/v0.6.2and matches the SHA the action's own README publishes. The audit identifiers come from zizmor's audit reference, and the SARIF upload default andversion: latestdefault from the action's README.The BufferZoneCorp campaign was verified against Socket's research, which names
extconf.rbas the install-time path.Beyond the CI checks:
node skills/oss-writing/scripts/prose.mjsover all four files reports 0 findings, the site builds 114 pages, andskillspectorexits 0 with the same result as the base branch.Known gaps
The
versioninput still floats atlatestin the snippet, which the prose names as a gap for the reader to close rather than pinning for them. Pinning it here would date the file at every zizmor release.Affects
.bundle/configcorrected