Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

ci-workflow-audit

БесплатноБез исполняемых скриптовНе проверен

Audit CI workflow files for supply-chain risk — unpinned actions, unpinned container images, pull_request-triggered jobs with secret access, curl-pipe-shell…

jmaglyот jmagly★ 233 звезды на GitHub

Об этом скилле

ci-workflow-audit

Use this skill when a user wants a one-shot scan of their CI workflows for the supply-chain attack surface that the ci-action-pinning rule defines as forbidden. The rule is the gate (blocks new violations post-deployment); this skill is the discovery tool (surfaces existing violations in a user repo).

Pairs with npm-supply-chain-audit (npm-ecosystem audit) — together they cover most of the user-side risk surface that AIWG's own supply-chain hardening (v2026.5.3) addresses on the AIWG side.

Triggers

  • "audit workflow pinning"
  • "ci workflow audit"
  • "are my actions pinned"
  • "check container image pins"
  • "scan workflows for secrets"
  • "supply chain risk in CI"

Scope

Audits the following workflow file locations (all supported in parallel):

Platform Path
GitHub Actions .github/workflows/*.yml, .github/workflows/*.yaml
Gitea Actions .gitea/workflows/*.yml, .gitea/workflows/*.yaml
GitLab CI .gitlab-ci.yml, .gitlab/*.yml (where applicable)
Reusable workflows uses: ./.github/workflows/* references (transitive)

Read-only. No mutations.

Audit sequence

1. Inventory workflow files

find .github/workflows .gitea/workflows -type f \( -name "*.yml" -o -name "*.yaml" \) 2>/dev/null
test -f .gitlab-ci.yml && echo ".gitlab-ci.yml"

Record the count. Each subsequent check iterates over this set.

2. Action-pin audit — fail on tag-pinned uses:

# Detect floating tags (semver tags, branches, latest)
grep -rnHE '^\s*-\s*uses:\s*[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+@(v?[0-9]+(\.[0-9]+)*|main|master|latest)\s*(#.*)?$' \
  .github/workflows/ .gitea/workflows/ 2>/dev/null

Each match is a finding. Severity: HIGH (workflow runs arbitrary third-party code with workflow's secret access).

Acceptable exception: uses: ./ references (local reusable workflows in the same repo) — these pin to the calling commit. Flag separately as INFO and recurse into them to check their uses: references too.

3. Container-image-pin audit — fail on tag-pinned container:/image:

grep -rnHE '^\s*(container|image):\s*[a-zA-Z0-9._/-]+:[a-zA-Z0-9._-]+\s*(#.*)?$' \
  .github/workflows/ .gitea/workflows/ 2>/dev/null \
  | grep -v 'sha256:'

Each match without @sha256: is a finding. Severity: HIGH (same attack surface as actions; container provides the execution environment for every step).

4. Bare :latest audit

grep -rnHE ':latest\b' .github/workflows/ .gitea/workflows/ 2>/dev/null

Each match is a finding. Severity: CRITICAL (:latest is the canonical anti-pattern — captures both digest absence AND the most volatile possible tag).

5. PR-secret-exposure audit

For each workflow file, check whether any job triggered by pull_request references secrets.*:

# Identify pull_request-triggered jobs
for f in $(find .github/workflows .gitea/workflows -name "*.yml" -o -name "*.yaml" 2>/dev/null); do
  # Extract jobs that run on pull_request and check for secret references
  awk '/^on:/,/^[a-z]/ { print }' "$f" | grep -q 'pull_request' || continue
  if grep -nE '\${{\s*secrets\.' "$f" >/dev/null 2>&1; then
    echo "POTENTIAL SECRET EXPOSURE in $f"
    grep -nE '\${{\s*secrets\.' "$f"
  fi
done

Each match is a finding. Severity: CRITICAL (a contributor PR from a fork can read repo secrets via the workflow's environment; classic supply-chain attack vector documented in the Shai-Hulud campaign).

Acceptable exception: jobs gated with if: github.event.pull_request.head.repo.full_name == github.repository (only trusted maintainer PRs). Flag as INFO and verify the guard.

6. Curl-pipe-shell installer audit

grep -rnHE 'curl[^|]+\|\s*(bash|sh)' .github/workflows/ .gitea/workflows/ 2>/dev/null

Each curl | sh pattern is a finding. Severity: MEDIUM unless the surrounding context includes a content-hash check (look for sha256sum, OBSERVED_SHA, EXPECTED_INSTALL_SHA) — if no hash check is present, severity is HIGH.

The recommended fix pattern (strict-mode opt-in) is documented in the ci-action-pinning rule section "Standalone tools pinned by version + checksum".

7. Pin-manifest presence audit

test -f ci/digests.txt || test -f .ci/digests.txt || test -f docs/ci/digests.txt

If no pin manifest exists, finding: MEDIUM (without a manifest, diffs that change pinned references are not auditable).

Output format

Produce a markdown report at .aiwg/security/working/ci-workflow-audit.md with the structure below. If the working directory doesn't exist, create it.

# CI Workflow Audit

**Generated**: <ISO timestamp>
**Repo**: <repo path or URL>
**Workflow files scanned**: <count>

## Findings

### CRITICAL — Bare :latest tags

- `<file>:<line>` — `<matching line>`

### CRITICAL — PR-triggered jobs reference secrets

- `<file>:<line>` — `<matc
Полный SKILL.md на GitHub

Установить ci-workflow-audit в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл ci-workflow-audit?

Audit CI workflow files for supply-chain risk — unpinned actions, unpinned container images, pull_request-triggered jobs with secret access, curl-pipe-shell installers, and bare :latest tags. Produces a structured markdown report with file:line refs.

Как установить скилл ci-workflow-audit?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл ci-workflow-audit запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить ci-workflow-audit с