Supply chain and setup
Most attacks walk in through someone else's code or a forgotten setting. Pin what you use, keep it current and give every account only what it needs.
- Required 8
- Recommended 2
Required
Lock and audit dependencies
RequiredCommit a lock file, install from it exactly, and fail the build on known holes in any dependency.
Review every new package
RequiredCheck every new dependency before adding it. Attackers publish packages with names close to popular ones, and take over abandoned ones.
Load third-party scripts safely
RequiredHost scripts yourself where you can. When a script must come from another server, pin its version and add an integrity hash.
Keep secrets out of builds from strangers
RequiredNever give deploy keys or other secrets to builds that run code from outside contributors. Give each build job only the access it needs.
Remove defaults and samples
RequiredChange every default password and remove sample apps, admin consoles and test pages before going live.
Keep software current and quiet
RequiredInstall security updates for the system, the server and the language runtime quickly. Don't tell visitors which versions you run.
Log attacks without personal data
RequiredLog failed logins, refused access and rate limit hits, and alert on spikes. Keep personal data out of the log.
Send the security headers
RequiredSend the browser security headers on every page, including a strict Content Security Policy, HSTS and
nosniff.
Recommended
Plan attacks before building
RecommendedBefore building a feature, write down what an attacker would want from it and how they could get it. Then design those paths away.
Publish what is in each release
RecommendedMake a software bill of materials for every release, and sign where and how the build was made.
For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers security testing playbook: https://agentwranglers.se/playbook/adversarial-testing/supply-chain-and-setup.