Index of every page on this site: llms.txt
All skills
Run it yourself

Scans a repo's GitHub Actions workflows for the ten critical CI/CD attack vectors — template injection, fork code executed with privileges (pwn requests), cache poisoning, impostor action SHAs, secrets dumps, GITHUB_ENV hijack, write-token untrusted triggers, credentials in caches/artifacts, unverified remote code execution (curl|bash and mutable fetch-and-run), and dependency install scripts running in a job that holds secrets — reports every finding with a plain-English attacker scenario, plus pass/fail config hygiene checks, and fixes selected findings via per-finding subagents. Deliberately NOT comprehensive — critical exploit-chain checks only (references/why-these-ten.md). Use when: the user asks to audit or review CI/CD or GitHub Actions security posture, "is my CI secure", "audit my CI security", or names ci-secure / /ci-secure. Do NOT trigger for: CI speed, cost, or wall-clock audits ("why is CI slow") — use ci-speedup; CI config best-practices grading ("grade my CI", "CI score") — use ci-score.

Use this Skill: https://skilld.dev/gh/starslingdev/skills/ci-secure

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesscan-output.md

≈2.9k tokens on demand. Your agent reads this file only when SKILL.md points to it.

The scan output JSON — shape of $FINDINGS

scripts/run.py --out "$FINDINGS" writes this file, and it is the orchestrator's source of truth for every later phase of SKILL.md. Never re-parse the markdown report to make a decision the JSON can answer.

Contents


One finding object

findings is a list, one object per occurrence (occurrences are grouped by pattern for rendering and dispatch, not stored grouped).

{
  "id": "f1",
  "pattern": "P14.9",
  "severity": "HIGH",
  "title": "Fork code executed with privileges in bench.yml",
  "workflow_file": ".github/workflows/bench.yml",
  "line": 8,
  "affected_jobs": ["bench"],
  "workflow_activity": {"runs_30d": 218, "last_run": "...", "dormant": false},
  "evidence": "   8: job `bench` on `pull_request_target` checks out `${{ github.event.pull_request.head.sha }}` then executes from the tree <-- here",
  "fix_strategy": "switch-to-pull-request-or-drop-head-checkout",
  "fix_guidance": "Optional evidence-specific guidance when this occurrence needs a narrower fix than the catalog default.",
  "fix_recipe_anchor": "p149--fork-code-executed-with-privileges"
}

workflow_activity has three shapes, and they are not interchangeable. The one above is the enriched success case. {} means no enrichment was attempted — --repo was not passed. {"status": "unavailable", "reason": ...} means enrichment WAS attempted and failed. The last one must never be read as "active": the dormancy flag is simply absent, so a failed check looks identical to a live workflow unless the distinction is kept. Dormancy drives a mandatory note in the report and the all fix selection, so read the report's rendered dormancy state rather than inferring one from a missing flag.

P14.18 findings only also carry actions_can_approve_prs: GitHub's "Allow GitHub Actions to create and approve pull requests" repository setting (can_approve_pull_request_reviews from GET repos/{owner}/{repo}/actions/permissions/workflow), read once per scan when a P14.18 finding exists. state is "true", "false" or "unread", and detail says where the answer came from or why it could not be read (no --repo, gh not signed in, an API error). It is never guessed: an unread setting renders as "not checked" in the finding's reference block and as a sentence under "What an attacker could do then".

"actions_can_approve_prs": {"state": "true", "detail": "read from the repository's Actions settings"}

The attacker_scenario merged in at Phase 2.5

The one usually non-scripted field. Written once per (pattern, severity, fix_strategy) profile and merged onto every member of that profile, so a group that mixes a detector-lowered profile with the catalog one gets one object per profile; the report shows the group's most exposed profile. One field per plain section the report renders at the top of the finding, in this order (rules per field: scenario-authoring.md):

{
  ...,
  "attacker_scenario": {
    "what_it_does": "Runs the benchmark suite on every pull request and posts the timings as a comment.",
    "why_flagged": "It is started by pull requests from forks, runs with this repo's write pass and secrets, and then runs the pull request's own code.",
    "what_must_go_wrong": "Nothing hard:\n- anyone with a GitHub account can open a fork pull request;\n- the job checks out that pull request's code and runs its install step.\nNo prior access to the repo is needed.",
    "attacker_could": "Their install step runs holding the repo's write pass and secrets, so they could push commits or read every secret the job has.",
    "verdict": "High: any stranger can reach it today.",
    "how_to_close": "1. Run the benchmark on `pull_request` instead, where fork runs get no secrets and a read-only pass.\n2. If the comment must stay, post it from a second workflow that never runs the pull request's code."
  }
}

