ci-agent-hardening

Audit GitHub Actions workflows for security vulnerabilities and misconfigurations.

21|28|Updated Aug 11, 2025
One-click install
npx skills add https://github.com/stacklok/toolhive-catalog --skill ci-agent-hardening
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ci-agent-hardening
Source: https://github.com/stacklok/toolhive-catalog/tree/main/registries/toolhive/skills/ci-agent-hardening/skill
Command: npx skills add https://github.com/stacklok/toolhive-catalog --skill ci-agent-hardening

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Audit and harden GitHub Actions workflows against security vulnerabilities and misconfigurations, with emphasis on AI-powered CI/CD contexts.

Core Features & Use Cases

  • Detects risky patterns such as pull_request_target forks, unsanitized run: expressions, and missing permissions that enable credential leakage or code execution.
  • Provides concrete remediation guidance and checks for CI pipelines across multiple repos, including AI agent integration, slash command controls, and provenance best practices.
  • Use cases include securing enterprise CI pipelines, auditing open-source projects, and hardening automation workflows before public releases.

Quick Start

From the repository root, run the audit-workflows.sh script to scan all .github/workflows YAML files and report issues.

Frequently Asked Questions about ci-agent-hardening

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

FAQPage Schema
How do I audit GitHub Actions workflows for security vulnerabilities?

Audit GitHub Actions workflows for security vulnerabilities by running a script that scans all .github/workflows YAML files to detect risky patterns like pull_request_target forks, unsanitized run: blocks, and missing explicit permissions.

What is pull_request_target and why is it a CI/CD security risk?

pull_request_target is a GitHub Actions trigger that grants token access to forked code, creating a security risk. It enables credential leakage or unauthorized code execution if workflows run unsanitized commands from untrusted pull requests.

How do I secure AI-powered CI pipelines against prompt injection?

Secure AI-powered CI pipelines against prompt injection by checking for misconfigurations, enforcing CODEOWNERS protections, limiting tool access, and applying safe CLAUDE.md guidance to guard AI agents across build, test, and release stages.

Does this GitHub Actions security audit check for missing permissions and unilateral PAT usage?

Yes, this GitHub Actions security audit checks for missing explicit permissions, unilateral PAT usage, cache implications, and CODEOWNERS protections, providing concrete remediation guidance to prevent credential exposure.

Can I use this workflow audit for enterprise CI pipelines and open-source projects?

Yes, you can use this workflow audit for enterprise CI pipelines, open-source project auditing, and hardening automation workflows before public releases across multiple repositories to ensure provenance best practices.

What are the limitations of securing CI workflows against prompt injection?

Limitations of securing CI workflows against prompt injection include the need to manually apply concrete remediation guidance and the requirement to continuously monitor AI agent integration, slash command controls, and tool access configurations.