github-actions-security-hardening

Enforce least-privilege tokens, pinned actions, and runner risk controls in GitHub Actions workflows.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/chf3198/devenv-ops --skill github-actions-security-hardening
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-actions-security-hardening
Source: https://github.com/chf3198/devenv-ops/tree/main/skills/github-actions-security-hardening
Command: npx skills add https://github.com/chf3198/devenv-ops --skill github-actions-security-hardening

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enforce secure GitHub Actions posture with least-privilege tokens, pinned dependencies, runner risk controls, and workflow supply-chain checks.

Core Features & Use Cases

  • Enforce token permissions (least privilege, minimal blast radius)
  • Pin third-party actions to full commit SHAs where policy requires
  • OIDC-based credentials and secrets hygiene to prevent leakage
  • Runner security controls (hosted vs self-hosted) and policy-based risk governance
  • Audit-friendly reporting (ACTIONS_SECURITY_REPORT)

Quick Start

Run the governance checks on a repository to generate an ACTIONS_SECURITY_REPORT.

Frequently Asked Questions about github-actions-security-hardening

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce least-privilege tokens in GitHub Actions workflows?

To enforce least-privilege tokens in GitHub Actions, apply explicit permission settings to workflows to minimize blast radius, ensuring tokens only grant the minimum access required for CI pipelines and PR checks to run securely.

Why should I pin GitHub Actions dependencies to full commit SHAs?

Pinning GitHub Actions dependencies to full commit SHAs secures your workflow supply chain by preventing unauthorized modifications from mutable tags, ensuring your CI pipelines only execute verified, immutable third-party action versions.

Can I use OIDC for credentials in GitHub Actions to prevent secret leakage?

Yes, you can use OIDC-based credentials in GitHub Actions to fetch short-lived tokens on-demand, eliminating the need to store long-lived secrets in your repository and significantly reducing the risk of secret leakage.

How do I manage runner security controls for self-hosted GitHub Actions environments?

Manage runner security by implementing policy-driven risk governance to evaluate hosted versus self-hosted environments, applying robust security controls to harden self-hosted runners against potential CI pipeline threats.

What is the best way to audit GitHub Actions security posture across an organization?

The best way to audit GitHub Actions security is to run policy-driven governance checks across repositories, generating an audit-friendly ACTIONS_SECURITY_REPORT that details token permissions, action pinning, and runner risk controls.

Does this GitHub Actions security hardening approach work for both hosted and self-hosted environments?

Yes, this security hardening approach applies across repositories and organizations to enforce workflow security and policy-driven risk controls in both hosted and self-hosted GitHub Actions runner environments.