Skip to content
Back to skills

Package Risk Audit

ASecurity

Dependency and supply-chain risk audit: lockfiles, typosquat and dependency confusion checks, OSV/CVE triage, license exposure, SBOM generation, update policy. Use when adding a package, reviewing package.json/pnpm-lock/Cargo.lock/go.mod, investigating a CVE, or preparing a release BOM.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 27, 2026
ai-agentsgogitsecurity

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned November 27, 2026

npx -y skills add novahiz/novahiz --skill package-risk-audit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Package Risk Audit?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Package Risk Audit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/novahiz-package-risk-audit/badge)](https://www.skillsdirectory.com/skills/novahiz-package-risk-audit)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "package-risk-audit"
description: "Dependency and supply-chain risk audit: lockfiles, typosquat and dependency confusion checks, OSV/CVE triage, license exposure, SBOM generation, update policy. Use when adding a package, reviewing package.json/pnpm-lock/Cargo.lock/go.mod, investigating a CVE, or preparing a release BOM."
license: "Apache-2.0"
metadata:
  author: Novahiz
  organization: Novahiz
  version: "1.0.0"
  date: September 2026
---

# package-risk-audit

Decide whether a dependency is safe to take, keep, or drop. Aligns with OWASP Top 10 2025 A03 (software supply chain failures) and OSSF package-manager practice.

## Intake (new package)

1. Exact name and registry; prefer official source over mirrors.
2. Why this package beats a small in-repo implementation (cost of ownership).
3. Repo health: maintainers, release cadence, open critical issues, OpenSSF Scorecard if available.
4. Transitive size: what it pulls in; `deps.dev` or lockfile graph.
5. License compatible with the product license.
6. Pin strategy: exact version or lockfile hash; no floating `latest`.

Reject or quarantine when: brand-new account, name within Levenshtein distance of a popular package with no clear link, install scripts that fetch remote binaries, or maintainers you cannot map to a known org.

## Typosquat and confusion

- Compare the name to the intended package (edit distance, homoglyphs, extra suffixes like `-utils`, `-pro`).
- Scope private packages (`@yorg/...`) so npm cannot silently resolve them from the public registry.
- Disable “merge with upstream” on internal proxies; fail the build on 404 instead of falling back to public.
- Claim the org name on public registries even if you only publish privately.

Confusion attacks are mostly semantic; typos are only one mechanism. A rename that swaps one word (`discord.js` vs `discord.dll`) is a real flag.

## Vulnerability triage

| Source | Use |
|---|---|
| OSV / GitHub Advisory | Primary advisory query per ecosystem |
| NVD CVE | When OSV is thin for a stack |
| OSSF malicious-packages | Known malicious publishes |

For each hit:

1. Is the package actually reachable in your build (not dev-only, not optional unused)?
2. Fixed version available? Semver-compatible?
3. Exploitability in your call path (not only CVSS).
4. Action: upgrade, patch pin, replace, or document accepted risk with an owner and review date.

Do not mass-upgrade majors in the same PR as product changes.

## Lockfile and reproducibility

- Commit the lockfile; CI installs frozen/`--frozen-lockfile`/`cargo build --locked` style.
- Prefer hash pinning the manager already stores; treat lockfile diffs as security-relevant.
- Remove unused deps on a schedule (`npm prune`, `cargo machete` equivalent, `go mod tidy`).
- Build images and artifacts from the lockfile, not from a developer’s global cache.

## SBOM and inventory

Generate a CycloneDX or SPDX SBOM on release (and on demand for customers). Contents: direct and transitive components, versions, licenses, purls. Store next to the artifact. Diff SBOMs between releases to spot unexpected new packages.

## Update policy

- Critical/high with fix: same week (or documented exception).
- Dependabot/Renovate (or equivalent) with security alerts on.
- Staged rollout when the vendor is new to you; canary before fleet-wide.
- Unmaintained dependency with no fix: plan a replacement; virtual patch only buys time.

## Checklist

- [ ] Name and registry verified; scope confusion impossible.
- [ ] Lockfile present, committed, enforced in CI.
- [ ] OSV/advisory scan clean or triaged with owners.
- [ ] License recorded in SBOM; copyleft OK for ship context.
- [ ] Install scripts reviewed or disabled.
- [ ] Transitive graph understood for the new package.
- [ ] Update bot and alert channel configured.

## Sources

OWASP Top 10 2025 A03; OSSF package-manager best practices (npm and peers); OSV schema and OSSF malicious-packages; ConfuGuard / Neupane package-confusion research. Original Novahiz synthesis.

Files in this skill

  • SKILL.md3.9 KB
  • references/intake-worksheet.md511 B
  • scripts/dep_risk_lint.mjs4.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.