Supply chain and dependency review

From makifbaysal/tasktrooper · View interactive version

Supply chain and dependency review is an AI agent skill from the GitHub repository makifbaysal/tasktrooper. Use when the diff adds, upgrades, re-sources or re-pins a dependency - manifests, lockfiles, go.mod replace, Docker base images, GitHub Actions uses, Terraform modules, submodules, vendored or generated code, curl-pipe-sh installs - or changes what goes into a package or image, how releases are sign

How to use this skill

Skill file

Supply Chain and Dependency Review

Overview

A dependency is code you run without reviewing it. A diff that adds or changes one asks the reviewer to vouch for code that is not in the diff. You cannot read it all; you can check whether it is known-bad, misspelled, newly hijacked, or able to run code at install time. OWASP Top 10:2025 lists this as A03 Software Supply Chain Failures.

Core principle: judge the dependency change by evidence — advisories, identity, provenance. Unavailable data is never evidence of risk, and an absent measurement is never a clean verdict.

1. Find Every Dependency Change

git diff --name-only "$base" | grep -E 'package(-lock)?\.json|pnpm-lock|yarn\.lock|bun\.lock|go\.(mod|sum)|pom\.xml|\.gradle(\.kts)?|libs\.versions\.toml|requirements.*\.txt|pyproject\.toml|poetry\.lock|uv\.lock|Pipfile|Cargo\.(toml|lock)|Gemfile|Podfile|Package\.resolved|pubspec|\.csproj|packages\.lock\.json|Dockerfile|\.github/workflows|\.terraform\.lock\.hcl|\.gitmodules'
git diff "$base" -- package-lock.json | grep -E '^\+\s+"(node_modules/[^"]+|version|resolved|integrity|hasInstallScript)"'

Also: curl … | sh and wget … | bash in scripts and Dockerfiles, new uses: lines, FROM lines, replace directives, git URLs in manifests, vendored directories.

2. Advisories — Version-Matched

Query OSV for each new or changed name@version. fetch_url is GET-only, so the query goes through run_terminal (a network read, not project code):

curl -s https://api.osv.dev/v1/query \
  -d '{"package":{"name":"lodash","ecosystem":"npm"},"version":"4.17.20"}'

Ecosystem names: npm, PyPI, Go, Maven, crates.io, RubyGems, NuGet, Packagist, Pub. Details of one advisory: fetch_url https://api.osv.dev/v1/vulns/<id>. A cross-check with publish dates and advisory keys: fetch_url https://api.deps.dev/v3/systems/npm/packages/<url-encoded name>/versions/<version>.

Then judge it:

3. Identity — Typosquats, Slopsquats, Confusion

A likely typosquat or confusion vector on a new dependency → block.

4. Install-Time Code Execution

Not a block by itself — many legitimate packages compile native code — but it turns any identity doubt into a block, and it is why you never install the dependency to look at it.

5. Provenance, Pinning and Drift

6. What Goes Into the Artifact

7. Signing, Releases and Updates

Severity Guide

Malicious package, likely typosquat, or dependency-confusion vector → CRITICAL. An updater or verifier that accepts an artifact signed by anyone → CRITICAL. Critical/high advisory with a fix on a new or changed dependency, secrets shipped in a published image or package → HIGH (block). Unpinned action, missing lockfile update, abandoned upstream → MEDIUM note.

Common Mistakes

Red Flags

References (names and links only)

OWASP Top 10:2025 A03 Software Supply Chain Failures · OSV API · deps.dev API · OpenSSF malicious-packages · OpenSSF Scorecard · CVE-2025-30066, CVE-2026-33634

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.