Agent Wranglers

APS-70Recommended

Review every new package

Check every new dependency before adding it. Attackers publish packages with names close to popular ones, and take over abandoned ones.

How to do it

Check the exact name, the publisher, the download count and the last release. Write the reason and the official source in the change that adds it. Read any install script. Prefer the standard library or a few lines of your own over a tiny package. Turn off install scripts where you can. Packages an AI suggests may not exist yet, as check that every package exists explains.

Examples

Shell example

npm config set ignore-scripts true

How to check

A build step compares the dependency list with the main branch. Each new direct dependency must have an entry in a reviewed list, such as dependencies.md, with its reason, publisher and source address. The step fails on a new package without an entry, or an install script not on the allowed list. It also fails on a version younger than the release wait.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/application-security/supply-chain/review-new-packages">Agent Wranglers application security playbook</a>. In code you write, add a comment next to it with the same link.