Supply chain dependency security

From uw-ssec/rse-plugins · View interactive version

Supply chain dependency security is an AI agent skill from the GitHub repository uw-ssec/rse-plugins. Use when reviewing a dependency update, a Dependabot or Renovate PR, a manifest's dependency list (package.json, pyproject.toml, pixi.toml), or a lockfile (package-lock.json, yarn.lock, pnpm-lock.yaml, uv.lock, poetry.lock, pixi.lock, conda-lock.yml, requirements.txt); when adding a new package; whe

How to use this skill

Skill file

Supply Chain Dependency Security

Keeps malicious releases out of dependency updates and CI installs.

Core principle: a clean CVE scan says nothing about a version published hours ago: no advisory exists yet.

Observed 2025–2026, verified 2026-11: major incidents were maintainer account takeovers, not typosquats. Campaigns: supply-chain-threat-awareness.

When to Use

Not for workflow hardening (supply-chain-hardened-ci-cd). If a dependency is compromised:

REQUIRED SUB-SKILL: Use supply-chain-security:supply-chain-incident-response

Rules

  1. Lockfile only. Commit it. CI's install command must fail on a stale lockfile. No * or latest in manifests.
  2. Install scripts off. Never drop --ignore-scripts, even once. Rebuild only what needs it:

```bash

npm ci --ignore-scripts

npm rebuild <package>

```

npm 12+: approve it first (npm install-scripts approve <package>, commit package.json).

  1. 7-day cooldown. Nothing younger merges. Cooldown settings filter resolution, not locked versions. Age-check every version a lockfile diff adds: npm view <package> time, PyPI https://pypi.org/pypi/<package>/<version>/json (upload_time_iso_8601), pixi search <package>==<version>. Security fixes: see /supply-chain-lockfile-check.
  2. Check the publisher. Compare with earlier releases (npm view <package>@<version> _npmUser), run npm audit signatures, read npm diff --diff=<package>@<old> --diff=<package>@<new>. A first-time publisher on an established package signals takeover: hold the version.
  3. .pth files: use the PyPI .pth check in supply-chain-ecosystem-quirks.
  4. Findings: class, <package>@<version>, advisory or campaign, install-time reach, fix.

Quick Reference

| Tool | CI install | Resolver cooldown |

|---|---|---|

| npm | npm ci --ignore-scripts | .npmrc: min-release-age=7 (11.10+) |

| pnpm | pnpm install --frozen-lockfile | pnpm-workspace.yaml: minimumReleaseAge: 10080 (minutes; 10.16+) |

| Yarn | yarn install --immutable with enableScripts: false (default from 4.14); v1: --frozen-lockfile --ignore-scripts | .yarnrc.yml: npmMinimalAgeGate: 10080 (minutes; 4.10+) |

| uv | uv sync --locked | [tool.uv]: exclude-newer = "7 days" (0.9.17+) |

| Poetry | poetry check --lock && poetry install (fails on a missing or stale lock) | poetry config --local solver.min-release-age 7 (2.4+) |

| pip | pip install --require-hashes -r requirements.txt | --uploaded-prior-to P7D (26.1+) |

| pixi | pixi install --locked | [workspace]: exclude-newer = "7d" (0.67+) |

| conda-lock | conda-lock lock --check-input-hash -p <platform>, git diff --exit-code conda-lock.yml, then conda-lock install -n <env> conda-lock.yml | none |

Bots: Dependabot cooldown: with default-days: 7; Renovate "minimumReleaseAge": "7 days". Neither delays security updates.

Rationalizations

| Excuse | Reality |

|---|---|

| "Only for the demo build", "temporary" | One build with scripts on is all a malicious postinstall needs. |

| "--ignore-scripts breaks the build" | Only packages needing an install step break; rebuild those. |

| "It's a trusted, popular package" | Takeovers target trusted packages; popularity is the payoff. |

Red Flags

Either one: keep the control, hold the version.

Common Mistakes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.