ci: supply-chain & secrets hardening — SHA-pin actions, Dependabot, zizmor, gitleaks (closes #11)#20
Merged
Conversation
The workflows were the least-hardened surface in the org (this repo ships no app dependencies). Bring them in line with pithead/rigforge. - Pin all GitHub Actions by commit SHA with `# vX.Y.Z` comments (checkout v6.0.3, configure-pages v6.0.0, upload-pages-artifact v5.0.0, deploy-pages v5.0.0); add `persist-credentials: false` on checkouts. - deploy.yml: scope permissions per-job — the build job is read-only; only the deploy job gets pages:write + id-token:write (was repo-wide). Pass the Pages base_url via env instead of inline expansion (template-injection). - .github/dependabot.yml: track the github-actions ecosystem (weekly, grouped) to keep the SHA pins current. - .github/workflows/security.yml: gitleaks full-history secret scan + zizmor workflow audit (online advisory cross-check), mirroring rigforge. - .pre-commit-config.yaml: gitleaks hook pinned in lockstep with CI; document it in CONTRIBUTING under "Secret scanning". Verified locally: gitleaks reports no leaks across history; zizmor reports no findings on the workflows. Co-Authored-By: Claude Opus 4.8 (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.
Resolves #11 — the same supply-chain hardening pithead/rigforge already have, sized to this repo. This repo ships no app dependencies, so the surface is the workflows themselves, which were the least-hardened in the org.
What this does
1. Pin every Action by commit SHA (with
# vX.Y.Zcomments, mirroring rigforge):actions/checkoutdf4cb1c…# v6.0.3actions/configure-pages45bfe01…# v6.0.0actions/upload-pages-artifactfc324d3…# v5.0.0actions/deploy-pagescd2ce8f…# v5.0.0Plus
persist-credentials: falseon checkouts (zizmor: artipacked).2. Scope
deploy.ymlpermissions per-job — the build job is now read-only; only the deploy job carriespages: write+id-token: write(was granted repo-wide). Also pass the Pagesbase_urlviaenv:instead of inline expansion (template-injection).3.
.github/dependabot.yml— tracks thegithub-actionsecosystem only (weekly, grouped rollup) to keep the SHA pins current and surface advisories. No pip/npm/docker ecosystems exist here; Hugo iswget-pinned and stays manual (#15).4.
.github/workflows/security.yml— two gates, mirroring rigforge:5.
.pre-commit-config.yaml— gitleaks hook pinned in lockstep with CI, documented in CONTRIBUTING under Secret scanning.Verified locally
gitleaks git . --redact→ no leaks across all 19 commits of history (so the new gate is green, not red on its own PR).zizmor .github/workflows/→ no findings.Acceptance (#11)
# vX.Y.Zcomments.github/dependabot.yml(github-actions) live🤖 Generated with Claude Code