A field may also be a list of strings (one line each). A single string — from an older run, or supplied by the scanner itself (P14.18's MEDIUM cosmetic profile) — is still accepted and renders under "What an attacker could do then" alone; tests/verify_report.py then counts that finding as not repo-specific, exactly like the catalog's generic stand-in. So Phase 2.5 keeps a scanner-supplied string's claim as that profile's attacker_could and replaces the string with the full object.

Top-level blocks

  • gh_checks — per-network-gated-check status, P14.11 above all: ran / partial / skipped plus the detail (pin counts, or the reason). An ABSENT P14.11 key is the "not recorded" state — a coverage hole, never a pass. P14.24 is present only when the scan reached a GitHub CLI extension pinned to a tag and then run: the release-immutability lookup's ran / partial / skipped status, e.g. ran: 2 tag-pinned GitHub CLI extension install(s) looked up, 1 immutable (not reported), 1 reported. This lookup can only remove a finding, so a partial or skipped one means some tag-pinned findings were kept without being checked, never that a finding is missing. Its absence means no such install was reached.
  • gh_check_details — the per-check detail a partial status refers to, including the unresolved-pin list (for P14.24, each owner/repo@tag (file:line) — reason that was not looked up). gh_checks gives the status word; this is where the specifics live.
  • scan_incomplete — workflow files skipped or unreadable, with a reason each. Non-empty means coverage is PARTIAL.
  • dropped_matches and coverage_notes — the other two coverage channels. Coverage is complete only when all THREE of scan_incomplete, dropped_matches and coverage_notes are empty (report.py's _coverage_is_complete). Reading scan_incomplete alone will call a degraded run complete, which is the one thing the coverage rule forbids. The rendered report already applies all three, which is why Phase 3 copies its Coverage: line rather than recomputing one.
  • suppressed_findings — matches the engine deliberately withheld, with the reason each was withheld. Not a coverage gap, but not nothing either.
  • parallel_steps — steps_scanned (steps read inside GitHub Actions parallel: groups), control_steps (wait: / wait-all: / cancel:, which hold no code), background_steps (top-level steps written with any background: value but a literal false; a child of a parallel: group is counted in steps_scanned only, background or not) and the workflows holding at least one of those counted steps. The key is always present (all zeros for a repository without the syntax). Informational, never a coverage gap: the leaf steps counted were scanned like any other; control steps hold no code. A parallel: group or background step the walker cannot fully read as written lands in coverage_notes instead, tagged scope: "parallel-group": a group whose value is not a list, nested past the depth cap, carrying run: / uses: beside parallel:, holding an entry that is not a step, carrying a key the scan does not model (anything but parallel:, if:, name:, id:, continue-on-error:, background:), re-entering itself through a YAML alias, or past the walk's entry budget; a background: value chosen at run time; or a job whose concurrent steps' source lines could not be found. Its file is not listed in workflows unless it also holds counted steps. Parallel steps are a github.com / GitHub Enterprise Cloud feature; the scan reads the syntax wherever it appears.
  • action_lockfile — the GitHub Actions workflow lockfile (.github/workflows/actions.lock): path (a case variant such as Actions.lock is named as it is on disk), state (absent, valid, or invalid for a file that is not exactly that name, a symbolic link, unreadable, unparseable, a format version the scan does not recognize, or holding any malformed entry — invalid credits nothing), covered_references (step-level uses: occurrences not pinned to a full commit, in scanned workflows the lockfile lists, that it locks to a commit; repeats count, and a reusable-workflow call is never counted because the lockfile does not pin one) and covered_workflows. The key is always present. Informational, never a coverage gap: GitHub verifies each locked commit at run time, and P14.11 checks only commit pins written in uses:, so these are the references P14.11 leaves to GitHub. The report states them on its Action lockfile row.
  • security_score — present in the JSON and never rendered. Phase 3 forbids a score, ratio or N/100 anywhere the user sees. It is listed here so it is recognized as out of bounds rather than mistaken for a summary worth surfacing. Its facts rows ARE rendered (the hygiene table), and so is one unscored key inside it, security_score.push_access, which the report shows under "If a push credential leaks":
    • status — measured / unmeasured (the environment list could not be read) / not_checked (no repository, no token, or the settings or verdicts could not be computed at all), with reason; in the shape a crashed facts layer leaves, token_note is absent.
    • environments — one object per environment: name, managed (GitHub-managed github-pages / copilot), branch_check and branch_check_why (pass / fail / unmeasured, or info for a managed environment that is not judged), approval_check and approval_check_why (pass / fail / not_applicable / info), reviewers (count), has_rules (a branch policy or required reviewers exist) and admins_can_bypass (information only, never part of a verdict; the report notes it only where has_rules is true, on an environment that is not GitHub-managed).
    • inventory — the secret list behind the sec.secrets.environment-scoped row: status (measured / partial / unmeasured / not_checked), repo_secrets and org_secrets (lists of secret NAMES, or null when that list could not be read — null is never "none"), high_value (a sort hint, not a severity) and reason.
    • tier1_gap and credential_note — the two sentences every run states when this layer completes (empty when it crashed): what is not checked yet, and the OIDC exposure.
    • token_note — one sentence linking GitHub's docs on which credentials can add or change workflow files. The three facts themselves are sec.environments.branch-restricted, sec.environments.approval-holds and sec.secrets.environment-scoped in facts, like any other.
  • timings — script-owned spans. As run.py --out writes them at Phase 2: run_start_epoch, activity_enrich_s, scan_total_s, scripted_end_epoch, scripted_total_s. total_run_s is NOT there yet — report.py computes and writes it back at Phase 3, which is why Phase 6 composes its Timing: line from THIS block only after the render has happened. There is no Timing: line in the rendered report to copy; the only such string in the scripts is a stderr debug log. record_timing.py appends the orchestrator-measured fixes_s.
  • Provenance, also top-level: commit_sha, repo_tree_dirty, skill_commit_sha, skill_tree_dirty and catalog_patterns_evaluated.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warningtoday3 checks · Risk SAFE
  • Gen Agent Trust Hubtoday

    The skill 'ci-secure' is a comprehensive security auditing tool for GitHub Actions. It is authored by starslingdev and follows excellent security practices, including centralized data sanitization to prevent Markdown injection and defensive prompt engineering to protect against malicious instructions in audited code. Its use of dynamic loading and subprocess calls is restricted to essential functions for modularity and repository analysis using standard tools like git and gh.

  • Socket4d

    No alerts

  • Snyktoday

    Risk: MEDIUM · 2 issues

Signed by skilld at 9a84115. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 16 hours ago.

Activeupdated last week

README badge

README badge for starslingdev/skills/ci-secure