Supply chain check
Goal
Reduce the chance that code the team did not write runs with the team's privileges.
A good check gives a clear adopt, avoid or replace call on each package with the evidence, and closes the common pipeline gaps.
When to use
- The user is about to add a new dependency or GitHub Action.
- A strange package name appears in the lockfile.
- The team wants build and release hardening.
- For known CVEs in packages already used, use
use_skillwithdependency-vulnerability-triage.
Steps
- Name the package and registry. Read its registry page with
read_url: owner, first publish date, recent release history, download trend, linked repository. - Compare the registry name with the repository and with the name the user meant. Look for lookalikes and swapped letters.
- Read the source repository with
read_url: activity, number of maintainers, open security issues, whether the published package matches a tag. - Inspect install-time code. For npm check
scripts(preinstall,install,postinstall) in the manifest. For Python look atsetup.pyside effects. - Download the package without running it, such as
npm packin an empty directory throughrun_command, and read what it contains withlsandrgfor network calls,eval, obfuscated blobs and credential reads. - Count the transitive dependencies the package would bring in and prefer smaller trees. Ask whether the standard library or a few lines of code would do.
- Check the project's lockfile with
read_file: it is committed, and CI installs from it with a command that fails on drift (npm ci,pip install --require-hashes). - Check CI configuration: third party actions pinned to a full commit hash, minimal token permissions, no secrets exposed to pull requests from forks, and a protected release branch.
- Check registry settings: publish tokens scoped and short lived, two-factor on maintainer accounts, and provenance attestations if the ecosystem supports them. Confirm current features with
search_web. - Check that private package names are claimed on the public registry or scoped, to prevent dependency confusion.
- Write the decision per package and the pipeline fixes with
edit_filewhere simple. - State what was not reviewed, such as compiled binaries.
Gotchas
- Download counts are easy to inflate and prove nothing about safety.
- A trusted package can be compromised by a maintainer account takeover. Pin versions and review updates to sensitive packages.
- The repository on the registry page may differ from the published tarball. Read the tarball.
- A tag like
@v3on a GitHub Action can move. Only a commit hash is fixed. - Running the package's install script to inspect it executes its code on your machine. Inspect first, in an isolated environment.
- Auto-merge of dependency bump pull requests passes any malicious release straight into production.
Output
- Per package: adopt, avoid or replace, with evidence lines.
- Pipeline hardening list with changes made.
- Residual risks and what was not checked.
