npm-harden
Hardens npm, pnpm, and Yarn v2+ projects against supply chain attacks. Audits package manager configuration, version pinning, and lockfile hygiene to protect the npm supply chain. Trigger with /supplychain:npm-harden or /supplychain:npm-harden <path>.
- License 许可
- GPL-3.0
- 最近更新
- 2026-10-16
- Stars
- ★ 13
- Forks
- 1
01 前言 Front Matter
- name
- npm-harden
- description
- Hardens npm, pnpm, and Yarn v2+ projects against supply chain attacks. Audits package manager configuration, version pinning, and lockfile hygiene to protect the npm supply chain. Trigger with /supplychain:npm-harden or /supplychain:npm-harden <path>.
03 SKILL.md 正文
Trigger
Activate on /supplychain:npm-harden or /supplychain:npm-harden <path>. Treat the path as project root, or use cwd.
Step 1 — detect manager
grep -oE '"packageManager":\s*"[^"@]*' package.json 2>/dev/null | grep -oE '[a-z]+$'
ls pnpm-lock.yaml yarn.lock package-lock.json 2>/dev/null || true
Detect from packageManager field, then from whichever lockfile is present. Run the matching block below as a single bash call.
pnpm:
echo "MGR=pnpm"
echo "PNPM_VERSION=$(pnpm --version 2>/dev/null)"
echo "GLOBAL_RELEASE_AGE=$(pnpm config get minimumReleaseAge 2>/dev/null)"
echo "LOCKFILE=$(ls pnpm-lock.yaml 2>/dev/null && echo PRESENT || echo ABSENT)"
echo "LOCKFILE_GITIGNORED=$(grep -qE 'pnpm-lock' .gitignore 2>/dev/null && echo YES || echo NO)"
echo "DANGEROUSLY=$(grep -qE '(dangerouslyAllowAllBuilds|dangerously-allow-all-builds)[:=]\s*true' pnpm-workspace.yaml .npmrc 2>/dev/null && echo YES || echo NO)"
echo "PKG_MANAGER_FIELD=$(grep -oE '"packageManager":\s*"[^"]*"' package.json 2>/dev/null | grep -oE '[a-z]+@[0-9][^"]*' || echo NOT_SET)"
echo "GLOBAL_IGNORE_SCRIPTS=$(pnpm config get ignore-scripts 2>/dev/null)"
echo "ONLY_ALLOW=$(grep -oE '"preinstall":\s*"[^"]*only-allow[^"]*"' package.json 2>/dev/null || echo NOT_SET)"
echo "=== RELEASE_AGE ===" && grep -E "minimumReleaseAge|minimum-release-age" pnpm-workspace.yaml .npmrc 2>/dev/null || echo "NOT_SET"
echo "=== NPMRC ===" && grep -E "ignore-scripts|ignoreScripts" .npmrc 2>/dev/null || echo "NOT_SET"
echo "=== BUILD_POLICY ===" && grep -E "dangerouslyAllowAllBuilds|allowBuilds|strictDepBuilds|onlyBuiltDependencies|ignoredBuiltDependencies" pnpm-workspace.yaml 2>/dev/null || echo "NOT_SET"
echo "=== HARDENING ===" && grep -E "blockExoticSubdeps|trustPolicy" pnpm-workspace.yaml 2>/dev/null || echo "NOT_SET"
echo "=== EXOTIC_DEPS ===" && grep -oE '"[^"]+": "(git\+?https?://[^"]+|github:[^"]+|bitbucket:[^"]+|gitlab:[^"]+|[^"]+\.tgz|file:\.\.)"' package.json 2>/dev/null || echo "NONE"
echo "RANGE_TOTAL=$(grep -cE '"[\^~]' package.json 2>/dev/null || echo 0)"
echo "=== PKG_NAME ===" && grep -oE '"name":\s*"[^"]*"' package.json 2>/dev/null | head -1
echo "=== RANGES ===" && grep -oE '"[^"]+": "[\^~][^"]*"' package.json 2>/dev/null | head -8
npm:
echo "MGR=npm"
echo "LOCKFILE=$(ls package-lock.json 2>/dev/null && echo PRESENT || echo ABSENT)"
echo "LOCKFILE_GITIGNORED=$(grep -qE 'package-lock' .gitignore 2>/dev/null && echo YES || echo NO)"
echo "PKG_MANAGER_FIELD=$(grep -oE '"packageManager":\s*"[^"]*"' package.json 2>/dev/null | grep -oE '[a-z]+@[0-9][^"]*' || echo NOT_SET)"
echo "=== RELEASE_AGE ===" && grep -E "min-release-age|minimum-release-age|minimumReleaseAge" .npmrc 2>/dev/null || echo "NOT_SET"
echo "=== NPMRC ===" && grep -E "ignore-scripts|save-exact" .npmrc 2>/dev/null || echo "NOT_SET"
echo "=== EXOTIC_DEPS ===" && grep -oE '"[^"]+": "(git\+?https?://[^"]+|github:[^"]+|bitbucket:[^"]+|gitlab:[^"]+|[^"]+\.tgz|file:\.\.)"' package.json 2>/dev/null || echo "NONE"
echo "RANGE_TOTAL=$(grep -cE '"[\^~]' package.json 2>/dev/null || echo 0)"
echo "=== PKG_NAME ===" && grep -oE '"name":\s*"[^"]*"' package.json 2>/dev/null | head -1
echo "=== RANGES ===" && grep -oE '"[^"]+": "[\^~][^"]*"' package.json 2>/dev/null | head -8
Yarn:
echo "MGR=yarn"
echo "YARN_VERSION=$(yarn --version 2>/dev/null)"
echo "LOCKFILE=$(ls yarn.lock 2>/dev/null && echo PRESENT || echo ABSENT)"
echo "LOCKFILE_GITIGNORED=$(grep -qE 'yarn\.lock' .gitignore 2>/dev/null && echo YES || echo NO)"
echo "PKG_MANAGER_FIELD=$(grep -oE '"packageManager":\s*"[^"]*"' package.json 2>/dev/null | grep -oE '[a-z]+@[0-9][^"]*' || echo NOT_SET)"
echo "=== RELEASE_AGE ===" && grep -E "npmMinimalAgeGate" .yarnrc.yml 2>/dev/null || echo "NOT_SET"
echo "=== YARNRC ===" && grep -E "enableScripts|defaultSemverRangePrefix" .yarnrc.yml 2>/dev/null || echo "NOT_SET"
echo "=== EXOTIC_DEPS ===" && grep -oE '"[^"]+": "(git\+?https?://[^"]+|github:[^"]+|bitbucket:[^"]+|gitlab:[^"]+|[^"]+\.tgz|file:\.\.)"' package.json 2>/dev/null || echo "NONE"
echo "RANGE_TOTAL=$(grep -cE '"[\^~]' package.json 2>/dev/null || echo 0)"
echo "=== PKG_NAME ===" && grep -oE '"name":\s*"[^"]*"' package.json 2>/dev/null | head -1
echo "=== RANGES ===" && grep -oE '"[^"]+": "[\^~][^"]*"' package.json 2>/dev/null | head -8
Step 1.5 — derive version flags
From Step 1 output, compute the booleans below once and reference them by name in Step 3. Do not repeat version comparisons in prose downstream.
CVE_FLAG: YES ifPNPM_VERSIONparses and is< 10.26.2(CVE-2025-69263/69264 unpatched). NO if parses and ≥. UNKNOWN ifPNPM_VERSIONempty/unparseable → emit ⚠️ WARN "pnpm binary not found on PATH — CVE version check skipped; ensure installed version ≥10.26.2". N/A ifMGR≠ pnpm.PKG_MGR_CVE: YES ifPKG_MANAGER_FIELDmatchespnpm@X.Y.Zwith X.Y.Z< 10.26.2. NO otherwise. Applies regardless of installed pnpm (project pin, not runtime).YARN_SCRIPTS_OFF: YES ifYARN_VERSIONparses and is≥ 4.14.0(scripts-off default landed). NO if parses and<. UNKNOWN if empty → ⚠️ WARN "yarn binary not found — version check skipped". N/A ifMGR≠ yarn.YARN_DURATION_OK: YES ifYARN_VERSIONparses and is≥ 4.12.0(npmMinimalAgeGatebecame a DURATION type, so "3d"-style strings are honoured). NO if parses and<(plain NUMBER read with parseInt — the suffix is dropped). UNKNOWN if empty. N/A ifMGR≠ yarn.AGE_DEFAULT: the release age the manager enforces with nothing configured.1difMGR=pnpmandPNPM_VERSION≥11.0.0(pnpm'sminimumReleaseAgedefault became 1440 in v11), orMGR=yarnandYARN_VERSION≥4.12.0(Yarn 4.12 gavenpmMinimalAgeGatea1ddefault — the same release asYARN_DURATION_OK).0for npm, pnpm <11, and Yarn <4.12. UNKNOWN if the manager version is empty/unparseable.
Step 2 — version rules
Yarn v1: ? CRITICAL for Lifecycle script control — scripts run by default, no allowlist. Output: "Yarn Classic detected — lifecycle scripts enabled with no protection. Same exposure as npm without ignore-scripts. Migrate to pnpm or Yarn v4." Yarn v2/v3: apply Yarn v2+ checks; scripts-off-by-default arrived in v4.14. pnpm < 10.0: allowBuilds-as-default absent — flag. pnpm < 10.26.2: CVE-2025-69263/69264 unpatched — git dep script bypass. Flag regardless.
Step 3 — checks
Apply only checks for detected manager. Read signals from Step 1 output — do not re-read files.
Lifecycle script control
pnpm: DANGEROUSLY=YES → ? CRITICAL "dangerouslyAllowAllBuilds: true — all pnpm script protection disabled. e.g. Shai-Hulud (Sep 2025) used postinstall hooks to steal credentials from 796 packages; this setting would have let it run." DANGEROUSLY=NO → ✅ PASS (pnpm v10 default). Then read BUILD_POLICY extraction: if allowBuilds present, list packages and flag non-native entries (expected: esbuild, sharp, canvas, fsevents, node-gyp); if onlyBuiltDependencies/ignoredBuiltDependencies present, note migration to allowBuilds; if strictDepBuilds: true absent, add ⚠️ WARN to HARDENING section. Global-config credit: if GLOBAL_IGNORE_SCRIPTS=true or NPMRC contains ignore-scripts=true / ignoreScripts=true, add ✅ note "lifecycle scripts globally disabled via pnpm config — defence-in-depth on top of the v10 default".
npm: Read NPMRC for ignore-scripts. Not found or ignore-scripts=false → ? CRITICAL "lifecycle scripts enabled by default — preinstall/install/postinstall run on every npm install. e.g. Axios 1.14.1 (Mar 2026) used a postinstall hook to deploy a cross-platform RAT during a 3h window; @bitwarden/cli 2026.4.0 (Apr 2026) used the preinstall hook to harvest GitHub tokens, AWS/GCP/Azure secrets, shell history, and AI-tool configs from every machine that ran npm install." ignore-scripts=true → PASS (check PackageGate: if EXOTIC_DEPS ≠ NONE, downgrade to ⚠️ WARN).
Yarn Classic (v1): ? CRITICAL "Yarn Classic — scripts run by default with no allowlist. Same exposure as npm without ignore-scripts. e.g. Shai-Hulud's postinstall worm would have executed on every yarn install. Migrate to pnpm or Yarn v4."
Yarn v2+:
YARN_SCRIPTS_OFF=NO(pre-v4.14): read YARNRC forenableScripts. Absent → ⚠️ WARN "pre-v4.14 Yarn — scripts-off default arrived in v4.14; upgrade or setenableScripts: falseexplicitly."YARN_SCRIPTS_OFF=YES(v4.14+):enableScriptsabsent/false → ✅ PASS.enableScripts: true→ ? CRITICAL "explicitly re-enabled lifecycle scripts — Yarn v4.14 ships with scripts off; this reverses that. e.g. Shai-Hulud's postinstall payload would execute on every yarn install."
Release age gate
Read RELEASE_AGE — every manager emits it, from .npmrc, .yarnrc.yml, or pnpm-workspace.yaml as appropriate — plus GLOBAL_RELEASE_AGE for pnpm. Normalise to days for output.
Unit conversion: pnpm value ÷ 1440 = days (4320 = 3d; if >43800 → WARN wrong unit). Yarn npmMinimalAgeGate: bare number = minutes ÷ 1440 = days (4320 = 3d) on every version. Duration strings ("3d"/"72h"/"1w") are only honoured on Yarn ≥4.12 — see the verdict below. npm min-release-age: value is days (3 = 3d), since npm v11.10.0; if >365 → WARN wrong unit. Only min-release-age is a real npm option: npm stores unrecognised keys verbatim and never maps them onto real options, so minimum-release-age and camelCase minimumReleaseAge are inert.
Effective value: project RELEASE_AGE takes precedence; if absent and MGR=pnpm, fall back to GLOBAL_RELEASE_AGE; if both are absent, the manager's built-in AGE_DEFAULT applies. Convert to days, then apply verdicts.
Verdicts:
MGR=npm,RELEASE_AGEhasminimum-release-ageorminimumReleaseAgeand nomin-release-age→ ? CRITICAL "release-age key not recognised by npm — npm ignores unknown keys, so the gate is inactive and the configured value never applies; rename the key tomin-release-agein .npmrc. e.g. Axios 1.14.1 (Mar 2026) was live for 3h, Shai-Hulud 2.0 (Nov 2025) for 12h, chalk/debug (Sep 2025) for 2.5h — all would have landed." Treat the value as NOT_SET in every verdict below; do not also emit the 0d finding.MGR=npm,RELEASE_AGEhas bothmin-release-ageand one of the inert spellings → apply the verdicts below tomin-release-age, plus ⚠️ WARN "inert duplicate key — npm ignores it; delete it from .npmrc so it stops implying the gate was raised."MGR=yarn,RELEASE_AGEnpmMinimalAgeGateis a duration string ("3d"/"72h"/"1w") andYARN_DURATION_OK=NO→ ? CRITICAL "release-age gate inactive — Yarn <4.12 reads npmMinimalAgeGate as a plain number through parseInt, so "3d" becomes 3 minutes and the three-day gate the team believes is in place does not exist. Upgrade to Yarn ≥4.12, where the setting became a DURATION type, or use a plain minute count, which is correct on every version: 3 days = 4320 (yarnpkg/berry#6991, reported on 4.10.3). e.g. Axios 1.14.1 (Mar 2026) was live for 3h, Shai-Hulud 2.0 (Nov 2025) for 12h, chalk/debug (Sep 2025) for 2.5h — all would have landed." Emit this in place of the day-based verdict below; do not also report a PASS for the configured value.MGR=yarn,npmMinimalAgeGateis a duration string andYARN_DURATION_OK=UNKNOWN→ ⚠️ WARN "yarn binary not found, so this cannot be verified — duration strings are honoured only on Yarn ≥4.12; below that "3d" silently becomes 3 minutes. Confirm the installed version, or switch to a plain minute count (3 days = 4320), which is correct on every version." Emit this in place of the day-based verdict below.MGR=yarn,npmMinimalAgeGateis a duration string andYARN_DURATION_OK=YES→ the suffix parses correctly ("3d"/"72h" = 3d). Convert to days and apply the verdicts below as normal; no warning.- Project NOT_SET, no exclude list,
AGE_DEFAULT=0, AND (npm/yarn OR pnpm global also NOT_SET/0) → ? CRITICAL "release age: 0d — every newly published version installs immediately. e.g. Axios 1.14.1 (Mar 2026) was live for 3h, Shai-Hulud 2.0 (Nov 2025) for 12h, chalk/debug (Sep 2025) for 2.5h — all would have landed." - Project NOT_SET, no exclude list,
AGE_DEFAULT=1d, AND (yarn OR pnpm global also NOT_SET/0) → ⚠️ WARN "release age: 1d — inherited from the manager's default, not chosen by this project. A day would have blocked all three incidents this skill cites — Axios 1.14.1 (3h), Shai-Hulud 2.0 (12h), chalk/debug (2.5h) — so the exposure is real but narrow: the value is invisible in the repo, disappears if anyone pins an older manager, and does nothing against a compromise that goes unnoticed for longer. Commit an explicit 3 days — pnpm-workspace.yaml: minimumReleaseAge: 4320, or .yarnrc.yml: npmMinimalAgeGate: 4320." - Project NOT_SET, no exclude list,
AGE_DEFAULT=UNKNOWN→ ? CRITICAL "release age not configured, and the manager version could not be read to tell whether a built-in default covers it — treat as 0d until confirmed. e.g. Axios 1.14.1 (Mar 2026) was live for 3h, Shai-Hulud 2.0 (Nov 2025) for 12h, chalk/debug (Sep 2025) for 2.5h — all would have landed." - Project NOT_SET, pnpm
GLOBAL_RELEASE_AGE≥4320 (3d) → ✅ PASS + note "pnpm global config supplies minimumReleaseAge={N}d — consider committing topnpm-workspace.yamlfor team visibility and new-joiner parity." - Project NOT_SET, pnpm
GLOBAL_RELEASE_AGE1-2d → ⚠️ WARN "global config has release age <3d — raise to 4320 and commit to workspace file." - Exclude present, base NOT_SET (and no global fallback) → ? CRITICAL "exclude list set but gate inactive — team believes release-age protection is on; it is not. e.g. Axios 1.14.1 would have installed silently despite the apparent configuration."
- Exclude present, base set → ✅ note excluded packages, flag non-internal-scoped ones
- <1d → ⚠️ WARN
- 1–2d → ✅ PASS + note "consider 3d"
- ≥3d → ✅ PASS
packageManager field
Read PKG_MANAGER_FIELD signal.
NOT_SET→ ⚠️ WARN "packageManager field absent — manager version floats between environments. Add\"packageManager\": \"pnpm@x.y.z\"to package.json."- Present, fully pinned with patch (e.g.
pnpm@10.26.2) → ifPKG_MGR_CVE=YES→ ? CRITICAL "pinned to CVE-affected version — update to ≥10.26.2. e.g. pnpm <10.26.2 allows a git dependency to override the git binary via .npmrc and execute scripts even with dangerouslyAllowAllBuilds: false (CVE-2025-69263)." Else → ✅ PASS. - Present, partially pinned (e.g.
pnpm@10orpnpm@10.26) → ⚠️ WARN "missing patch version — pin to exact (e.g. pnpm@10.26.2) to prevent silent patch updates."
Lockfile
Read LOCKFILE signal. ABSENT → ? CRITICAL "no lockfile — every install resolves versions fresh from the registry. e.g. running pnpm install during Axios's 3h attack window would have pulled 1.14.1 with no barrier." Read LOCKFILE_GITIGNORED. YES → ? CRITICAL "lockfile gitignored — --frozen-lockfile has no baseline to enforce; teams fall back to unfrozen installs. e.g. Axios 1.14.1 would resolve on any CI run during the attack window." Both OK → ✅ PASS.
Exotic sources
Read EXOTIC_DEPS. NONE → ✅ PASS for direct deps. Then read HARDENING for blockExoticSubdeps: present+true → ✅; absent → ⚠️ WARN (pnpm only).
npm + EXOTIC_DEPS ≠ NONE → ? FAIL (PackageGate unpatched bypass).
pnpm + EXOTIC_DEPS ≠ NONE + CVE_FLAG=YES → ? FAIL (CVE-2025-69263/69264 — git dep can override git binary via .npmrc).
pnpm + EXOTIC_DEPS ≠ NONE + CVE_FLAG=NO → ⚠️ WARN.
pnpm + EXOTIC_DEPS ≠ NONE + CVE_FLAG=UNKNOWN → ⚠️ WARN "exotic deps present; pnpm version unverifiable — ensure ≥10.26.2 before install."
Trust policy (pnpm only)
Read HARDENING for trustPolicy. no-downgrade present → ✅ PASS. Absent → ⚠️ WARN.
Version ranges
Read RANGE_TOTAL. 0 → ✅ PASS immediately, no further processing.
If >0: read PKG_NAME to determine internal scope (e.g. @eyectrl-engineering, @eye). Classify each entry in RANGES as internal (matches own scope) or external.
Verdicts — ranges are the belt-and-suspenders layer. Release-age + lockfile + CI frozen-install carry the primary weight; when those three hold, ranges are a reproducibility concern, not an acute supply-chain risk.
- All internal → ⚠️ WARN "internal
^/~ranges — tighten to exact for reproducibility; supply-chain risk already contained by lockfile + CI frozen install." - Any external + lockfile committed + not gitignored → ⚠️ WARN "external
^/~ranges present. Committed lockfile contains the acute risk; remaining exposure is manualnpm/pnpm/yarn installorupdatecalls by developers that bypass the lockfile. Run/supplychain:ci-auditto verify CI enforces--frozen-lockfile/--immutable. Pin to exact versions for defence-in-depth." List up to 5 external fromRANGES; 6+ → count + first 5. - Any external + lockfile absent or gitignored → ? FAIL "external
^/~ranges combined with the lockfile gap — unfrozen install resolves fresh from registry and a malicious patch cleared of the release-age gate lands automatically." List up to 5 external.
Config tie-ins (print under the finding as additional └─ lines if applicable):
- npm:
NPMRCmissingsave-exact=true→ add ⚠️ WARN note and suggest└─ .npmrc: save-exact=true. - Yarn:
YARNRCmissingdefaultSemverRangePrefix→ add ⚠️ WARN note and suggest└─ .yarnrc.yml: defaultSemverRangePrefix: "". - pnpm: no equivalent config; suggest only exact-pin fixups in
package.json.
Fix-line examples:
└─ package.json: replace "^1.2.3" with "1.2.3" (exact pin)
└─ .npmrc: save-exact=true
└─ .yarnrc.yml: defaultSemverRangePrefix: ""
Manager enforcement (pnpm only)
Read ONLY_ALLOW. Checks whether the project blocks teammates from accidentally running npm install / yarn install and bypassing pnpm's protections.
- Present (any
preinstallmatchingonly-alloworonly-allow pnpm) → ✅ PASS "preinstall guard blocks non-pnpm installs". NOT_SET→ ⚠️ WARN "no preinstall guard — a teammate runningnpm installout of habit silently createspackage-lock.json, installs without pnpm's release-age gate, and runs lifecycle scripts with npm defaults. Add\"preinstall\": \"npx only-allow pnpm\"to package.json scripts."
Fix line:
└─ package.json: "scripts": { "preinstall": "npx only-allow pnpm" }
Step 4 — output format
HARD STOP: output ends after ✅ PASSING. Do not generate patch files, config summaries, YAML blocks, or offers to apply fixes. Each fix is already specified inline in its section. Adding anything after PASSING is explicitly prohibited.
No separate check results block. Each check appears exactly once inside its category. PASSING goes last.
Icon system — shape and color both carry meaning:
- ? CRITICAL — any of: unpatched CVE in installed tooling; dangerouslyAllowAllBuilds: true; npm ignore-scripts absent (scripts run by default — primary attack vector); release age not configured and the manager applies no default of its own (npm, pnpm <11, Yarn <4.12); npm release-age key spelled so npm ignores it (gate inactive); Yarn <4.12 with a duration-string release-age value (parsed as minutes — a 3d gate is 3 minutes); minimumReleaseAgeExclude set without minimumReleaseAge (false security posture); lockfile gitignored. Do not use for optional hardening gaps.
- ? FAIL — real gap needing a fix (Yarn Classic, lockfile absent, exotic deps with CVE exposure, external ranges + lockfile gap)
- ⚠️ WARN — hardening opportunity, not immediately exploitable
- ✅ PASS — clean, shown last
- ➖ N/A
pnpm is safer by default (scripts off in v10, more security settings available) so pnpm projects have fewer CRITICAL findings than npm for the same security posture. This is correct and expected.
Apply the same icon to the section header as to its highest-severity item.
Structure:
/supplychain:npm-harden · [project name] ([manager] [version])
? N critical ? N failing ⚠️ N hardening ✅ N passing
→ [top fix]
? Hardening guide: [manager docs URL — see table below]
[sections...]
Omit any zero-count category from line 2. If everything passes: ✅ all passing.
Line 2 is a count of checks, not sections. Count each check finding that has a result.
Hardening-guide link (line 4, one line, plain URL — no markdown link syntax, renders cleanly in monospace):
MGR |
URL |
|---|---|
pnpm |
https://pnpm.io/supply-chain-security |
npm |
https://github.blog/security/supply-chain-security/our-plan-for-a-more-secure-npm-supply-chain/ |
yarn (v1 or v2+) |
https://yarnpkg.com/features/security |
Emit exactly one line. If MGR is unknown, omit the ? line entirely.
Fix line format — every fix uses this pattern:
└─ [filename]: [exact config value]
The └─ prefix visually separates the fix from the description above it without relying on markdown rendering. No backticks — they appear literally in Claude Code's output pane and add noise.
Examples:
└─ pnpm-workspace.yaml: minimumReleaseAge: 4320 # 3 days in minutes
└─ package.json: "packageManager": "pnpm@10.26.2"
└─ .npmrc: ignore-scripts=true
└─ pnpm-workspace.yaml: strictDepBuilds: true
Incident examples in CRITICAL findings:
Step 3 is the sole source for finding wording. Copy both the first clause and the full e.g. line verbatim from the matching Step 3 definition. Do not paraphrase, shorten, re-order incidents, or combine multiple incidents into a new sentence. If Step 3 lists three incidents, output all three.
Layout template (placeholders are structural only — do not emit them literally):
? <Check name> <first clause, verbatim from Step 3>
<full e.g. line, verbatim from Step 3>
└─ <file>: <exact config value>
Name specific files and exact values. If CVE present, include it first. Do not repeat any finding line elsewhere in the output.
Format: → [verb] [what with exact values] — [impact]
Never add after PASSING: no patch blocks, no config summaries, no YAML, no "Want me to apply?" — output stops at the last ✅ or ➖ line. This is a hard rule.
04 同仓库更多 Skills
kitten-process
ACTIVATE when the user asks to run the kitten process, or to analyse, assess, reverse engineer, or security-test a piece of software for vulnerabilities — an installer, binary, container image, appliance, firmware, or application. Drives a repeatable 12-step vulnerability research workflow from obtaining the target through mapping attack surface, reverse engineering, finding high-impact vulnerabilities, building a proof-of-concept, and writing a vendor advisory. Every step is documented to a KITTEN_<n>.md file so the assessment is auditable. For authorized security research and responsible disclosure only.
pypi-harden
Hardens Python projects against PyPI supply chain attacks. Audits installer configuration (uv, pip, Poetry, pdm), version pinning, lockfile + hash hygiene, release-age gate, sdist execution policy, and index integrity. Trigger with /supplychain:pypi-harden or /supplychain:pypi-harden <path>.
ci-audit
Audits npm and PyPI supply-chain hardening in GitHub Actions workflows. Primary focus on how the project's package manager is invoked in CI — install commands, registry integrity, manager version pinning, publish flow (OIDC + provenance / attestations), and uncontrolled install surface (npx, pipx, global installs, curl|sh). Secondary focus on generic GitHub Actions hardening (external action SHA pinning, token permissions, pull_request_target). Trigger with /supplychain:ci-audit or /supplychain:ci-audit <path>.
supplychain
Supply-chain security for JavaScript and Python projects — npm, pnpm, Yarn v2+, uv, pip, Poetry, pdm, and GitHub Actions CI. Router skill: detects which ecosystems a project uses and dispatches to the matching sub-skill under skills/. Read this first, then read only the sub-skill(s) the project actually needs.
vendor-risk
ACTIVATE when integrating a new service, API, SaaS tool, SDK, npm/pip/maven package, Docker image, or any third-party dependency — or when discussing suppliers, vendors, processor agreements, or supply chain security. Also activate on imports from unknown packages or adding external webhooks/endpoints. Ensures every new vendor or dependency is assessed against the org's critical assets, data residency, and NIS2 Art. 21(2)(d) supply chain requirements.
security-compliance-tools
ACTIVATE when the user asks about compliance tooling, risk assessment methods, critical assets (crown jewels), or how to assess their organisation's security posture for EU regulations (NIS2, GDPR, ISO 27001). Curated index of tools and methodologies that support EU compliance — not generic AppSec tooling.