mukul975/anthropic-cybersecurity-skills/securing-github-actions-workflows
Claude Code and agent skill by mukul975/anthropic-cybersecurity-skills
- community
Checking that the SKILL.md file is still in the repository.
'Hardens GitHub Actions workflows against supply chain attacks, credential
Install
npx vskill@latest install mukul975/anthropic-cybersecurity-skills/securing-github-actions-workflowsSKILL.md
The same SKILL.md was published earlier as mukul975/anthropic-cybersecurity-skills/securing-github-actions-workflows.
Securing GitHub Actions Workflows
When to Use
- When GitHub Actions is the CI/CD platform and workflows need hardening against supply chain attacks
- When workflows handle secrets, deploy to production, or have elevated permissions
- When preventing script injection via untrusted PR titles, branch names, or commit messages
- When requiring audit trails and approval gates for workflow modifications
- When third-party actions pose supply chain risk through mutable version tags
Do not use for securing other CI/CD platforms (see platform-specific hardening guides), for application vulnerability scanning (use SAST/DAST), or for secret detection in code (use Gitleaks).
Prerequisites
- GitHub repository with GitHub Actions enabled
- GitHub organization admin access for organization-level settings
- Understanding of GitHub Actions workflow syntax and events
Workflow
Step 1: Pin Actions to SHA Digests
Step 2: Minimize GITHUB_TOKEN Permissions
Step 3: Prevent Script Injection
Step 4: Secure Fork Pull Request Handling
Step 5: Protect Secrets and Environment Variables
Step 6: Implement Workflow Change Controls
Key Concepts
| Term | Definition | |
|---|---|---|
| SHA Pinning | Referencing GitHub Actions by their immutable commit SHA instead of mutable version tags | |
| Script Injection | Attack where untrusted input (PR title, branch name) is interpolated into shell commands | |
| GITHUB_TOKEN | Automatically generated token with configurable permissions scoped to the current repository | |
| pull_request_target | Dangerous event trigger that runs in the base repo context with full permissions on fork PRs | |
| Environment Protection | GitHub feature requiring manual approval before jobs accessing an environment can run | |
| CODEOWNERS | File defining required reviewers for specific paths including workflow files | |
| OIDC Federation | Using GitHub's OIDC token to authenticate to cloud providers without storing long-lived credentials |
Tools & Systems
- Dependabot: Automated dependency updater that keeps pinned action SHAs current
- StepSecurity Harden Runner: GitHub Action that monitors and restricts outbound network calls from workflows
- actionlint: Linter for GitHub Actions workflow files that detects security issues
- allstar: GitHub App by OpenSSF that enforces security policies on repositories
- scorecard: OpenSSF tool that evaluates supply chain security practices including CI/CD
Common Scenarios
Scenario: Preventing Supply Chain Attack via Compromised Third-Party Action
Context: A widely-used GitHub Action is compromised and its v3 tag is updated to include credential-stealing code. Repositories using @v3 automatically pull the malicious version.
Approach:
- Pin all actions to SHA digests immediately across all repositories
- Configure Dependabot for github-actions ecosystem to manage SHA updates
- Restrict GITHUB_TOKEN permissions so even compromised actions have minimal access
- Add StepSecurity harden-runner to detect anomalous outbound network calls
- Review all third-party actions and replace unnecessary ones with inline scripts
- Require CODEOWNERS approval for any changes to .github/workflows/
Pitfalls: SHA pinning without Dependabot means missing legitimate security updates to actions. Overly restrictive permissions can break legitimate workflows. Using pull_request_target for label-based gating still exposes secrets if the workflow checks out PR code.
Output Format
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/securing-github-actions-workflows/SKILL.md
Popularity
- Repository stars
- 33,535
- Repository forks
- 4,068
- 7-day trend score
- 52
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 8 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mukul975/anthropic-cybersecurity-skills/securing-github-actions-workflows)