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.
- package/README.md +6 -3
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/composer-scanner.d.ts +27 -0
- package/dist/composer-scanner.d.ts.map +1 -0
- package/dist/composer-scanner.js +209 -0
- package/dist/composer-scanner.js.map +1 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/dist/ioc-blocklist.d.ts +1 -1
- package/dist/ioc-blocklist.d.ts.map +1 -1
- package/dist/ioc-blocklist.js +8 -1
- package/dist/ioc-blocklist.js.map +1 -1
- package/dist/lockfile-checker.d.ts +39 -4
- package/dist/lockfile-checker.d.ts.map +1 -1
- package/dist/lockfile-checker.js +585 -27
- package/dist/lockfile-checker.js.map +1 -1
- package/dist/nuget-scanner.d.ts +36 -0
- package/dist/nuget-scanner.d.ts.map +1 -0
- package/dist/nuget-scanner.js +233 -0
- package/dist/nuget-scanner.js.map +1 -0
- package/dist/policy-engine.d.ts.map +1 -1
- package/dist/policy-engine.js +184 -9
- package/dist/policy-engine.js.map +1 -1
- package/dist/reporter.js +4 -4
- package/dist/reporter.js.map +1 -1
- package/dist/rubygems-scanner.d.ts +27 -0
- package/dist/rubygems-scanner.d.ts.map +1 -0
- package/dist/rubygems-scanner.js +215 -0
- package/dist/rubygems-scanner.js.map +1 -0
- package/dist/scanner.d.ts.map +1 -1
- package/dist/scanner.js +31 -0
- package/dist/scanner.js.map +1 -1
- package/dist/threat-intel.d.ts +16 -0
- package/dist/threat-intel.d.ts.map +1 -1
- package/dist/threat-intel.js +48 -0
- package/dist/threat-intel.js.map +1 -1
- package/dist/types.d.ts +21 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +4 -3
- package/policy-schema.json +91 -0
|
@@ -1,16 +1,51 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Lockfile integrity verification (T-006)
|
|
3
3
|
*
|
|
4
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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"}
|