Skip to content

Harden CI workflow against pwn request attacks (release-v0.6) - #42

Merged
lwr20 merged 1 commit into
projectcalico:release-v0.6from
lwr20:fix/ci-hardening-v0.6
Mar 25, 2026
Merged

Harden CI workflow against pwn request attacks (release-v0.6)#42
lwr20 merged 1 commit into
projectcalico:release-v0.6from
lwr20:fix/ci-hardening-v0.6

Conversation

@lwr20

@lwr20 lwr20 commented Mar 25, 2026

Copy link
Copy Markdown
Member

Summary

Backport of the CI hardening from #39 to release-v0.6.

  • Replace pull_request_target with pull_request so fork PRs no longer run with access to secrets or a write-capable GITHUB_TOKEN
  • Remove safe to test label gate; add explicit permissions blocks (contents: read + checks: write on test; contents: read on deploy)
  • Remove unnecessary packages: write from deploy job
  • Pin all actions to immutable commit SHAs to prevent supply chain attacks via tag force-push
  • Gate e2e test to push and same-repo PRs only
  • Add persist-credentials: false to both checkout steps
  • Simplify checkout refs to github.sha and fix deploy job if condition syntax

Ref: https://www.stepsecurity.io/blog/hackerbot-claw-github-actions-exploitation

🤖 Generated with Claude Code

- Replace pull_request_target with pull_request so fork PRs no longer
  run with access to secrets or a write-capable GITHUB_TOKEN
- Remove safe-to-test label gate; replace with explicit permissions
  (contents:read, checks:write on test; contents:read on deploy)
- Remove unnecessary packages:write from deploy job
- Pin all actions to immutable commit SHAs
- Gate e2e test to push and same-repo PRs to avoid burning runner
  resources on untrusted fork code
- Add persist-credentials:false to both checkout steps
- Simplify checkout refs and fix deploy job if condition syntax

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lwr20
lwr20 merged commit 8a90459 into projectcalico:release-v0.6 Mar 25, 2026
2 checks passed
@lwr20
lwr20 deleted the fix/ci-hardening-v0.6 branch March 25, 2026 14:56
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