dependency-security Skill
This skill secures the software supply chain.
1. Software Composition Analysis (SCA)
"You are what you import."
- Audit: Run
npm audit/pip-audit/cargo auditin CI. - Block: Fail the build on
CRITICALorHIGHvulnerabilities. - Lock: Always verify lockfiles (
package-lock.json) matchpackage.json.
2. SBOM (Software Bill of Materials)
- Generate a list of all ingredients in your software.
- Tools:
syft,cyclonedx-cli. - Why? Rapid response when the next Log4Shell happens.
3. Dependency Pinning
- Pin Exact Versions: Avoid
^1.2.3in critical apps. Use1.2.3to prevent "works on my machine" drift. - Private Registry: For enterprise, proxy public registries to prevent "Left-Pad" incidents.
4. Typosquatting Defense
- Scope: Use
@myorg/packagescopes. - Verify: Check download counts and maintainer reputation before adding new deps.