supply-chain-guard 5.2.45 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +6 -3
  2. package/dist/cli.js +1 -1
  3. package/dist/cli.js.map +1 -1
  4. package/dist/composer-scanner.d.ts +27 -0
  5. package/dist/composer-scanner.d.ts.map +1 -0
  6. package/dist/composer-scanner.js +209 -0
  7. package/dist/composer-scanner.js.map +1 -0
  8. package/dist/index.d.ts +5 -2
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +13 -2
  11. package/dist/index.js.map +1 -1
  12. package/dist/ioc-blocklist.d.ts +1 -1
  13. package/dist/ioc-blocklist.d.ts.map +1 -1
  14. package/dist/ioc-blocklist.js +8 -1
  15. package/dist/ioc-blocklist.js.map +1 -1
  16. package/dist/lockfile-checker.d.ts +39 -4
  17. package/dist/lockfile-checker.d.ts.map +1 -1
  18. package/dist/lockfile-checker.js +585 -27
  19. package/dist/lockfile-checker.js.map +1 -1
  20. package/dist/nuget-scanner.d.ts +36 -0
  21. package/dist/nuget-scanner.d.ts.map +1 -0
  22. package/dist/nuget-scanner.js +233 -0
  23. package/dist/nuget-scanner.js.map +1 -0
  24. package/dist/policy-engine.d.ts.map +1 -1
  25. package/dist/policy-engine.js +184 -9
  26. package/dist/policy-engine.js.map +1 -1
  27. package/dist/reporter.js +4 -4
  28. package/dist/reporter.js.map +1 -1
  29. package/dist/rubygems-scanner.d.ts +27 -0
  30. package/dist/rubygems-scanner.d.ts.map +1 -0
  31. package/dist/rubygems-scanner.js +215 -0
  32. package/dist/rubygems-scanner.js.map +1 -0
  33. package/dist/scanner.d.ts.map +1 -1
  34. package/dist/scanner.js +31 -0
  35. package/dist/scanner.js.map +1 -1
  36. package/dist/threat-intel.d.ts +16 -0
  37. package/dist/threat-intel.d.ts.map +1 -1
  38. package/dist/threat-intel.js +48 -0
  39. package/dist/threat-intel.js.map +1 -1
  40. package/dist/types.d.ts +21 -0
  41. package/dist/types.d.ts.map +1 -1
  42. package/dist/types.js.map +1 -1
  43. package/package.json +4 -3
  44. package/policy-schema.json +91 -0
@@ -1,16 +1,51 @@
1
1
  /**
2
2
  * Lockfile integrity verification (T-006)
3
3
  *
4
- * Parses package-lock.json and checks for:
4
+ * Covers all four major JavaScript package-manager lockfile formats:
5
+ * - package-lock.json (npm, lockfile v1/v2/v3)
6
+ * - pnpm-lock.yaml (pnpm v6 "/name@1.2.3" and v9 "name@1.2.3" package keys)
7
+ * - yarn.lock (classic v1 and Berry v2+ with __metadata)
8
+ * - bun.lock (JSONC text lockfile, bun >= 1.2); binary bun.lockb is flagged
9
+ * as unauditable instead of parsed
10
+ *
11
+ * Shared checks across all formats:
5
12
  * - Integrity hashes matching expected format (sha512/sha256/sha1)
6
- * - Packages resolved from non-registry URLs
13
+ * - Packages resolved from non-registry / plain-HTTP / git URLs
14
+ * - Missing integrity data on resolvable packages
15
+ * - Known-compromised package versions (ioc-blocklist)
16
+ *
17
+ * npm-only checks (package-lock.json):
7
18
  * - Dependencies in lockfile but not in package.json
8
19
  * - Lockfile version downgrades
9
20
  */
10
21
  import type { Finding } from "./types.js";
11
22
  /**
12
- * Check a directory for lockfile issues.
13
- * Returns findings if a lockfile is present.
23
+ * Check a directory for lockfile issues across all supported formats.
24
+ * A repo can contain several lockfiles (e.g. after a package-manager
25
+ * migration); all present ones are checked.
14
26
  */
15
27
  export declare function checkLockfile(dir: string): Finding[];
28
+ /**
29
+ * Check package-lock.json (npm) for lockfile issues.
30
+ * Returns findings if the lockfile is present.
31
+ */
32
+ export declare function checkNpmLockfile(dir: string): Finding[];
33
+ /**
34
+ * Check pnpm-lock.yaml for lockfile issues.
35
+ * Supports v6 ("/name@1.2.3") and v9 ("name@1.2.3") package-key styles.
36
+ */
37
+ export declare function checkPnpmLockfile(dir: string): Finding[];
38
+ /**
39
+ * Check yarn.lock for lockfile issues. Detects classic v1 (entry headers
40
+ * like 'name@^1.0.0:') and Berry v2+ (YAML with __metadata, keys like
41
+ * "name@npm:^1.0.0") automatically.
42
+ */
43
+ export declare function checkYarnLockfile(dir: string): Finding[];
44
+ /**
45
+ * Check bun lockfiles. The text lockfile (bun.lock, JSONC) is parsed and
46
+ * audited; the binary lockfile (bun.lockb) cannot be audited and is flagged
47
+ * with a low-severity finding instead. When both exist, bun uses the text
48
+ * lockfile, so the binary one is not flagged.
49
+ */
50
+ export declare function checkBunLockfile(dir: string): Finding[];
16
51
  //# sourceMappingURL=lockfile-checker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lockfile-checker.d.ts","sourceRoot":"","sources":["../src/lockfile-checker.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAmD1C;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,EAAE,CAwDpD"}
1
+ {"version":3,"file":"lockfile-checker.d.ts","sourceRoot":"","sources":["../src/lockfile-checker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAoE1C;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,EAAE,CAOpD;AAMD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,EAAE,CAgDvD;AA8TD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,EAAE,CAsBxD;AA2GD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,EAAE,CAsBxD;AAqKD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,EAAE,CA6CvD"}