ci-agent-hardening

ci-agent-hardening is a skill for Claude Code, Codex from stacklok/toolhive-catalog. It costs 108 tokens per session (1,775 once invoked), scanned A, original, Apache-2.0.

A security audit and hardening guide for GitHub Actions, especially workflows that use AI or process code from pull requests.

In plain words
What is it for?
Use it to inspect workflow files, run the provided audit, and fix risks involving pull_request_target, expression injection, cache use, credentials, and untrusted actions.
Why use it?
It helps find ways attackers could inject instructions, run untrusted fork code with secrets, poison caches, steal credentials, or compromise the software supply chain.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for cline. Also seen: mentions CLAUDE.md; built for cline.

Good fit Use it to inspect workflow files, run the provided audit, and fix risks involving pull_request_target, expression injection, cache use, credentials, and untrusted actions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/stacklok/toolhive-catalog/skill
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add stacklok/toolhive-catalog --skill skill
Clone the repo
git clone --depth 1 https://github.com/stacklok/toolhive-catalog

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ci-agent-hardening

README.md
[![agentmods](https://agentmods.dev/badge/skills/stacklok/toolhive-catalog/skill/github.svg)](https://agentmods.dev/skills/stacklok/toolhive-catalog/skill)
Your own site
<a href="https://agentmods.dev/skills/stacklok/toolhive-catalog/skill"><img src="https://agentmods.dev/badge/skills/stacklok/toolhive-catalog/skill/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ci-agent-hardening

Your own site · 80×15
<a href="https://agentmods.dev/skills/stacklok/toolhive-catalog/skill"><img src="https://agentmods.dev/badge/skills/stacklok/toolhive-catalog/skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,775 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00108 $0.01775
Opus 5.5 $0.00043 $0.00710
Sonnet 5.5 $0.00022 $0.00355
Haiku 4.5 $0.00011 $0.00178

Measured 1mo ago against content hash e9dd71e254f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ci-agent-hardening scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/audit-workflows.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

Every attack in the hackerbot-claw campaign depended on `curl` to `hackmoltrepeat.com`. Consider:
registries/toolhive/skills/ci-agent-hardening/skill/SKILL.md · 179 lines

How it starts

The opening of the file, as written. The whole thing — 179 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CI Agent Hardening

Audit and fix security vulnerabilities in GitHub Actions workflows, with emphasis on AI-powered CI/CD. Based on two major 2026 incidents:

  • Clinejection — Prompt injection in AI triage bot led to cache poisoning, credential theft, malicious npm publish (~4,000 developers affected)
  • hackerbot-claw — Autonomous AI bot exploited 7 repos (Microsoft, DataDog, CNCF, Aqua Trivy), achieving full repo compromise on Trivy (25k+ stars) via PAT theft

Prerequisites

  • Repository with .github/workflows/ directory
  • bash available for running the audit script

Instructions

For background and exploit details on any pattern below, see references/ATTACK-PATTERNS.md.

Step 1: Run the Automated Audit

Run from the repository root:

bash <skill-path>/scripts/audit-workflows.sh .github/workflows

Review [CRIT] findings first (exploitable now), then [WARN] (defense gaps).

Step 2: Fix pull_request_target + Fork Checkout (CRITICAL)

This is the #1 attack vector. 4 of 7 hackerbot-claw attacks exploited it. Check every pull_request_target workflow:

# DANGEROUS — runs fork code with your secrets
on: pull_request_target
steps:
  - uses: actions/checkout@v4
    with:
      ref: ${{ github.event.pull_request.head.sha }}  # ATTACKER'S CODE

# SAFE — use pull_request trigger instead (no secret access)
on: pull_request

# SAFE — if pull_request_target needed, checkout base only
on: pull_request_target
steps:
  - uses: actions/checkout@v4  # defaults to base branch

If the workflow needs both secrets AND fork code (e.g., comment on PR), split into two workflows: one that runs untrusted code (no secrets) and one that consumes artifacts (with secrets).

Step 3: Eliminate Expression Injection in run: Blocks

Any ${{ }} expression referencing user-controlled values inside a run: block is a shell injection. Branch names, filenames, PR titles, commit messages are all vectors.

# VULNERABLE — branch name is shell-evaluated
- run: echo "${{ github.event.pull_request.head.ref }}"

# SAFE — environment variable (properly quoted by runner)
- run: echo "$PR_HEAD_REF"
  env:
    PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}

Read the full file on GitHub · 179 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 179 lines · 108 tokens per session scan A e9dd71e254f1

Subscribe to this mod's changes

ci-agent-hardening is a skill published in the GitHub repository stacklok/toolhive-catalog (23 stars, last pushed today), licensed Apache-2.0. It adds 108 tokens to every session and 1,775 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

securing-container-registry-images

Securing container registry images by implementing vulnerability scanning with Trivy and Grype, enforcing image signing with Cosign and Sigstore, configuring registry access controls, and building CI/CD pipelines that prevent deploying unscanned or unsigned images.

xalgorix/xalgorix · 54 tokens

fluent-ci-cd

This skill should be used when the user asks to "set up ci for fluent", "github actions for servicenow", "deploy fluent from a pipeline", "fluent pull request checks", "automate now-sdk", or reports "keys.ts out of date" — anything about running the ServiceNow SDK (now-sdk) headless in CI/CD.

serac-labs/serac · 78 tokens

ci-cd-best-practices

Apply Dedalus CI/CD workflow rules for runner placement, Docker build verification, artifact publication, and self-hosted runner orchestration. Use when editing GitHub Actions workflows, Docker build pipelines, deploy jobs, Terraform/ECS/Flux workflows, or self-hosted runner automation.

Kevin-Liu-01/Agent-Machines · 63 tokens

blazemeter-integrations

Comprehensive guide for BlazeMeter Integrations, including APM tools, CI/CD pipelines, and development tools. Use when working with integrations for (1) Integrating APM tools (AppDynamics, Datadog, New Relic, CloudWatch, DX APM, Dynatrace, Delphix), (2) Integrating CI/CD tools (Jenkins, GitHub Actions, GitLab CI/CD…

Blazemeter/bzm-mcp · 131 tokens

gitlab-ci

Investigate a failed GitLab pipeline or job, inspect bounded logs and explain an evidence-based fix. Use for GitLab CI failure diagnosis and related follow-ups, not perpetual monitoring or automatic job retries.

structured-world/gitlab-mcp · 44 tokens

dag-skill-registry

Central catalog of available skills with metadata, capabilities, and performance history. Provides skill discovery and lookup services. Activate on 'skill registry', 'list skills', 'skill catalog', 'available skills', 'skill metadata'. NOT for matching skills to tasks (use dag-semantic-matcher) or ranking (use…

curiositech/windags-skills · 73 tokens