ci-cd-security

Harden GitHub Actions pipelines with least-privilege permissions and SHA pinning.

9|3|Updated Jun 4, 2022
One-click install
npx skills add https://github.com/Hack23/riksdagsmonitor --skill ci-cd-security
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ci-cd-security
Source: https://github.com/Hack23/riksdagsmonitor/tree/main/.github/skills/ci-cd-security
Command: npx skills add https://github.com/Hack23/riksdagsmonitor --skill ci-cd-security

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Security-focused guidance and templates to harden CI/CD pipelines using GitHub Actions, with emphasis on least privilege, pinning actions, and supply-chain controls.

Core Features & Use Cases

  • Establishes least-privilege permissions for GitHub Actions workflows across builds, tests, and deployments.
  • Pins actions to commit SHAs to prevent drift and ensure reproducibility.
  • Integrates runner hardening, secret management, dependency reviews, and code scanning as a unified security baseline.
  • Suitable for teams adopting secure SDLC practices and auditing CI/CD processes.

Quick Start

Deploy the Secure Workflow starter template to implement a secure, auditable CI/CD pipeline in your repository.

Frequently Asked Questions about ci-cd-security

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

FAQPage Schema
How do I secure GitHub Actions workflows with least privilege permissions?

Securing GitHub Actions workflows with least privilege involves scoping permissions explicitly for build, test, and deployment stages. This approach restricts token access to only what is necessary, reducing the risk of unauthorized repository modifications.

Why should I pin GitHub Actions to commit SHAs instead of tags?

Pinning GitHub Actions to commit SHAs prevents drift and ensures reproducible builds. Immutable SHA references protect your supply chain from tag reassignment attacks, guaranteeing the action code remains unchanged over time.

What's the best way to harden CI/CD runners and manage secrets in GitHub Actions?

Hardening CI/CD runners and managing secrets requires implementing unified security baselines. This includes restricting runner environments and applying strict secret access controls to prevent unauthorized data exposure across pipeline stages.

How do I add supply-chain controls and dependency reviews to my CI/CD pipeline?

Adding supply-chain controls to CI/CD pipelines involves integrating automated dependency reviews and code scanning. This validates third-party components and detects vulnerabilities before deployment, establishing a secure software development lifecycle.

Does this CI/CD security guidance apply to non-GitHub Actions platforms?

This CI/CD security guidance is specifically tailored for GitHub Actions. It provides templates and baseline controls designed for GitHub repositories and may not directly apply to other continuous integration platforms.

Can I use these secure workflow templates to audit my existing CI/CD processes?

You can use these secure workflow templates to audit existing CI/CD processes. They provide a baseline for least-privilege permissions, SHA pinning, and runner hardening, helping teams verify their pipelines meet secure SDLC standards.