@cdxgen/cdxgen 13.3.0 → 13.4.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 +9 -6
- package/bin/cdxgen.js +90 -26
- package/bin/evinse.js +18 -1
- package/bin/repl.js +86 -0
- package/bin/sign.js +45 -15
- package/bin/tracebom.js +5 -1
- package/bin/validate.js +84 -18
- package/bin/verify.js +155 -86
- package/data/helpers/init.gradle +46 -21
- package/data/remediations.json +61 -0
- package/data/rules/dependency-sources.yaml +67 -0
- package/data/rules/scala-evidence.yaml +115 -0
- package/lib/audit/index.js +38 -6
- package/lib/cli/index.js +113 -54
- package/lib/cli/jsBom.js +50 -29
- package/lib/cli/jvmBom.js +665 -138
- package/lib/cli/managedBom.js +320 -200
- package/lib/cli/nativeBom.js +139 -30
- package/lib/core/activity.js +12 -0
- package/lib/core/env.js +17 -9
- package/lib/core/fs.js +3 -2
- package/lib/core/httpClient.js +159 -24
- package/lib/core/pluginRun.js +184 -0
- package/lib/core/processTree.js +100 -0
- package/lib/core/runState.js +39 -0
- package/lib/core/toml.js +72 -0
- package/lib/ecosystems/asarutils.js +4 -2
- package/lib/ecosystems/bunutils.js +5 -7
- package/lib/ecosystems/cargoCache.js +231 -8
- package/lib/ecosystems/cmakeResolver.js +10 -21
- package/lib/ecosystems/cppBuildContext.js +631 -0
- package/lib/ecosystems/cppEvidence.js +337 -22
- package/lib/ecosystems/cppIncludeResolver.js +294 -0
- package/lib/ecosystems/denoutils.js +93 -66
- package/lib/ecosystems/ecosystems.js +1967 -788
- package/lib/ecosystems/golem.js +28 -12
- package/lib/ecosystems/gradleutils.js +314 -30
- package/lib/ecosystems/jsEvidence.js +85 -24
- package/lib/ecosystems/kosi.js +21 -4
- package/lib/ecosystems/npmutils.js +64 -0
- package/lib/ecosystems/parsers-dotnet.js +567 -151
- package/lib/ecosystems/parsers-elm.js +46 -28
- package/lib/ecosystems/parsers-gleam.js +3 -4
- package/lib/ecosystems/parsers-go.js +324 -61
- package/lib/ecosystems/parsers-js.js +92 -26
- package/lib/ecosystems/parsers-julia.js +2 -3
- package/lib/ecosystems/parsers-jvm.js +204 -12
- package/lib/ecosystems/parsers-misc.js +182 -55
- package/lib/ecosystems/parsers-python.js +141 -10
- package/lib/ecosystems/parsers-rust.js +4 -4
- package/lib/ecosystems/parsers-terraform.js +1573 -19
- package/lib/ecosystems/pythonutils.js +102 -6
- package/lib/ecosystems/remote/huggingface.js +3 -0
- package/lib/ecosystems/rubyutils.js +67 -17
- package/lib/ecosystems/rusi.js +22 -9
- package/lib/ecosystems/sbtutils.js +243 -187
- package/lib/ecosystems/scalacliutils.js +342 -0
- package/lib/ecosystems/scalasem.js +2618 -0
- package/lib/ecosystems/terraformRegistry.js +288 -0
- package/lib/ecosystems/utils.js +2 -0
- package/lib/ecosystems/vendoredCode.js +156 -0
- package/lib/evinser/evinser.js +578 -69
- package/lib/helpers/agenticToolutils.js +2 -2
- package/lib/helpers/bomSigner.js +576 -128
- package/lib/inventory/aiCollector.js +4 -1
- package/lib/inventory/analyzer.js +110 -127
- package/lib/inventory/atomUtils.js +171 -48
- package/lib/inventory/auditCategories.js +7 -0
- package/lib/inventory/buildToolRateLimit.js +144 -0
- package/lib/inventory/cacheCommands.js +2 -1
- package/lib/inventory/cmakeBuildDirs.js +254 -0
- package/lib/inventory/deps.js +501 -124
- package/lib/inventory/dosai.js +248 -44
- package/lib/inventory/dosaiParsers.js +310 -15
- package/lib/inventory/dynamic.js +52 -6
- package/lib/inventory/evidenceUtils.js +154 -109
- package/lib/inventory/fetchBatch.js +574 -38
- package/lib/inventory/fetchDiskCache.js +597 -0
- package/lib/inventory/forgeEnricher.js +14 -5
- package/lib/inventory/jvmLocalRepos.js +917 -0
- package/lib/inventory/mcpConfigParser.js +2 -3
- package/lib/inventory/parentSelection.js +146 -0
- package/lib/inventory/rustFormulationParser.js +3 -4
- package/lib/inventory/scalaCoords.js +153 -0
- package/lib/inventory/source.js +8 -8
- package/lib/inventory/spdx.js +101 -0
- package/lib/inventory/traceRunner.js +88 -7
- package/lib/inventory/tracedCrypto.js +294 -0
- package/lib/managers/docker.js +33 -32
- package/lib/managers/oci.js +24 -2
- package/lib/parsers/cmakeCache.js +69 -0
- package/lib/parsers/cmakeLists.js +16 -2
- package/lib/parsers/cmakePresets.js +400 -0
- package/lib/parsers/compileCommands.js +557 -0
- package/lib/parsers/strictJson.js +322 -0
- package/lib/parsers/terraformConfig.js +1073 -0
- package/lib/parsers/terraformSource.js +652 -0
- package/lib/server/server.js +23 -0
- package/lib/stages/postgen/introspection/markers.js +1 -1
- package/lib/stages/postgen/postgen.js +15 -1
- package/lib/stages/postgen/specVersionCompat.js +32 -0
- package/lib/validator/index.js +25 -10
- package/lib/validator/reporters/json.js +1 -0
- package/package.json +21 -21
- package/types/lib/audit/index.d.ts.map +1 -1
- 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 +24 -1
- package/types/lib/cli/jvmBom.d.ts.map +1 -1
- package/types/lib/cli/managedBom.d.ts +7 -4
- package/types/lib/cli/managedBom.d.ts.map +1 -1
- package/types/lib/cli/nativeBom.d.ts +3 -1
- package/types/lib/cli/nativeBom.d.ts.map +1 -1
- package/types/lib/core/activity.d.ts.map +1 -1
- package/types/lib/core/env.d.ts +9 -0
- package/types/lib/core/env.d.ts.map +1 -1
- package/types/lib/core/fs.d.ts.map +1 -1
- package/types/lib/core/httpClient.d.ts +13 -8
- package/types/lib/core/httpClient.d.ts.map +1 -1
- package/types/lib/core/pluginRun.d.ts +97 -0
- package/types/lib/core/pluginRun.d.ts.map +1 -0
- package/types/lib/core/processTree.d.ts +36 -0
- package/types/lib/core/processTree.d.ts.map +1 -0
- package/types/lib/core/runState.d.ts +29 -0
- package/types/lib/core/runState.d.ts.map +1 -0
- package/types/lib/core/toml.d.ts +20 -0
- package/types/lib/core/toml.d.ts.map +1 -0
- package/types/lib/ecosystems/asarutils.d.ts.map +1 -1
- package/types/lib/ecosystems/bunutils.d.ts.map +1 -1
- package/types/lib/ecosystems/cargoCache.d.ts +12 -0
- package/types/lib/ecosystems/cargoCache.d.ts.map +1 -1
- package/types/lib/ecosystems/cmakeResolver.d.ts +5 -3
- package/types/lib/ecosystems/cmakeResolver.d.ts.map +1 -1
- package/types/lib/ecosystems/cppBuildContext.d.ts +55 -0
- package/types/lib/ecosystems/cppBuildContext.d.ts.map +1 -0
- package/types/lib/ecosystems/cppEvidence.d.ts +18 -2
- package/types/lib/ecosystems/cppEvidence.d.ts.map +1 -1
- package/types/lib/ecosystems/cppIncludeResolver.d.ts +92 -0
- package/types/lib/ecosystems/cppIncludeResolver.d.ts.map +1 -0
- package/types/lib/ecosystems/denoutils.d.ts +9 -3
- package/types/lib/ecosystems/denoutils.d.ts.map +1 -1
- package/types/lib/ecosystems/ecosystems.d.ts +62 -13
- package/types/lib/ecosystems/ecosystems.d.ts.map +1 -1
- package/types/lib/ecosystems/golem.d.ts.map +1 -1
- package/types/lib/ecosystems/gradleutils.d.ts +50 -0
- package/types/lib/ecosystems/gradleutils.d.ts.map +1 -1
- package/types/lib/ecosystems/jsEvidence.d.ts.map +1 -1
- package/types/lib/ecosystems/kosi.d.ts.map +1 -1
- package/types/lib/ecosystems/npmutils.d.ts +15 -0
- package/types/lib/ecosystems/npmutils.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-dotnet.d.ts +118 -4
- package/types/lib/ecosystems/parsers-dotnet.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-elm.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-gleam.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-go.d.ts +44 -2
- package/types/lib/ecosystems/parsers-go.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-js.d.ts +6 -1
- package/types/lib/ecosystems/parsers-js.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-julia.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-jvm.d.ts +46 -1
- package/types/lib/ecosystems/parsers-jvm.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-misc.d.ts +3 -1
- package/types/lib/ecosystems/parsers-misc.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-python.d.ts +53 -3
- package/types/lib/ecosystems/parsers-python.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-terraform.d.ts +38 -21
- package/types/lib/ecosystems/parsers-terraform.d.ts.map +1 -1
- package/types/lib/ecosystems/pythonutils.d.ts +27 -2
- package/types/lib/ecosystems/pythonutils.d.ts.map +1 -1
- package/types/lib/ecosystems/remote/huggingface.d.ts.map +1 -1
- package/types/lib/ecosystems/rubyutils.d.ts +21 -1
- package/types/lib/ecosystems/rubyutils.d.ts.map +1 -1
- package/types/lib/ecosystems/rusi.d.ts.map +1 -1
- package/types/lib/ecosystems/sbtutils.d.ts +88 -2
- package/types/lib/ecosystems/sbtutils.d.ts.map +1 -1
- package/types/lib/ecosystems/scalacliutils.d.ts +56 -0
- package/types/lib/ecosystems/scalacliutils.d.ts.map +1 -0
- package/types/lib/ecosystems/scalasem.d.ts +311 -0
- package/types/lib/ecosystems/scalasem.d.ts.map +1 -0
- package/types/lib/ecosystems/terraformRegistry.d.ts +9 -0
- package/types/lib/ecosystems/terraformRegistry.d.ts.map +1 -0
- package/types/lib/ecosystems/utils.d.ts +2 -2
- package/types/lib/ecosystems/utils.d.ts.map +1 -1
- package/types/lib/ecosystems/vendoredCode.d.ts +32 -0
- package/types/lib/ecosystems/vendoredCode.d.ts.map +1 -0
- package/types/lib/evinser/evinser.d.ts +75 -8
- package/types/lib/evinser/evinser.d.ts.map +1 -1
- package/types/lib/helpers/bomSigner.d.ts +80 -4
- package/types/lib/helpers/bomSigner.d.ts.map +1 -1
- package/types/lib/inventory/aiCollector.d.ts.map +1 -1
- package/types/lib/inventory/analyzer.d.ts.map +1 -1
- package/types/lib/inventory/atomUtils.d.ts +82 -10
- package/types/lib/inventory/atomUtils.d.ts.map +1 -1
- package/types/lib/inventory/auditCategories.d.ts +3 -0
- package/types/lib/inventory/auditCategories.d.ts.map +1 -1
- package/types/lib/inventory/buildToolRateLimit.d.ts +38 -0
- package/types/lib/inventory/buildToolRateLimit.d.ts.map +1 -0
- package/types/lib/inventory/cacheCommands.d.ts +2 -1
- package/types/lib/inventory/cacheCommands.d.ts.map +1 -1
- package/types/lib/inventory/cmakeBuildDirs.d.ts +58 -0
- package/types/lib/inventory/cmakeBuildDirs.d.ts.map +1 -0
- package/types/lib/inventory/deps.d.ts +59 -1
- package/types/lib/inventory/deps.d.ts.map +1 -1
- package/types/lib/inventory/dosai.d.ts +57 -8
- package/types/lib/inventory/dosai.d.ts.map +1 -1
- package/types/lib/inventory/dosaiParsers.d.ts +53 -7
- package/types/lib/inventory/dosaiParsers.d.ts.map +1 -1
- package/types/lib/inventory/dynamic.d.ts +10 -0
- package/types/lib/inventory/dynamic.d.ts.map +1 -1
- package/types/lib/inventory/evidenceUtils.d.ts +19 -4
- package/types/lib/inventory/evidenceUtils.d.ts.map +1 -1
- package/types/lib/inventory/fetchBatch.d.ts +83 -14
- package/types/lib/inventory/fetchBatch.d.ts.map +1 -1
- package/types/lib/inventory/fetchDiskCache.d.ts +169 -0
- package/types/lib/inventory/fetchDiskCache.d.ts.map +1 -0
- package/types/lib/inventory/forgeEnricher.d.ts.map +1 -1
- package/types/lib/inventory/jvmLocalRepos.d.ts +178 -0
- package/types/lib/inventory/jvmLocalRepos.d.ts.map +1 -0
- package/types/lib/inventory/mcpConfigParser.d.ts.map +1 -1
- package/types/lib/inventory/parentSelection.d.ts +34 -0
- package/types/lib/inventory/parentSelection.d.ts.map +1 -0
- package/types/lib/inventory/rustFormulationParser.d.ts.map +1 -1
- package/types/lib/inventory/scalaCoords.d.ts +80 -0
- package/types/lib/inventory/scalaCoords.d.ts.map +1 -0
- package/types/lib/inventory/source.d.ts.map +1 -1
- package/types/lib/inventory/spdx.d.ts +9 -0
- package/types/lib/inventory/spdx.d.ts.map +1 -1
- package/types/lib/inventory/traceRunner.d.ts +12 -0
- package/types/lib/inventory/traceRunner.d.ts.map +1 -1
- package/types/lib/inventory/tracedCrypto.d.ts +42 -0
- package/types/lib/inventory/tracedCrypto.d.ts.map +1 -0
- package/types/lib/managers/docker.d.ts.map +1 -1
- package/types/lib/managers/oci.d.ts +3 -1
- package/types/lib/managers/oci.d.ts.map +1 -1
- package/types/lib/parsers/cmakeCache.d.ts +16 -0
- package/types/lib/parsers/cmakeCache.d.ts.map +1 -1
- package/types/lib/parsers/cmakeLists.d.ts +2 -1
- package/types/lib/parsers/cmakeLists.d.ts.map +1 -1
- package/types/lib/parsers/cmakePresets.d.ts +78 -0
- package/types/lib/parsers/cmakePresets.d.ts.map +1 -0
- package/types/lib/parsers/compileCommands.d.ts +115 -0
- package/types/lib/parsers/compileCommands.d.ts.map +1 -0
- package/types/lib/parsers/strictJson.d.ts +46 -0
- package/types/lib/parsers/strictJson.d.ts.map +1 -0
- package/types/lib/parsers/terraformConfig.d.ts +70 -0
- package/types/lib/parsers/terraformConfig.d.ts.map +1 -0
- package/types/lib/parsers/terraformSource.d.ts +66 -0
- package/types/lib/parsers/terraformSource.d.ts.map +1 -0
- package/types/lib/server/server.d.ts.map +1 -1
- package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
- package/types/lib/stages/postgen/specVersionCompat.d.ts.map +1 -1
- package/types/lib/validator/index.d.ts +8 -0
- package/types/lib/validator/index.d.ts.map +1 -1
- package/types/lib/validator/reporters/json.d.ts.map +1 -1
- package/lib/third-party/arborist/snapshots/calc-dep-flags.test.cjs +0 -462
|
@@ -756,6 +756,12 @@ export function applyMetadata(bomJson, options) {
|
|
|
756
756
|
return;
|
|
757
757
|
}
|
|
758
758
|
if (comp.properties) {
|
|
759
|
+
// internal:LocalNodeModulesPath is a lookup path on the scanning host.
|
|
760
|
+
// Collectors outside the JS evidence pass (caxa, scalasem) keep it, so
|
|
761
|
+
// it is removed here for every component.
|
|
762
|
+
comp.properties = comp.properties.filter(
|
|
763
|
+
(aprop) => aprop.name !== "internal:LocalNodeModulesPath",
|
|
764
|
+
);
|
|
759
765
|
for (const aprop of comp.properties) {
|
|
760
766
|
if (aprop.name === "internal:SrcFile" && aprop.value) {
|
|
761
767
|
const rdir = relativeDir(aprop.value, options);
|
|
@@ -822,7 +828,15 @@ export function applyMetadata(bomJson, options) {
|
|
|
822
828
|
}
|
|
823
829
|
collectSrcFiles(comp);
|
|
824
830
|
}
|
|
825
|
-
|
|
831
|
+
// The project's sub-components, the modules of a multi-module build, name
|
|
832
|
+
// their manifests the same way, at any depth.
|
|
833
|
+
const collectSrcFilesTree = (comp) => {
|
|
834
|
+
collectSrcFiles(comp);
|
|
835
|
+
for (const subComponent of comp?.components || []) {
|
|
836
|
+
collectSrcFilesTree(subComponent);
|
|
837
|
+
}
|
|
838
|
+
};
|
|
839
|
+
collectSrcFilesTree(bomJson.metadata?.component);
|
|
826
840
|
if (!bomJson.metadata.properties) {
|
|
827
841
|
bomJson.metadata.properties = [];
|
|
828
842
|
}
|
|
@@ -53,6 +53,17 @@ const DEPENDENCY_1_6_ONLY_FIELDS = new Set(["provides"]);
|
|
|
53
53
|
// License and license expression objects gained these attributes only in the
|
|
54
54
|
// given spec versions. CycloneDX forbids additional properties, so they must be
|
|
55
55
|
// removed when downgrading. Ref: data/bom-1.{4,5,6}.schema.json
|
|
56
|
+
// The protocol types CycloneDX 1.6 defines; 1.7 added more.
|
|
57
|
+
const SPEC_1_6_PROTOCOL_TYPES = new Set([
|
|
58
|
+
"tls",
|
|
59
|
+
"ssh",
|
|
60
|
+
"ipsec",
|
|
61
|
+
"ike",
|
|
62
|
+
"sstp",
|
|
63
|
+
"wpa",
|
|
64
|
+
"other",
|
|
65
|
+
"unknown",
|
|
66
|
+
]);
|
|
56
67
|
const LICENSE_1_5_ONLY_FIELDS = new Set(["bom-ref", "licensing", "properties"]);
|
|
57
68
|
const LICENSE_1_6_ONLY_FIELDS = new Set(["acknowledgement"]);
|
|
58
69
|
const LICENSE_EXPRESSION_1_5_ONLY_FIELDS = new Set(["bom-ref"]);
|
|
@@ -602,8 +613,29 @@ function downgradeSubjectForSpecVersion(subject, specVersion, parentKey) {
|
|
|
602
613
|
// cryptoProperties.algorithmProperties. 1.6 keeps the deprecated free-text
|
|
603
614
|
// `curve`, so that one is preserved. Ref: data/bom-1.6.schema.json.
|
|
604
615
|
const algorithmProperties = subject.cryptoProperties.algorithmProperties;
|
|
616
|
+
// The curve stays known through the free-text field, by its name without
|
|
617
|
+
// the registry prefix (`secg/secp256r1` is `secp256r1`).
|
|
618
|
+
if (algorithmProperties.ellipticCurve && !algorithmProperties.curve) {
|
|
619
|
+
algorithmProperties.curve = String(algorithmProperties.ellipticCurve)
|
|
620
|
+
.split("/")
|
|
621
|
+
.pop();
|
|
622
|
+
}
|
|
605
623
|
delete algorithmProperties.algorithmFamily;
|
|
606
624
|
delete algorithmProperties.ellipticCurve;
|
|
625
|
+
// `key-wrap` joined the primitive enum in 1.7.
|
|
626
|
+
if (algorithmProperties.primitive === "key-wrap") {
|
|
627
|
+
algorithmProperties.primitive = "other";
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
if (
|
|
631
|
+
specVersion < 1.7 &&
|
|
632
|
+
subject.cryptoProperties?.protocolProperties?.type &&
|
|
633
|
+
!SPEC_1_6_PROTOCOL_TYPES.has(
|
|
634
|
+
subject.cryptoProperties.protocolProperties.type,
|
|
635
|
+
)
|
|
636
|
+
) {
|
|
637
|
+
// 1.7 added protocol types such as `dtls` and `quic`.
|
|
638
|
+
subject.cryptoProperties.protocolProperties.type = "other";
|
|
607
639
|
}
|
|
608
640
|
Object.entries(subject).forEach(([key, value]) => {
|
|
609
641
|
downgradeSubjectForSpecVersion(value, specVersion, key);
|
package/lib/validator/index.js
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
|
|
14
14
|
import {
|
|
15
15
|
loadSharedSecret,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
signatureReportReasons,
|
|
17
|
+
verifyBomSignatures,
|
|
18
18
|
} from "../helpers/bomSigner.js";
|
|
19
19
|
import {
|
|
20
20
|
validateBom,
|
|
@@ -170,12 +170,14 @@ async function runSchemaAndDeep(bomJson, opts) {
|
|
|
170
170
|
* @param {string} [options.publicKey] If set, verify the BOM signature with this public key.
|
|
171
171
|
* @param {string|Buffer} [options.secretKey] If set, verify an HMAC (HS*) BOM signature with this shared secret.
|
|
172
172
|
* @param {boolean} [options.nestedSignatures] Also verify component, service, and annotation signatures (default true), as cdx-verify does.
|
|
173
|
+
* Parse untrusted BOM text with `parseStrictJson()` from `lib/parsers/strictJson.js` when verifying signatures.
|
|
173
174
|
* @returns {{
|
|
174
175
|
* schemaValid: boolean,
|
|
175
176
|
* deepValid: boolean,
|
|
176
177
|
* validationErrors: Array<{ stage: string, message: string }>,
|
|
177
178
|
* signatureVerified: boolean | null,
|
|
178
179
|
* signatureDetails: object | null,
|
|
180
|
+
* signatureEntries: Array<{ index: number, algorithm: any, keyId: any, verified: boolean }> | null,
|
|
179
181
|
* findings: Array<object>,
|
|
180
182
|
* allFindings: Array<object>,
|
|
181
183
|
* benchmarks: Array<object>,
|
|
@@ -199,20 +201,32 @@ export async function validateBomAdvanced(bomJson, options = {}) {
|
|
|
199
201
|
});
|
|
200
202
|
let signatureVerified = null;
|
|
201
203
|
let signatureDetails = null;
|
|
202
|
-
|
|
204
|
+
let signatureEntries = null;
|
|
205
|
+
const verificationRequested =
|
|
206
|
+
(options.publicKey !== undefined && options.publicKey !== null) ||
|
|
207
|
+
(options.secretKey !== undefined && options.secretKey !== null);
|
|
203
208
|
if (verificationRequested && bomJson?.signature) {
|
|
204
209
|
try {
|
|
205
210
|
const key = options.secretKey
|
|
206
211
|
? loadSharedSecret(options.secretKey)
|
|
207
212
|
: options.publicKey;
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
const signatureReport = verifyBomSignatures(bomJson, [key], {
|
|
214
|
+
deep: options.nestedSignatures !== false,
|
|
215
|
+
});
|
|
216
|
+
signatureVerified = signatureReport.verified;
|
|
217
|
+
signatureEntries =
|
|
218
|
+
signatureReport.root?.entries.map(
|
|
219
|
+
({ index, algorithm, keyId, verified }) => ({
|
|
220
|
+
index,
|
|
221
|
+
algorithm,
|
|
222
|
+
keyId,
|
|
223
|
+
verified,
|
|
224
|
+
}),
|
|
225
|
+
) ?? null;
|
|
226
|
+
if (signatureReport.verified) {
|
|
227
|
+
signatureDetails = signatureReport.root.match;
|
|
215
228
|
} else {
|
|
229
|
+
const reasons = signatureReportReasons(signatureReport);
|
|
216
230
|
signatureDetails = {
|
|
217
231
|
error: reasons.length
|
|
218
232
|
? [...new Set(reasons)].join(" ")
|
|
@@ -237,6 +251,7 @@ export async function validateBomAdvanced(bomJson, options = {}) {
|
|
|
237
251
|
validationErrors,
|
|
238
252
|
signatureVerified,
|
|
239
253
|
signatureDetails,
|
|
254
|
+
signatureEntries,
|
|
240
255
|
findings: filtered,
|
|
241
256
|
allFindings,
|
|
242
257
|
benchmarks,
|
|
@@ -14,6 +14,7 @@ export function render(report, _options = {}) {
|
|
|
14
14
|
deepValid: report.deepValid,
|
|
15
15
|
validationErrors: report.validationErrors || [],
|
|
16
16
|
signatureVerified: report.signatureVerified ?? null,
|
|
17
|
+
signatureEntries: report.signatureEntries ?? null,
|
|
17
18
|
summary: report.summary,
|
|
18
19
|
benchmarks: report.benchmarks || [],
|
|
19
20
|
findings: (report.findings || []).map((f) => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdxgen/cdxgen",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.4.0",
|
|
4
4
|
"description": "Creates CycloneDX Software Bill of Materials (SBOM) from source or container image",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sbom",
|
|
@@ -123,8 +123,8 @@
|
|
|
123
123
|
"index.cjs"
|
|
124
124
|
],
|
|
125
125
|
"dependencies": {
|
|
126
|
-
"@babel/parser": "8.0.
|
|
127
|
-
"@babel/traverse": "8.0.
|
|
126
|
+
"@babel/parser": "8.0.7",
|
|
127
|
+
"@babel/traverse": "8.0.7",
|
|
128
128
|
"@cdxgen/cdx-purl": "0.0.6",
|
|
129
129
|
"@isaacs/string-locale-compare": "1.1.0",
|
|
130
130
|
"@npmcli/fs": "6.0.0",
|
|
@@ -140,40 +140,40 @@
|
|
|
140
140
|
"npm-package-arg": "14.0.0",
|
|
141
141
|
"parse-conflict-json": "6.0.0",
|
|
142
142
|
"semver": "7.8.5",
|
|
143
|
-
"smol-toml": "1.
|
|
143
|
+
"smol-toml": "1.9.1",
|
|
144
144
|
"ssri": "14.0.0",
|
|
145
145
|
"tar": "7.5.22",
|
|
146
146
|
"treeverse": "3.0.0",
|
|
147
|
-
"undici": "8.11.
|
|
147
|
+
"undici": "8.11.2",
|
|
148
148
|
"walk-up-path": "4.0.0",
|
|
149
149
|
"yaml": "2.9.1",
|
|
150
150
|
"yargs": "18.2.0"
|
|
151
151
|
},
|
|
152
152
|
"devDependencies": {
|
|
153
|
-
"@biomejs/biome": "2.5.
|
|
154
|
-
"esmock": "2.7.
|
|
153
|
+
"@biomejs/biome": "2.5.15",
|
|
154
|
+
"esmock": "2.7.9",
|
|
155
155
|
"poku": "4.5.0",
|
|
156
156
|
"sinon": "22.1.0",
|
|
157
157
|
"typescript": "^7.0.2"
|
|
158
158
|
},
|
|
159
159
|
"optionalDependencies": {
|
|
160
160
|
"@appthreat/atom": "3.1.1",
|
|
161
|
-
"@appthreat/atom-parsetools": "1.
|
|
162
|
-
"@bufbuild/protobuf": "2.
|
|
161
|
+
"@appthreat/atom-parsetools": "1.10.2",
|
|
162
|
+
"@bufbuild/protobuf": "2.16.0",
|
|
163
163
|
"@cdxgen/cdx-hbom": "0.5.1",
|
|
164
164
|
"@cdxgen/cdx-proto": "2.3.0",
|
|
165
|
-
"@cdxgen/cdxgen-plugins-bin": "4.1.
|
|
166
|
-
"@cdxgen/cdxgen-plugins-bin-darwin-amd64": "4.1.
|
|
167
|
-
"@cdxgen/cdxgen-plugins-bin-darwin-arm64": "4.1.
|
|
168
|
-
"@cdxgen/cdxgen-plugins-bin-linux-amd64": "4.1.
|
|
169
|
-
"@cdxgen/cdxgen-plugins-bin-linux-arm": "4.1.
|
|
170
|
-
"@cdxgen/cdxgen-plugins-bin-linux-arm64": "4.1.
|
|
171
|
-
"@cdxgen/cdxgen-plugins-bin-linux-ppc64": "4.1.
|
|
172
|
-
"@cdxgen/cdxgen-plugins-bin-linuxmusl-amd64": "4.1.
|
|
173
|
-
"@cdxgen/cdxgen-plugins-bin-linuxmusl-arm64": "4.1.
|
|
174
|
-
"@cdxgen/cdxgen-plugins-bin-windows-amd64": "4.1.
|
|
175
|
-
"@cdxgen/cdxgen-plugins-bin-windows-arm64": "4.1.
|
|
176
|
-
"@cdxgen/safer-exec": "1.
|
|
165
|
+
"@cdxgen/cdxgen-plugins-bin": "4.1.1",
|
|
166
|
+
"@cdxgen/cdxgen-plugins-bin-darwin-amd64": "4.1.1",
|
|
167
|
+
"@cdxgen/cdxgen-plugins-bin-darwin-arm64": "4.1.1",
|
|
168
|
+
"@cdxgen/cdxgen-plugins-bin-linux-amd64": "4.1.1",
|
|
169
|
+
"@cdxgen/cdxgen-plugins-bin-linux-arm": "4.1.1",
|
|
170
|
+
"@cdxgen/cdxgen-plugins-bin-linux-arm64": "4.1.1",
|
|
171
|
+
"@cdxgen/cdxgen-plugins-bin-linux-ppc64": "4.1.1",
|
|
172
|
+
"@cdxgen/cdxgen-plugins-bin-linuxmusl-amd64": "4.1.1",
|
|
173
|
+
"@cdxgen/cdxgen-plugins-bin-linuxmusl-arm64": "4.1.1",
|
|
174
|
+
"@cdxgen/cdxgen-plugins-bin-windows-amd64": "4.1.1",
|
|
175
|
+
"@cdxgen/cdxgen-plugins-bin-windows-arm64": "4.1.1",
|
|
176
|
+
"@cdxgen/safer-exec": "1.1.2",
|
|
177
177
|
"body-parser": "2.3.0",
|
|
178
178
|
"compression": "1.8.2",
|
|
179
179
|
"connect": "3.7.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/audit/index.js"],"names":[],"mappings":"AA6EA,yFAAyF;AACzF,eAAO,MAAM,wBAAwB,UAKpC,CAAC;AAuCF;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAHxB,MAGwB,GAFtB,MAAM,CAclB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAHxB,MAGwB,GAFtB,MAAM,EAAE,CAoBpB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAH1B,MAG0B,GAFxB;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,CA0BjD;AA+CD;;;;;;;;;GASG;AACH,wBAAsB,yBAAyB,CAAC,SAAS,EAJ9C;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAIW,EAAE,OAAO,AAH/D,CACA,EADQ,MAG4D,GAF1D,OAAO,CAAC,MAAM,CAAC,CAuG3B;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/audit/index.js"],"names":[],"mappings":"AA6EA,yFAAyF;AACzF,eAAO,MAAM,wBAAwB,UAKpC,CAAC;AAuCF;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAHxB,MAGwB,GAFtB,MAAM,CAclB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAHxB,MAGwB,GAFtB,MAAM,EAAE,CAoBpB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAH1B,MAG0B,GAFxB;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,CA0Bj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MAAM,CAAC,CAuJ3B;AAED;;;;;GAKG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAH3B,MAG2B,GAFzB,OAAO,CAAC,MAAM,CAAC,CA0B3B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EALnC,MAKmC,EAAE,SAAS,EAJ9C,MAAM,EAIwC,EAAE,MAAM,EAHtD,MAAM,GAAC,IAG+C,GAFpD,IAAI,CAwChB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAJ/B,MAI+B,EAAE,OAAO,EAHxC,MAGwC,GAFtC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAwChD;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAH9B,MAG8B,GAF5B,MAAM,GAAG,SAAS,CAU9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/cli/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/cli/index.js"],"names":[],"mappings":"AA2EA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAwCnE,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,aAAa,EACb,aAAa,EACb,wBAAwB,EACxB,eAAe,EACf,wBAAwB,GACzB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA0C1D,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,eAAe,EACf,UAAU,EACV,aAAa,EACb,kBAAkB,GACnB,MAAM,iBAAiB,CAAC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G;AACH,wBAAsB,UAAU,CAAC,KAAK,EAJ3B,MAI2B,EAAE,OAAO,EAHpC,MAGoC,GAFlC,OAAO,CAAC,MAAM,CAAC,CAsB3B;AAED;;;;;;GAMG;AACH;;;;;;;GAOG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAJzB,MAIyB,EAAE,OAAO,EAHlC,MAGkC,GAFhC,OAAO,CAAC,MAAM,CAAC,CAa3B;AAgYD;;;;;;;GAOG;AACH,wBAAsB,SAAS,CAAC,IAAI,EALzB,MAKyB,EAAE,WAAW,EAJtC,MAIsC,GAHrC,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAAC,CA+FjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsBom.d.ts","sourceRoot":"","sources":["../../../lib/cli/jsBom.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jsBom.d.ts","sourceRoot":"","sources":["../../../lib/cli/jsBom.js"],"names":[],"mappings":"AAiHA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAJlC,MAIkC,EAAE,OAAO,EAH3C,MAG2C,GAFzC,MAAM,GAAC,SAAS,CAwB5B;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAJ/B,MAI+B,EAAE,OAAO,EAHxC,MAGwC,GAFtC,OAAO,CAAC,MAAM,CAAC,CAq3C3B;AAED;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAFtB,MAE4C,CAAC;AAEvD;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,YAJ9B,KAAK,CAAC,MAAM,CAAC,cACb,MAAM,KACJ,KAAK,CAAC,MAAM,CAwExB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAJ7B,MAI6B,EAAE,OAAO,EAHtC,MAGsC,GAFpC,OAAO,CAAC,MAAM,CAAC,CAmD3B;AAED;;;;;;;;;GASG;AACH,wBAAsB,wBAAwB,CAAC,IAAI,EAJxC,MAIwC,EAAE,OAAO,EAHjD,MAGiD,GAF/C,OAAO,CAAC,MAAM,CAAC,CA+F3B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EANhC,MAMgC,EAAE,OAAO,EAHzC,MAGyC,GAFvC,OAAO,CAAC,MAAM,CAAC,CA6B3B;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAJ7B,MAI6B,EAAE,OAAO,EAHtC,MAGsC,GAFpC,OAAO,CAAC,MAAM,CAAC,CAoN3B;AAED;;;;;;GAMG;AACH,wBAAsB,wBAAwB,CAAC,IAAI,EAJxC,MAIwC,EAAE,OAAO,EAHjD,MAGiD,GAF/C,OAAO,CAAC,MAAM,CAAC,CAoD3B;AAED;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CAAC,MAAM,EAJrC,MAIqC,EAAE,OAAO,EAH9C,MAG8C,GAF5C,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAC,CAAC,CA2ChE;AAED;;;;;;;;GAQG;AACH,wBAAsB,6BAA6B,CACjD,aAAa,EANJ,MAMI,EACb,OAAO,EANE,MAMF,EACP,OAAO,EANE,MAAM,EAMR,EACP,YAAY,EANH,MAAM,EAMH,iBAsBb"}
|
|
@@ -18,6 +18,25 @@ export declare const GRADLE_INIT_SCRIPT: string;
|
|
|
18
18
|
* @type {string}
|
|
19
19
|
*/
|
|
20
20
|
export declare const SBT_CACHE_DIR: string;
|
|
21
|
+
/**
|
|
22
|
+
* Collect the namespaces of the jars of resolved sbt dependencies. sbt has
|
|
23
|
+
* just downloaded them into the user's caches, so each is read from there;
|
|
24
|
+
* the rest of the cache is never walked.
|
|
25
|
+
*
|
|
26
|
+
* @param {Object[]} pkgList Packages from the sbt dependency trees.
|
|
27
|
+
* @param {Object} [known] Jar namespace mapping already collected. Packages
|
|
28
|
+
* it covers are skipped.
|
|
29
|
+
* @returns {Promise<Object>} Jar namespace mapping keyed by package purl.
|
|
30
|
+
*/
|
|
31
|
+
export declare function collectSbtDependencyJars(pkgList: Object[], known?: Object): Promise<Object>;
|
|
32
|
+
/**
|
|
33
|
+
* The purls and bom-refs of a parent component and the module components
|
|
34
|
+
* nested under it.
|
|
35
|
+
*
|
|
36
|
+
* @param {Object} parentComponent Parent component.
|
|
37
|
+
* @returns {Set<string>} Purls and bom-refs.
|
|
38
|
+
*/
|
|
39
|
+
export declare function ownComponentRefs(parentComponent: Object): Set<string>;
|
|
21
40
|
/**
|
|
22
41
|
* Function to create bom string for Java jars
|
|
23
42
|
*
|
|
@@ -34,15 +53,19 @@ export declare function createJarBom(path: string, options: Object): Object;
|
|
|
34
53
|
* (commented-out code, examples, values that merely resemble project defs) that
|
|
35
54
|
* can lead to hangs when those bogus scopes are later passed to `dependencyTree`.
|
|
36
55
|
*
|
|
56
|
+
* The root project is kept when it has sources of its own, since it is then
|
|
57
|
+
* the application rather than a pure aggregator.
|
|
58
|
+
*
|
|
37
59
|
* Falls back to the regex-based {@link discoverSbtProjects} heuristic when the
|
|
38
60
|
* sbt invocation fails or yields nothing useful.
|
|
39
61
|
*
|
|
40
62
|
* @param {string} basePath Directory of the sbt build
|
|
41
63
|
* @param {string} sbtCmd sbt executable
|
|
42
64
|
* @param {Object} env Environment for the spawned process
|
|
65
|
+
* @param {string[]} [launcherArgs] Launcher options placed before the sbt arguments
|
|
43
66
|
* @returns {string[]} List of sbt project ids
|
|
44
67
|
*/
|
|
45
|
-
export declare function discoverSbtProjectsFromCmd(basePath: string, sbtCmd: string, env: Object): string[];
|
|
68
|
+
export declare function discoverSbtProjectsFromCmd(basePath: string, sbtCmd: string, env: Object, launcherArgs?: string[]): string[];
|
|
46
69
|
/**
|
|
47
70
|
* Function to create bom string for Java projects
|
|
48
71
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jvmBom.d.ts","sourceRoot":"","sources":["../../../lib/cli/jvmBom.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jvmBom.d.ts","sourceRoot":"","sources":["../../../lib/cli/jvmBom.js"],"names":[],"mappings":"AA0HA;;;;;GAKG;AACH,eAAO,IAAI,gBAAgB,EAFjB,MAIsD,CAAC;AAUjE;;;;GAIG;AAEH,eAAO,MAAM,kBAAkB,EAHrB,MAQT,CAAC;AAEF;;;;;GAKG;AAEH,eAAO,MAAM,aAAa,EAHhB,MAIqE,CAAC;AAuDhF;;;;;;;;;GASG;AACH,wBAAsB,wBAAwB,CAAC,OAAO,EAL3C,MAAM,EAKqC,EAAE,KAAK,AAJ1D,CAEA,EAFQ,MAIuD,GAFrD,OAAO,CAAC,MAAM,CAAC,CA2B3B;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,eAAe,EAHrC,MAGqC,GAFnC,GAAG,CAAC,MAAM,CAAC,CAwBvB;AAED;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAL5B,MAK4B,EAAE,OAAO,EAJrC,MAIqC,GAFnC,MAAM,CAmFlB;AAiCD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAPC,MAOD,EACR,MAAM,EAPG,MAOH,EACN,GAAG,EAPM,MAON,EACH,YAAY,AAPX,CACA,EADQ,MAAM,EAOE,GANN,MAAM,EAAE,CAwEpB;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAJ7B,MAI6B,EAAE,OAAO,EAHtC,MAGsC,GAFpC,OAAO,CAAC,MAAM,CAAC,CAqkE3B"}
|
|
@@ -127,12 +127,15 @@ export declare function createPerlBom(path: string, options: Object): Object;
|
|
|
127
127
|
/**
|
|
128
128
|
* Function to create bom string for Terraform and OpenTofu projects.
|
|
129
129
|
*
|
|
130
|
-
* The
|
|
131
|
-
*
|
|
130
|
+
* The workspace assembly turns the provider lock file, the module manifest
|
|
131
|
+
* `init` writes and the configuration files into module and provider
|
|
132
|
+
* components with a dependency graph and offline licenses. When metadata
|
|
133
|
+
* fetching is enabled, the public registries add licenses, repository URLs
|
|
134
|
+
* and registry flags to components the offline pass could not resolve.
|
|
132
135
|
*
|
|
133
136
|
* @param {string} path to the project
|
|
134
137
|
* @param {Object} options Parse options from the cli
|
|
135
|
-
* @returns {Object} BOM object
|
|
138
|
+
* @returns {Promise<Object>} BOM object
|
|
136
139
|
*/
|
|
137
|
-
export declare function createTerraformBom(path: string, options: Object): Object
|
|
140
|
+
export declare function createTerraformBom(path: string, options: Object): Promise<Object>;
|
|
138
141
|
//# sourceMappingURL=managedBom.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"managedBom.d.ts","sourceRoot":"","sources":["../../../lib/cli/managedBom.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"managedBom.d.ts","sourceRoot":"","sources":["../../../lib/cli/managedBom.js"],"names":[],"mappings":"AAwIA;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,QAJ5B,MAAM,YACN,MAAM,KACJ,OAMZ,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,QAJ1B,MAAM,YACN,MAAM,KACJ,OAeZ,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,IAAI,QAAA,EAAE,OAAO,EAHhC,MAGgC,GAF9B,MAAM,GAAG,IAAI,CAsEzB;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAJ/B,MAI+B,EAAE,OAAO,EAHxC,MAGwC,GAFtC,OAAO,CAAC,MAAM,CAAC,CA+rB3B;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAJzB,MAIyB,EAAE,OAAO,EAHlC,MAGkC,GAFhC,MAAM,CAyBlB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAJ7B,MAI6B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
25
25
|
export declare function buildCargoCacheComponent(crateFile: string): object | undefined;
|
|
26
26
|
/**
|
|
27
27
|
* Enriches a cargo cache component with a SHA-256 hash and filename-based
|
|
28
|
-
* identity evidence (confidence 0.5)
|
|
28
|
+
* identity evidence (confidence 0.5), and with what the archive's own manifest
|
|
29
|
+
* says: its licence, description and repository, read from the archive without
|
|
30
|
+
* extracting it anywhere. Hash computation failures are ignored.
|
|
29
31
|
*
|
|
30
32
|
* @param {string} crateFile Absolute path to the `.crate` archive
|
|
31
33
|
* @param {object} [component] Component produced by `buildCargoCacheComponent`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nativeBom.d.ts","sourceRoot":"","sources":["../../../lib/cli/nativeBom.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nativeBom.d.ts","sourceRoot":"","sources":["../../../lib/cli/nativeBom.js"],"names":[],"mappings":"AAwLA;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAFnB,MAAM,GAAC,SAAS,CAU5B;AAED;;;;;;GAMG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAJ3B,MAI2B,EAAE,OAAO,EAHpC,MAGoC,GAFlC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAoevC;AA2PD,wBAAsB,aAAa,CAAC,IAAI,KAAA,EAAE,OAAO,KAAA,+BAyLhD;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAHvC,MAGuC,GAFrC,MAAM,GAAC,SAAS,CAiC5B;AAED;;;;;;;;;GASG;AACH,wBAAsB,yBAAyB,CAAC,SAAS,EAJ9C,MAI8C,EAAE,SAAS,AAHjE,CACA,EADQ,MAGyD,GAFvD,OAAO,CAAC,MAAM,GAAC,SAAS,CAAC,CAyDrC;AAED;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAJnC,MAImC,EAAE,OAAO,EAH5C,MAG4C,GAF1C,OAAO,CAAC,MAAM,CAAC,CAwB3B;AAED;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version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../../lib/core/activity.js"],"names":[],"mappings":"AAOA,oFAAoF;AACpF,eAAO,MAAM,UAAU,SAEkB,CAAC;AAE1C,+GAA+G;AAC/G,eAAO,MAAM,YAAY,KAE4B,CAAC;AAQtD,8IAA8I;AAC9I,eAAO,IAAI,QAAQ,KACkD,CAAC;AAEtE,gGAAgG;AAChG,eAAO,MAAM,kBAAkB,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../../lib/core/activity.js"],"names":[],"mappings":"AAOA,oFAAoF;AACpF,eAAO,MAAM,UAAU,SAEkB,CAAC;AAE1C,+GAA+G;AAC/G,eAAO,MAAM,YAAY,KAE4B,CAAC;AAQtD,8IAA8I;AAC9I,eAAO,IAAI,QAAQ,KACkD,CAAC;AAEtE,gGAAgG;AAChG,eAAO,MAAM,kBAAkB,mBAAmB,CAAC;AAkXnD,gJAAgJ;AAChJ,QAAA,MAAM,oBAAoB,UADd,MAAM,KAA4D,MACA,CAAC;AAe/E;;;;;;;GAOG;AACH,iBAAS,oBAAoB,CAAC,QAAQ,EAH3B,MAG2B,GAFzB,MAAM,GAAC,SAAS,CA8D5B;AAED;;;;;GAKG;AACH,iBAAS,wBAAwB,CAAC,OAAO,EAH9B,MAAM,GAAC,MAAM,EAGiB,GAF5B;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,CAqClD;AA0BD;;;;;;GAMG;AACH,wBAAgB,kCAAkC,CAAC,OAAO,EAH/C,MAG+C,GAF7C,OAAO,CAInB;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EALhC,MAKgC,EAAE,MAAM,EAJxC,MAIwC,EAAE,OAAO,AAHzD,CACA,EADQ,MAGsD,GAFpD,MAAM,GAAC,SAAS,CA4B5B;AAED,0KAA0K;AAC1K,wBAAgB,sBAAsB,CAAC,MAAM,EADjC,MACiC,EAA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BAAuB,wBAAwB,CAAC;AAE7D;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAJlC,MAIkC,EAAE,MAAM,EAH1C,MAG0C,GAFxC,KAAK,CASjB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,AAHvC,CACA,EADQ,MAGoC,GAFlC,IAAI,CAOhB;AAED,0DAA0D;AAC1D,wBAAgB,oBAAoB,IADc,IAAI,CAGrD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAH5B,MAG4B,GAF1B,MAAM,GAAC,SAAS,CAgB5B;AAID,wEAAwE;AACxE,wBAAgB,qBAAqB,IADvB,MAAM,EAAE,CAGrB;AAED,oEAAoE;AACpE,wBAAgB,uBAAuB,IADqB,IAAI,CAO/D;AAED;;;;;;;;;GASG;AACH,iBAAS,wBAAwB,CAC/B,IAAI,EARK,MAQL,EACJ,MAAM,EARG,MAQH,EACN,MAAM,EARG,MAQH,EACN,MAAM,AARL,CACA,EADQ,MAQS,EAClB,QAAQ,AARP,CACA,EADQ,MAQI,GAPF,MAAM,GAAC,SAAS,CAgB5B;AAED,0EAA0E;AAC1E,eAAO,MAAM,mBAAmB,UAAY,CAAC;AAE7C;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EALC,MAKD,EACR,eAAe,AALd,CACA,EADQ,MAKwD,GAJtD,OAAO,CA+BnB;AAED;;;;;GAKG;AAEH,wBAAgB,mBAAmB,CAAC,GAAG,EAJ5B,MAI4B,GAH1B,OAAO,CAmBnB;AAmED,uLAAuL;AACvL,eAAO,MAAM,WAAW,UAyItB,CAAC;AAEH,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,GACzB,CAAC"}
|
package/types/lib/core/env.d.ts
CHANGED
|
@@ -30,6 +30,15 @@ export declare function parseMavenArgs(argsString: string): string[];
|
|
|
30
30
|
* @returns {boolean} True if the FETCH_LICENSE env var is set to "true" or "1"
|
|
31
31
|
*/
|
|
32
32
|
export declare function shouldFetchLicense(): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Determines whether registry provenance, such as publish times, publishers
|
|
35
|
+
* and trusted-publishing signals, is wanted. `--bom-audit` turns it on through
|
|
36
|
+
* CDXGEN_FETCH_PKG_METADATA. Local data cannot answer these questions, so a
|
|
37
|
+
* package whose licence and description are known locally is still looked up.
|
|
38
|
+
*
|
|
39
|
+
* @returns {boolean} True if CDXGEN_FETCH_PKG_METADATA is "true" or "1"
|
|
40
|
+
*/
|
|
41
|
+
export declare function shouldFetchRegistryProvenance(): boolean;
|
|
33
42
|
/**
|
|
34
43
|
* Determines whether remote package metadata should be fetched for enrichment.
|
|
35
44
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../lib/core/env.js"],"names":[],"mappings":"AAUA,uCAAuC;AACvC,eAAO,MAAM,MAAM,SAAmD,CAAC;AACvE,mCAAmC;AACnC,eAAO,MAAM,KAAK,SAAwC,CAAC;AAC3D,oCAAoC;AACpC,eAAO,MAAM,MAAM,SAA+C,CAAC;AAEnE,yFAAyF;AACzF,eAAO,MAAM,sBAAsB,oBAElC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,QAIrB,CAAC;AAEX,sJAAsJ;AACtJ,eAAO,MAAM,qBAAqB,SAI/B,CAAC;AAEJ,sIAAsI;AACtI,eAAO,MAAM,sBAAsB,SAElC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAH9B,MAG8B,GAF5B,MAAM,EAAE,CAiDpB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAFrB,OAAO,CAOnB;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,IAF7B,OAAO,
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../lib/core/env.js"],"names":[],"mappings":"AAUA,uCAAuC;AACvC,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
@@ -26,9 +26,8 @@
|
|
|
26
26
|
* `Content-Encoding` header, matching `got`'s transparent decoding.
|
|
27
27
|
* - Proxy support via the standard `HTTP_PROXY`/`HTTPS_PROXY`/`NO_PROXY`
|
|
28
28
|
* environment variables (through undici's `EnvHttpProxyAgent`).
|
|
29
|
-
* - An in-memory GET response cache
|
|
30
|
-
*
|
|
31
|
-
* cache cdxgen previously relied on.
|
|
29
|
+
* - An in-memory GET response cache that replaces the got + Keyv cache cdxgen
|
|
30
|
+
* previously relied on. A request opts out with `cache: false`.
|
|
32
31
|
* - Response objects exposing `statusCode`, `headers`, `body`, `rawBody`,
|
|
33
32
|
* `url` and `request.options`.
|
|
34
33
|
* - A lazily-resolved `.json()` method on the returned promise, mirroring
|
|
@@ -86,13 +85,19 @@ export declare function getDefaultHttpTimeoutMs(): number;
|
|
|
86
85
|
*/
|
|
87
86
|
export declare function resolveTimeout(timeout?: number | Object): number | undefined;
|
|
88
87
|
/**
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* callers can toggle it at runtime.
|
|
88
|
+
* Override the response cache bounds. Returns the previous bounds so tests can
|
|
89
|
+
* restore them. Not part of the public API.
|
|
92
90
|
*
|
|
93
|
-
* @
|
|
91
|
+
* @param {{ttlMs?: number, maxBytes?: number}} limits New bounds.
|
|
92
|
+
* @returns {{ttlMs: number, maxBytes: number}} Previous bounds.
|
|
94
93
|
*/
|
|
95
|
-
export declare function
|
|
94
|
+
export declare function _setHttpCacheLimits(limits: {
|
|
95
|
+
ttlMs?: number;
|
|
96
|
+
maxBytes?: number;
|
|
97
|
+
}): {
|
|
98
|
+
ttlMs: number;
|
|
99
|
+
maxBytes: number;
|
|
100
|
+
};
|
|
96
101
|
/**
|
|
97
102
|
* Clear the in-memory HTTP response cache. Primarily useful for tests.
|
|
98
103
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpClient.d.ts","sourceRoot":"","sources":["../../../lib/core/httpClient.js"],"names":[],"mappings":"
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O,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,GAAC,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,CAAC,MAAM,GAAC,IAAI,CAIlG,GAFxB,IAAI,CAIhB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAFvB,IAAI,CAIhB;AA4TD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,AAJtC,CACA,EADQ,MAImC,YAwC7C"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared plumbing for plugin (rusi/golem/kosi) invocations: resolving the
|
|
3
|
+
* directory to analyze, and reporting a failed run.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* The working directory, when a relative source argument names it.
|
|
7
|
+
*
|
|
8
|
+
* cdxgen is frequently launched with its working directory already set to the
|
|
9
|
+
* project (depscan does exactly that) while the path argument stays relative
|
|
10
|
+
* to some repository root, e.g. cwd `/work/repo/test/data/app` with argument
|
|
11
|
+
* `test/data/app`. A plain `path.resolve` then produces the doubled
|
|
12
|
+
* `/work/repo/test/data/app/test/data/app`. This recognises that shape and
|
|
13
|
+
* nothing looser: the argument's path segments must be the trailing segments
|
|
14
|
+
* of the working directory, so a mistyped argument run from some other
|
|
15
|
+
* project is never silently redirected to that project.
|
|
16
|
+
*
|
|
17
|
+
* @param {string} src The source path as the caller typed it.
|
|
18
|
+
* @param {string} [cwd] Working directory; defaults to `process.cwd()`.
|
|
19
|
+
* @returns {string|undefined} The absolute working directory when the
|
|
20
|
+
* argument names it, otherwise undefined.
|
|
21
|
+
*/
|
|
22
|
+
export declare function cwdNamedByRelativeSource(src: string, cwd?: string): string | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Resolve the source path argument once, at cdxgen's entry point.
|
|
25
|
+
*
|
|
26
|
+
* Everything downstream — the BOM generators, evinse, and the rusi/golem/kosi
|
|
27
|
+
* launchers — resolves the argument against the working directory, so the
|
|
28
|
+
* doubled-directory shape has to be corrected before any of them run;
|
|
29
|
+
* correcting it only in the plugin launchers leaves the main BOM built from a
|
|
30
|
+
* directory that does not exist.
|
|
31
|
+
*
|
|
32
|
+
* @param {string} src The source path as the caller typed it.
|
|
33
|
+
* @param {string} [cwd] Working directory; defaults to `process.cwd()`.
|
|
34
|
+
* @returns {{path: string, rewritten: boolean, missing: boolean}} `path` is
|
|
35
|
+
* the argument to use: unchanged when it resolves to an existing path, the
|
|
36
|
+
* working directory when the argument names it (`rewritten`), and otherwise
|
|
37
|
+
* unchanged with `missing` set.
|
|
38
|
+
*/
|
|
39
|
+
export declare function resolveSourcePathArgument(src: string, cwd?: string): {
|
|
40
|
+
path: string;
|
|
41
|
+
rewritten: boolean;
|
|
42
|
+
missing: boolean;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Resolve the directory a plugin should analyze.
|
|
46
|
+
*
|
|
47
|
+
* The entry point already corrects the doubled-directory shape (see
|
|
48
|
+
* resolveSourcePathArgument); this is the same rule for callers that reach a
|
|
49
|
+
* plugin launcher directly (evinse, the library API). An existing directory
|
|
50
|
+
* wins and an absolute path is never rewritten. Otherwise the working
|
|
51
|
+
* directory is used only when the argument names it AND it carries the
|
|
52
|
+
* project marker the plugin needs (a `Cargo.toml` for rusi, a `go.mod` for
|
|
53
|
+
* golem). Anything else keeps the resolved path so the plugin's own error
|
|
54
|
+
* names the directory that was actually attempted.
|
|
55
|
+
*
|
|
56
|
+
* @param {string} src The source path as the caller typed it.
|
|
57
|
+
* @param {string[]} markerFiles File names that, present in the working
|
|
58
|
+
* directory, identify it as the project the plugin should analyze.
|
|
59
|
+
* @returns {string} The directory to pass to the plugin.
|
|
60
|
+
*/
|
|
61
|
+
export declare function resolvePluginSourceDir(src: string, markerFiles?: string[]): string;
|
|
62
|
+
/**
|
|
63
|
+
* Report a failed plugin run, keeping the two failure classes apart.
|
|
64
|
+
*
|
|
65
|
+
* A spawn error means the plugin binary itself could not run — not installed,
|
|
66
|
+
* not executable, blocked by the command policy — which is an installation
|
|
67
|
+
* problem. A non-zero exit status or a missing report means the plugin ran
|
|
68
|
+
* and the analysis failed, which must not be dressed up as an installation
|
|
69
|
+
* problem: the message names the directory and says the reachability
|
|
70
|
+
* evidence will be missing, because a silent degradation is what let a
|
|
71
|
+
* doubled `--dir` go unnoticed in the first place.
|
|
72
|
+
*
|
|
73
|
+
* Under `--fail-on-error` the failure additionally claims the process exit
|
|
74
|
+
* status through the deferred-exit contract.
|
|
75
|
+
*
|
|
76
|
+
* @param {Object} run What ran and how it failed.
|
|
77
|
+
* @param {string} run.tool Plugin name, e.g. "rusi".
|
|
78
|
+
* @param {string} run.ecosystem Ecosystem the plugin serves, e.g. "rust".
|
|
79
|
+
* @param {string} run.executable The binary that was invoked.
|
|
80
|
+
* @param {string[]} run.args The arguments it was invoked with.
|
|
81
|
+
* @param {string} run.dir The directory that was analyzed.
|
|
82
|
+
* @param {Object} run.result The spawn result.
|
|
83
|
+
* @param {string} run.outputFile The report file the plugin should have written.
|
|
84
|
+
* @param {Object} [run.options] CLI options, for the `--fail-on-error` contract.
|
|
85
|
+
* @returns {void}
|
|
86
|
+
*/
|
|
87
|
+
export declare function reportPluginRunFailure({ tool, ecosystem, executable, args, dir, result, outputFile, options, }: {
|
|
88
|
+
tool: string;
|
|
89
|
+
ecosystem: string;
|
|
90
|
+
executable: string;
|
|
91
|
+
args: string[];
|
|
92
|
+
dir: string;
|
|
93
|
+
result: Object;
|
|
94
|
+
outputFile: string;
|
|
95
|
+
options?: Object;
|
|
96
|
+
}): void;
|
|
97
|
+
//# sourceMappingURL=pluginRun.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginRun.d.ts","sourceRoot":"","sources":["../../../lib/core/pluginRun.js"],"names":[],"mappings":"AAAA;;;GAGG;AASH;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EALjC,MAKiC,EAAE,GAAG,AAJ9C,CACA,EADQ,MAIsD,GAHpD,MAAM,GAAC,SAAS,CA0B5B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAPlC,MAOkC,EAAE,GAAG,AAN/C,CACA,EADQ,MAMuD,GALrD;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAC,CAiBhE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAL/B,MAK+B,EAAE,WAAW,GAJ5C,MAAM,EAI2C,GAF/C,MAAM,CAoBlB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,IAAI,EACJ,SAAS,EACT,UAAU,EACV,IAAI,EACJ,GAAG,EACH,MAAM,EACN,UAAU,EACV,OAAO,GACR,EAnBE;IAAoB,IAAI,EAAhB,MAAM,CACd;IAAoB,SAAS,EAArB,MAAM,CACd;IAAoB,UAAU,EAAtB,MAAM,CACd;IAAsB,IAAI,EAAlB,MAAM,EAAE,CAChB;IAAoB,GAAG,EAAf,MAAM,CACd;IAAoB,MAAM,EAAlB,MAAM,CACd;IAAoB,UAAU,EAAtB,MAAM,CACd;IAAqB,OAAO,AAA5B,CACA,EADQ,MAAM,CACd;CAWF,GAXY,IAAI,CAuChB"}
|