Skip to content

Harden CI workflows#1252

Merged
ArnobKumarSaha merged 2 commits into
masterfrom
nolgtm
May 12, 2026
Merged

Harden CI workflows#1252
ArnobKumarSaha merged 2 commits into
masterfrom
nolgtm

Conversation

@tamalsaha
Copy link
Copy Markdown
Member

Summary

Tighten the GitHub Actions workflows in this repo so they no longer depend on a long-lived LGTM_GITHUB_TOKEN PAT, and bring them in line with GitHub's hardening guidance.

  • Use the default GITHUB_TOKEN instead of a PAT for in-repo operations. GITHUB_USER switches to github.actor.
  • Scope GITHUB_TOKEN to least privilege at the job level. release-tracker.yml gets contents: write so the token can push commits/tags back to this repo.
  • Pin every action to a full-length commit SHA with a trailing version comment, so floating tags like @v4 can't be silently re-pointed.
  • Tag-triggered workflows now check out with fetch-depth: 1 + fetch-tags: true so the tag ref resolves without a full clone.
  • Bump outdated actions/checkout@v1 to @v4.3.1 where it appeared.

Test plan

  • CI passes on this PR.
  • Confirm release-tracker continues to push commits/tags on PR close.
  • Confirm release.yml still functions on the next tag.

🤖 Generated with Claude Code

tamalsaha added 2 commits May 11, 2026 22:45
Signed-off-by: Tamal Saha <tamal@appscode.com>
- Pin every action ref to a full-length commit SHA with a trailing
  version comment, so floating tags like @v4 can't be re-pointed at
  malicious code.
- Bump outdated actions/checkout@v1 to @v4.3.1 (where present).
- Tag-triggered workflows now check out with fetch-depth: 1 and
  fetch-tags: true so the tag ref is available downstream.
- release-tracker.yml grants contents: write at the job level so the
  default GITHUB_TOKEN can push commits/tags back to the repo.

Signed-off-by: Tamal Saha <tamal@appscode.com>
@ArnobKumarSaha ArnobKumarSaha merged commit 8d55fcc into master May 12, 2026
3 of 7 checks passed
@ArnobKumarSaha ArnobKumarSaha deleted the nolgtm branch May 12, 2026 09:24
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.

2 participants