Skip to content

harden(ci): SHA-pin actions, scope permissions, add dependabot cooldown - #4

Merged
marcohost33-maker merged 1 commit into
mainfrom
harden/workflows-sha-pin-permissions
May 24, 2026
Merged

harden(ci): SHA-pin actions, scope permissions, add dependabot cooldown#4
marcohost33-maker merged 1 commit into
mainfrom
harden/workflows-sha-pin-permissions

Conversation

@marcohost33-maker

Copy link
Copy Markdown
Owner

Was & Warum

Schließt die 8 offenen zizmor Code-Scanning-Alerts auf main. ci.yml war als einziger Workflow nie gehärtet.

Alert Datei Fix
unpinned-uses ×3 ci.yml checkout/setup-python/upload-artifact auf Commit-SHA gepinnt (+ # vX.Y.Z)
excessive-permissions ci.yml top-level permissions: {} + Job contents: read
artipacked ci.yml persist-credentials: false an checkout
dependabot-cooldown ×2 dependabot.yml cooldown: default-days: 7 in beiden Updatern
ref-version-mismatch zizmor.yml codeql-SHA korrigiert

Kritischer Nebenbefund

Der codeql-action-Pin in zizmor.yml trug Kommentar # v3.35.5, aber die SHA f411752… existiert gar nicht in github/codeql-action (API 422). Der SARIF-Upload-Step war still unauflösbar. Korrigiert auf echte v3.35.5-SHA 458d36d….

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

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>
@marcohost33-maker
marcohost33-maker merged commit 1868153 into main May 24, 2026
6 checks passed
@marcohost33-maker
marcohost33-maker deleted the harden/workflows-sha-pin-permissions branch May 24, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant