Why these ten — the selection criterion behind the critical-only catalog
ci-secure deliberately detects ten attack vectors, not the 27 patterns its catalog held before the critical-only descope — the nine of today's ten that survived it, and the 18 the rejection record below names and accounts for, plus one adjacent practice recorded there as considered and excluded. The tenth vector (P14.25) was admitted after the descope and was never in that catalog; its own evaluation is below, which is why this document shipped as why-these-nine.md until then. This document is the reasoning, shipped with the skill so every finding can answer "why is this one of only ten?" — and so every future "shouldn't we add pattern X?" is tested against a written criterion instead of instinct. A census test binds the list below to the scanner's active pattern set: they cannot drift apart.
Contents
- The filter
- The ten, with their incident grounding
- The rejection record — what the filter removed, and why
- What "critical" means here
- Platform mitigations — dated, and scoped to what they actually close
- Adding a pattern — the mechanical checklist
The filter
A pattern is in the catalog only if it describes a complete outsider → compromise chain, judged by three tests, all required:
- The outsider-chain test. Someone with no access to the repo — an account that can open a fork PR, craft a branch/title, or publish an upstream artifact — can reach a concrete compromise: code execution holding a write token, secret theft, or poisoning of what the repo ships. Not "this makes a breach worse if one happens" (blast radius); the chain itself must start at outsider and end at compromise.
- The incident test. The vector class has actually happened in public — each entry below names its incidents. Nothing on the list is theoretical.
- The same-day-fix test. A maintainer can close the finding the day they read it — change a trigger, remove an interpolation, re-pin a SHA, drop a permission line. Nothing that requires a hardening program.
Notably, the filter is NOT "keep everything labeled HIGH": three catalog-HIGH patterns failed it, and two catalog-MEDIUM patterns passed it (see the rejection record).
The ten, with their incident grounding
| # | Pattern | Chain | Public incidents |
|---|---|---|---|
| 1 | P14.10 | Template injection in run: — attacker text (PR title, branch name) pasted into a shell |
nx / s1ngularity (2025); elementary-data (2026); Ultralytics (2024) |
| 2 | P14.9 | Fork code executed with privileges — untrusted trigger + head checkout + execution | GitHub Security Lab "pwn request" writeups; Trivy round 1 (2026) |
| 3 | P14.7 | Fork-writable shared cache — poisoned cache consumed by trusted runs | TanStack (2026); Ultralytics (2024) |
| 4 | P14.11 | Impostor / unreachable action SHA — a pin the canonical repo never contained | tj-actions/changed-files (2025); Chainguard "imposter commits" research |
| 5 | P14.14 | Whole-context secrets dump — toJSON(secrets) into logs/env |
tj-actions payload behavior (memory scraping, 2025) |
| 6 | P14.15 | Attacker-controlled $GITHUB_ENV / $GITHUB_PATH write — hijacks later steps |
GitHub Security Lab environment-injection writeups |
| 7 | P14.18 | pull-requests: write on an untrusted trigger — outsider's event holds a write token |
elementary-data (2026) — forged release via default-write token |
| 8 | P14.19 | Credential files in caches/artifacts — keys fetchable by other jobs or the public | Trivy round 2 (2026) — attacker swept the runner for exactly these credential files (SSH keys, cloud creds, Kubernetes tokens); caching or uploading them extends that exposure |
| 9 | P14.24 | Unverified remote code execution — a piped installer, or a git tree fetched at a mutable ref and executed | Codecov bash-uploader breach (2021) — the PIPED-INSTALLER arm only; the mutable-fetch arm has no named breach of its own (see below) |
| 10 | P14.25 | Dependency install scripts executing in a privileged job — a compromised upstream package runs code where the secrets are | nx / s1ngularity install-script payload (2025); Miasma / @redhat-cloud-services (2026); GitHub's July 28 2026 supply-chain post |
Full incident citations live in the catalog's Reference incidents section.
P14.24's three shapes, and which one the incident evidences
P14.24 detects three shapes, and only one of them is carried by the incident cited beside it. Saying so is the point of the incident test — an entry that lets another shape ride quietly on the first shape's breach has not passed it.
- The piped installer (
curl … | bashand friends) is evidenced directly. The Codecov bash-uploader breach (2021) IS this shape: an altered script served from the vendor's own host, piped into a shell by every job that used it, exfiltrating the CI environment. That is the citation's whole scope. - The mutable fetch (a git tree cloned at a branch, tag,
HEAD, or an abbreviated commit, and then executed out of) is not evidenced by Codecov, and this document does not claim a breach for it. It is in the catalog on the strength of the SHARED TRUST MODEL rather than a named incident: all three shapes execute code the repo never pinned, re-resolved live on every run, at full job privilege — and a branch or tag is designed to move, so it needs no host compromise at all, only push access on the other side. Its mitigation is a full 40-character commit. - The GitHub CLI extension (an extension installed at a mutable ref and
then invoked) has that same shared trust model and is likewise not evidenced
by Codecov. Pin a script extension to a full 40-character commit, or pin a
binary extension to a tag on a release GitHub publishes as immutable. A
numeric spelling does not prove a commit:
20261111is a date-style tag, not an abbreviated commit id. These are three shapes of one vector because each executes remote code whose identity the repository did not make immutable.
If a public incident of the mutable-fetch shape is later cited, it belongs in the catalog's Reference incidents section and in this row — until then, the asymmetry stays stated rather than smoothed over.
The tenth vector, evaluated against the three tests
P14.25 (dependency install scripts executed in a privileged job) was admitted 2026-08-06. Its evaluation, stated in full so the admission is auditable:
- Outsider-chain test — passes. The outsider capability the filter names
explicitly is "publish an upstream artifact". An attacker who takes over a
maintainer's npm account, lands a typosquat, or compromises a transitive
dependency publishes a version whose
preinstall/install/postinstallscript runs automatically the next time CI installs dependencies. No repo access is needed at any point. The chain ends at compromise only when the job the install runs in holds something to steal — repo secrets or a write-scoped token — which is why the detector requires that payoff rather than flagging every install (see below). - Incident test — passes. The s1ngularity-class payloads (2025) executed
from install scripts and harvested credentials from the machines that ran
them; the June 2026 Miasma compromise of the
@redhat-cloud-servicesnamespace, and itsbinding.gyp-based follow-up, used the same execution point. GitHub's July 28 2026 post describes the class as the one it changed npm's defaults to disrupt. - Same-day-fix test — passes. Adding
--ignore-scriptsto the install command is a one-line edit a maintainer can make the day they read the finding. Where a legitimate build step depends on a lifecycle script, the same-day move is to re-enable it explicitly for the packages that need it (npm v12's approval list) or to run the script-bearing install in a separate job that carries no secrets — still a workflow edit, not a hardening program.
The severity is MEDIUM for the same documented reason as P14.24: the vector's potency depends on a live condition outside the repo (whether a dependency in the tree is or becomes malicious), not on an in-repo defect. Criticality is membership, so it renders as a finding all the same.
The rejection record — what the filter removed, and why
The old catalog's other patterns fell into two classes:
Blast-radius patterns (including three catalog-HIGHs). Real weaknesses
that make a breach worse if an attacker is already in, with no chain that
starts at outsider: workflow-scoped OIDC tokens (P14.8), long-lived cloud
credentials where OIDC exists (P14.12), cache steps in release jobs (P8.3).
These are exactly the findings a maintainer reads and cannot act on that
day — the noise the descope removed. ONE of them is already a pass/fail fact
in the CI Score: workflow-scoped OIDC tokens (P14.8) is ci-score's
ci.security.scoped-id-token. The other two are scored nowhere.
Presence-shaped hygiene observations. A defense being absent is not an
attack being possible: missing permissions: blocks (P5.5), unpinned
versions (P5.1), workflow-level permission scoping (P14.3), no CODEOWNERS on
workflows (P14.20), no scanner installed (P14.5), tag-pin audit hygiene
(P14.2), release-environment gating (P8.4), checkout credential persistence
(P14.16), secrets: inherit (P14.17), broad artifact upload (P14.22),
malformed if: (P14.23), and the manual-review checklist entries (P14.6).
P14.23's rejection still stands, and the scanner naming a dead
github.event.* field beside an existing finding does not reconsider it:
that raises no finding and changes no count — it tells the reader whether
the gate they can already see, on a vector already in the ten, is capable
of restricting anything.
These either became scored config facts — where a one-line
pass/fail is the honest weight for a presence fact — or were dropped.
Three more from the old catalog, named here for completeness. A rejection record is only usable if it accounts for every id the old catalog carried, and these three were removed without being written down:
- Untrusted-event trigger presence (P14.1) reports a precondition, not a
finding.
pull_request_targetand its siblings are the entry condition for three vectors that ARE in the ten — the shared-cache write (P14.7), fork code executed with privileges (P14.9), andpull-requests: writeon an untrusted trigger (P14.18) — and the template injection those events feed (P14.10) is raised on its own, independent of the trigger — so a maintainer whose repo is clean against those has nothing left to do about the trigger itself. Naming it separately restates the precondition of findings the scan already raises. - Secret passed on the command line (P14.21) fails the outsider-chain test. Process arguments are readable to whatever already executes on that runner, so the exposure widens a breach rather than starting one. Its second arm — the value reaching a run log, which on a public repo anyone can read, and where transforming the secret defeats GitHub's literal-string masking — does start at outsider, but only when the command echoes the value back. The detector never established that: it fired on the interpolation alone. A chain conditional on a shape the check does not test is not the complete chain the filter requires. That places it with the blast-radius class above: real, and not a chain that starts at outsider.
- Secrets accessible to jobs without environment scoping (P14.4) fails the
outsider-chain test. It listed every job reading a stored secret without an
environment:gate — the structural precondition, not proof the secret is a sensitive publish credential, and not a chain an outsider can walk. The routes an attacker actually takes to that secret are already in the ten: a compromised test job, or a workflow added on a malicious PR, both mean execution on the runner first. That places it with the blast-radius class above. Its output also needed per-job human triage to tell release tokens from benign build ones — advisory as flagged, and only HIGH once a human confirmed which jobs mattered. Its concern now lives as a scored config fact, not a finding:sec.environments.branch-restrictedasks whether each deployment environment is limited to branches a leaked push credential cannot create or move (or requires a reviewer), read from the repository's environment settings rather than from which jobs name anenvironment:, andsec.secrets.environment-scopedbeside it names the repository and organisation secrets every branch can read (security-facts.md). Both stay blast radius, so they stay out of the ten.
No detector for any of the three ships, so none of them can raise a finding.
Test fixtures named for two of them (p14_1_*, p14_21_*) do still ship, kept
deliberately as the negative space the scan must stay silent on. Re-admitting
any of the three means passing the three tests above and updating the census,
exactly as for any other entry in this record.
Two catalog-MEDIUM patterns passed the filter and stayed: the fork-code trust chain (P14.9 — its severity was raised to HIGH with the rebuilt detector) and unverified remote code execution (P14.24 — the Codecov chain, which is the piped-installer arm, is real; the mutable-fetch arm shares that chain's trust model rather than a breach of its own. Either way the potency depends on a live condition, which is why its catalog severity stays MEDIUM while it remains a critical finding by membership).
The removed patterns are not shipped with the skill; re-admitting any entry means passing this document's three tests and updating the census.
Build provenance and artifact attestation, evaluated against the three tests
Build provenance / artifact attestation —
actions/attest-build-provenance, cosign / sigstore signing, SLSA levels —
was never a catalog pattern. Its evaluation is stated here so the absence is a
decision on the record:
- Outsider-chain test — fails. Attestation does not sit between an
outsider and a compromise of this pipeline. It changes nothing an attacker
can do to the workflows in this repo: the fork PR still runs, the poisoned
cache is still restored, the interpolated title still reaches the shell.
What it adds is a signed statement that the consumers of what CI emits
can verify downstream — a different party, defending a different chain (a
substituted or forged artifact somewhere between this repo and them). The
one direction that does touch this pipeline is verifying what a workflow
consumes —
gh attestation verifyon a downloaded installer before running it — and that is a second mitigation for a chain already in the ten (P14.24), whose same-day fix is pinning. It adds no chain the catalog lacks. - Incident test — passes, and is not decisive. Build-system compromise and artifact substitution have happened in public; that is not in dispute. The incidents the practice answers are consumer-side substitutions, downstream of the pipeline this skill scans, so a pass here admits nothing once test 1 has failed.
- Same-day-fix test — fails. "Attest your builds" is a program, not an edit: it needs a decision about which artifacts count as releases, an identity to attest to, and — the load-bearing half — a verifier on the consuming side. That value is realized by the consumer, who is usually not the maintainer reading the finding.
The exclusion stands. A maintainer whose repo is clean against the ten is not "attestation-deficient", and saying so would be a finding a maintainer reads and cannot act on. It is not a catalog pattern, carries no pattern id, and does not change the counts the census checks.
What "critical" means here
Criticality is membership in this list. The catalog's severity field
still records each unfixed attack's potency (HIGH/MEDIUM), but the report
does not tier, top up, or truncate: every finding from these ten renders,
every one carries its attacker scenario, and zero findings is a first-class
result. One of the ten (P14.11) needs the GitHub API; when it cannot run,
the report says so explicitly — a skipped check is never a silent pass.
Platform mitigations — dated, and scoped to what they actually close
Several of these vectors were partly mitigated by GitHub platform changes in mid-2026. The catalog records each change with its date and the residuals GitHub itself enumerates, on the entry it affects (P14.7, P14.9, P14.18, P14.25). A platform default that closes the classic entry on github.com does not retire the vector — Enterprise Server, third-party backends, opt-outs and pinned action versions keep it live — so the detectors and severities are unchanged, and the finding says which of those residuals applies to the reader.
Adding a pattern — the mechanical checklist
A candidate that passes all three tests above is a deliberate catalog change,
not a drift; the census test (tests/test_census_why_these_ten.py) fails any
catalog/doc mismatch. Mechanically, in ONE change:
- append a
### Pxx.ysection tosecurity-patterns.mdwith a METADATA block (schema in the catalog's## METADATA schemasection) and the five prose markers —**TL;DR.**,**What an attacker can do.**,**Anti-pattern**:,**Fix recipe**,**Risk of the change.**.tests/test_census_why_these_ten.pypins all five, and**Anti-pattern**:is pinned WITH its trailing colon; - add a fixture the detector fires on, at
tests/fixtures/dot-github/workflows/pXX_Y_*.yml.fixture— the.yml.fixturesuffix anddot-github/directory keep fixtures out of the scanner's own workflow scans and off registry scanners — and register its hash intests/fixtures/cloak-manifest.json, or the cloak-prune step drops it; - update the list and rejection record in THIS document in the same change.
F7's required-verdict assertion extension (2026-10-26) belongs to the existing
API-gated configuration fact, not a new attack vector or offline guess about
branch protection. It catches a required check that runs but accepts missing
verification. Its stronger pass meaning and unmeasured assertion coverage are
documented in security-facts.md; historical score values are not equivalent
measurements merely because this extension preserves the fact IDs.