Skip to content

Pin CI actions to commit SHAs and make the token read-only - #16

Merged
antigenius0910 merged 1 commit into
mainfrom
chore/harden-ci
Oct 26, 2026
Merged

antigenius0910 merged 1 commit into
mainfrom
chore/harden-ci

Conversation

@antigenius0910

Copy link
Copy Markdown
Contributor

Hardening before the repo goes public; fixes the only 2 findings from the pre-publish semgrep scan (p/javascript, p/typescript, p/github-actions, p/secrets, p/xss).

  • actions/checkout and actions/setup-node pinned to full commit SHAs instead of the mutable v4 tag (semgrep github-actions-mutable-action-tag). The SHAs are exactly what v4 resolves to today (v4.4.0), so CI runs the same code.
  • permissions: contents: read for the workflow's GITHUB_TOKEN; CI only checks out and builds.

Triggers stay push to main and pull_request (no pull_request_target), so PRs from forks get no secrets and a read-only token.

Re-scan: semgrep p/github-actions reports 0 findings.

🤖 Generated with Claude Code

Before the repo goes public: a moved tag can no longer swap the code CI
runs (semgrep github-actions-mutable-action-tag), and the GITHUB_TOKEN
only gets contents: read. The SHAs are what v4 points at today (v4.4.0),
so CI runs the same code as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@antigenius0910
antigenius0910 merged commit ef14f63 into main Oct 26, 2026
2 checks passed
@antigenius0910
antigenius0910 deleted the chore/harden-ci branch October 26, 2026 00:04
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