Securing Your GitHub Actions
summary
Describes concrete vulnerability patterns and fixes: attackers altered TJ Actions and reviewdog tags, so reference actions by commit SHA and enforce tag protection; default GitHub token lands in .git/config so set persist-credentials: false and explicitly narrow token permissions (the uploader provides a permission-auditing action); forks can RCE workflows and poison caches, so use two workflows with artifact handoff rather than job-level splits; cache token risk and 34 new CodeQL actions queries (Apr 2025) help detect unsafe data flows.
AI-written summary · about
chapters (19)
- 0:00Introduction
- 0:21Threats and workflow triggers
- 1:27Pull request workflow risks
- 2:52Secure action references
- 3:33Secrets and tokens handling
- 4:39Workflow job isolation
- 5:21GitHub token permissions
- 6:44Repository permission defaults
- 7:25Permission migration tool
- 7:47Code injection risks
- 9:11Environment variable injection
- 9:54Pull request code execution
- 10:57Two-workflow security pattern
- 12:24Cache poisoning attacks
- 13:51Sandboxing limitations
- 14:11Manual approval pitfalls
- 15:33Secure approval methods
- 16:18CodeQL security queries
- 17:01Q&A and closing
