skills/package-security-check/SKILL.md
Run a reusable JavaScript supply-chain security baseline with pnpm-first hardening, release-age gating, lifecycle-script controls, exotic dependency checks, CI install checks, and optional incident IOC profiles.
npx skillsauth add regenrek/agent-skills package-security-checkInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
python3 scripts/check_js_supply_chain.py --root <repo-or-workspace-root>
Use --strict when the check should fail on hardening gaps. Use --json when another tool needs machine-readable output. Use --include-installed only when node_modules exists and installed package lifecycle metadata matters.
python3 scripts/check_js_supply_chain.py \
--root <repo-or-workspace-root> \
--ioc data/iocs/npm-supply-chain-2026-05.json \
--since 2026-05-11T19:20:00Z
Refresh incident facts from current advisory sources before relying on a profile. IOC profiles are detection data, not the base policy.
package_manager_policyrepo_config_findings and effective_config_findingsrisky_direct_specspackage_lifecycle_scripts, then installed_lifecycle_scripts when requestedci_install_findings, including GitHub Actions privilege/cache warningsioc_hitsrecent_package_manager_filesUse pnpm 11 or newer as the single package manager because it has the best current pnpm security model: release-age gating, lifecycle-script approval, exotic-subdependency blocking, and trust policy controls.
Verify the current pnpm release before writing packageManager:
npm view pnpm dist-tags --json
Require pnpm 11 or newer. As of 2026-05-12, npm reports latest as pnpm 11.1.1. Do not hardcode that value without rechecking. If the repo's Node runtime cannot run pnpm 11, report it as a compatibility blocker instead of silently falling back to pnpm 10.
Use devEngines.packageManager to declare the required major:
{
"devEngines": {
"packageManager": {
"name": "pnpm",
"version": ">=11.0.0",
"onFail": "download"
}
}
}
Also pin the verified current stable version in packageManager for reproducibility:
{
"packageManager": "[email protected]"
}
Treat pnpm 10 or older as legacy-pnpm-major unless the user explicitly approves a temporary exception.
pnpm >=11: canonical baseline. Prefer this for new hardening work.bun: accepted only when the repo intentionally uses Bun and has equivalent local hardening.npm: fallback only. Recommend migration to pnpm 11 unless the repo has a clear documented reason to stay npm.yarn: not accepted baseline for this skill. Recommend pnpm 11 or hardened Bun.Do not present npm as equivalent to pnpm 11. Bun can be accepted as a project-level choice, but still gets checked against Bun-specific hardening.
For npm fallback repos, require exact saves and reproducible CI while recommending pnpm migration:
save-exact=true
Do not claim npm has a supported release-age gate unless verified in current npm docs and local npm config ls -l.
For Bun fallback repos, require repo-local bunfig.toml:
[install]
minimumReleaseAge = 604800
exact = true
frozenLockfile = true
saveTextLockfile = true
Do not set minimumReleaseAgeExcludes without a reviewed, package-specific reason.
Add or update root pnpm-workspace.yaml:
minimumReleaseAge: 10080
minimumReleaseAgeStrict: true
minimumReleaseAgeIgnoreMissingTime: false
blockExoticSubdeps: true
trustPolicy: no-downgrade
trustPolicyIgnoreAfter: 43200
dangerouslyAllowAllBuilds: false
savePrefix: ""
allowBuilds: {}
Use 7 days (10080) for normal repos. Use 3 days only when the repo has a real dependency freshness requirement. Do not set minimumReleaseAgeExclude or trustPolicyExclude without a reviewed, package-specific reason.
Allow dependency build scripts only after review:
allowBuilds:
esbuild: true
core-js: false
Require frozen pnpm installs:
pnpm install --frozen-lockfile
Treat these as findings unless the repo has a written reason:
npm install, yarn install, unfrozen bun install, or unfrozen pnpm installnpm ci with a committed lockfile while migration is pendingbunfig.toml release-age, exact, frozen-lockfile, or text-lockfile policypull_request_target workflows; these are allowed only with a reviewed reason and must not checkout or run untrusted PR codelatest, *, broad ranges, Git/GitHub shorthands, HTTP tarballs, or external file: specsdangerouslyAllowAllBuilds: truetoJSON(secrets) or publish credentials in broad build jobsscripts/check_js_supply_chain.py performs deterministic local checks:
pull_request_target and shared cache patterns that can become supply-chain escalation paths--sinceKeep incident profiles under data/iocs/. Do not add incident-specific constants to the scanner unless they are generic across npm supply-chain attacks.
tools
Live-test any Electron desktop app with native-devtools-mcp, Chrome DevTools Protocol, screenshots, OCR, and accessibility tools. Use when the user asks for Electron UI verification, MCP-driven app control, renderer CDP interaction, native desktop automation, screenshots, or OCR-driven checks.
testing
Find, clone, inspect, and summarize high-quality GitHub reference repositories for coding agents. Use when a user asks for GitHub reference projects, examples, prior art, inspiration, implementation patterns, or includes "$search-context" in a coding prompt.
testing
Run or install repo security leak checks with BetterLeaks and Trivy. Use when asked to scan for leaked secrets, vulnerable dependencies, misconfigurations, add secret-leak guardrails, add BetterLeaks, add forbidden-path hooks, or run secleak-check before release.
development
Stage a finished local feature, run local verification, create a Conventional Commit, then send it through the no-mistakes gated review/fix loop before real upstream push/PR. Use when the user says a feature is done, asks for a professional stage-review flow, wants Codex to git add and commit safely, or wants no-mistakes review/verify/fix before pushing to origin.