harden(ci): SHA-pin actions, scope permissions, add dependabot cooldown - #4
Merged
Merged
Conversation
Closes the 8 open zizmor code-scanning alerts on main:
ci.yml (was completely unhardened):
- pin actions/checkout, setup-python, upload-artifact to commit SHAs
with version comments (unpinned-uses x3, ref-version-mismatch-safe)
- add top-level `permissions: {}` + job `contents: read` (excessive-permissions)
- add `persist-credentials: false` to checkout (artipacked)
zizmor.yml:
- fix codeql-action/upload-sarif pin: the comment said v3.35.5 but the SHA
f411752... does not exist in github/codeql-action (422) -> the SARIF
upload step was silently unresolvable. Corrected to the real v3.35.5 SHA
458d36d... (ref-version-mismatch)
dependabot.yml:
- add `cooldown: { default-days: 7 }` to both updaters so freshly published
(potentially compromised) releases are not pulled in immediately
(dependabot-cooldown x2)
Same action major versions as before (v4/v5/v4) -> zero behavior change,
just supply-chain hardening. Verified locally: `zizmor v1.25.2 .github/`
reports no findings.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Was & Warum
Schließt die 8 offenen zizmor Code-Scanning-Alerts auf
main.ci.ymlwar als einziger Workflow nie gehärtet.# vX.Y.Z)permissions: {}+ Jobcontents: readpersist-credentials: falsean checkoutcooldown: default-days: 7in beiden UpdaternKritischer Nebenbefund
Der codeql-action-Pin in
zizmor.ymltrug Kommentar# v3.35.5, aber die SHAf411752…existiert gar nicht ingithub/codeql-action(API 422). Der SARIF-Upload-Step war still unauflösbar. Korrigiert auf echte v3.35.5-SHA458d36d….Risiko
Gleiche Action-Major-Versionen wie zuvor (v4/v5/v4) → kein Verhaltens-Change, reine Supply-Chain-Härtung.
Verifikation
Lokal
zizmor v1.25.2 .github/→ No findings to report.🤖 Generated with Claude Code