[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6HR1H8HZXS5E2NQZFG9BZP4":3,"skill-same:01M6HR1H8HZXS5E2NQZFG9BZP4":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":50,"ownerDescription":6,"updatedAt":51,"install":52,"resources":65},"01M6HR1H8HZXS5E2NQZFG9BZP4","npm-harden",null,"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 \u002Fsupplychain:npm-harden or \u002Fsupplychain:npm-harden \u003Cpath>.","eyesecurity\u002Fskills","eyesecurity","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F183391194?v=4","01M6HQZA25T34FZZEVX0C25SA2","Eye Security","01M6HQZA6FFY8RJG9N1YMBE6EF",13,"GPL-3.0","https:\u002F\u002Fgithub.com\u002Feyesecurity\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fsupplychain\u002Fskills\u002Fnpm-harden\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"harden","npm harden","npm","hygiene","yarn","manager","attacks","supply","with","chain","supplychain","trigger","package manager","supply chain","configuration","protect","version","projects","lockfile","package","2026-11-10 10:12:30",false,"---\nname: npm-harden\ndescription: 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 \u002Fsupplychain:npm-harden or \u002Fsupplychain:npm-harden \u003Cpath>.\n---\n\n## Trigger\n\nActivate on `\u002Fsupplychain:npm-harden` or `\u002Fsupplychain:npm-harden \u003Cpath>`. Treat the path as project root, or use cwd.\n\n## Step 1 — detect manager\n\n```sh\ngrep -oE '\"packageManager\":\\s*\"[^\"@]*' package.json 2>\u002Fdev\u002Fnull | grep -oE '[a-z]+$'\nls pnpm-lock.yaml yarn.lock package-lock.json 2>\u002Fdev\u002Fnull || true\n```\n\nDetect from `packageManager` field, then from whichever lockfile is present. Run the matching block below as a single bash call.\n\n**pnpm:**\n```sh\necho \"MGR=pnpm\"\necho \"PNPM_VERSION=$(pnpm --version 2>\u002Fdev\u002Fnull)\"\necho \"GLOBAL_RELEASE_AGE=$(pnpm config get minimumReleaseAge 2>\u002Fdev\u002Fnull)\"\necho \"LOCKFILE=$(ls pnpm-lock.yaml 2>\u002Fdev\u002Fnull && echo PRESENT || echo ABSENT)\"\necho \"LOCKFILE_GITIGNORED=$(grep -qE 'pnpm-lock' .gitignore 2>\u002Fdev\u002Fnull && echo YES || echo NO)\"\necho \"DANGEROUSLY=$(grep -qE '(dangerouslyAllowAllBuilds|dangerously-allow-all-builds)[:=]\\s*true' pnpm-workspace.yaml .npmrc 2>\u002Fdev\u002Fnull && echo YES || echo NO)\"\necho \"PKG_MANAGER_FIELD=$(grep -oE '\"packageManager\":\\s*\"[^\"]*\"' package.json 2>\u002Fdev\u002Fnull | grep -oE '[a-z]+@[0-9][^\"]*' || echo NOT_SET)\"\necho \"GLOBAL_IGNORE_SCRIPTS=$(pnpm config get ignore-scripts 2>\u002Fdev\u002Fnull)\"\necho \"ONLY_ALLOW=$(grep -oE '\"preinstall\":\\s*\"[^\"]*only-allow[^\"]*\"' package.json 2>\u002Fdev\u002Fnull || echo NOT_SET)\"\necho \"=== RELEASE_AGE ===\" && grep -E \"minimumReleaseAge|minimum-release-age\" pnpm-workspace.yaml .npmrc 2>\u002Fdev\u002Fnull || echo \"NOT_SET\"\necho \"=== NPMRC ===\" && grep -E \"ignore-scripts|ignoreScripts\" .npmrc 2>\u002Fdev\u002Fnull || echo \"NOT_SET\"\necho \"=== BUILD_POLICY ===\" && grep -E \"dangerouslyAllowAllBuilds|allowBuilds|strictDepBuilds|onlyBuiltDependencies|ignoredBuiltDependencies\" pnpm-workspace.yaml 2>\u002Fdev\u002Fnull || echo \"NOT_SET\"\necho \"=== HARDENING ===\" && grep -E \"blockExoticSubdeps|trustPolicy\" pnpm-workspace.yaml 2>\u002Fdev\u002Fnull || echo \"NOT_SET\"\necho \"=== EXOTIC_DEPS ===\" && grep -oE '\"[^\"]+\": \"(git\\+?https?:\u002F\u002F[^\"]+|github:[^\"]+|bitbucket:[^\"]+|gitlab:[^\"]+|[^\"]+\\.tgz|file:\\.\\.)\"' package.json 2>\u002Fdev\u002Fnull || echo \"NONE\"\necho \"RANGE_TOTAL=$(grep -cE '\"[\\^~]' package.json 2>\u002Fdev\u002Fnull || echo 0)\"\necho \"=== PKG_NAME ===\" && grep -oE '\"name\":\\s*\"[^\"]*\"' package.json 2>\u002Fdev\u002Fnull | head -1\necho \"=== RANGES ===\" && grep -oE '\"[^\"]+\": \"[\\^~][^\"]*\"' package.json 2>\u002Fdev\u002Fnull | head -8\n```\n\n**npm:**\n```sh\necho \"MGR=npm\"\necho \"LOCKFILE=$(ls package-lock.json 2>\u002Fdev\u002Fnull && echo PRESENT || echo ABSENT)\"\necho \"LOCKFILE_GITIGNORED=$(grep -qE 'package-lock' .gitignore 2>\u002Fdev\u002Fnull && echo YES || echo NO)\"\necho \"PKG_MANAGER_FIELD=$(grep -oE '\"packageManager\":\\s*\"[^\"]*\"' package.json 2>\u002Fdev\u002Fnull | grep -oE '[a-z]+@[0-9][^\"]*' || echo NOT_SET)\"\necho \"=== RELEASE_AGE ===\" && grep -E \"min-release-age|minimum-release-age|minimumReleaseAge\" .npmrc 2>\u002Fdev\u002Fnull || echo \"NOT_SET\"\necho \"=== NPMRC ===\" && grep -E \"ignore-scripts|save-exact\" .npmrc 2>\u002Fdev\u002Fnull || echo \"NOT_SET\"\necho \"=== EXOTIC_DEPS ===\" && grep -oE '\"[^\"]+\": \"(git\\+?https?:\u002F\u002F[^\"]+|github:[^\"]+|bitbucket:[^\"]+|gitlab:[^\"]+|[^\"]+\\.tgz|file:\\.\\.)\"' package.json 2>\u002Fdev\u002Fnull || echo \"NONE\"\necho \"RANGE_TOTAL=$(grep -cE '\"[\\^~]' package.json 2>\u002Fdev\u002Fnull || echo 0)\"\necho \"=== PKG_NAME ===\" && grep -oE '\"name\":\\s*\"[^\"]*\"' package.json 2>\u002Fdev\u002Fnull | head -1\necho \"=== RANGES ===\" && grep -oE '\"[^\"]+\": \"[\\^~][^\"]*\"' package.json 2>\u002Fdev\u002Fnull | head -8\n```\n\n**Yarn:**\n```sh\necho \"MGR=yarn\"\necho \"YARN_VERSION=$(yarn --version 2>\u002Fdev\u002Fnull)\"\necho \"LOCKFILE=$(ls yarn.lock 2>\u002Fdev\u002Fnull && echo PRESENT || echo ABSENT)\"\necho \"LOCKFILE_GITIGNORED=$(grep -qE 'yarn\\.lock' .gitignore 2>\u002Fdev\u002Fnull && echo YES || echo NO)\"\necho \"PKG_MANAGER_FIELD=$(grep -oE '\"packageManager\":\\s*\"[^\"]*\"' package.json 2>\u002Fdev\u002Fnull | grep -oE '[a-z]+@[0-9][^\"]*' || echo NOT_SET)\"\necho \"=== RELEASE_AGE ===\" && grep -E \"npmMinimalAgeGate\" .yarnrc.yml 2>\u002Fdev\u002Fnull || echo \"NOT_SET\"\necho \"=== YARNRC ===\" && grep -E \"enableScripts|defaultSemverRangePrefix\" .yarnrc.yml 2>\u002Fdev\u002Fnull || echo \"NOT_SET\"\necho \"=== EXOTIC_DEPS ===\" && grep -oE '\"[^\"]+\": \"(git\\+?https?:\u002F\u002F[^\"]+|github:[^\"]+|bitbucket:[^\"]+|gitlab:[^\"]+|[^\"]+\\.tgz|file:\\.\\.)\"' package.json 2>\u002Fdev\u002Fnull || echo \"NONE\"\necho \"RANGE_TOTAL=$(grep -cE '\"[\\^~]' package.json 2>\u002Fdev\u002Fnull || echo 0)\"\necho \"=== PKG_NAME ===\" && grep -oE '\"name\":\\s*\"[^\"]*\"' package.json 2>\u002Fdev\u002Fnull | head -1\necho \"=== RANGES ===\" && grep -oE '\"[^\"]+\": \"[\\^~][^\"]*\"' package.json 2>\u002Fdev\u002Fnull | head -8\n```\n\n## Step 1.5 — derive version flags\n\nFrom Step 1 output, compute the booleans below once and reference them by name in Step 3. Do not repeat version comparisons in prose downstream.\n\n- `CVE_FLAG`: YES if `PNPM_VERSION` parses and is `\u003C 10.26.2` (CVE-2025-69263\u002F69264 unpatched). NO if parses and ≥. UNKNOWN if `PNPM_VERSION` empty\u002Funparseable → emit ⚠️ WARN \"pnpm binary not found on PATH — CVE version check skipped; ensure installed version ≥10.26.2\". N\u002FA if `MGR` ≠ pnpm.\n- `PKG_MGR_CVE`: YES if `PKG_MANAGER_FIELD` matches `pnpm@X.Y.Z` with X.Y.Z `\u003C 10.26.2`. NO otherwise. Applies regardless of installed pnpm (project pin, not runtime).\n- `YARN_SCRIPTS_OFF`: YES if `YARN_VERSION` parses and is `≥ 4.14.0` (scripts-off default landed). NO if parses and `\u003C`. UNKNOWN if empty → ⚠️ WARN \"yarn binary not found — version check skipped\". N\u002FA if `MGR` ≠ yarn.\n- `YARN_DURATION_OK`: YES if `YARN_VERSION` parses and is `≥ 4.12.0` (`npmMinimalAgeGate` became a DURATION type, so \"3d\"-style strings are honoured). NO if parses and `\u003C` (plain NUMBER read with parseInt — the suffix is dropped). UNKNOWN if empty. N\u002FA if `MGR` ≠ yarn.\n- `AGE_DEFAULT`: the release age the manager enforces with nothing configured. `1d` if `MGR=pnpm` and `PNPM_VERSION` ≥ `11.0.0` (pnpm's `minimumReleaseAge` default became 1440 in v11), or `MGR=yarn` and `YARN_VERSION` ≥ `4.12.0` (Yarn 4.12 gave `npmMinimalAgeGate` a `1d` default — the same release as `YARN_DURATION_OK`). `0` for npm, pnpm \u003C11, and Yarn \u003C4.12. UNKNOWN if the manager version is empty\u002Funparseable.\n\n## Step 2 — version rules\n\n**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.\"\n**Yarn v2\u002Fv3**: apply Yarn v2+ checks; scripts-off-by-default arrived in v4.14.\n**pnpm \u003C 10.0**: allowBuilds-as-default absent — flag.\n**pnpm \u003C 10.26.2**: CVE-2025-69263\u002F69264 unpatched — git dep script bypass. Flag regardless.\n\n## Step 3 — checks\n\nApply only checks for detected manager. Read signals from Step 1 output — do not re-read files.\n\n**Lifecycle script control**\n\npnpm: 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`\u002F`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` \u002F `ignoreScripts=true`, add ✅ note \"lifecycle scripts globally disabled via pnpm config — defence-in-depth on top of the v10 default\".\n\nnpm: Read NPMRC for `ignore-scripts`. Not found or `ignore-scripts=false` → ? CRITICAL \"lifecycle scripts enabled by default — preinstall\u002Finstall\u002Fpostinstall 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\u002Fcli 2026.4.0 (Apr 2026) used the preinstall hook to harvest GitHub tokens, AWS\u002FGCP\u002FAzure 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).\n\nYarn 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.\"\n\nYarn v2+:\n- `YARN_SCRIPTS_OFF=NO` (pre-v4.14): read YARNRC for `enableScripts`. Absent → ⚠️ WARN \"pre-v4.14 Yarn — scripts-off default arrived in v4.14; upgrade or set `enableScripts: false` explicitly.\"\n- `YARN_SCRIPTS_OFF=YES` (v4.14+): `enableScripts` absent\u002Ffalse → ✅ 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.\"\n\n**Release age gate**\n\nRead `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.\n\nUnit 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\"\u002F\"72h\"\u002F\"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.\n\nEffective 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.\n\nVerdicts:\n- `MGR=npm`, `RELEASE_AGE` has `minimum-release-age` or `minimumReleaseAge` and no `min-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 to `min-release-age` in .npmrc. e.g. Axios 1.14.1 (Mar 2026) was live for 3h, Shai-Hulud 2.0 (Nov 2025) for 12h, chalk\u002Fdebug (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.\n- `MGR=npm`, `RELEASE_AGE` has both `min-release-age` and one of the inert spellings → apply the verdicts below to `min-release-age`, plus ⚠️ WARN \"inert duplicate key — npm ignores it; delete it from .npmrc so it stops implying the gate was raised.\"\n- `MGR=yarn`, `RELEASE_AGE` `npmMinimalAgeGate` is a duration string (\"3d\"\u002F\"72h\"\u002F\"1w\") and `YARN_DURATION_OK=NO` → ? CRITICAL \"release-age gate inactive — Yarn \u003C4.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\u002Fberry#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\u002Fdebug (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.\n- `MGR=yarn`, `npmMinimalAgeGate` is a duration string and `YARN_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.\n- `MGR=yarn`, `npmMinimalAgeGate` is a duration string and `YARN_DURATION_OK=YES` → the suffix parses correctly (\"3d\"\u002F\"72h\" = 3d). Convert to days and apply the verdicts below as normal; no warning.\n- Project NOT_SET, no exclude list, `AGE_DEFAULT=0`, AND (npm\u002Fyarn OR pnpm global also NOT_SET\u002F0) → ? 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\u002Fdebug (Sep 2025) for 2.5h — all would have landed.\"\n- Project NOT_SET, no exclude list, `AGE_DEFAULT=1d`, AND (yarn OR pnpm global also NOT_SET\u002F0) → ⚠️ 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\u002Fdebug (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.\"\n- 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\u002Fdebug (Sep 2025) for 2.5h — all would have landed.\"\n- Project NOT_SET, pnpm `GLOBAL_RELEASE_AGE` ≥4320 (3d) → ✅ PASS + note \"pnpm global config supplies minimumReleaseAge={N}d — consider committing to `pnpm-workspace.yaml` for team visibility and new-joiner parity.\"\n- Project NOT_SET, pnpm `GLOBAL_RELEASE_AGE` 1-2d → ⚠️ WARN \"global config has release age \u003C3d — raise to 4320 and commit to workspace file.\"\n- 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.\"\n- Exclude present, base set → ✅ note excluded packages, flag non-internal-scoped ones\n- \u003C1d → ⚠️ WARN\n- 1–2d → ✅ PASS + note \"consider 3d\"\n- ≥3d → ✅ PASS\n\n**packageManager field**\n\nRead PKG_MANAGER_FIELD signal.\n\n- `NOT_SET` → ⚠️ WARN \"packageManager field absent — manager version floats between environments. Add `\\\"packageManager\\\": \\\"pnpm@x.y.z\\\"` to package.json.\"\n- Present, fully pinned with patch (e.g. `pnpm@10.26.2`) → if `PKG_MGR_CVE=YES` → ? CRITICAL \"pinned to CVE-affected version — update to ≥10.26.2. e.g. pnpm \u003C10.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.\n- Present, partially pinned (e.g. `pnpm@10` or `pnpm@10.26`) → ⚠️ WARN \"missing patch version — pin to exact (e.g. pnpm@10.26.2) to prevent silent patch updates.\"\n\n**Lockfile**\n\nRead 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.\n\n**Exotic sources**\n\nRead EXOTIC_DEPS. NONE → ✅ PASS for direct deps. Then read HARDENING for `blockExoticSubdeps`: present+true → ✅; absent → ⚠️ WARN (pnpm only).\nnpm + EXOTIC_DEPS ≠ NONE → ? FAIL (PackageGate unpatched bypass).\npnpm + EXOTIC_DEPS ≠ NONE + `CVE_FLAG=YES` → ? FAIL (CVE-2025-69263\u002F69264 — git dep can override git binary via .npmrc).\npnpm + EXOTIC_DEPS ≠ NONE + `CVE_FLAG=NO` → ⚠️ WARN.\npnpm + EXOTIC_DEPS ≠ NONE + `CVE_FLAG=UNKNOWN` → ⚠️ WARN \"exotic deps present; pnpm version unverifiable — ensure ≥10.26.2 before install.\"\n\n**Trust policy** (pnpm only)\n\nRead HARDENING for `trustPolicy`. `no-downgrade` present → ✅ PASS. Absent → ⚠️ WARN.\n\n**Version ranges**\n\nRead `RANGE_TOTAL`. `0` → ✅ PASS immediately, no further processing.\n\nIf `>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.\n\nVerdicts — 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.\n\n- All internal → ⚠️ WARN \"internal `^`\u002F`~` ranges — tighten to exact for reproducibility; supply-chain risk already contained by lockfile + CI frozen install.\"\n- Any external + lockfile committed + not gitignored → ⚠️ WARN \"external `^`\u002F`~` ranges present. Committed lockfile contains the acute risk; remaining exposure is manual `npm\u002Fpnpm\u002Fyarn install` or `update` calls by developers that bypass the lockfile. Run `\u002Fsupplychain:ci-audit` to verify CI enforces `--frozen-lockfile` \u002F `--immutable`. Pin to exact versions for defence-in-depth.\" List up to 5 external from `RANGES`; 6+ → count + first 5.\n- Any external + lockfile absent or gitignored → ? FAIL \"external `^`\u002F`~` 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.\n\nConfig tie-ins (print under the finding as additional `└─` lines if applicable):\n- npm: `NPMRC` missing `save-exact=true` → add ⚠️ WARN note and suggest `└─ .npmrc: save-exact=true`.\n- Yarn: `YARNRC` missing `defaultSemverRangePrefix` → add ⚠️ WARN note and suggest `└─ .yarnrc.yml: defaultSemverRangePrefix: \"\"`.\n- pnpm: no equivalent config; suggest only exact-pin fixups in `package.json`.\n\nFix-line examples:\n```\n        └─ package.json: replace \"^1.2.3\" with \"1.2.3\" (exact pin)\n        └─ .npmrc: save-exact=true\n        └─ .yarnrc.yml: defaultSemverRangePrefix: \"\"\n```\n\n**Manager enforcement** (pnpm only)\n\nRead `ONLY_ALLOW`. Checks whether the project blocks teammates from accidentally running `npm install` \u002F `yarn install` and bypassing pnpm's protections.\n\n- Present (any `preinstall` matching `only-allow` or `only-allow pnpm`) → ✅ PASS \"preinstall guard blocks non-pnpm installs\".\n- `NOT_SET` → ⚠️ WARN \"no preinstall guard — a teammate running `npm install` out of habit silently creates `package-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.\"\n\nFix line:\n```\n        └─ package.json: \"scripts\": { \"preinstall\": \"npx only-allow pnpm\" }\n```\n\n## Step 4 — output format\n\n**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.**\n\nNo separate check results block. Each check appears exactly once inside its category. PASSING goes last.\n\n**Icon system — shape and color both carry meaning:**\n- ? 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 \u003C11, Yarn \u003C4.12); npm release-age key spelled so npm ignores it (gate inactive); Yarn \u003C4.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.\n- ? FAIL — real gap needing a fix (Yarn Classic, lockfile absent, exotic deps with CVE exposure, external ranges + lockfile gap)\n- ⚠️ WARN — hardening opportunity, not immediately exploitable\n- ✅ PASS — clean, shown last\n- ➖ N\u002FA\n\npnpm 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.\n\nApply the same icon to the section header as to its highest-severity item.\n\n**Structure:**\n\n```\n\u002Fsupplychain:npm-harden · [project name] ([manager] [version])\n? N critical  ? N failing  ⚠️ N hardening  ✅ N passing\n→ [top fix]\n? Hardening guide: [manager docs URL — see table below]\n\n[sections...]\n```\n\nOmit any zero-count category from line 2. If everything passes: `✅ all passing`.\n\nLine 2 is a count of *checks*, not sections. Count each check finding that has a result.\n\n**Hardening-guide link** (line 4, one line, plain URL — no markdown link syntax, renders cleanly in monospace):\n\n| `MGR` | URL |\n|-------|-----|\n| `pnpm` | `https:\u002F\u002Fpnpm.io\u002Fsupply-chain-security` |\n| `npm` | `https:\u002F\u002Fgithub.blog\u002Fsecurity\u002Fsupply-chain-security\u002Four-plan-for-a-more-secure-npm-supply-chain\u002F` |\n| `yarn` (v1 or v2+) | `https:\u002F\u002Fyarnpkg.com\u002Ffeatures\u002Fsecurity` |\n\nEmit exactly one line. If `MGR` is unknown, omit the ? line entirely.\n\n**Fix line format — every fix uses this pattern:**\n```\n        └─ [filename]: [exact config value]\n```\nThe `└─` 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.\n\nExamples:\n```\n        └─ pnpm-workspace.yaml: minimumReleaseAge: 4320  # 3 days in minutes\n        └─ package.json: \"packageManager\": \"pnpm@10.26.2\"\n        └─ .npmrc: ignore-scripts=true\n        └─ pnpm-workspace.yaml: strictDepBuilds: true\n```\n\n**Incident examples in CRITICAL findings:**\n\nStep 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.\n\nLayout template (placeholders are structural only — do not emit them literally):\n```\n  ? \u003CCheck name>  \u003Cfirst clause, verbatim from Step 3>\n          \u003Cfull e.g. line, verbatim from Step 3>\n          └─ \u003Cfile>: \u003Cexact config value>\n```\nName specific files and exact values. If CVE present, include it first. Do not repeat any finding line elsewhere in the output.\n\nFormat: `→ [verb] [what with exact values] — [impact]`\n\n**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.\n","## Trigger\n\nActivate on `\u002Fsupplychain:npm-harden` or `\u002Fsupplychain:npm-harden \u003Cpath>`. Treat the path as project root, or use cwd.\n\n## Step 1 — detect manager\n\n```sh\ngrep -oE '\"packageManager\":\\s*\"[^\"@]*' package.json 2>\u002Fdev\u002Fnull | grep -oE '[a-z]+$'\nls pnpm-lock.yaml yarn.lock package-lock.json 2>\u002Fdev\u002Fnull || true\n```\n\nDetect from `packageManager` field, then from whichever lockfile is present. Run the matching block below as a single bash call.\n\n**pnpm:**\n```sh\necho \"MGR=pnpm\"\necho \"PNPM_VERSION=$(pnpm --version 2>\u002Fdev\u002Fnull)\"\necho \"GLOBAL_RELEASE_AGE=$(pnpm config get minimumReleaseAge 2>\u002Fdev\u002Fnull)\"\necho \"LOCKFILE=$(ls pnpm-lock.yaml 2>\u002Fdev\u002Fnull && echo PRESENT || echo ABSENT)\"\necho \"LOCKFILE_GITIGNORED=$(grep -qE 'pnpm-lock' .gitignore 2>\u002Fdev\u002Fnull && echo YES || echo NO)\"\necho \"DANGEROUSLY=$(grep -qE '(dangerouslyAllowAllBuilds|dangerously-allow-all-builds)[:=]\\s*true' pnpm-workspace.yaml .npmrc 2>\u002Fdev\u002Fnull && echo YES || echo NO)\"\necho \"PKG_MANAGER_FIELD=$(grep -oE '\"packageManager\":\\s*\"[^\"]*\"' package.json 2>\u002Fdev\u002Fnull | grep -oE '[a-z]+@[0-9][^\"]*' || echo NOT_SET)\"\necho \"GLOBAL_IGNORE_SCRIPTS=$(pnpm config get ignore-scripts 2>\u002Fdev\u002Fnull)\"\necho \"ONLY_ALLOW=$(grep -oE '\"preinstall\":\\s*\"[^\"]*only-allow[^\"]*\"' package.json 2>\u002Fdev\u002Fnull || echo NOT_SET)\"\necho \"=== RELEASE_AGE ===\" && grep -E \"minimumReleaseAge|minimum-release-age\" pnpm-workspace.yaml .npmrc 2>\u002Fdev\u002Fnull || echo \"NOT_SET\"\necho \"=== NPMRC ===\" && grep -E \"ignore-scripts|ignoreScripts\" .npmrc 2>\u002Fdev\u002Fnull || echo \"NOT_SET\"\necho \"=== BUILD_POLICY ===\" && grep -E \"dangerouslyAllowAllBuilds|allowBuilds|strictDepBuilds|onlyBuiltDependencies|ignoredBuiltDependencies\" pnpm-workspace.yaml 2>\u002Fdev\u002Fnull || echo \"NOT_SET\"\necho \"=== HARDENING ===\" && grep -E \"blockExoticSubdeps|trustPolicy\" pnpm-workspace.yaml 2>\u002Fdev\u002Fnull || echo \"NOT_SET\"\necho \"=== EXOTIC_DEPS ===\" && grep -oE '\"[^\"]+\": \"(git\\+?https?:\u002F\u002F[^\"]+|github:[^\"]+|bitbucket:[^\"]+|gitlab:[^\"]+|[^\"]+\\.tgz|file:\\.\\.)\"' package.json 2>\u002Fdev\u002Fnull || echo \"NONE\"\necho \"RANGE_TOTAL=$(grep -cE '\"[\\^~]' package.json 2>\u002Fdev\u002Fnull || echo 0)\"\necho \"=== PKG_NAME ===\" && grep -oE '\"name\":\\s*\"[^\"]*\"' package.json 2>\u002Fdev\u002Fnull | head -1\necho \"=== RANGES ===\" && grep -oE '\"[^\"]+\": \"[\\^~][^\"]*\"' package.json 2>\u002Fdev\u002Fnull | head -8\n```\n\n**npm:**\n```sh\necho \"MGR=npm\"\necho \"LOCKFILE=$(ls package-lock.json 2>\u002Fdev\u002Fnull && echo PRESENT || echo ABSENT)\"\necho \"LOCKFILE_GITIGNORED=$(grep -qE 'package-lock' .gitignore 2>\u002Fdev\u002Fnull && echo YES || echo NO)\"\necho \"PKG_MANAGER_FIELD=$(grep -oE '\"packageManager\":\\s*\"[^\"]*\"' package.json 2>\u002Fdev\u002Fnull | grep -oE '[a-z]+@[0-9][^\"]*' || echo NOT_SET)\"\necho \"=== RELEASE_AGE ===\" && grep -E \"min-release-age|minimum-release-age|minimumReleaseAge\" .npmrc 2>\u002Fdev\u002Fnull || echo \"NOT_SET\"\necho \"=== NPMRC ===\" && grep -E \"ignore-scripts|save-exact\" .npmrc 2>\u002Fdev\u002Fnull || echo \"NOT_SET\"\necho \"=== EXOTIC_DEPS ===\" && grep -oE '\"[^\"]+\": \"(git\\+?https?:\u002F\u002F[^\"]+|github:[^\"]+|bitbucket:[^\"]+|gitlab:[^\"]+|[^\"]+\\.tgz|file:\\.\\.)\"' package.json 2>\u002Fdev\u002Fnull || echo \"NONE\"\necho \"RANGE_TOTAL=$(grep -cE '\"[\\^~]' package.json 2>\u002Fdev\u002Fnull || echo 0)\"\necho \"=== PKG_NAME ===\" && grep -oE '\"name\":\\s*\"[^\"]*\"' package.json 2>\u002Fdev\u002Fnull | head -1\necho \"=== RANGES ===\" && grep -oE '\"[^\"]+\": \"[\\^~][^\"]*\"' package.json 2>\u002Fdev\u002Fnull | head -8\n```\n\n**Yarn:**\n```sh\necho \"MGR=yarn\"\necho \"YARN_VERSION=$(yarn --version 2>\u002Fdev\u002Fnull)\"\necho \"LOCKFILE=$(ls yarn.lock 2>\u002Fdev\u002Fnull && echo PRESENT || echo ABSENT)\"\necho \"LOCKFILE_GITIGNORED=$(grep -qE 'yarn\\.lock' .gitignore 2>\u002Fdev\u002Fnull && echo YES || echo NO)\"\necho \"PKG_MANAGER_FIELD=$(grep -oE '\"packageManager\":\\s*\"[^\"]*\"' package.json 2>\u002Fdev\u002Fnull | grep -oE '[a-z]+@[0-9][^\"]*' || echo NOT_SET)\"\necho \"=== RELEASE_AGE ===\" && grep -E \"npmMinimalAgeGate\" .yarnrc.yml 2>\u002Fdev\u002Fnull || echo \"NOT_SET\"\necho \"=== YARNRC ===\" && grep -E \"enableScripts|defaultSemverRangePrefix\" .yarnrc.yml 2>\u002Fdev\u002Fnull || echo \"NOT_SET\"\necho \"=== EXOTIC_DEPS ===\" && grep -oE '\"[^\"]+\": \"(git\\+?https?:\u002F\u002F[^\"]+|github:[^\"]+|bitbucket:[^\"]+|gitlab:[^\"]+|[^\"]+\\.tgz|file:\\.\\.)\"' package.json 2>\u002Fdev\u002Fnull || echo \"NONE\"\necho \"RANGE_TOTAL=$(grep -cE '\"[\\^~]' package.json 2>\u002Fdev\u002Fnull || echo 0)\"\necho \"=== PKG_NAME ===\" && grep -oE '\"name\":\\s*\"[^\"]*\"' package.json 2>\u002Fdev\u002Fnull | head -1\necho \"=== RANGES ===\" && grep -oE '\"[^\"]+\": \"[\\^~][^\"]*\"' package.json 2>\u002Fdev\u002Fnull | head -8\n```\n\n## Step 1.5 — derive version flags\n\nFrom Step 1 output, compute the booleans below once and reference them by name in Step 3. Do not repeat version comparisons in prose downstream.\n\n- `CVE_FLAG`: YES if `PNPM_VERSION` parses and is `\u003C 10.26.2` (CVE-2025-69263\u002F69264 unpatched). NO if parses and ≥. UNKNOWN if `PNPM_VERSION` empty\u002Funparseable → emit ⚠️ WARN \"pnpm binary not found on PATH — CVE version check skipped; ensure installed version ≥10.26.2\". N\u002FA if `MGR` ≠ pnpm.\n- `PKG_MGR_CVE`: YES if `PKG_MANAGER_FIELD` matches `pnpm@X.Y.Z` with X.Y.Z `\u003C 10.26.2`. NO otherwise. Applies regardless of installed pnpm (project pin, not runtime).\n- `YARN_SCRIPTS_OFF`: YES if `YARN_VERSION` parses and is `≥ 4.14.0` (scripts-off default landed). NO if parses and `\u003C`. UNKNOWN if empty → ⚠️ WARN \"yarn binary not found — version check skipped\". N\u002FA if `MGR` ≠ yarn.\n- `YARN_DURATION_OK`: YES if `YARN_VERSION` parses and is `≥ 4.12.0` (`npmMinimalAgeGate` became a DURATION type, so \"3d\"-style strings are honoured). NO if parses and `\u003C` (plain NUMBER read with parseInt — the suffix is dropped). UNKNOWN if empty. N\u002FA if `MGR` ≠ yarn.\n- `AGE_DEFAULT`: the release age the manager enforces with nothing configured. `1d` if `MGR=pnpm` and `PNPM_VERSION` ≥ `11.0.0` (pnpm's `minimumReleaseAge` default became 1440 in v11), or `MGR=yarn` and `YARN_VERSION` ≥ `4.12.0` (Yarn 4.12 gave `npmMinimalAgeGate` a `1d` default — the same release as `YARN_DURATION_OK`). `0` for npm, pnpm \u003C11, and Yarn \u003C4.12. UNKNOWN if the manager version is empty\u002Funparseable.\n\n## Step 2 — version rules\n\n**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.\"\n**Yarn v2\u002Fv3**: apply Yarn v2+ checks; scripts-off-by-default arrived in v4.14.\n**pnpm \u003C 10.0**: allowBuilds-as-default absent — flag.\n**pnpm \u003C 10.26.2**: CVE-2025-69263\u002F69264 unpatched — git dep script bypass. Flag regardless.\n\n## Step 3 — checks\n\nApply only checks for detected manager. Read signals from Step 1 output — do not re-read files.\n\n**Lifecycle script control**\n\npnpm: 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`\u002F`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` \u002F `ignoreScripts=true`, add ✅ note \"lifecycle scripts globally disabled via pnpm config — defence-in-depth on top of the v10 default\".\n\nnpm: Read NPMRC for `ignore-scripts`. Not found or `ignore-scripts=false` → ? CRITICAL \"lifecycle scripts enabled by default — preinstall\u002Finstall\u002Fpostinstall 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\u002Fcli 2026.4.0 (Apr 2026) used the preinstall hook to harvest GitHub tokens, AWS\u002FGCP\u002FAzure 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).\n\nYarn 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.\"\n\nYarn v2+:\n- `YARN_SCRIPTS_OFF=NO` (pre-v4.14): read YARNRC for `enableScripts`. Absent → ⚠️ WARN \"pre-v4.14 Yarn — scripts-off default arrived in v4.14; upgrade or set `enableScripts: false` explicitly.\"\n- `YARN_SCRIPTS_OFF=YES` (v4.14+): `enableScripts` absent\u002Ffalse → ✅ 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.\"\n\n**Release age gate**\n\nRead `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.\n\nUnit 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\"\u002F\"72h\"\u002F\"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.\n\nEffective 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.\n\nVerdicts:\n- `MGR=npm`, `RELEASE_AGE` has `minimum-release-age` or `minimumReleaseAge` and no `min-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 to `min-release-age` in .npmrc. e.g. Axios 1.14.1 (Mar 2026) was live for 3h, Shai-Hulud 2.0 (Nov 2025) for 12h, chalk\u002Fdebug (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.\n- `MGR=npm`, `RELEASE_AGE` has both `min-release-age` and one of the inert spellings → apply the verdicts below to `min-release-age`, plus ⚠️ WARN \"inert duplicate key — npm ignores it; delete it from .npmrc so it stops implying the gate was raised.\"\n- `MGR=yarn`, `RELEASE_AGE` `npmMinimalAgeGate` is a duration string (\"3d\"\u002F\"72h\"\u002F\"1w\") and `YARN_DURATION_OK=NO` → ? CRITICAL \"release-age gate inactive — Yarn \u003C4.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\u002Fberry#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\u002Fdebug (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.\n- `MGR=yarn`, `npmMinimalAgeGate` is a duration string and `YARN_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.\n- `MGR=yarn`, `npmMinimalAgeGate` is a duration string and `YARN_DURATION_OK=YES` → the suffix parses correctly (\"3d\"\u002F\"72h\" = 3d). Convert to days and apply the verdicts below as normal; no warning.\n- Project NOT_SET, no exclude list, `AGE_DEFAULT=0`, AND (npm\u002Fyarn OR pnpm global also NOT_SET\u002F0) → ? 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\u002Fdebug (Sep 2025) for 2.5h — all would have landed.\"\n- Project NOT_SET, no exclude list, `AGE_DEFAULT=1d`, AND (yarn OR pnpm global also NOT_SET\u002F0) → ⚠️ 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\u002Fdebug (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.\"\n- 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\u002Fdebug (Sep 2025) for 2.5h — all would have landed.\"\n- Project NOT_SET, pnpm `GLOBAL_RELEASE_AGE` ≥4320 (3d) → ✅ PASS + note \"pnpm global config supplies minimumReleaseAge={N}d — consider committing to `pnpm-workspace.yaml` for team visibility and new-joiner parity.\"\n- Project NOT_SET, pnpm `GLOBAL_RELEASE_AGE` 1-2d → ⚠️ WARN \"global config has release age \u003C3d — raise to 4320 and commit to workspace file.\"\n- 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.\"\n- Exclude present, base set → ✅ note excluded packages, flag non-internal-scoped ones\n- \u003C1d → ⚠️ WARN\n- 1–2d → ✅ PASS + note \"consider 3d\"\n- ≥3d → ✅ PASS\n\n**packageManager field**\n\nRead PKG_MANAGER_FIELD signal.\n\n- `NOT_SET` → ⚠️ WARN \"packageManager field absent — manager version floats between environments. Add `\\\"packageManager\\\": \\\"pnpm@x.y.z\\\"` to package.json.\"\n- Present, fully pinned with patch (e.g. `pnpm@10.26.2`) → if `PKG_MGR_CVE=YES` → ? CRITICAL \"pinned to CVE-affected version — update to ≥10.26.2. e.g. pnpm \u003C10.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.\n- Present, partially pinned (e.g. `pnpm@10` or `pnpm@10.26`) → ⚠️ WARN \"missing patch version — pin to exact (e.g. pnpm@10.26.2) to prevent silent patch updates.\"\n\n**Lockfile**\n\nRead 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.\n\n**Exotic sources**\n\nRead EXOTIC_DEPS. NONE → ✅ PASS for direct deps. Then read HARDENING for `blockExoticSubdeps`: present+true → ✅; absent → ⚠️ WARN (pnpm only).\nnpm + EXOTIC_DEPS ≠ NONE → ? FAIL (PackageGate unpatched bypass).\npnpm + EXOTIC_DEPS ≠ NONE + `CVE_FLAG=YES` → ? FAIL (CVE-2025-69263\u002F69264 — git dep can override git binary via .npmrc).\npnpm + EXOTIC_DEPS ≠ NONE + `CVE_FLAG=NO` → ⚠️ WARN.\npnpm + EXOTIC_DEPS ≠ NONE + `CVE_FLAG=UNKNOWN` → ⚠️ WARN \"exotic deps present; pnpm version unverifiable — ensure ≥10.26.2 before install.\"\n\n**Trust policy** (pnpm only)\n\nRead HARDENING for `trustPolicy`. `no-downgrade` present → ✅ PASS. Absent → ⚠️ WARN.\n\n**Version ranges**\n\nRead `RANGE_TOTAL`. `0` → ✅ PASS immediately, no further processing.\n\nIf `>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.\n\nVerdicts — 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.\n\n- All internal → ⚠️ WARN \"internal `^`\u002F`~` ranges — tighten to exact for reproducibility; supply-chain risk already contained by lockfile + CI frozen install.\"\n- Any external + lockfile committed + not gitignored → ⚠️ WARN \"external `^`\u002F`~` ranges present. Committed lockfile contains the acute risk; remaining exposure is manual `npm\u002Fpnpm\u002Fyarn install` or `update` calls by developers that bypass the lockfile. Run `\u002Fsupplychain:ci-audit` to verify CI enforces `--frozen-lockfile` \u002F `--immutable`. Pin to exact versions for defence-in-depth.\" List up to 5 external from `RANGES`; 6+ → count + first 5.\n- Any external + lockfile absent or gitignored → ? FAIL \"external `^`\u002F`~` 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.\n\nConfig tie-ins (print under the finding as additional `└─` lines if applicable):\n- npm: `NPMRC` missing `save-exact=true` → add ⚠️ WARN note and suggest `└─ .npmrc: save-exact=true`.\n- Yarn: `YARNRC` missing `defaultSemverRangePrefix` → add ⚠️ WARN note and suggest `└─ .yarnrc.yml: defaultSemverRangePrefix: \"\"`.\n- pnpm: no equivalent config; suggest only exact-pin fixups in `package.json`.\n\nFix-line examples:\n```\n        └─ package.json: replace \"^1.2.3\" with \"1.2.3\" (exact pin)\n        └─ .npmrc: save-exact=true\n        └─ .yarnrc.yml: defaultSemverRangePrefix: \"\"\n```\n\n**Manager enforcement** (pnpm only)\n\nRead `ONLY_ALLOW`. Checks whether the project blocks teammates from accidentally running `npm install` \u002F `yarn install` and bypassing pnpm's protections.\n\n- Present (any `preinstall` matching `only-allow` or `only-allow pnpm`) → ✅ PASS \"preinstall guard blocks non-pnpm installs\".\n- `NOT_SET` → ⚠️ WARN \"no preinstall guard — a teammate running `npm install` out of habit silently creates `package-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.\"\n\nFix line:\n```\n        └─ package.json: \"scripts\": { \"preinstall\": \"npx only-allow pnpm\" }\n```\n\n## Step 4 — output format\n\n**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.**\n\nNo separate check results block. Each check appears exactly once inside its category. PASSING goes last.\n\n**Icon system — shape and color both carry meaning:**\n- ? 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 \u003C11, Yarn \u003C4.12); npm release-age key spelled so npm ignores it (gate inactive); Yarn \u003C4.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.\n- ? FAIL — real gap needing a fix (Yarn Classic, lockfile absent, exotic deps with CVE exposure, external ranges + lockfile gap)\n- ⚠️ WARN — hardening opportunity, not immediately exploitable\n- ✅ PASS — clean, shown last\n- ➖ N\u002FA\n\npnpm 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.\n\nApply the same icon to the section header as to its highest-severity item.\n\n**Structure:**\n\n```\n\u002Fsupplychain:npm-harden · [project name] ([manager] [version])\n? N critical  ? N failing  ⚠️ N hardening  ✅ N passing\n→ [top fix]\n? Hardening guide: [manager docs URL — see table below]\n\n[sections...]\n```\n\nOmit any zero-count category from line 2. If everything passes: `✅ all passing`.\n\nLine 2 is a count of *checks*, not sections. Count each check finding that has a result.\n\n**Hardening-guide link** (line 4, one line, plain URL — no markdown link syntax, renders cleanly in monospace):\n\n| `MGR` | URL |\n|-------|-----|\n| `pnpm` | `https:\u002F\u002Fpnpm.io\u002Fsupply-chain-security` |\n| `npm` | `https:\u002F\u002Fgithub.blog\u002Fsecurity\u002Fsupply-chain-security\u002Four-plan-for-a-more-secure-npm-supply-chain\u002F` |\n| `yarn` (v1 or v2+) | `https:\u002F\u002Fyarnpkg.com\u002Ffeatures\u002Fsecurity` |\n\nEmit exactly one line. If `MGR` is unknown, omit the ? line entirely.\n\n**Fix line format — every fix uses this pattern:**\n```\n        └─ [filename]: [exact config value]\n```\nThe `└─` 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.\n\nExamples:\n```\n        └─ pnpm-workspace.yaml: minimumReleaseAge: 4320  # 3 days in minutes\n        └─ package.json: \"packageManager\": \"pnpm@10.26.2\"\n        └─ .npmrc: ignore-scripts=true\n        └─ pnpm-workspace.yaml: strictDepBuilds: true\n```\n\n**Incident examples in CRITICAL findings:**\n\nStep 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.\n\nLayout template (placeholders are structural only — do not emit them literally):\n```\n  ? \u003CCheck name>  \u003Cfirst clause, verbatim from Step 3>\n          \u003Cfull e.g. line, verbatim from Step 3>\n          └─ \u003Cfile>: \u003Cexact config value>\n```\nName specific files and exact values. If CVE present, include it first. Do not repeat any finding line elsewhere in the output.\n\nFormat: `→ [verb] [what with exact values] — [impact]`\n\n**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.\n",{"name":5,"description":7},"main","f5790eb83ab8f632ad86f456a485e0b2029a7a5d","plugins\u002Fsupplychain\u002Fskills\u002Fnpm-harden",1,"https:\u002F\u002Fgithub.com\u002Feyesecurity\u002Fskills","https:\u002F\u002Fgithub.com\u002Feyesecurity","https:\u002F\u002Feye.security\u002F","2026-10-16 16:24:26",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add eyesecurity\u002Fskills --skill npm-harden",{"tool":58,"command":59},"bunx","bunx skills add eyesecurity\u002Fskills --skill npm-harden",{"tool":61,"command":62},"pnpm","pnpm dlx skills add eyesecurity\u002Fskills --skill npm-harden","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Feyesecurity\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fsupplychain\u002Fskills\u002Fnpm-harden\u002FSKILL.md",true,[],[67,94,111,135,147,169],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":39},"01M6HR1T4DBWRQ4JE2X21V1AVM","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_\u003Cn>.md file so the assessment is auditable. For authorized security research and responsible disclosure only.","https:\u002F\u002Fgithub.com\u002Feyesecurity\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fvulnerability-research\u002FSKILL.md",[],[74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],"process","kitten process","writing","image","security","workflow","assessment","run","firmware","vulnerability","only","engineer","installer","activate","security research","software","mapping","impact","reverse","concept",{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":39},"01M6HR1N44E8VSWB7T4JRJ3XPN","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 \u002Fsupplychain:pypi-harden or \u002Fsupplychain:pypi-harden \u003Cpath>.","https:\u002F\u002Fgithub.com\u002Feyesecurity\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fsupplychain\u002Fskills\u002Fpypi-harden\u002FSKILL.md",[],[101,19,102,103,104,37,105,36,35,106,86,107,108,30,29,28,26,25,109,110],"pypi","pypi harden","python","policy","execution","uv","Poetry","age","pdm","pip",{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":39},"01M6HR1BMX7JMG48CKAGQQPFM6","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 \u002F 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 \u002Fsupplychain:ci-audit or \u002Fsupplychain:ci-audit \u003Cpath>.","https:\u002F\u002Fgithub.com\u002Feyesecurity\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fsupplychain\u002Fskills\u002Fci-audit\u002FSKILL.md",[],[118,119,120,121,31,122,123,124,125,126,127,128,129,130,131,132,29,28,133,134],"audit","ci","ci audit","workflows","permissions","actions","github actions","github actions hardening","publish","how","install","focus","project","commands","token","pipx","action",{"skillNo":136,"name":29,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":140,"publishedAt":39},"01M6HR17VCHBGQY9MPWN9RVBG4","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\u002F. Read this first, then read only the sub-skill(s) the project actually needs.","https:\u002F\u002Fgithub.com\u002Feyesecurity\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fsupplychain\u002FSKILL.md",[],[29,103,141,123,119,124,142,36,143,84,106,107,130,144,28,26,109,145,110,146],"javascript","first","router","ecosystems","which","for",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":153,"publishedAt":39},"01M6HR12HJXARMTMSK9A1VR0C2","vendor-risk","ACTIVATE when integrating a new service, API, SaaS tool, SDK, npm\u002Fpip\u002Fmaven 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\u002Fendpoints. 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.","https:\u002F\u002Fgithub.com\u002Feyesecurity\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fcomplisec\u002Fskills\u002Fvendor-risk\u002FSKILL.md",[],[154,155,156,77,78,157,158,159,160,161,162,163,164,87,165,28,166,26,167,168],"risk","vendor","vendor risk","packages","data","processor","maven","api","dependency","webhooks","Art","critical","org","unknown","nis2",{"skillNo":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":173,"categories":174,"keywords":175,"publishedAt":39},"01M6HR0Y33RYSB1TZAFZ4NKWV0","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.","https:\u002F\u002Fgithub.com\u002Feyesecurity\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fcomplisec\u002Fskills\u002Fsecurity-compliance-tools\u002FSKILL.md",[],[78,176,177,178,179,180,181,80,154,127,182,87,183,184,165,185,186,146,187,168],"compliance","Tools","security compliance","security compliance tools","support","risk assessment","AppSec","methods","iso","how to","assess","eu compliance"]