@cdxgen/cdxgen 13.2.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 +33 -14
- package/bin/cdxgen.js +310 -138
- package/bin/evinse.js +22 -0
- package/bin/repl.js +86 -0
- package/bin/sign.js +119 -15
- package/bin/tracebom.js +69 -5
- package/bin/validate.js +107 -19
- package/bin/verify.js +172 -63
- package/data/helpers/init.gradle +46 -21
- package/data/remediations.json +85 -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/bomAssembly.js +105 -15
- package/lib/cli/cliOptions.js +93 -1
- package/lib/cli/index.js +156 -58
- package/lib/cli/jsBom.js +99 -53
- package/lib/cli/jvmBom.js +708 -147
- package/lib/cli/managedBom.js +415 -224
- package/lib/cli/nativeBom.js +264 -44
- package/lib/core/activity.js +12 -0
- package/lib/core/env.js +22 -15
- package/lib/core/fs.js +176 -7
- package/lib/core/httpClient.js +159 -24
- package/lib/core/metadataProperties.js +97 -0
- package/lib/core/pluginRun.js +184 -0
- package/lib/core/processTree.js +100 -0
- package/lib/core/projectConfig.js +31 -4
- 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 +274 -108
- package/lib/ecosystems/cargoCache.js +231 -8
- package/lib/ecosystems/caxa.js +434 -2
- package/lib/ecosystems/cmakeResolver.js +76 -21
- package/lib/ecosystems/cppBuildContext.js +631 -0
- package/lib/ecosystems/cppEvidence.js +399 -51
- package/lib/ecosystems/cppIncludeResolver.js +294 -0
- package/lib/ecosystems/denoutils.js +93 -66
- package/lib/ecosystems/ecosystems.js +1983 -793
- package/lib/ecosystems/golem.js +28 -12
- package/lib/ecosystems/gradleutils.js +356 -37
- package/lib/ecosystems/jsEvidence.js +104 -44
- package/lib/ecosystems/kosi.js +31 -7
- package/lib/ecosystems/npmutils.js +174 -9
- package/lib/ecosystems/parsers-dotnet.js +616 -159
- package/lib/ecosystems/parsers-elm.js +46 -28
- package/lib/ecosystems/parsers-gleam.js +3 -4
- package/lib/ecosystems/parsers-go.js +371 -70
- package/lib/ecosystems/parsers-js.js +263 -76
- package/lib/ecosystems/parsers-julia.js +2 -3
- package/lib/ecosystems/parsers-jvm.js +204 -12
- package/lib/ecosystems/parsers-misc.js +929 -216
- package/lib/ecosystems/parsers-python.js +167 -24
- package/lib/ecosystems/parsers-rust.js +28 -22
- 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 +1492 -182
- package/lib/ecosystems/rusi.js +54 -10
- 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 +1008 -191
- package/lib/evinser/swiftsem.js +1914 -302
- package/lib/helpers/agenticToolutils.js +2 -2
- package/lib/helpers/bomSigner.js +1101 -222
- package/lib/inventory/aiCollector.js +4 -1
- package/lib/inventory/analyzer.js +110 -127
- package/lib/inventory/atomUtils.js +703 -43
- package/lib/inventory/auditCategories.js +7 -0
- package/lib/inventory/buildToolRateLimit.js +144 -0
- package/lib/inventory/cacheCommands.js +2 -1
- package/lib/inventory/cdxrs.js +103 -12
- package/lib/inventory/cmakeBuildDirs.js +254 -0
- package/lib/inventory/deps.js +501 -124
- package/lib/inventory/depsUtils.js +183 -11
- package/lib/inventory/display.js +4 -5
- package/lib/inventory/dosai.js +798 -57
- package/lib/inventory/dosaiParsers.js +310 -15
- package/lib/inventory/dynamic.js +90 -6
- package/lib/inventory/evidenceUtils.js +166 -113
- package/lib/inventory/fetchBatch.js +690 -55
- 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/protobom.js +8 -1
- package/lib/inventory/purl.js +152 -3
- package/lib/inventory/rustFormulationParser.js +3 -4
- package/lib/inventory/sbomDocument.js +2 -70
- package/lib/inventory/scalaCoords.js +153 -0
- package/lib/inventory/source.js +45 -27
- package/lib/inventory/spdx.js +101 -0
- package/lib/inventory/traceRunner.js +295 -25
- package/lib/inventory/tracedCrypto.js +294 -0
- package/lib/managers/binary.js +115 -24
- package/lib/managers/docker.js +467 -46
- package/lib/managers/oci.js +63 -3
- package/lib/parsers/cmakeCache.js +69 -0
- package/lib/parsers/cmakeLists.js +466 -0
- package/lib/parsers/cmakePresets.js +400 -0
- package/lib/parsers/compileCommands.js +557 -0
- package/lib/parsers/largeJson.js +454 -0
- package/lib/parsers/npmrc.js +19 -1
- 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 +83 -16
- package/lib/stages/postgen/specVersionCompat.js +32 -0
- package/lib/validator/bomValidator.js +6 -16
- package/lib/validator/index.js +64 -11
- package/lib/validator/reporters/console.js +3 -0
- package/lib/validator/reporters/json.js +2 -0
- package/lib/validator/reporters/sarif.js +7 -0
- package/package.json +23 -23
- package/types/lib/audit/index.d.ts.map +1 -1
- package/types/lib/cli/bomAssembly.d.ts +2 -1
- package/types/lib/cli/bomAssembly.d.ts.map +1 -1
- package/types/lib/cli/cliOptions.d.ts +33 -1
- package/types/lib/cli/cliOptions.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 +55 -0
- 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/metadataProperties.d.ts +39 -0
- package/types/lib/core/metadataProperties.d.ts.map +1 -0
- 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/projectConfig.d.ts +6 -2
- package/types/lib/core/projectConfig.d.ts.map +1 -1
- 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 +12 -5
- 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/caxa.d.ts +14 -0
- package/types/lib/ecosystems/caxa.d.ts.map +1 -1
- package/types/lib/ecosystems/cmakeResolver.d.ts +28 -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 +17 -1
- 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 +70 -4
- package/types/lib/ecosystems/gradleutils.d.ts.map +1 -1
- package/types/lib/ecosystems/jsEvidence.d.ts +5 -2
- package/types/lib/ecosystems/jsEvidence.d.ts.map +1 -1
- package/types/lib/ecosystems/kosi.d.ts +13 -0
- package/types/lib/ecosystems/kosi.d.ts.map +1 -1
- package/types/lib/ecosystems/npmutils.d.ts +57 -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 +54 -2
- package/types/lib/ecosystems/parsers-go.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-js.d.ts +16 -5
- 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 +70 -4
- 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-rust.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 +164 -3
- package/types/lib/ecosystems/rubyutils.d.ts.map +1 -1
- package/types/lib/ecosystems/rusi.d.ts +13 -0
- 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 +132 -15
- package/types/lib/evinser/evinser.d.ts.map +1 -1
- package/types/lib/evinser/swiftsem.d.ts +280 -15
- package/types/lib/evinser/swiftsem.d.ts.map +1 -1
- package/types/lib/helpers/bomSigner.d.ts +182 -13
- 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 +219 -5
- 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/cdxrs.d.ts +8 -3
- package/types/lib/inventory/cdxrs.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/depsUtils.d.ts +15 -0
- package/types/lib/inventory/depsUtils.d.ts.map +1 -1
- package/types/lib/inventory/display.d.ts.map +1 -1
- package/types/lib/inventory/dosai.d.ts +121 -9
- 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/plugins.d.ts.map +1 -1
- package/types/lib/inventory/protobom.d.ts.map +1 -1
- package/types/lib/inventory/purl.d.ts +71 -2
- package/types/lib/inventory/purl.d.ts.map +1 -1
- package/types/lib/inventory/rustFormulationParser.d.ts.map +1 -1
- package/types/lib/inventory/sbomDocument.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 +59 -1
- 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/binary.d.ts +30 -1
- package/types/lib/managers/binary.d.ts.map +1 -1
- package/types/lib/managers/docker.d.ts +29 -0
- package/types/lib/managers/docker.d.ts.map +1 -1
- package/types/lib/managers/oci.d.ts +17 -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 +77 -0
- package/types/lib/parsers/cmakeLists.d.ts.map +1 -0
- 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/largeJson.d.ts +52 -0
- package/types/lib/parsers/largeJson.d.ts.map +1 -0
- package/types/lib/parsers/npmrc.d.ts +5 -0
- package/types/lib/parsers/npmrc.d.ts.map +1 -1
- 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/bomValidator.d.ts.map +1 -1
- package/types/lib/validator/index.d.ts +18 -1
- package/types/lib/validator/index.d.ts.map +1 -1
- package/types/lib/validator/reporters/console.d.ts.map +1 -1
- package/types/lib/validator/reporters/json.d.ts.map +1 -1
- package/types/lib/validator/reporters/sarif.d.ts.map +1 -1
- package/lib/third-party/arborist/snapshots/calc-dep-flags.test.cjs +0 -462
|
@@ -72,4 +72,16 @@ export declare function getCargoRegistryDir(): string;
|
|
|
72
72
|
* local source has this crate.
|
|
73
73
|
*/
|
|
74
74
|
export declare function readCargoCacheMetadata(name: string, version: string): CargoCacheMetadata | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* The manifest values of a `.crate` archive, read without extracting it.
|
|
77
|
+
*
|
|
78
|
+
* @param {string} crateFile Path to the `.crate` archive
|
|
79
|
+
* @param {string} name Crate name, for the archive's inner directory
|
|
80
|
+
* @param {string} version Crate version
|
|
81
|
+
* @returns {Promise<{values: Object, source: string}|undefined>}
|
|
82
|
+
*/
|
|
83
|
+
export declare function readCrateArchiveValues(crateFile: string, name: string, version: string): Promise<{
|
|
84
|
+
values: Object;
|
|
85
|
+
source: string;
|
|
86
|
+
} | undefined>;
|
|
75
87
|
//# sourceMappingURL=cargoCache.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cargoCache.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/cargoCache.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cargoCache.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/cargoCache.js"],"names":[],"mappings":"AAyCG,YAAkB,kBAAkB,GACpC;;;;IAAoB,WAAW,AAA/B,CACA,EADW,MAAM,CACjB;;;;IAAoB,OAAO,AAA3B,CACA,EADW,MAAM,CACjB;;;;IAAoB,UAAU,AAA9B,CACA,EADW,MAAM,CACjB;;;;IAAoB,QAAQ,AAA5B,CACA,EADW,MAAM,CACjB;;;;IAAoB,WAAW,AAA/B,CACA,EADW,MAAM,CACjB;;;;IAAoB,QAAQ,AAA5B,CACA,EADW,MAAM,CACjB;;;;IAAoB,QAAQ,AAA5B,CACA,EADW,MAAM,CACjB;;;;IAAqB,MAAM,AAA3B,CACA,EADW,OAAO,CAClB;;;;IAAoB,WAAW,AAA/B,CACA,EADW,MAAM,CACjB;;;;IAAoB,aAAa,AAAjC,CACA,EADW,MAAM,CACjB;;;;IAAqB,OAAO,EAAjB,MAAM,EAAE,CACrB;CAAA,CAAA;AAUD;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAFvB,IAAI,CAKhB;AAID;;;;GAIG;AACH,wBAAgB,yBAAyB,IAF5B,OAAO,CAOnB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAFtB,MAAM,CAOlB;AAmCD;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAAC,IAAI,EALtC,MAKsC,EAAE,OAAO,EAJ/C,MAI+C,GAH7C,kBAAkB,GAAC,SAAS,CAmCxC;AAoGD;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAAC,SAAS,EAL3C,MAK2C,EAAE,IAAI,EAJjD,MAIiD,EAAE,OAAO,EAH1D,MAG0D,GAFxD,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAC,GAAC,SAAS,CAAC,CA0C/D"}
|
|
@@ -5,4 +5,18 @@
|
|
|
5
5
|
* @returns {Promise<Object>} Parsed metadata object.
|
|
6
6
|
*/
|
|
7
7
|
export declare function parseCaxaMetadata(mfile: string): Promise<Object>;
|
|
8
|
+
/**
|
|
9
|
+
* Complete caxa metadata from the application the binary extracts (or was
|
|
10
|
+
* built from): npm integrity from the lockfile pnpm or npm leaves in
|
|
11
|
+
* node_modules, the native tools a cdxgen plugins manifest describes, with
|
|
12
|
+
* their own dependencies, and the PHP, Ruby and Java packages vendored inside
|
|
13
|
+
* npm packages. Everything found is linked from the npm package whose
|
|
14
|
+
* directory contains it; npm packages that are not in the metadata are
|
|
15
|
+
* ignored.
|
|
16
|
+
*
|
|
17
|
+
* @param {Object} mdata Parsed caxa metadata (see parseCaxaMetadata)
|
|
18
|
+
* @param {string} appDir Directory of the extracted app
|
|
19
|
+
* @returns {Promise<Object>} The metadata, with components and dependencies added
|
|
20
|
+
*/
|
|
21
|
+
export declare function enrichCaxaMetadataFromApp(mdata: Object, appDir: string): Promise<Object>;
|
|
8
22
|
//# sourceMappingURL=caxa.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"caxa.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/caxa.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"caxa.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/caxa.js"],"names":[],"mappings":"AAiBA;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,KAAK,EAHlC,MAGkC,GAFhC,OAAO,CAAC,MAAM,CAAC,CA0E3B;AAiXD;;;;;;;;;;;;GAYG;AACH,wBAAsB,yBAAyB,CAAC,KAAK,EAJ1C,MAI0C,EAAE,MAAM,EAHlD,MAGkD,GAFhD,OAAO,CAAC,MAAM,CAAC,CAyC3B"}
|
|
@@ -22,9 +22,11 @@ declare function toRepoRelative(absPath: string, scanRoot: string): string | nul
|
|
|
22
22
|
/**
|
|
23
23
|
* Detect the build directory that holds a `CMakeCache.txt`.
|
|
24
24
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
25
|
+
* An explicit `--cmake-cache <path>` option (passed via `options.cmakeCache`)
|
|
26
|
+
* takes precedence and skips autodetection. Otherwise the project's build
|
|
27
|
+
* directories are searched in order: those its CMake presets configure, then
|
|
28
|
+
* the conventional `build`, `out`, `builddir` and `cmake-build-` directories
|
|
29
|
+
* (see `cmakeBuildDirCandidates`).
|
|
28
30
|
*
|
|
29
31
|
* @param {string} path Project scan root
|
|
30
32
|
* @param {Object} options CLI options; `options.cmakeCache` is an explicit override
|
|
@@ -172,5 +174,28 @@ export declare function buildDependentPurl(resolvedUrl: string, version?: string
|
|
|
172
174
|
* @returns {Object[]} Components with one entry per package name, in first-seen order
|
|
173
175
|
*/
|
|
174
176
|
export declare function collapseCmakeVersions(pkgList: Object[]): Object[];
|
|
177
|
+
/**
|
|
178
|
+
* Keep one component per dependency downloaded at configure time.
|
|
179
|
+
*
|
|
180
|
+
* The same `FetchContent_Declare` may be read from several files, and a
|
|
181
|
+
* `find_package(<name>)` names the package a `FetchContent_Declare(<name>)` or
|
|
182
|
+
* `CPMAddPackage` fetches. Within the components scraped from CMake files, the
|
|
183
|
+
* first fetched component of each name stands for all of them, and a plain
|
|
184
|
+
* `find_package` entry of that name is dropped.
|
|
185
|
+
*
|
|
186
|
+
* @param {Object[]} pkgList Components scraped from CMake-like files
|
|
187
|
+
* @returns {Object[]} The components, in first-seen order
|
|
188
|
+
*/
|
|
189
|
+
export declare function preferFetchedCmakeDependencies(pkgList: Object[]): Object[];
|
|
190
|
+
/**
|
|
191
|
+
* Drop the components scraped from CMake files for a dependency the build tree
|
|
192
|
+
* has resolved: the gitclone script names the repository and tag that were
|
|
193
|
+
* really checked out, so its component replaces the declared one.
|
|
194
|
+
*
|
|
195
|
+
* @param {Object[]} pkgList Components collected so far
|
|
196
|
+
* @param {string} name Name of the resolved dependency
|
|
197
|
+
* @returns {Object[]} The components without the scraped entries for `name`
|
|
198
|
+
*/
|
|
199
|
+
export declare function withoutScrapedFetchDependency(pkgList: Object[], name: string): Object[];
|
|
175
200
|
export { GIT_COMMAND, toRepoRelative };
|
|
176
201
|
//# sourceMappingURL=cmakeResolver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmakeResolver.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/cmakeResolver.js"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"cmakeResolver.d.ts","sourceRoot":"","sources":["../../../lib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3C,MAAM,EAGqC,GAFzC,MAAM,EAAE,CAyBpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,EAJ1C,MAAM,EAIoC,EAAE,IAAI,EAHhD,MAGgD,GAF9C,MAAM,EAAE,CAapB;AAED,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a C/C++ project is built: its CMake configure presets, the compilers
|
|
3
|
+
* its compilation database or configured build tree names, the
|
|
4
|
+
* security-hardening options it is compiled and linked with, and which of the
|
|
5
|
+
* headers it includes are its own.
|
|
6
|
+
*
|
|
7
|
+
* The presets and compilers become formulation components, the hardening
|
|
8
|
+
* options properties of the project component, and the project's own include
|
|
9
|
+
* directories let the include analysis tell first-party headers from
|
|
10
|
+
* dependencies.
|
|
11
|
+
*
|
|
12
|
+
* Layer 3: this module reads the build tree and may run a compiler (only
|
|
13
|
+
* `--version`, only outside secure mode, only a GCC, Clang, MSVC, Intel,
|
|
14
|
+
* NVIDIA or EDG driver found on the PATH or named by an absolute path outside
|
|
15
|
+
* the project).
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* The empty build context, for scans that are not of a source tree.
|
|
19
|
+
*
|
|
20
|
+
* @returns {Object}
|
|
21
|
+
*/
|
|
22
|
+
export declare function emptyCppBuildContext(): Object;
|
|
23
|
+
/**
|
|
24
|
+
* The executable a driver names, when it may be run: an absolute path, or a
|
|
25
|
+
* command found on the PATH, that is a file outside the project. A relative
|
|
26
|
+
* path, or anything inside the project tree, is never run, since a
|
|
27
|
+
* compilation database can come with the code it describes.
|
|
28
|
+
*/
|
|
29
|
+
export declare function trustedCompilerPath(driver: any, root: any): any;
|
|
30
|
+
/**
|
|
31
|
+
* Resolve the build context of a C/C++ project.
|
|
32
|
+
*
|
|
33
|
+
* @param {string} path Project scan root
|
|
34
|
+
* @param {Object} options CLI options
|
|
35
|
+
* @param {Object} [cmakeContext] The CMake context (`boundaries` lists the
|
|
36
|
+
* source directories of fetched and submodule dependencies)
|
|
37
|
+
* @param {string[]} [vendoredDirs] Directories of code the project carries
|
|
38
|
+
* under another license; their headers are not the project's own
|
|
39
|
+
* @returns {{
|
|
40
|
+
* formulationComponents: Object[],
|
|
41
|
+
* parentProperties: Object[],
|
|
42
|
+
* firstPartyIncludeDirs: string[],
|
|
43
|
+
* compileDatabase: string|undefined,
|
|
44
|
+
* isFirstPartyHeader: function(string): boolean,
|
|
45
|
+
* }}
|
|
46
|
+
*/
|
|
47
|
+
export declare function resolveCppBuildContext(path: string, options?: Object, cmakeContext?: Object, vendoredDirs?: string[]): {
|
|
48
|
+
formulationComponents: Object[];
|
|
49
|
+
parentProperties: Object[];
|
|
50
|
+
firstPartyIncludeDirs: string[];
|
|
51
|
+
compileDatabase: string | undefined;
|
|
52
|
+
isFirstPartyHeader: Function;
|
|
53
|
+
(string: any): boolean;
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=cppBuildContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cppBuildContext.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/cppBuildContext.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAqEH;;;;GAIG;AACH,wBAAgB,oBAAoB,IAFvB,MAAM,CAIlB;AAgKD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,KAAA,EAAE,IAAI,KAAA,OA0C/C;AA0KD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAfK,MAeL,EACJ,OAAO,GAfE,MAeG,EACZ,YAAY,AAfX,CAEA,EAFQ,MAee,EACxB,YAAY,AAdX,CAEA,EAFQ,MAAM,EAcE,GAZN;IACR,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,eAAe,EAAE,MAAM,GAAC,SAAS,CAAC;IAClC,kBAAkB,WAAU;IAAA,CAAC,MAAM,KAAA,GAAG,OAAO,CAAC;CAC/C,CAkJH"}
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a directory holds C or C++ sources for atom to parse.
|
|
3
|
+
*
|
|
4
|
+
* The search skips the directories the manifest searches skip, such as
|
|
5
|
+
* node_modules and dot directories, and honours the exclude patterns, so the
|
|
6
|
+
* sources of a native npm addon do not count.
|
|
7
|
+
*
|
|
8
|
+
* @param {string} src directory
|
|
9
|
+
* @param {Object} options CLI options
|
|
10
|
+
* @returns {boolean} true when the directory holds at least one C or C++ file
|
|
11
|
+
*/
|
|
12
|
+
export declare function hasCppSources(src: string, options?: Object): boolean;
|
|
1
13
|
/**
|
|
2
14
|
* Method to find c/c++ modules by collecting usages with atom
|
|
3
15
|
*
|
|
@@ -5,8 +17,12 @@
|
|
|
5
17
|
* @param {object} options Command line options
|
|
6
18
|
* @param {array} osPkgsList Array of OS pacakges represented as components
|
|
7
19
|
* @param {array} epkgList Existing packages list
|
|
20
|
+
* @param {function(string): boolean} [isFirstPartyHeader] Whether an
|
|
21
|
+
* included header is the project's own (found under the project root or
|
|
22
|
+
* one of its own include directories, outside any dependency's sources);
|
|
23
|
+
* such a header is not a component
|
|
8
24
|
*/
|
|
9
|
-
export declare function getCppModules(src: string, options: object, osPkgsList: array, epkgList: array): {
|
|
25
|
+
export declare function getCppModules(src: string, options: object, osPkgsList: array, epkgList: array, isFirstPartyHeader?: Function): {
|
|
10
26
|
parentComponent: Object | {
|
|
11
27
|
name: any;
|
|
12
28
|
version: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cppEvidence.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/cppEvidence.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cppEvidence.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/cppEvidence.js"],"names":[],"mappings":"AA0MA;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAJtB,MAIsB,EAAE,OAAO,GAH/B,MAGoC,GAFlC,OAAO,CAOnB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAVM,MAUN,EACH,OAAO,EAVE,MAUF,EACP,UAAU,EAVD,KAUC,EACV,QAAQ,EAVC,KAUD,EACR,kBAAkB,WAAY;;;;;;;;;;;;;;;;;;;;;;;;;EAqc/B"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which package provides a C/C++ header, from the file the include resolved
|
|
3
|
+
* to. atom 4 and later name that file in each include's usages slice
|
|
4
|
+
* (`resolvedPath`); with it, a header is attributed exactly instead of by its
|
|
5
|
+
* name: to the project itself, to a dependency whose sources CMake fetched or
|
|
6
|
+
* a submodule checked out, to code the project vendors, to a port vcpkg
|
|
7
|
+
* installed, to a package in the Conan cache, or to the operating-system
|
|
8
|
+
* package that owns the file.
|
|
9
|
+
*
|
|
10
|
+
* Layer 3: reads the vcpkg installed tree and the Conan cache, and asks the
|
|
11
|
+
* OS package manager about a file (`dpkg-query -S`, `rpm -qf`, `apk info -W`,
|
|
12
|
+
* or the Homebrew Cellar path).
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* The include slices of an atom C/C++ usages report: for each header as
|
|
16
|
+
* written, the files it resolved to, whether it was written as a system
|
|
17
|
+
* include, and the functions the including files call that it declares.
|
|
18
|
+
* Slices from atom releases that do not name the resolved file contribute no
|
|
19
|
+
* paths and no symbols.
|
|
20
|
+
*
|
|
21
|
+
* @param {Object} sliceData Parsed atom usages report
|
|
22
|
+
* @returns {Map<string, {paths: Set<string>, system: boolean, symbols: Set<string>}>}
|
|
23
|
+
*/
|
|
24
|
+
export declare function parseCIncludeSlices(sliceData: Object): Map<string, {
|
|
25
|
+
paths: Set<string>;
|
|
26
|
+
system: boolean;
|
|
27
|
+
symbols: Set<string>;
|
|
28
|
+
}>;
|
|
29
|
+
/**
|
|
30
|
+
* Index the ports vcpkg installed into the given `vcpkg_installed`
|
|
31
|
+
* directories: every file a port installed, by absolute path. vcpkg lists a
|
|
32
|
+
* port's files in `vcpkg/info/<port>_<version>_<triplet>.list`, one path per
|
|
33
|
+
* line relative to the installed directory.
|
|
34
|
+
*
|
|
35
|
+
* @param {string[]} installedDirs `vcpkg_installed` directories
|
|
36
|
+
* @returns {Map<string, {port: string, version: string, triplet: string}>}
|
|
37
|
+
*/
|
|
38
|
+
export declare function readVcpkgInstalledIndex(installedDirs: string[]): Map<string, {
|
|
39
|
+
port: string;
|
|
40
|
+
version: string;
|
|
41
|
+
triplet: string;
|
|
42
|
+
}>;
|
|
43
|
+
/**
|
|
44
|
+
* The package folders of a Conan 2 cache, from its database
|
|
45
|
+
* (`<home>/p/cache.sqlite3`, table `packages`).
|
|
46
|
+
*
|
|
47
|
+
* @param {string} conanHome Conan 2 home (`CONAN_HOME`, or `~/.conan2`)
|
|
48
|
+
* @returns {Array<{dir: string, name: string, version: string}>}
|
|
49
|
+
*/
|
|
50
|
+
export declare function conan2Packages(conanHome: string): Array<{
|
|
51
|
+
dir: string;
|
|
52
|
+
name: string;
|
|
53
|
+
version: string;
|
|
54
|
+
}>;
|
|
55
|
+
/**
|
|
56
|
+
* The Conan package a file belongs to: in a Conan 1 cache
|
|
57
|
+
* (`<home>/.conan/data/<name>/<version>/<user>/<channel>/package/<id>/...`)
|
|
58
|
+
* from its path, in a Conan 2 cache from the cache's database.
|
|
59
|
+
*
|
|
60
|
+
* @param {string} file Absolute path
|
|
61
|
+
* @param {Object[]} conan2 Conan 2 package folders (see `conan2Packages`)
|
|
62
|
+
* @returns {{name: string, version: string}|undefined}
|
|
63
|
+
*/
|
|
64
|
+
export declare function conanPackageOf(file: string, conan2: Object[]): {
|
|
65
|
+
name: string;
|
|
66
|
+
version: string;
|
|
67
|
+
} | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* Build the function that attributes a header from the files it resolved
|
|
70
|
+
* to.
|
|
71
|
+
*
|
|
72
|
+
* @param {Object} context
|
|
73
|
+
* @param {string} context.src Project scan root
|
|
74
|
+
* @param {Object[]} [context.components] Components already known: CMake
|
|
75
|
+
* dependencies (`cdx:cmake:sourceDir`) and vendored code
|
|
76
|
+
* (`cdx:vendored:path`) claim the headers under their directories
|
|
77
|
+
* @param {string[]} [context.buildDirs] Build directories, searched for
|
|
78
|
+
* `vcpkg_installed`
|
|
79
|
+
* @param {function(string): boolean} [context.isFirstPartyHeader] Whether a
|
|
80
|
+
* file is the project's own
|
|
81
|
+
* @returns {function(Iterable<string>): Object|undefined} Given the resolved
|
|
82
|
+
* files, `{kind: "first-party"}`, `{kind: "component", component}`,
|
|
83
|
+
* `{kind: "vcpkg", port, version, triplet}`, `{kind: "conan", name,
|
|
84
|
+
* version}`, `{kind: "os", pkgInfo}`, or `undefined` when no file says.
|
|
85
|
+
* Its `vcpkgPorts()` lists the ports vcpkg installed.
|
|
86
|
+
*/
|
|
87
|
+
export declare function createIncludeAttributor(context: {
|
|
88
|
+
src: string;
|
|
89
|
+
components?: Object[];
|
|
90
|
+
buildDirs?: string[];
|
|
91
|
+
}): Function;
|
|
92
|
+
//# sourceMappingURL=cppIncludeResolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cppIncludeResolver.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/cppIncludeResolver.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAYH;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAHlC,MAGkC,GAFhC,GAAG,CAAC,MAAM,EAAE;IAAC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAAC,CAAC,CA+BpF;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,aAAa,EAH1C,MAAM,EAGoC,GAFxC,GAAG,CAAC,MAAM,EAAE;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,CAAC,CAsCzE;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAH7B,MAG6B,GAF3B,KAAK,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,CAAC,CAuC/D;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAJxB,MAIwB,EAAE,MAAM,EAHhC,MAAM,EAG0B,GAF9B;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,GAAC,SAAS,CAgBrD;AAMD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAd5C;IAAwB,GAAG,EAAnB,MAAM,CACd;IAA2B,UAAU,AAArC,CAGA,EAHQ,MAAM,EAAE,CAGhB;IAA2B,SAAS,AAApC,CAEA,EAFQ,MAAM,EAAE,CAEhB;CAQ4C,YAuF9C"}
|
|
@@ -28,9 +28,15 @@ export declare function findDenoJson(dir: string): string | undefined;
|
|
|
28
28
|
/**
|
|
29
29
|
* Fetch JSR registry metadata for deno/jsr package components.
|
|
30
30
|
*
|
|
31
|
-
* For each component carrying a `cdx:deno:jsrKey` property, fetches the
|
|
32
|
-
* and package endpoints from the JSR API
|
|
33
|
-
*
|
|
31
|
+
* For each component carrying a `cdx:deno:jsrKey` property, fetches the
|
|
32
|
+
* version and package endpoints from the JSR API and fills in license,
|
|
33
|
+
* description, and the GitHub source link. A document is requested only for
|
|
34
|
+
* a component that still misses a field that document supplies: the version
|
|
35
|
+
* document carries the license, the package document the description and the
|
|
36
|
+
* repository link, so whatever the lockfile and the installed-manifest
|
|
37
|
+
* mining filled is never asked for again. Neither document carries
|
|
38
|
+
* provenance, so a provenance fetch, as under --bom-audit, asks for nothing
|
|
39
|
+
* more.
|
|
34
40
|
*
|
|
35
41
|
* @param {Array<object>} pkgList Package components potentially enriched with `cdx:deno:jsrKey`.
|
|
36
42
|
* @returns {Promise<Array<object>>} The enriched package list (same reference as pkgList).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"denoutils.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/denoutils.js"],"names":[],"mappings":"AA8DA;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAHpB,MAGoB,GAFlB,MAAM,CAuDlB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAH/B,MAG+B,GAF7B,MAAM,GAAC,SAAS,CAuB5B;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAHrB,MAGqB,GAFnB,MAAM,GAAC,SAAS,CAY5B;
|
|
1
|
+
{"version":3,"file":"denoutils.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/denoutils.js"],"names":[],"mappings":"AA8DA;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAHpB,MAGoB,GAFlB,MAAM,CAuDlB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAH/B,MAG+B,GAF7B,MAAM,GAAC,SAAS,CAuB5B;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAHrB,MAGqB,GAFnB,MAAM,GAAC,SAAS,CAY5B;AA2TD;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAHjC,KAAK,CAAC,MAAM,CAGqB,GAF/B,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CA4ElC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAsB,aAAa,CAAC,QAAQ,EALjC,MAKiC,EAAE,OAAO,AAJlD,CACA,EADQ,MAI+C,GAH7C,OAAO,CAAC;IAAC,OAAO,QAAQ;IAAC,gBAAgB,QAAO;CAAC,CAAC,CAge9D"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export declare let metadata_cache: {};
|
|
2
1
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* No longer used. Registry answers are kept per ecosystem and for one run; this
|
|
3
|
+
* object stays exported for callers that imported it.
|
|
4
|
+
*
|
|
5
|
+
* @deprecated
|
|
6
6
|
*/
|
|
7
|
-
export declare
|
|
7
|
+
export declare const metadata_cache: {};
|
|
8
8
|
/**
|
|
9
9
|
* Fetches license information for a list of Swift packages by querying the
|
|
10
10
|
* GitHub repository license API for packages hosted on github.com.
|
|
@@ -16,9 +16,27 @@ export declare function getSwiftPackageMetadata(pkgList: Object[]): Promise<Obje
|
|
|
16
16
|
/**
|
|
17
17
|
* Method to retrieve metadata for npm packages by querying npmjs
|
|
18
18
|
*
|
|
19
|
+
* Packages a public registry cannot hold are skipped: the project itself,
|
|
20
|
+
* workspace and link members, file and git sources, and scopes served by
|
|
21
|
+
* another registry. See {@link npmLookupRegistry}. A package whose licence,
|
|
22
|
+
* description and repository the project or lockfile already supplied is left
|
|
23
|
+
* alone as well: the registry answers only what is still missing, and never
|
|
24
|
+
* overwrites a licence that is already set. The registry's licence is read
|
|
25
|
+
* with its legacy `licenses` field, and only a package for which neither the
|
|
26
|
+
* package nor the registry names one falls back to its repository's licence.
|
|
27
|
+
*
|
|
19
28
|
* @param {Array} pkgList Package list
|
|
29
|
+
* @param {string} [registryUrl] Registry to query instead of NPM_URL
|
|
30
|
+
* @param {Object} [options] Options
|
|
31
|
+
* @param {Object} [options.npmrcConfig] Merged .npmrc configuration, used to
|
|
32
|
+
* resolve a scope's own registry
|
|
33
|
+
* @param {boolean} [options.secureMode] Whether secure mode is on. Defaults to
|
|
34
|
+
* the process-wide setting.
|
|
20
35
|
*/
|
|
21
|
-
export declare function getNpmMetadata(pkgList: any[], registryUrl
|
|
36
|
+
export declare function getNpmMetadata(pkgList: any[], registryUrl?: string, options?: {
|
|
37
|
+
npmrcConfig?: Object;
|
|
38
|
+
secureMode?: boolean;
|
|
39
|
+
}): Promise<any[]>;
|
|
22
40
|
/**
|
|
23
41
|
* Method to locate local Gradle, Maven, or Coursier cache files for a given maven coordinate.
|
|
24
42
|
*
|
|
@@ -29,15 +47,25 @@ export declare function getNpmMetadata(pkgList: any[], registryUrl: any): Promis
|
|
|
29
47
|
*/
|
|
30
48
|
export declare function findLocalMvnArtifact(group: string, name: string, version: string): Object | null;
|
|
31
49
|
/**
|
|
32
|
-
* Method to retrieve metadata for maven packages
|
|
50
|
+
* Method to retrieve metadata for maven packages, from the local caches first
|
|
51
|
+
* and from Maven Central only for what remains.
|
|
52
|
+
*
|
|
53
|
+
* Every package is first enriched from data on disk. Only when license
|
|
54
|
+
* fetching is enabled (FETCH_LICENSE) or `force` is set are the packages
|
|
55
|
+
* still without a licence looked up remotely, and then only those a public
|
|
56
|
+
* repository can hold.
|
|
33
57
|
*
|
|
34
58
|
* @param {Array} pkgList Package list
|
|
35
59
|
* @param {Object} jarNSMapping Jar Namespace mapping object
|
|
36
60
|
* @param {Boolean} force Force fetching of license
|
|
61
|
+
* @param {{skipPurls?: Set<string>}} [context] Purls or bom-refs of the
|
|
62
|
+
* project's own modules, which are never looked up remotely.
|
|
37
63
|
*
|
|
38
64
|
* @returns {Array} Updated package list
|
|
39
65
|
*/
|
|
40
|
-
export declare function getMvnMetadata(pkgList: any[], jarNSMapping?: Object, force?: boolean
|
|
66
|
+
export declare function getMvnMetadata(pkgList: any[], jarNSMapping?: Object, force?: boolean, context?: {
|
|
67
|
+
skipPurls?: Set<string>;
|
|
68
|
+
}): any[];
|
|
41
69
|
/**
|
|
42
70
|
* Method to compose URL of pom.xml
|
|
43
71
|
*
|
|
@@ -50,7 +78,10 @@ export declare function getMvnMetadata(pkgList: any[], jarNSMapping?: Object, fo
|
|
|
50
78
|
*/
|
|
51
79
|
export declare function composePomXmlUrl({ urlPrefix, group, name, version }: string): string;
|
|
52
80
|
/**
|
|
53
|
-
* Method to fetch pom.xml data and parse it to JSON
|
|
81
|
+
* Method to fetch pom.xml data and parse it to JSON, merged with its parents.
|
|
82
|
+
*
|
|
83
|
+
* Each level is read from the local caches first. When a parent cannot be
|
|
84
|
+
* found, the child and any nearer parents are still returned.
|
|
54
85
|
*
|
|
55
86
|
* @param {String} urlPrefix
|
|
56
87
|
* @param {String} group
|
|
@@ -61,7 +92,7 @@ export declare function composePomXmlUrl({ urlPrefix, group, name, version }: st
|
|
|
61
92
|
*/
|
|
62
93
|
export declare function fetchPomXmlAsJson({ urlPrefix, group, name, version }: string): Object | undefined;
|
|
63
94
|
/**
|
|
64
|
-
* Method to fetch pom.xml data
|
|
95
|
+
* Method to fetch pom.xml data, from the local caches when present.
|
|
65
96
|
*
|
|
66
97
|
* @param {String} urlPrefix
|
|
67
98
|
* @param {String} group
|
|
@@ -231,8 +262,9 @@ export declare function getGoPkgLicense(repoMetadata: Object): Promise<any>;
|
|
|
231
262
|
*
|
|
232
263
|
* @param {String} group Package group
|
|
233
264
|
* @param {String} name Package name
|
|
265
|
+
* @param {String} [version] Package version, part of the page URL
|
|
234
266
|
*/
|
|
235
|
-
export declare function getGoPkgVCSUrl(group: string, name: string): Promise<any>;
|
|
267
|
+
export declare function getGoPkgVCSUrl(group: string, name: string, version?: string): Promise<any>;
|
|
236
268
|
/**
|
|
237
269
|
* Method to retrieve metadata for rust packages by querying crates
|
|
238
270
|
*
|
|
@@ -243,7 +275,13 @@ export declare function getGoPkgVCSUrl(group: string, name: string): Promise<any
|
|
|
243
275
|
*
|
|
244
276
|
* What it does not hold is publisher identity, so a caller that needs the
|
|
245
277
|
* publisher-drift and release-cadence signals — the predictive audit does —
|
|
246
|
-
* passes `preferLocalCache: false` and takes the slower registry path.
|
|
278
|
+
* passes `preferLocalCache: false` and takes the slower registry path. That is
|
|
279
|
+
* also the only caller that needs the crate's owners, so the `/owners` request
|
|
280
|
+
* is made for it alone.
|
|
281
|
+
*
|
|
282
|
+
* Crates a public registry cannot hold are skipped: the project itself, path
|
|
283
|
+
* and git crates, and crates from an alternate registry. See
|
|
284
|
+
* {@link canCratesIoServe}.
|
|
247
285
|
*
|
|
248
286
|
* @param {Array} pkgList Package list
|
|
249
287
|
* @param {Object} [options] Options
|
|
@@ -256,9 +294,20 @@ export declare function getCratesMetadata(pkgList: any[], options?: {
|
|
|
256
294
|
/**
|
|
257
295
|
* Method to retrieve metadata for dart packages by querying pub.dev
|
|
258
296
|
*
|
|
297
|
+
* A hosted package whose lockfile names another registry is looked up there;
|
|
298
|
+
* the score endpoint that carries the licence tag is pub.dev's, so a private
|
|
299
|
+
* registry is asked only for the package document. In secure mode cdxgen does
|
|
300
|
+
* not contact a registry the scanned project names, so such a package is not
|
|
301
|
+
* looked up at all.
|
|
302
|
+
*
|
|
259
303
|
* @param {Array} pkgList Package list
|
|
304
|
+
* @param {Object} [options] Options
|
|
305
|
+
* @param {boolean} [options.secureMode] Whether secure mode is on. Defaults to
|
|
306
|
+
* the process-wide setting.
|
|
260
307
|
*/
|
|
261
|
-
export declare function getDartMetadata(pkgList: any[]
|
|
308
|
+
export declare function getDartMetadata(pkgList: any[], options?: {
|
|
309
|
+
secureMode?: boolean;
|
|
310
|
+
}): Promise<any[]>;
|
|
262
311
|
/**
|
|
263
312
|
* Normalize a Cargo checksum/integrity string into canonical hex-prefixed form.
|
|
264
313
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ecosystems.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/ecosystems.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ecosystems.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/ecosystems.js"],"names":[],"mappings":"AAiHA;;;;;GAKG;AACH,eAAO,MAAM,cAAc,IAAK,CAAC;AAqDjC;;;;;;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MAIgE,kBAoe1E;AAkbD;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,OAAA,EAAE,YAAY,QAAY;;;GA4IvE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"golem.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/golem.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"golem.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/golem.js"],"names":[],"mappings":"AAgkDA;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAH/B,MAG+B,GAF7B,OAAO,CAInB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAJ/B,MAI+B,GAH7B,MAAM,GAAC,SAAS,CAY5B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EALzB,MAKyB,EAAE,UAAU,EAJrC,MAIqC,EAAE,OAAO,AAHtD,CACA,EADQ,MAGmD,GAFjD,OAAO,CA4DnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAJ5B,MAI4B,EAAE,OAAO,AAH7C,CACA,EADQ,MAG0C,GAFxC,MAAM,GAAC,SAAS,CA2B5B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,AAL7C,CACA,EADQ,MAK0C,EAAE,UAAU,AAJ9D,CACA,EADQ,KAAK,CAAC,MAAM,CAI+C,GAHzD;IAAC,sBAAsB,2BAAgC;IAAC,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAAC,mBAAmB,0BAA0B;IAAC,cAAc,wBAAwB;IAAC,kBAAkB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAAC,eAAe,wBAAuB;CAAC,CAsFpQ"}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Method to return the gradle command to use.
|
|
3
3
|
*
|
|
4
|
+
* Project-local wrapper scripts (`gradlew`) are attacker-controlled files in
|
|
5
|
+
* the scanned project, so they are only used when dependency tooling is
|
|
6
|
+
* allowed (`options.installDeps !== false`); otherwise the system Gradle is
|
|
7
|
+
* used.
|
|
8
|
+
*
|
|
4
9
|
* @param {string} srcPath Path to look for gradlew wrapper
|
|
5
10
|
* @param {string|null} rootPath Root directory to look for gradlew wrapper
|
|
11
|
+
* @param {Object} [options] CLI options (`installDeps` gates wrapper use)
|
|
6
12
|
*/
|
|
7
|
-
export declare function getGradleCommand(srcPath: string, rootPath: string | null): string;
|
|
13
|
+
export declare function getGradleCommand(srcPath: string, rootPath: string | null, options?: Object): string;
|
|
8
14
|
/**
|
|
9
15
|
* Method to combine the general gradle arguments, the sub-commands and the sub-commands' arguments in the correct way
|
|
10
16
|
*
|
|
@@ -19,6 +25,18 @@ export declare function buildGradleCommandArguments(gradleArguments: string[], g
|
|
|
19
25
|
/**
|
|
20
26
|
* Method to split the output produced by Gradle using parallel processing by project
|
|
21
27
|
*
|
|
28
|
+
* Gradle groups console output by task and prints a `> Task :path` header
|
|
29
|
+
* before each group, repeating it whenever a task's output resumes after
|
|
30
|
+
* another task's. Each group is therefore keyed by the project in its own
|
|
31
|
+
* header (`> Task :app:dependencies` belongs to `:app`), never by whatever
|
|
32
|
+
* report header happened to precede it, and the groups of one project are
|
|
33
|
+
* concatenated in order, so reordering or interrupting the task reports cannot
|
|
34
|
+
* move a report to another project or overwrite one (issue 4465). The groups
|
|
35
|
+
* of a root task (`:dependencies`) all take the root project's name from the
|
|
36
|
+
* `Root project '…'` header that only a root task prints, so a continuation
|
|
37
|
+
* group, which carries no report header, stays with the rest of the root
|
|
38
|
+
* report. The groups of other tasks are dropped along with their headers.
|
|
39
|
+
*
|
|
22
40
|
* @param {string} rawOutput Full output produced by Gradle using parallel processing
|
|
23
41
|
* @param {string[]} relevantTasks The list of gradle tasks whose output need to be considered.
|
|
24
42
|
* @returns {map} Map with subProject names as keys and corresponding dependency task outputs as values.
|
|
@@ -57,7 +75,7 @@ export declare function parseGradleProperties(rawOutput: string, gradleModuleNam
|
|
|
57
75
|
*
|
|
58
76
|
* @returns {string} The combined output for all subprojects of the Gradle properties task
|
|
59
77
|
*/
|
|
60
|
-
export declare function executeParallelGradleProperties(dir: string, allProjectsStr: array, extraArgs?: array): string;
|
|
78
|
+
export declare function executeParallelGradleProperties(dir: string, allProjectsStr: array, extraArgs?: array, options?: {}): string;
|
|
61
79
|
/**
|
|
62
80
|
* Forget the causes diagnosed so far, so a process that generates more than
|
|
63
81
|
* one BOM diagnoses each run on its own.
|
|
@@ -159,16 +177,64 @@ _includeCacheDir?: boolean): Promise<Object>;
|
|
|
159
177
|
/**
|
|
160
178
|
* Method to return the mill command to use.
|
|
161
179
|
*
|
|
180
|
+
* The project-local `mill` script is an attacker-controlled file in the
|
|
181
|
+
* scanned project, so it is only used when dependency tooling is allowed
|
|
182
|
+
* (`options.installDeps !== false`).
|
|
183
|
+
*
|
|
162
184
|
* @param {string} srcPath Path to look for mill wrapper
|
|
185
|
+
* @param {Object} [options] CLI options (`installDeps` gates wrapper use)
|
|
186
|
+
*/
|
|
187
|
+
export declare function getMillCommand(srcPath: string, options?: Object): string;
|
|
188
|
+
/**
|
|
189
|
+
* Determine the Mill version of a build.
|
|
190
|
+
*
|
|
191
|
+
* The version is read from the `.mill-version` file, from the
|
|
192
|
+
* `//| mill-version:` header of the build file, or from the launcher itself.
|
|
193
|
+
*
|
|
194
|
+
* @param {string} millRootPath Root of the Mill build
|
|
195
|
+
* @param {string} millCmd Mill command to use for the fallback probe
|
|
196
|
+
* @returns {string|null} The Mill version, or null when it cannot be determined
|
|
197
|
+
*/
|
|
198
|
+
export declare function getMillVersion(millRootPath: string, millCmd: string): string | null;
|
|
199
|
+
/**
|
|
200
|
+
* Find the Mill daemons running under a tree.
|
|
201
|
+
*
|
|
202
|
+
* Daemons record their process id in `out/mill-daemon*` (Mill 1.x) or
|
|
203
|
+
* `out/mill-server*` directories, directly or one level below (Mill 0.12
|
|
204
|
+
* keeps one subdirectory per server). Only processes that are still alive
|
|
205
|
+
* are returned.
|
|
206
|
+
*
|
|
207
|
+
* @param {string} rootPath Tree to search
|
|
208
|
+
* @returns {Map<string, Set<number>>} Live daemon process ids by the root of
|
|
209
|
+
* the build they belong to
|
|
210
|
+
*/
|
|
211
|
+
export declare function findMillDaemons(rootPath: string): Map<string, Set<number>>;
|
|
212
|
+
/**
|
|
213
|
+
* Stop the Mill daemons that started under the scanned tree during the scan.
|
|
214
|
+
*
|
|
215
|
+
* cdxgen's own Mill calls run with --no-server, but a project build cdxgen
|
|
216
|
+
* runs can shell out to Mill without it and leave a daemon behind. Daemons
|
|
217
|
+
* that were already running when the scan started belong to the user, for
|
|
218
|
+
* example to an IDE, and are left alone; every other live daemon is shut
|
|
219
|
+
* down through the launcher of the build it belongs to.
|
|
220
|
+
*
|
|
221
|
+
* @param {string} rootPath Scanned tree
|
|
222
|
+
* @param {Map<string, Set<number>>} [runningBefore] Result of
|
|
223
|
+
* {@link findMillDaemons} taken before the scan
|
|
163
224
|
*/
|
|
164
|
-
export declare function
|
|
225
|
+
export declare function stopMillDaemons(rootPath: string, runningBefore?: Map<string, Set<number>>): void;
|
|
165
226
|
/**
|
|
166
227
|
* Method to return the maven command to use.
|
|
167
228
|
*
|
|
229
|
+
* Project-local wrapper scripts (`mvnw`) are attacker-controlled files in the
|
|
230
|
+
* scanned project, so they are only used when dependency tooling is allowed
|
|
231
|
+
* (`options.installDeps !== false`); otherwise the installed Maven is used.
|
|
232
|
+
*
|
|
168
233
|
* @param {string} srcPath Path to look for maven wrapper
|
|
169
234
|
* @param {string} rootPath Root directory to look for maven wrapper
|
|
235
|
+
* @param {Object} [options] CLI options (`installDeps` gates wrapper use)
|
|
170
236
|
*/
|
|
171
|
-
export declare function getMavenCommand(srcPath: string, rootPath: string): string;
|
|
237
|
+
export declare function getMavenCommand(srcPath: string, rootPath: string, options?: Object): string;
|
|
172
238
|
/**
|
|
173
239
|
* Parse a Gradle version catalog (`gradle/libs.versions.toml`).
|
|
174
240
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gradleutils.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/gradleutils.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gradleutils.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/gradleutils.js"],"names":[],"mappings":"AA8CA;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAJ7B,MAI6B,EAAE,QAAQ,EAHvC,MAAM,GAAC,IAGgC,EAAE,OAAO,AAFxD,CACF,EADU,MAEqD,UAoG/D;AA6DD;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CACzC,eAAe,EARN,MAAM,EAQA,EACf,iBAAiB,EARR,MAAM,EAQE,EACjB,yBAAyB,EARhB,MAAM,EAQU,EACzB,mBAAmB,EARV,GAQU,GANR,MAAM,EAAE,CA4CpB;AAqCD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAJ1C,MAI0C,EAAE,aAAa,EAHzD,MAAM,EAGmD,GAFvD,GAAG,CA0Cf;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAFlC,MAEkC;;;EAsD5C;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAHpC,MAGoC,EAAE,gBAAgB,GAFtD,MAE6D;;;;;;;;EAoDvE;AAED;;;;;;;;GAQG;AACH,wBAAgB,+BAA+B,CAC7C,GAAG,EAPM,MAON,EACH,cAAc,EAPL,KAOK,EACd,SAAS,GAPA,KAOK,EACd,OAAO,KAAK,GAND,MAAM,CA6GlB;AAiBD;;;;;GAKG;AACH,wBAAgB,wBAAwB,IAF3B,IAAI,CAKhB;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,IAF7B,OAAO,CAInB;AAiGD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,6BAA6B,CAAC,MAA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AAC,CA2DpC;AAqBD;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAJ7B,MAI6B,EAAE,aAAa,AAHpD,CAEF,EAFU,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAGiC,QAelE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAJ5B,MAI4B,EAAE,QAAQ,EAHtC,MAGsC,EAAE,OAAO,AAFvD,CACF,EADU,MAEoD,UAsK9D;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,yBAAyB,CAAC,WAAW,EAH1C,MAG0C,GAFxC,MAAM,EAAE,CAoEpB"}
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
*
|
|
4
4
|
* For each component, resolves its module aliases (including the deno jsr
|
|
5
5
|
* specifier), records imported/exported modules as properties, attaches
|
|
6
|
-
* occurrence evidence, and
|
|
7
|
-
* package is used
|
|
6
|
+
* occurrence evidence, and promotes the component scope to "required" when the
|
|
7
|
+
* package is used. A package with no observed usage keeps the scope its
|
|
8
|
+
* manifest parser assigned: static import analysis cannot see packages loaded
|
|
9
|
+
* from configuration, bundler entrypoints, stylesheets, or plugins, so a
|
|
10
|
+
* missing import is not evidence that a package is optional.
|
|
8
11
|
*
|
|
9
12
|
* @param {Array<object>} pkgList Package components to enrich.
|
|
10
13
|
* @param {object} allImports Map of import specifier to usage evidence objects.
|