Skip to content

ci: harden docs.yml and release.yml from the chant audit (#287) - #289

Merged
lex00 merged 1 commit into
mainfrom
ci-hardening-287
Aug 10, 2026
Merged

ci: harden docs.yml and release.yml from the chant audit (#287)#289
lex00 merged 1 commit into
mainfrom
ci-hardening-287

Conversation

@lex00

@lex00 lex00 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Clears the workflow-hardening half of #287 (the dependabot npm alerts stay a separate lane).

  • docs.yml — the audit's soft spot:
    • GHA021/GHA029: checkout, setup-node, upload-pages-artifact, deploy-pages pinned to full commit SHAs (same idiom ci.yml and release.yml already use); the SHAs are what v6/v6/v3/v5 resolve to today.
    • GHA034: pages: write + id-token: write move from workflow-wide onto the deploy job. The build job — the one that runs on every PR — now has only contents: read.
    • GHA022: timeout-minutes: 10 on deploy.
  • release.yml — GHA026: the publish job gets environment: release. GitHub creates the environment on first run; protection rules (required reviewers, wait timers) can then be attached in repo settings without touching the workflow, and the npm trusted-publisher record can name the environment to reject publishes from outside it.

The PR's own docs run exercises the pinned build path (deploy is gated off pull_request). release.yml can be rehearsed post-merge with gh workflow run release.yml — dispatch runs everything but the tag-gated publish steps.

Closes #287

🤖 Generated with Claude Code

https://claude.ai/code/session_01JD1XEfzQByQEP29dMhJgvz

docs.yml: pin all four actions to full commit SHAs (GHA021/GHA029), move
the pages+id-token write grants from workflow-wide onto the deploy job
(GHA034), and give deploy a timeout-minutes (GHA022). release.yml: gate
the publish job behind an `environment: release` (GHA026) so protection
rules can be attached in repo settings, and the npm trusted-publisher
record can pin to it.

Closes #287

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JD1XEfzQByQEP29dMhJgvz
@lex00
lex00 merged commit a3f99f2 into main Aug 10, 2026
3 checks passed
lex00 added a commit that referenced this pull request Aug 10, 2026
The release.yml rehearsal after #289 annotated both v4 pins as targeting
the deprecated Node 20 runtime. Same v6 SHAs docs.yml already uses, so
all three workflows now pin the same versions.


Claude-Session: https://claude.ai/code/session_01JD1XEfzQByQEP29dMhJgvz

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.

chant audit: CI workflow hardening — unpinned actions, workflow-wide write grants, ungated release secrets

1 participant