securing-github-actions-workflows

Featured

This skill covers hardening GitHub Actions workflows against supply chain attacks, credential theft, and privilege escalation. It addresses pinning actions to SHA digests, minimizing GITHUB_TOKEN permissions, protecting secrets from exfiltration, preventing script injection in workflow expressions, and implementing required reviewers for workflow changes.

AI & Automation 36,355 stars 4443 forks Updated 2 months ago Apache-2.0

Install

View on GitHub

Quality Score: 94/100

Stars 20%
100
Recency 20%
75
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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 ```yaml # INSECURE: Mutable tag can be overwritten by attacker - uses: actions/checkout@v4 # SECURE: Pinned to immutable SHA digest - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 # Use Dependabot to auto-update pinned SHAs # .github/dependabot.yml version: 2 updates: - package-ecosystem: "github-actions" directory: "/" schedule: interval: "weekly" commit-message: prefix: "ci" ``` ### Step 2: Minimize GITHUB_TOKEN Permissions ```yaml # Set restrictive default permissions at workflow level name: CI Pipeli...

Details

Author
mukul975
Repository
mukul975/Anthropic-Cybersecurity-Skills
Created
8 months ago
Last Updated
2 months ago
Language
Python
License
Apache-2.0

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

github-actions-security

Harden GitHub Actions workflows against the well-known footguns. Covers SHA-pinned third-party actions, scoped GITHUB_TOKEN permissions, OIDC in place of long-lived cloud credentials, the pull_request_target trap, untrusted-input interpolation, and protected deploy environments. Invoke when adding a new workflow, introducing a third-party action, or migrating from long-lived secrets to OIDC.

21 Updated 3 weeks ago
GoldenWing-360
Code & Development Listed

github-actions-security

Authors, reviews, and hardens GitHub Actions workflows, reusable workflows, and composite actions with least-privilege GITHUB_TOKEN permissions, action references pinned by commit SHA to the latest published release, injection-safe handling of untrusted event data, safe trigger and runner choices, and a structure that scales across many repositories, verified with actionlint and zizmor in a bounded loop. Use when creating or editing anything under .github/workflows/, an action.yml or action.yaml, or a dependabot.yml covering actions, and when reviewing workflow permissions, secrets, OIDC, action pinning or versions, triggers such as pull_request_target or workflow_run, self-hosted runners, caching, or organization-wide workflow governance.

2 Updated today
konstruktoid
DevOps & Infrastructure Listed

cicd-security

Harden GitHub Actions, GitLab CI, and similar pipelines against supply-chain attacks, secret exfiltration, and pwn-request abuse. Use when authoring or reviewing workflow files, adding a third-party action, image, or script, wiring cloud or registry credentials into CI, or triaging a suspected pipeline compromise.

23 Updated 3 months ago
ShieldNet-360