Skip to content

Pin GitHub Actions to full-length commit SHAs#38

Merged
tamalsaha merged 2 commits into
masterfrom
pin-actions-to-sha
May 21, 2026
Merged

Pin GitHub Actions to full-length commit SHAs#38
tamalsaha merged 2 commits into
masterfrom
pin-actions-to-sha

Conversation

@tamalsaha
Copy link
Copy Markdown
Member

Summary

Replace tag/branch references in workflow files with full 40-character commit SHAs and a trailing version comment, generated with pinact.

Per GitHub's security hardening guidance, pinning third-party actions to a SHA defends against tag-hijack attacks.

Test plan

  • CI passes on this PR.

🤖 Generated with Claude Code

tamalsaha added 2 commits May 20, 2026 21:29
Replace tag/branch references (e.g. `@v1`, `@main`) with full 40-char
commit SHAs and a trailing version comment, per GitHub's hardening
guidance: https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions

Generated with `pinact run`.

Signed-off-by: Tamal Saha <tamal@appscode.com>
- Add `permissions: packages: write` to the build job so the workflow's
  GITHUB_TOKEN can push to ghcr.io.
- Add `fetch-depth: 0` to the actions/checkout step so the full history
  is available for version derivation (e.g. `git describe`).
- Switch container-registry login to ghcr.io with `github.actor` /
  `GITHUB_TOKEN` via docker/login-action (replacing prior 1gtm /
  DOCKERHUB_TOKEN, and any inline `docker login` shell command).

Signed-off-by: Tamal Saha <tamal@appscode.com>
@tamalsaha tamalsaha merged commit 3dfec37 into master May 21, 2026
3 checks passed
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