agentleFS
ku5icku5ic/claude-kit/skills/audit-ci/SKILL.md

audit-ci

Skill2 starsChanged 15 days agoMITView on GitHub

Hardening review of CI workflow files

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run actionlint on the target workflows.

    line 30
  2. Distinctive:

    Read each workflow and check:

    line 31

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/audit-ci

Hardening review of CI workflows.

Loading this skill isn't enough. Before the step a row names, read its file.

BeforeRead
Checking permissions, triggers, run: steps, secrets, or runners, step 2reference/workflow-hardening.md

Run

Resolve a linked ticket or doc as skills/investigate step 0 describes, then dispatch the auditor agent (subagent_type: kit:auditor, foreground) with this file's procedure and the resolved arguments. It writes the report. Then run the report-format skill's Runtime checks yourself, and reply per skills/kit-rules/reference/output.md section 3.

Prerequisites

  • No .github/workflows directory: stop and say so.

Procedure

  1. Run actionlint on the target workflows. Each error is a finding. With no actionlint, skip this step and say so under "Needs a runtime check".
  2. Read each workflow and check:
    • Pinning: a uses: of an action outside the repo pinned to a branch (@main) is a warning.
    • Permissions: a top-level or per-job permissions: block granting only what the jobs use. None at all means the token's default scope, a warning.
    • Untrusted triggers: pull_request_target or workflow_run that checks out or runs the PR's code is a failure.
    • Injection: ${{ github.event.* }}, ${{ github.head_ref }}, or another attacker-set value interpolated into run: is a failure. The fix passes it through env:.
    • Secrets: a secret echoed, written to a file or artifact, or passed to a step that runs PR code.
    • Self-hosted runners on a workflow that public PRs can trigger.
  3. Infra files the jobs deploy are /audit-infra's job.

Not a finding

  • An event value interpolated into run: that an attacker can't shape: a SHA, a number, or a boolean, such as github.event.pull_request.base.sha. Passing it through env: is still cleaner, as info.
  • A local action (uses: ./...), which the repo itself pins.
  • An action pinned to a version tag (@v4).

Output per finding

  • The workflow and job, with file:line
  • Evidence: the actionlint line, or the quoted YAML
  • Severity: per the report-format skill's rubric, or as step 2 sets it
  • Fix: the replacement YAML

Output file

Load the report-format skill and use its format. Write to the path kit scratch-dir ci <target-slug> prints.

Arguments: $ARGUMENTS

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.