@cdxgen/cdxgen 13.0.0 → 13.1.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 +26 -13
- package/bin/audit.js +6 -0
- package/bin/cdxgen.js +140 -8
- package/bin/convert.js +7 -0
- package/bin/evinse.js +1 -1
- package/bin/hbom.js +13 -4
- package/bin/tracebom.js +9 -1
- package/data/component-tags.json +8 -1
- package/data/frameworks-list.json +86 -1
- package/data/remediations.json +1144 -0
- package/data/rules/asar-archives.yaml +1 -1
- package/data/rules/build-fidelity.yaml +782 -0
- package/data/rules/package-integrity.yaml +13 -13
- package/lib/audit/index.js +48 -4
- package/lib/audit/scoring.js +2 -8
- package/lib/cli/bomAssembly.js +83 -15
- package/lib/cli/cliOptions.js +124 -7
- package/lib/cli/index.js +76 -48
- package/lib/cli/jsBom.js +32 -3
- package/lib/cli/jvmBom.js +1494 -1315
- package/lib/cli/managedBom.js +97 -28
- package/lib/cli/nativeBom.js +189 -10
- package/lib/core/buildLedger.js +799 -0
- package/lib/core/deferredExit.js +141 -0
- package/lib/core/env.js +69 -1
- package/lib/core/fs.js +60 -0
- package/lib/core/logger.js +76 -25
- package/lib/core/severity.js +16 -0
- package/lib/core/syncFileWriter.js +106 -0
- package/lib/core/ui.js +46 -2
- package/lib/ecosystems/ecosystems.js +9 -0
- package/lib/ecosystems/gradleutils.js +355 -15
- package/lib/ecosystems/parsers-js.js +26 -0
- package/lib/ecosystems/parsers-jvm.js +9 -0
- package/lib/ecosystems/parsers-misc.js +16 -2
- package/lib/ecosystems/parsers-python.js +171 -35
- package/lib/ecosystems/parsers-rust.js +12 -2
- package/lib/ecosystems/pypiClassifiers.js +326 -0
- package/lib/ecosystems/pythonutils.js +49 -1
- package/lib/ecosystems/rubyutils.js +13 -0
- package/lib/ecosystems/utils.js +9 -1
- package/lib/evinser/evinser.js +30 -12
- package/lib/helpers/remote/dependency-track.js +81 -14
- package/lib/inventory/auditCategories.js +9 -0
- package/lib/inventory/depsUtils.js +72 -0
- package/lib/inventory/dosai.js +431 -22
- package/lib/inventory/envcontext.js +211 -19
- package/lib/inventory/fetchBatch.js +57 -0
- package/lib/inventory/jvmToolEnv.js +593 -0
- package/lib/inventory/osinfo.js +123 -16
- package/lib/inventory/table.js +9 -5
- package/lib/inventory/toolRequirements.js +903 -0
- package/lib/managers/binary.js +216 -40
- package/lib/managers/docker.js +26 -5
- package/lib/server/server.js +1 -1
- package/lib/stages/postgen/annotationBuilder.js +97 -0
- package/lib/stages/postgen/auditBom.js +76 -79
- package/lib/stages/postgen/introspection/annotate.js +320 -0
- package/lib/stages/postgen/introspection/commandFacts.js +293 -0
- package/lib/stages/postgen/introspection/emit.js +192 -0
- package/lib/stages/postgen/introspection/formulationEvidence.js +427 -0
- package/lib/stages/postgen/introspection/markers.js +227 -0
- package/lib/stages/postgen/introspection/reflect.js +1214 -0
- package/lib/stages/postgen/introspection/report.js +1208 -0
- package/lib/stages/postgen/introspection/score.js +1067 -0
- package/lib/stages/postgen/introspection/shapeCommand.js +304 -0
- package/lib/stages/postgen/parentEdge.js +156 -0
- package/lib/stages/postgen/postgen.js +115 -2
- package/lib/stages/postgen/ruleEngine.js +17 -0
- package/lib/stages/pregen/envAudit.js +42 -2
- package/lib/stages/pregen/pregen.js +1171 -6
- package/lib/validator/bomValidator.js +11 -2
- package/package.json +14 -14
- package/types/lib/audit/index.d.ts.map +1 -1
- package/types/lib/audit/scoring.d.ts +2 -8
- package/types/lib/audit/scoring.d.ts.map +1 -1
- package/types/lib/cli/bomAssembly.d.ts +14 -0
- package/types/lib/cli/bomAssembly.d.ts.map +1 -1
- package/types/lib/cli/cliOptions.d.ts +2 -1
- package/types/lib/cli/cliOptions.d.ts.map +1 -1
- package/types/lib/cli/index.d.ts +8 -0
- package/types/lib/cli/index.d.ts.map +1 -1
- package/types/lib/cli/jsBom.d.ts.map +1 -1
- package/types/lib/cli/jvmBom.d.ts.map +1 -1
- package/types/lib/cli/managedBom.d.ts.map +1 -1
- package/types/lib/cli/nativeBom.d.ts.map +1 -1
- package/types/lib/core/buildLedger.d.ts +272 -0
- package/types/lib/core/buildLedger.d.ts.map +1 -0
- package/types/lib/core/deferredExit.d.ts +84 -0
- package/types/lib/core/deferredExit.d.ts.map +1 -0
- package/types/lib/core/env.d.ts +22 -1
- package/types/lib/core/env.d.ts.map +1 -1
- package/types/lib/core/fs.d.ts +21 -0
- package/types/lib/core/fs.d.ts.map +1 -1
- package/types/lib/core/logger.d.ts +14 -1
- package/types/lib/core/logger.d.ts.map +1 -1
- package/types/lib/core/severity.d.ts +11 -0
- package/types/lib/core/severity.d.ts.map +1 -0
- package/types/lib/core/syncFileWriter.d.ts +33 -0
- package/types/lib/core/syncFileWriter.d.ts.map +1 -0
- package/types/lib/core/ui.d.ts +1 -1
- package/types/lib/core/ui.d.ts.map +1 -1
- package/types/lib/ecosystems/ecosystems.d.ts.map +1 -1
- package/types/lib/ecosystems/gradleutils.d.ts +33 -0
- package/types/lib/ecosystems/gradleutils.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-js.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-jvm.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-misc.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-python.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-rust.d.ts.map +1 -1
- package/types/lib/ecosystems/pypiClassifiers.d.ts +80 -0
- package/types/lib/ecosystems/pypiClassifiers.d.ts.map +1 -0
- package/types/lib/ecosystems/pythonutils.d.ts +20 -0
- package/types/lib/ecosystems/pythonutils.d.ts.map +1 -1
- package/types/lib/ecosystems/rubyutils.d.ts.map +1 -1
- package/types/lib/ecosystems/utils.d.ts +4 -4
- package/types/lib/ecosystems/utils.d.ts.map +1 -1
- package/types/lib/evinser/evinser.d.ts +5 -1
- package/types/lib/evinser/evinser.d.ts.map +1 -1
- package/types/lib/helpers/remote/dependency-track.d.ts +45 -4
- package/types/lib/helpers/remote/dependency-track.d.ts.map +1 -1
- package/types/lib/inventory/auditCategories.d.ts +8 -0
- package/types/lib/inventory/auditCategories.d.ts.map +1 -1
- package/types/lib/inventory/depsUtils.d.ts.map +1 -1
- package/types/lib/inventory/dosai.d.ts +20 -0
- package/types/lib/inventory/dosai.d.ts.map +1 -1
- package/types/lib/inventory/envcontext.d.ts.map +1 -1
- package/types/lib/inventory/fetchBatch.d.ts +9 -0
- package/types/lib/inventory/fetchBatch.d.ts.map +1 -1
- package/types/lib/inventory/jvmToolEnv.d.ts +189 -0
- package/types/lib/inventory/jvmToolEnv.d.ts.map +1 -0
- package/types/lib/inventory/osinfo.d.ts +83 -2
- package/types/lib/inventory/osinfo.d.ts.map +1 -1
- package/types/lib/inventory/table.d.ts +4 -1
- package/types/lib/inventory/table.d.ts.map +1 -1
- package/types/lib/inventory/toolRequirements.d.ts +216 -0
- package/types/lib/inventory/toolRequirements.d.ts.map +1 -0
- package/types/lib/managers/binary.d.ts +71 -0
- package/types/lib/managers/binary.d.ts.map +1 -1
- package/types/lib/managers/docker.d.ts.map +1 -1
- package/types/lib/stages/postgen/annotationBuilder.d.ts +53 -0
- package/types/lib/stages/postgen/annotationBuilder.d.ts.map +1 -0
- package/types/lib/stages/postgen/auditBom.d.ts.map +1 -1
- package/types/lib/stages/postgen/introspection/annotate.d.ts +81 -0
- package/types/lib/stages/postgen/introspection/annotate.d.ts.map +1 -0
- package/types/lib/stages/postgen/introspection/commandFacts.d.ts +32 -0
- package/types/lib/stages/postgen/introspection/commandFacts.d.ts.map +1 -0
- package/types/lib/stages/postgen/introspection/emit.d.ts +71 -0
- package/types/lib/stages/postgen/introspection/emit.d.ts.map +1 -0
- package/types/lib/stages/postgen/introspection/formulationEvidence.d.ts +154 -0
- package/types/lib/stages/postgen/introspection/formulationEvidence.d.ts.map +1 -0
- package/types/lib/stages/postgen/introspection/markers.d.ts +57 -0
- package/types/lib/stages/postgen/introspection/markers.d.ts.map +1 -0
- package/types/lib/stages/postgen/introspection/reflect.d.ts +77 -0
- package/types/lib/stages/postgen/introspection/reflect.d.ts.map +1 -0
- package/types/lib/stages/postgen/introspection/report.d.ts +85 -0
- package/types/lib/stages/postgen/introspection/report.d.ts.map +1 -0
- package/types/lib/stages/postgen/introspection/score.d.ts +149 -0
- package/types/lib/stages/postgen/introspection/score.d.ts.map +1 -0
- package/types/lib/stages/postgen/introspection/shapeCommand.d.ts +79 -0
- package/types/lib/stages/postgen/introspection/shapeCommand.d.ts.map +1 -0
- package/types/lib/stages/postgen/parentEdge.d.ts +35 -0
- package/types/lib/stages/postgen/parentEdge.d.ts.map +1 -0
- package/types/lib/stages/postgen/postgen.d.ts +2 -2
- package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
- package/types/lib/stages/postgen/ruleEngine.d.ts.map +1 -1
- package/types/lib/stages/pregen/envAudit.d.ts.map +1 -1
- package/types/lib/stages/pregen/pregen.d.ts +131 -0
- package/types/lib/stages/pregen/pregen.d.ts.map +1 -1
- package/types/lib/validator/bomValidator.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evinser.d.ts","sourceRoot":"","sources":["../../../lib/evinser/evinser.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"evinser.d.ts","sourceRoot":"","sources":["../../../lib/evinser/evinser.js"],"names":[],"mappings":"AA4FA;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,OAAO,EAF5B,MAE4B;;;;;;;eAuDtC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAPE,MAOF,EACP,SAAS,wBAAA,EACT,UAAU,EAPD,MAOC,EACV,OAAO,GAPE,MAOG,GAND,OAAO,CAAC,IAAI,CAAC,CAmDzB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EALpC,MAKoC,EAAE,SAAS,wBAAA,EAAE,UAAU,EAH3D,MAG2D,GAFzD,OAAO,CAAC,IAAI,CAAC,CAoCzB;AAED;;;;;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AAqB,CACzC,QAAQ,EARC,MAQD,EACR,mBAAmB,EARV,MAQU,EACnB,aAAa,EARJ,MAQI,EACb,QAAQ,EARC,MAQD,EACR,gBAAgB,EARP,MAQO,EAChB,cAAc,EARL,MAQK,eA4Gf;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAHrC,MAGqC,EAAE,eAAe,EAFtD,MAEsD;;;;;;;;YAgFzD,SAAS;YACT,GAAG;;;;EASV;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,QAAQ,OAAA,qBA4DnC;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,YAAY,EAH9B,MAG8B,UAExC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAJvC,MAIuC,EAAE,YAAY,EAHrD,MAGqD,GAFnD,MAAM,GAAC,SAAS,CAmD5B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Buffer } from "node:buffer";
|
|
1
2
|
/**
|
|
2
3
|
* Returns the Dependency-Track BOM API URL as a sanitized URL object.
|
|
3
4
|
*
|
|
@@ -13,11 +14,51 @@ export declare function getDependencyTrackBomApiUrl(serverUrl: string): URL | un
|
|
|
13
14
|
*/
|
|
14
15
|
export declare function getDependencyTrackBomUrl(serverUrl: string): string | undefined;
|
|
15
16
|
/**
|
|
16
|
-
* Build the
|
|
17
|
+
* Build the form fields for a Dependency-Track BOM submission.
|
|
18
|
+
*
|
|
19
|
+
* Field names follow the `multipart/form-data` variant of `/api/v1/bom`, which differs
|
|
20
|
+
* from the JSON variant: the JSON body calls the flag `isLatestProjectVersion` and takes
|
|
21
|
+
* `projectTags` as an array of objects, while the form takes `isLatest` and a
|
|
22
|
+
* comma-separated tag list.
|
|
23
|
+
*
|
|
24
|
+
* @param {Object} args CLI/server arguments
|
|
25
|
+
* @returns {Object | undefined} field map if the project coordinates are valid
|
|
26
|
+
*/
|
|
27
|
+
export declare function buildDependencyTrackBomPayload(args: Object): Object | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Encode text fields and a single file part as a `multipart/form-data` body.
|
|
30
|
+
*
|
|
31
|
+
* @param {Object} fields Text fields keyed by field name
|
|
32
|
+
* @param {Object} file File part
|
|
33
|
+
* @param {string} file.name Field name of the file part
|
|
34
|
+
* @param {string} file.filename File name reported to the server
|
|
35
|
+
* @param {string} file.contentType Content type of the file part
|
|
36
|
+
* @param {Buffer} file.content File content
|
|
37
|
+
* @returns {{ body: Buffer, contentType: string }} encoded body and its content type
|
|
38
|
+
*/
|
|
39
|
+
export declare function encodeMultipartFormData(fields: Object, file: {
|
|
40
|
+
name: string;
|
|
41
|
+
filename: string;
|
|
42
|
+
contentType: string;
|
|
43
|
+
content: Buffer;
|
|
44
|
+
}): {
|
|
45
|
+
body: Buffer;
|
|
46
|
+
contentType: string;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Build the `multipart/form-data` request for Dependency-Track BOM submission.
|
|
50
|
+
*
|
|
51
|
+
* The JSON variant of the endpoint carries the BOM as a base64 string, which Jackson
|
|
52
|
+
* refuses to read beyond 20,000,000 characters - roughly a 15 MB BOM, which container
|
|
53
|
+
* image scans exceed routinely. The form variant carries the BOM as a file part and has
|
|
54
|
+
* no such limit, and is what the server recommends for large uploads.
|
|
17
55
|
*
|
|
18
56
|
* @param {Object} args CLI/server arguments
|
|
19
|
-
* @param {Object} bomContents BOM Json
|
|
20
|
-
* @returns {
|
|
57
|
+
* @param {Object | string} bomContents BOM Json
|
|
58
|
+
* @returns {{ body: Buffer, contentType: string } | undefined} request body and content type if the arguments are valid
|
|
21
59
|
*/
|
|
22
|
-
export declare function
|
|
60
|
+
export declare function buildDependencyTrackBomRequest(args: Object, bomContents: Object | string): {
|
|
61
|
+
body: Buffer;
|
|
62
|
+
contentType: string;
|
|
63
|
+
} | undefined;
|
|
23
64
|
//# sourceMappingURL=dependency-track.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependency-track.d.ts","sourceRoot":"","sources":["../../../../lib/helpers/remote/dependency-track.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dependency-track.d.ts","sourceRoot":"","sources":["../../../../lib/helpers/remote/dependency-track.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAKrC;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAH1C,MAG0C,GAFxC,GAAG,GAAG,SAAS,CAyB3B;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAHvC,MAGuC,GAFrC,MAAM,GAAG,SAAS,CAI9B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,8BAA8B,CAAC,IAAI,EAHxC,MAGwC,GAFtC,MAAM,GAAG,SAAS,CA6D9B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EARnC,MAQmC,EAAE,IAAI,EANjD;IAAqB,IAAI,EAAjB,MAAM,CACd;IAAqB,QAAQ,EAArB,MAAM,CACd;IAAqB,WAAW,EAAxB,MAAM,CACd;IAAqB,OAAO,EAApB,MAAM,CACd;CAEiD,GAFvC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAyBjD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,8BAA8B,CAAC,IAAI,EAJxC,MAIwC,EAAE,WAAW,EAHrD,MAAM,GAAG,MAG4C,GAFnD;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAmB7D"}
|
|
@@ -6,6 +6,14 @@ export declare const CBOM_AUDIT_CATEGORIES: readonly string[];
|
|
|
6
6
|
export declare const HOST_TOPOLOGY_AUDIT_CATEGORIES: readonly string[];
|
|
7
7
|
/** Frozen list of Golem (Go Evinse) audit categories. */
|
|
8
8
|
export declare const GOLEM_AUDIT_CATEGORIES: readonly string[];
|
|
9
|
+
/**
|
|
10
|
+
* Frozen list of audit categories that never activate on their own. These
|
|
11
|
+
* rule packs serve a specific feature (`--introspect` for build-fidelity) and
|
|
12
|
+
* stay inactive unless the caller explicitly requests the category, so a
|
|
13
|
+
* default `--bom-audit` run - which evaluates every loaded rule - cannot pick
|
|
14
|
+
* them up.
|
|
15
|
+
*/
|
|
16
|
+
export declare const OPT_IN_BOM_AUDIT_CATEGORIES: readonly string[];
|
|
9
17
|
/** Frozen list of AI-bill-of-materials audit categories. */
|
|
10
18
|
export declare const AI_BOM_AUDIT_CATEGORIES: readonly string[];
|
|
11
19
|
/** Comma-separated default HBOM category string used when none is specified. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auditCategories.d.ts","sourceRoot":"","sources":["../../../lib/inventory/auditCategories.js"],"names":[],"mappings":"AAEA,yEAAyE;AACzE,eAAO,MAAM,qBAAqB,mBAIhC,CAAC;AAEH,8EAA8E;AAC9E,eAAO,MAAM,qBAAqB,mBAGhC,CAAC;AAEH,qDAAqD;AACrD,eAAO,MAAM,8BAA8B,mBAAmC,CAAC;AAE/E,yDAAyD;AACzD,eAAO,MAAM,sBAAsB,mBAIjC,CAAC;AAEH,4DAA4D;AAC5D,eAAO,MAAM,uBAAuB,mBAIlC,CAAC;AAEH,gFAAgF;AAChF,eAAO,MAAM,6BAA6B,QAAkC,CAAC;AAE7E;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;EAWrC,CAAC;AAMH;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,UAAU,EAH3C,MAAM,GAAC,MAAM,EAG8B,GAFzC,MAAM,EAAE,CAiBpB;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAHxC,MAAM,GAAC,MAAM,EAG2B,GAFtC,MAAM,EAAE,CAapB;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAHtC,KAAK,CAAC;IAAC,QAAQ,CAAC,E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,EAG2B,GAFtC,MAAM,EAAE,CAapB;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAHtC,KAAK,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAC,CAGa,GAFpC,MAAM,EAAE,CAMpB;AAUD;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAJ1C,MAAM,GAAC,MAAM,EAI6B,EAAE,KAAK,EAHjD,KAAK,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAC,CAGwB,GAF/C;IAAC,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAAC,eAAe,EAAE,MAAM,EAAE,CAAA;CAAC,CAyB3F;AAED;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAJzC,MAIyC,EAAE,WAAW,AAH9D,CACA,EADQ,MAGsD,GAFpD,MAAM,GAAG,SAAS,CA8B9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depsUtils.d.ts","sourceRoot":"","sources":["../../../lib/inventory/depsUtils.js"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EANH,MAAM,EAMH,EACZ,eAAe,EANN,MAAM,EAMA,EACf,eAAe,GANN,MAMW,GALT,MAAM,EAAE,CAuEpB;AA4CD;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,UAAU,GAH9C,MAAM,EAG6C,GAFjD,MAAM,EAAE,CAYpB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sCAAsC,CACpD,UAAU,GALD,MAAM,EAKA,EACf,YAAY,GALH,MAAM,EAKE,GAJN,MAAM,EAAE,CA8DpB;
|
|
1
|
+
{"version":3,"file":"depsUtils.d.ts","sourceRoot":"","sources":["../../../lib/inventory/depsUtils.js"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EANH,MAAM,EAMH,EACZ,eAAe,EANN,MAAM,EAMA,EACf,eAAe,GANN,MAMW,GALT,MAAM,EAAE,CAuEpB;AA4CD;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,UAAU,GAH9C,MAAM,EAG6C,GAFjD,MAAM,EAAE,CAYpB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sCAAsC,CACpD,UAAU,GALD,MAAM,EAKA,EACf,YAAY,GALH,MAAM,EAKE,GAJN,MAAM,EAAE,CA8DpB;AA0FD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAJ3B,MAAM,EAAE,GAAC,MAIkB,EAAE,WAAW,EAHxC,MAAM,EAAE,GAAC,MAG+B,GAFtC,MAAM,EAAE,CAqFpB;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,UAAU,OAAA,SAoIxC;AAED;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAAC,UAAU,EAH7C,MAAM,EAAE,GAAG,SAAS,GAAG,IAGsB,GAF3C,MAAM,EAAE,CA0CpB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,YAAY,OAAA,EAAE,eAAe,SAAI,WAsB9D;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,OAAO,OAAA,EAAE,YAAY,OAAA,SAgCnD"}
|
|
@@ -108,6 +108,26 @@ export declare function collectDosaiPurlEvidence(methodsSlice: Object, component
|
|
|
108
108
|
* @returns {Object} Map of canonical purl to arrays of call-stack frame objects
|
|
109
109
|
*/
|
|
110
110
|
export declare function collectDosaiDataFlowFrames(dataFlowResult: Object, components?: Object[]): Object;
|
|
111
|
+
/**
|
|
112
|
+
* Consume dosai's AiComponents[] inventory (schema 4.0.0): model identifiers,
|
|
113
|
+
* on-disk model artifacts with hashes, MCP tools, prompts (redacted), and agents
|
|
114
|
+
* become CycloneDX machine-learning-model / data components with modelCard data.
|
|
115
|
+
*
|
|
116
|
+
* @param {Object} methodsSlice Parsed dosai methods slice JSON
|
|
117
|
+
* @param {Array} [components] Component list to mutate in place
|
|
118
|
+
* @returns {Array} The updated component list
|
|
119
|
+
*/
|
|
120
|
+
export declare function collectDosaiAiComponents(methodsSlice: Object, components?: any[]): any[];
|
|
121
|
+
/**
|
|
122
|
+
* Consume dosai's first-class Services[] inventory (schema 4.0.0) directly: richer
|
|
123
|
+
* than deriving services from ApiEndpoints alone — stable bom-refs, trust zones,
|
|
124
|
+
* data classifications, providers, and per-service evidence occurrences.
|
|
125
|
+
*
|
|
126
|
+
* @param {Object} methodsSlice Parsed dosai methods slice JSON
|
|
127
|
+
* @param {Object} [servicesMap] Map of service key to service definition, mutated in place
|
|
128
|
+
* @returns {Object} The updated services map
|
|
129
|
+
*/
|
|
130
|
+
export declare function collectDosaiServiceComponents(methodsSlice: Object, servicesMap?: Object): Object;
|
|
111
131
|
/**
|
|
112
132
|
* Infer service and endpoint definitions from a dosai methods slice.
|
|
113
133
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dosai.d.ts","sourceRoot":"","sources":["../../../lib/inventory/dosai.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dosai.d.ts","sourceRoot":"","sources":["../../../lib/inventory/dosai.js"],"names":[],"mappings":"AAqLA;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAHnC,MAGmC,GAFjC,OAAO,CAInB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAH/B,MAG+B,GAF7B,MAAM,GAAC,SAAS,CAW5B;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAN5B,MAM4B,EAAE,GAAG,EALjC,MAKiC,EAAE,UAAU,EAJ7C,MAI6C,EAAE,OAAO,AAH9D,CACA,EADQ,MAG2D,GAFzD,OAAO,CAiEnB;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EALhC,MAKgC,EAAE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C,MAI0C,EAAE,UAAU,AAH9D,CACA,OAEmE,SA6FrE;AAED;;;;;;;;GAQG;AACH,wBAAgB,6BAA6B,CAAC,YAAY,EAJ/C,MAI+C,EAAE,WAAW,AAHpE,CACA,EADQ,MAGiE,GAF/D,MAAM,CAyKlB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,+BAA+B,CAC7C,YAAY,EALH,MAKG,EACZ,WAAW,AALV,CACA,EADQ,MAKO,GAJL,MAAM,CA+GlB;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,AAHjD,CACA,EADQ,MAG8C,GAF5C,MAAM,EAAE,CA6CpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envcontext.d.ts","sourceRoot":"","sources":["../../../lib/inventory/envcontext.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"envcontext.d.ts","sourceRoot":"","sources":["../../../lib/inventory/envcontext.js"],"names":[],"mappings":"AAkDA;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAFd,MAE4D,CAAC;AAuCvE;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,wBAUpC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAL3B,MAK2B,EAAE,GAAG,EAJhC,MAIgC,sBAE1C;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAJrB,MAIqB,sBAE/B;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,UAAU,KAAA,EAAE,GAAG,EAJ9B,MAI8B,sBAExC;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAJtB,MAIsB,MAkBhC;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAJlB,MAIkB,SA4B5B;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,GAAG,EALvB,MAKuB,EAAE,IAAI,OAAA,sBAiBvC;AAED;;;;;;;GAOG;AACH,wB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GA,EAFA;IAAyB,GAAG,AAA5B,CACA,EADQ,MAAM,CACd;IAAyB,QAAQ,AAAjC,CACA,EADQ,MAAM,CACd;CAEyC,GAF/B,KAAK,CAAC,MAAM,CAAC,CA4CzB;AAMD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAJ9B,MAI8B,EAAE,QAAQ,GAHxC,MAG6C,GAF3C,KAAK,CAAC,MAAM,CAAC,CA+BzB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAFxB,MAAM,CA4GlB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,WAUpC;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,IAF9B,MAAM,GAAC,SAAS,CAc5B"}
|
|
@@ -95,6 +95,15 @@ export declare function prefetchJson(requests: Array<{
|
|
|
95
95
|
}>, options?: {
|
|
96
96
|
timeoutMs?: number;
|
|
97
97
|
}): Promise<Map<string, BatchEntry>>;
|
|
98
|
+
/**
|
|
99
|
+
* Record the run-level policy or connectivity condition carried by a caught
|
|
100
|
+
* fetch error, if it names one. Shared by the batch retry loop and by the
|
|
101
|
+
* serial enrichment paths that catch and swallow the same typed errors.
|
|
102
|
+
*
|
|
103
|
+
* @param {Error} err Error caught from a `cdxgenAgent` request.
|
|
104
|
+
* @returns {void}
|
|
105
|
+
*/
|
|
106
|
+
export declare function recordPolicyDegradationFromError(err: Error): void;
|
|
98
107
|
/**
|
|
99
108
|
* Read a prefetched response, or signal that the caller should fetch it itself.
|
|
100
109
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchBatch.d.ts","sourceRoot":"","sources":["../../../lib/inventory/fetchBatch.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;
|
|
1
|
+
{"version":3,"file":"fetchBatch.d.ts","sourceRoot":"","sources":["../../../lib/inventory/fetchBatch.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;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,189 @@
|
|
|
1
|
+
import { compareVersions, extractJavaMajor, isPrereleaseVersion } from "./toolRequirements.js";
|
|
2
|
+
/**
|
|
3
|
+
* The general-purpose version comparator, prerelease classifier, and JDK
|
|
4
|
+
* major extractor live in `toolRequirements.js` so every ecosystem shares one
|
|
5
|
+
* comparator; they are re-exported here under the names this module's
|
|
6
|
+
* consumers already use.
|
|
7
|
+
*/
|
|
8
|
+
export { compareVersions as compareSdkmanVersions, extractJavaMajor, isPrereleaseVersion, };
|
|
9
|
+
/**
|
|
10
|
+
* Anchored validator for sdkman version identifiers such as `3.9.9`,
|
|
11
|
+
* `4.0.0-rc-5`, `8.14`, or `21.0.7-tem`. Versions are interpolated into a
|
|
12
|
+
* shell command by the sdkman installer, so every identifier must be a single
|
|
13
|
+
* safe token: it must start with a digit and may only contain digits, ascii
|
|
14
|
+
* letters, dots, and hyphens.
|
|
15
|
+
*
|
|
16
|
+
* Every separator must be followed by at least one alphanumeric character, and
|
|
17
|
+
* a single repeated group covers both the dotted numeric part and the vendor
|
|
18
|
+
* or prerelease suffix. That leaves each character exactly one role, so the
|
|
19
|
+
* pattern matches in linear time on untrusted input.
|
|
20
|
+
*
|
|
21
|
+
* @param {string} version Candidate version identifier
|
|
22
|
+
* @returns {boolean} True when the identifier is safe to pass to sdkman
|
|
23
|
+
*/
|
|
24
|
+
export declare function isValidSdkmanVersion(version: string): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Parse a versioned JVM build tool project type such as `maven3.9.9`,
|
|
27
|
+
* `mvn3.9.9`, `gradle8.14`, `sbt1.10`, or `scala3.6.4` into its sdkman
|
|
28
|
+
* candidate name and version token.
|
|
29
|
+
*
|
|
30
|
+
* The returned object distinguishes between a syntactically valid pin and a
|
|
31
|
+
* rejected one so callers can print a precise CLI error instead of silently
|
|
32
|
+
* ignoring the type.
|
|
33
|
+
*
|
|
34
|
+
* @param {string} projectType Project type argument from the CLI
|
|
35
|
+
* @returns {Object|undefined} `{ tool, version, valid }` when the type looks
|
|
36
|
+
* like a versioned JVM build tool, `undefined` otherwise. `valid` is false
|
|
37
|
+
* when the version token fails validation.
|
|
38
|
+
*/
|
|
39
|
+
export declare function parseJvmToolProjectType(projectType: string): Object | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Parse a `.sdkmanrc` environment file into the sdkman candidates it pins.
|
|
42
|
+
* Only the JVM-related candidates cdxgen knows how to provision are kept;
|
|
43
|
+
* unknown keys are ignored so newer sdkman files remain readable. Malformed
|
|
44
|
+
* lines are skipped instead of aborting the whole file.
|
|
45
|
+
*
|
|
46
|
+
* @param {string} filePath Project directory that may contain a `.sdkmanrc`
|
|
47
|
+
* @returns {Object|undefined} Map of candidate name to exact version
|
|
48
|
+
* identifier, or `undefined` when the file is missing or unreadable.
|
|
49
|
+
*/
|
|
50
|
+
export declare function parseSdkmanrc(filePath: string): Object | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Read the version pinned by a Gradle wrapper's `gradle-wrapper.properties`.
|
|
53
|
+
* The `distributionUrl` value may escape colons as `\:` per the Java
|
|
54
|
+
* properties format; the escapes are removed before parsing.
|
|
55
|
+
*
|
|
56
|
+
* @param {string} rootPath Directory holding the `gradle/wrapper` folder
|
|
57
|
+
* @returns {Object|undefined} `{ version, distributionUrl, distributionSha256Sum? }`
|
|
58
|
+
* or `undefined` when the wrapper is missing or unparsable.
|
|
59
|
+
*/
|
|
60
|
+
export declare function readGradleWrapperVersion(rootPath: string): Object | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Read the version pinned by a Maven wrapper's `maven-wrapper.properties`.
|
|
63
|
+
* Legacy wrappers (pre wrapper-distribution downloads) lack a
|
|
64
|
+
* `distributionUrl` and are treated as unpinned.
|
|
65
|
+
*
|
|
66
|
+
* @param {string} rootPath Directory holding the `.mvn/wrapper` folder
|
|
67
|
+
* @returns {Object|undefined} `{ version, distributionUrl }` or `undefined`
|
|
68
|
+
* when the wrapper is missing or unpinned.
|
|
69
|
+
*/
|
|
70
|
+
export declare function readMavenWrapperVersion(rootPath: string): Object | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Read the sbt version declared in `project/build.properties`. Kept here as a
|
|
73
|
+
* small properties-file read so environment preparation does not depend on
|
|
74
|
+
* higher layers.
|
|
75
|
+
*
|
|
76
|
+
* @param {string} projectPath SBT project directory
|
|
77
|
+
* @returns {string|undefined} Declared sbt version, when present and valid.
|
|
78
|
+
*/
|
|
79
|
+
export declare function readSbtBuildPropertiesVersion(projectPath: string): string | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Minimum JDK major version required to run each build tool, keyed by the
|
|
82
|
+
* tool's major version line. Versions absent from the table fall back to the
|
|
83
|
+
* tool's `default` entry.
|
|
84
|
+
*
|
|
85
|
+
* Sources: Maven release history (maven.apache.org/docs/history.html), the
|
|
86
|
+
* Gradle compatibility table (docs.gradle.org), and the sbt setup notes.
|
|
87
|
+
*
|
|
88
|
+
* @type {Object<string, Object<number, number>|number>}
|
|
89
|
+
*/
|
|
90
|
+
export declare const TOOL_JDK_REQUIREMENTS: Record<string, number | Record<number, number>>;
|
|
91
|
+
/**
|
|
92
|
+
* Minimum Gradle version that supports a given JDK major, for the
|
|
93
|
+
* combinations where running an older Gradle on a newer JDK is known to fail.
|
|
94
|
+
* Used to warn instead of guess-installing when the environment contradicts
|
|
95
|
+
* the project's Gradle pin.
|
|
96
|
+
*
|
|
97
|
+
* @type {Object<number, string>}
|
|
98
|
+
*/
|
|
99
|
+
export declare const GRADLE_JAVA_CAPS: Record<number, string>;
|
|
100
|
+
/** JDK major that satisfies every current build tool minimum. */
|
|
101
|
+
export declare const DEFAULT_JAVA_MAJOR = 21;
|
|
102
|
+
/**
|
|
103
|
+
* Look up the minimum JDK major required to run a tool version.
|
|
104
|
+
*
|
|
105
|
+
* @param {string} tool Tool name (maven, gradle, sbt, scala)
|
|
106
|
+
* @param {string} version Tool version identifier
|
|
107
|
+
* @returns {number|undefined} Minimum JDK major, when known.
|
|
108
|
+
*/
|
|
109
|
+
export declare function minimumJdkForToolVersion(tool: string, version: string): number | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* Compute the highest JDK major required across a set of tool pins.
|
|
112
|
+
*
|
|
113
|
+
* @param {Array<{tool: string, version: string}>} toolPins Pinned tools
|
|
114
|
+
* @returns {number|undefined} Highest required JDK major, when any pin maps.
|
|
115
|
+
*/
|
|
116
|
+
export declare function determineRequiredJavaVersion(toolPins: Array<{
|
|
117
|
+
tool: string;
|
|
118
|
+
version: string;
|
|
119
|
+
}>): number | undefined;
|
|
120
|
+
/**
|
|
121
|
+
* Minimum Gradle version that can run on the given JDK major, when such a cap
|
|
122
|
+
* is known.
|
|
123
|
+
*
|
|
124
|
+
* @param {number} javaMajor JDK major version
|
|
125
|
+
* @returns {string|undefined} Minimum Gradle version, when capped.
|
|
126
|
+
*/
|
|
127
|
+
export declare function minimumGradleVersionForJava(javaMajor: number): string | undefined;
|
|
128
|
+
/**
|
|
129
|
+
* Collect the version tokens printed by `sdk list <candidate>`. The output is
|
|
130
|
+
* a fixed-width table whose cells may carry `+`, `*`, or `>` status markers;
|
|
131
|
+
* every token that passes the sdkman version validator is kept, which
|
|
132
|
+
* naturally drops banners, legends, and shell noise.
|
|
133
|
+
*
|
|
134
|
+
* @param {string} stdout Raw `sdk list` output
|
|
135
|
+
* @returns {string[]} Version identifiers found in the output.
|
|
136
|
+
*/
|
|
137
|
+
export declare function extractSdkListVersions(stdout: string): string[];
|
|
138
|
+
/**
|
|
139
|
+
* Resolve a partial version prefix such as `3.9` or `8.14` to the newest
|
|
140
|
+
* matching version in `sdk list` output. Stable versions are preferred unless
|
|
141
|
+
* the requested prefix itself is a prerelease.
|
|
142
|
+
*
|
|
143
|
+
* @param {string} stdout Raw `sdk list <candidate>` output
|
|
144
|
+
* @param {string} prefix Partial or exact version prefix; empty matches all
|
|
145
|
+
* @returns {string|undefined} Best matching version identifier.
|
|
146
|
+
*/
|
|
147
|
+
export declare function resolvePartialVersion(stdout: string, prefix: string): string | undefined;
|
|
148
|
+
/**
|
|
149
|
+
* Environment variable hints that carry a tool version, used by container
|
|
150
|
+
* images and CI setups to describe the preinstalled JVM toolchain.
|
|
151
|
+
*
|
|
152
|
+
* @type {Object<string, string>}
|
|
153
|
+
*/
|
|
154
|
+
export declare const JVM_TOOL_VERSION_ENV_HINTS: Record<string, string>;
|
|
155
|
+
/**
|
|
156
|
+
* Environment variable overrides that declare the sdkman version to use for
|
|
157
|
+
* a tool, mirroring the existing `JAVA<NN>_TOOL` pattern.
|
|
158
|
+
*
|
|
159
|
+
* @type {Object<string, string>}
|
|
160
|
+
*/
|
|
161
|
+
export declare const JVM_TOOL_VERSION_OVERRIDES: Record<string, string>;
|
|
162
|
+
/**
|
|
163
|
+
* Read the `MAVEN_TOOL`/`GRADLE_TOOL`/`SBT_TOOL`/`SCALA_TOOL` override for a
|
|
164
|
+
* tool, when set to a valid sdkman version identifier.
|
|
165
|
+
*
|
|
166
|
+
* @param {string} tool Tool name
|
|
167
|
+
* @returns {string|undefined} Overridden version identifier.
|
|
168
|
+
*/
|
|
169
|
+
export declare function readToolVersionOverride(tool: string): string | undefined;
|
|
170
|
+
/**
|
|
171
|
+
* Read the container/CI version hint (`MAVEN_VERSION` etc.) for a tool, when
|
|
172
|
+
* set to a valid sdkman version identifier.
|
|
173
|
+
*
|
|
174
|
+
* @param {string} tool Tool name
|
|
175
|
+
* @returns {string|undefined} Hinted version identifier.
|
|
176
|
+
*/
|
|
177
|
+
export declare function readToolVersionEnvHint(tool: string): string | undefined;
|
|
178
|
+
/**
|
|
179
|
+
* Detect the JDK major a project asks for from its build files: Gradle
|
|
180
|
+
* toolchain declarations (`JavaLanguageVersion.of(N)`) and Maven compiler or
|
|
181
|
+
* enforcer properties (`maven.compiler.release`, `maven.compiler.source`,
|
|
182
|
+
* `requireJavaVersion`). The scan is intentionally line-based and
|
|
183
|
+
* conservative: it only recognises whole-number values.
|
|
184
|
+
*
|
|
185
|
+
* @param {string} projectPath Project directory
|
|
186
|
+
* @returns {number|undefined} JDK major requested by the project.
|
|
187
|
+
*/
|
|
188
|
+
export declare function detectProjectJavaMajor(projectPath: string): number | undefined;
|
|
189
|
+
//# sourceMappingURL=jvmToolEnv.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jvmToolEnv.d.ts","sourceRoot":"","sources":["../../../lib/inventory/jvmToolEnv.js"],"names":[],"mappings":"AAMA,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAE/B;;;;;GAKG;AACH,OAAO,EACL,eAAe,IAAI,qBAAqB,EACxC,gBAAgB,EAChB,mBAAmB,GACpB,CAAC;AAuBF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAHjC,MAGiC,GAF/B,OAAO,CASnB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,EALxC,MAKwC,GAJtC,MAAM,GAAC,SAAS,CAmB5B;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAJ3B,MAI2B,GAHzB,MAAM,GAAC,SAAS,CA4C5B;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAJtC,MAIsC,GAHpC,MAAM,GAAC,SAAS,CAwC5B;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAJrC,MAIqC,GAHnC,MAAM,GAAC,SAAS,CAgC5B;AAED;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAAC,WAAW,EAH9C,MAG8C,GAF5C,MAAM,GAAC,SAAS,CAkB5B;AAsDD;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,iDAKjC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,wBAM5B,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAJlC,MAIkC,EAAE,OAAO,EAH3C,MAG2C,GAFzC,MAAM,GAAC,SAAS,CAY5B;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,QAAQ,EAH1C,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,CAGK,GAFxC,MAAM,GAAC,SAAS,CAc5B;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAH1C,MAG0C,GAFxC,MAAM,GAAC,SAAS,CAI5B;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAHlC,MAGkC,GAFhC,MAAM,EAAE,CAgBpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAJjC,MAIiC,EAAE,MAAM,EAHzC,MAGyC,GAFvC,MAAM,GAAC,SAAS,CAwB5B;AAED;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,wBAKtC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,wBAKtC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAHjC,MAGiC,GAF/B,MAAM,GAAC,SAAS,CAS5B;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAHhC,MAGgC,GAF9B,MAAM,GAAC,SAAS,CAS5B;AASD;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EAHvC,MAGuC,GAFrC,MAAM,GAAC,SAAS,CAuB5B"}
|
|
@@ -82,6 +82,85 @@ export declare const OS_DISTRO_ALIAS: {
|
|
|
82
82
|
"red hat enterprise linux 9": string;
|
|
83
83
|
"red hat enterprise linux 10": string;
|
|
84
84
|
};
|
|
85
|
+
/**
|
|
86
|
+
* Canonical purl namespace for distro vendors that are published under more
|
|
87
|
+
* than one spelling. Both the os-release path (`getDistroInfo`) and the trivy
|
|
88
|
+
* passthrough in `lib/managers/binary.js` route through this single map so the
|
|
89
|
+
* two paths cannot drift apart again.
|
|
90
|
+
*
|
|
91
|
+
* Azure Linux 2.0 is CBL-Mariner 2.0 — Microsoft renamed the product — and the
|
|
92
|
+
* OSV feed publishes `pkg:rpm/azure-linux/<name>` for every generation
|
|
93
|
+
* (ecosystems "Azure Linux:2" and "Azure Linux:3"), so the historical
|
|
94
|
+
* spellings azurelinux, cbl-mariner and mariner all canonicalise to
|
|
95
|
+
* "azure-linux". rhel/ol/amzn/opensuse-* are the cases previously inlined in
|
|
96
|
+
* getDistroInfo(); alma/rocky-linux were previously inlined in binary.js.
|
|
97
|
+
*
|
|
98
|
+
* Amazon Linux canonicalises to "amazon", the spelling the vulnerability feeds
|
|
99
|
+
* publish (AppThreat vuln-list `amazon`): the os-release ID is `amzn` and
|
|
100
|
+
* trivy emits `amazon`, and the previous `amazonlinux` mapping here matched
|
|
101
|
+
* neither, so live-host Amazon Linux purls matched nothing at all.
|
|
102
|
+
*/
|
|
103
|
+
export declare const OS_NAMESPACE_ALIAS: {
|
|
104
|
+
alma: string;
|
|
105
|
+
amazonlinux: string;
|
|
106
|
+
amzn: string;
|
|
107
|
+
azurelinux: string;
|
|
108
|
+
"cbl-mariner": string;
|
|
109
|
+
mariner: string;
|
|
110
|
+
ol: string;
|
|
111
|
+
"opensuse-leap": string;
|
|
112
|
+
"opensuse-tumbleweed": string;
|
|
113
|
+
rhel: string;
|
|
114
|
+
"rocky-linux": string;
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Vendor prefixes that `distro` qualifier values are canonicalised for, so one
|
|
118
|
+
* release has exactly one qualifier value no matter which side produced it.
|
|
119
|
+
*
|
|
120
|
+
* trivy stamps the qualifier from its own distro table while cdxgen stamps it
|
|
121
|
+
* from os-release, and the two disagree: an Oracle Linux 9.8 image came out
|
|
122
|
+
* with `oracle-9.8` on 99 components and `ol-9.8` on 43, and a RHEL 9.8 image
|
|
123
|
+
* with namespace `redhat` but qualifier `rhel-9.8`. Canonicalising both sides
|
|
124
|
+
* through this map collapses each release onto the vendor its purl namespace
|
|
125
|
+
* already uses.
|
|
126
|
+
*
|
|
127
|
+
* SUSE is deliberately absent. `sles-15.6`, `opensuse-leap-15.6` and
|
|
128
|
+
* `opensuse-tumbleweed-<snapshot>` are the values consumers derive the release
|
|
129
|
+
* channel from (vulnerability-db maps them to per-release channels), and both
|
|
130
|
+
* sides already agree on them; folding Leap and Tumbleweed onto a bare
|
|
131
|
+
* `opensuse-` vendor would destroy exactly the distinction that matters.
|
|
132
|
+
*
|
|
133
|
+
* Keys are matched longest-first so `cbl-mariner-2.0` resolves against the
|
|
134
|
+
* full vendor segment rather than a shorter prefix.
|
|
135
|
+
*/
|
|
136
|
+
export declare const OS_DISTRO_QUALIFIER_ALIAS: {
|
|
137
|
+
alma: string;
|
|
138
|
+
amazonlinux: string;
|
|
139
|
+
amzn: string;
|
|
140
|
+
azurelinux: string;
|
|
141
|
+
"cbl-mariner": string;
|
|
142
|
+
mariner: string;
|
|
143
|
+
ol: string;
|
|
144
|
+
rhel: string;
|
|
145
|
+
"rocky-linux": string;
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* Whether a `distro` qualifier value is safe to place in a purl unencoded.
|
|
149
|
+
*
|
|
150
|
+
* @param {string} qualifier - distro qualifier value
|
|
151
|
+
* @returns {boolean} true when the value contains only purl-safe characters
|
|
152
|
+
*/
|
|
153
|
+
export declare function isCleanDistroQualifier(qualifier: string): boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Canonicalise the vendor prefix of a `distro` qualifier value
|
|
156
|
+
* (e.g. "cbl-mariner-2.0" or "mariner-2.0" -> "azure-linux-2.0") so a release
|
|
157
|
+
* has exactly one qualifier spelling regardless of which tool emitted it.
|
|
158
|
+
* Values without a known vendor prefix are returned unchanged.
|
|
159
|
+
*
|
|
160
|
+
* @param {string} qualifier - distro qualifier value such as "azurelinux-3.0"
|
|
161
|
+
* @returns {string} canonical qualifier value
|
|
162
|
+
*/
|
|
163
|
+
export declare function canonicalDistroQualifier(qualifier: string): string;
|
|
85
164
|
/**
|
|
86
165
|
* Parse an os-release file from an arbitrary root path and return a plain
|
|
87
166
|
* key→value object. Results are cached per root path so the file is read
|
|
@@ -101,8 +180,10 @@ export declare function _resetOsReleaseCache(): void;
|
|
|
101
180
|
*
|
|
102
181
|
* Returns an object with:
|
|
103
182
|
* - purlType {string} "deb" | "apk" | "rpm"
|
|
104
|
-
* - namespace {string} purl namespace (e.g. "ubuntu", "alpine",
|
|
105
|
-
*
|
|
183
|
+
* - namespace {string} canonical purl namespace (e.g. "ubuntu", "alpine",
|
|
184
|
+
* "azure-linux" for both Azure Linux and CBL-Mariner)
|
|
185
|
+
* - distroId {string} ID + "-" + VERSION_ID with a canonical vendor
|
|
186
|
+
* prefix (e.g. "ubuntu-22.04", "azure-linux-3.0")
|
|
106
187
|
* - distroName {string} codename/alias (e.g. "jammy")
|
|
107
188
|
*
|
|
108
189
|
* Mirrors the logic in lib/managers/binary.js getOSPackages() so that both
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"osinfo.d.ts","sourceRoot":"","sources":["../../../lib/inventory/osinfo.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,eAAe;IAC1B,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,WAAW;IACX,WAAW;IACX,aAAa;IACb,WAAW;IACX,aAAa;IACb,WAAW;IACX,aAAa;IACb,aAAa;IACb,WAAW;IACX,aAAa;IACb,WAAW;IACX,aAAa;IACb,UAAU;IACV,YAAY;IACZ,UAAU;IACV,YAAY;IACZ,UAAU;IACV,YAAY;IACZ,UAAU;IACV,UAAU;IACV,UAAU;IACV,YAAY;IACZ,UAAU;IACV,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,0BAA0B;IAC1B,4BAA4B;IAC5B,4BAA4B;IAC5B,4BAA4B;IAC5B,4BAA4B;IAC5B,6BAA6B;CAC9B,CAAC;
|
|
1
|
+
{"version":3,"file":"osinfo.d.ts","sourceRoot":"","sources":["../../../lib/inventory/osinfo.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,eAAe;IAC1B,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,WAAW;IACX,WAAW;IACX,aAAa;IACb,WAAW;IACX,aAAa;IACb,WAAW;IACX,aAAa;IACb,aAAa;IACb,WAAW;IACX,aAAa;IACb,WAAW;IACX,aAAa;IACb,UAAU;IACV,YAAY;IACZ,UAAU;IACV,YAAY;IACZ,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: any[][], config?: Object): string;
|
|
9
9
|
/**
|
|
10
|
-
* Create a streaming table writer that renders rows
|
|
10
|
+
* Create a streaming table writer that renders rows incrementally.
|
|
11
|
+
*
|
|
12
|
+
* Rows go to the diagnostic stream: a rendered table is human-readable output,
|
|
13
|
+
* and writing it to stdout corrupted the BOM document under `-o -`.
|
|
11
14
|
*
|
|
12
15
|
* @param {Object} [config={}] Table configuration (header, columns, border style)
|
|
13
16
|
* @returns {{write(row: *): void, end(): void}} Writer whose `end()` emits the bottom border
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../lib/inventory/table.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../lib/inventory/table.js"],"names":[],"mappings":"AAiNA;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAJf,OAIe,EAAE,MAAM,AAH/B,CACA,EADQ,MAG4B,GAF1B,MAAM,CAIlB;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,MAAM,AAHhC,CACA,EADQ,MAG6B,GAF3B;IAAC,KAAK,CAAC,GAAG,EAAE,GAAC,GAAG,IAAI,CAAC;IAAC,GAAG,IAAI,IAAI,CAAA;CAAC,CAuC9C"}
|