@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
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure reader for JSON compilation databases (`compile_commands.json`).
|
|
3
|
+
*
|
|
4
|
+
* Each entry names a translation unit (`file`), the directory its command ran
|
|
5
|
+
* in (`directory`) and the command, either as an argument list (`arguments`)
|
|
6
|
+
* or as one command line (`command`) split with the quoting rules of the
|
|
7
|
+
* shell it was written for. From the entries this module derives the
|
|
8
|
+
* compilers a build uses, the include directories each unit is compiled
|
|
9
|
+
* with, and the security-hardening options in effect.
|
|
10
|
+
*
|
|
11
|
+
* Layer 1: data in, data out. Locating and reading the file, and running a
|
|
12
|
+
* compiler to learn its version, belong to the callers.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Split a POSIX shell command line into words: single quotes keep everything
|
|
16
|
+
* literally, double quotes keep everything except `\"`, `\\`, `\$` and
|
|
17
|
+
* `` \` ``, and a backslash outside quotes escapes the next character.
|
|
18
|
+
*
|
|
19
|
+
* @param {string} command Command line
|
|
20
|
+
* @returns {string[]} Words
|
|
21
|
+
*/
|
|
22
|
+
export declare function splitPosixCommand(command: string): string[];
|
|
23
|
+
/**
|
|
24
|
+
* Split a Windows command line into words as the Microsoft C runtime does:
|
|
25
|
+
* double quotes group, `\"` is a literal quote, and backslashes are literal
|
|
26
|
+
* unless they precede a quote.
|
|
27
|
+
*
|
|
28
|
+
* @param {string} command Command line
|
|
29
|
+
* @returns {string[]} Words
|
|
30
|
+
*/
|
|
31
|
+
export declare function splitWindowsCommand(command: string): string[];
|
|
32
|
+
/**
|
|
33
|
+
* The compiler family a driver's name implies.
|
|
34
|
+
*
|
|
35
|
+
* @param {string} driver Driver path or name
|
|
36
|
+
* @returns {string} `msvc`, `clang-cl`, `clang`, `gcc`, `nvcc`, `icx`,
|
|
37
|
+
* `icc`, `nvhpc`, `edg` or `unknown`
|
|
38
|
+
*/
|
|
39
|
+
export declare function compilerFamilyOfName(driver: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* The argument list of a database entry, with any compiler launcher
|
|
42
|
+
* (`ccache`, `sccache`, ...) removed so the first argument is the compiler.
|
|
43
|
+
*
|
|
44
|
+
* @param {Object} entry Database entry
|
|
45
|
+
* @returns {string[]} Arguments
|
|
46
|
+
*/
|
|
47
|
+
export declare function entryArguments(entry: Object): string[];
|
|
48
|
+
/**
|
|
49
|
+
* The language a unit is compiled as: from `-x`/`/TP`/`/TC`, the driver
|
|
50
|
+
* name, then the file extension.
|
|
51
|
+
*
|
|
52
|
+
* @param {string[]} args Arguments, compiler first
|
|
53
|
+
* @param {string} file Translation unit
|
|
54
|
+
* @returns {string} `c`, `c++`, `cuda` or `unknown`
|
|
55
|
+
*/
|
|
56
|
+
export declare function unitLanguage(args: string[], file: string): string;
|
|
57
|
+
/**
|
|
58
|
+
* The include directories a unit is compiled with, as absolute paths.
|
|
59
|
+
*
|
|
60
|
+
* @param {string[]} args Arguments, compiler first
|
|
61
|
+
* @param {string} directory The entry's working directory
|
|
62
|
+
* @returns {string[]} Directories, in command order
|
|
63
|
+
*/
|
|
64
|
+
export declare function includeDirectories(args: string[], directory: string): string[];
|
|
65
|
+
/**
|
|
66
|
+
* The security-hardening settings an argument list turns on or off. Later
|
|
67
|
+
* options override earlier ones, as they do for the compiler.
|
|
68
|
+
*
|
|
69
|
+
* @param {string[]} args Compiler or linker arguments
|
|
70
|
+
* @returns {Map<string, string>} Setting name to value:
|
|
71
|
+
* `fortifySource` (level), `stackProtector` (`on`, `strong`, `all`,
|
|
72
|
+
* `off`), `pie` (`on`/`off`), `relro` (`partial`/`full`, from `-z relro`
|
|
73
|
+
* and `-z now`), `cfProtection` (`full`, `branch`, `return`, `none`),
|
|
74
|
+
* `sanitizers` (comma-separated), `glibcxxAssertions` (`on`),
|
|
75
|
+
* `stackClashProtection` (`on`/`off`), `msvcBufferSecurityCheck` (`/GS`
|
|
76
|
+
* `on`/`off`), `msvcControlFlowGuard` (`on`/`off`)
|
|
77
|
+
*/
|
|
78
|
+
export declare function hardeningSettings(args: string[]): Map<string, string>;
|
|
79
|
+
/**
|
|
80
|
+
* Summarise a compilation database.
|
|
81
|
+
*
|
|
82
|
+
* @param {Object[]} entries Parsed database (a JSON array)
|
|
83
|
+
* @returns {{
|
|
84
|
+
* units: number,
|
|
85
|
+
* compilers: Map<string, {driver: string, family: string, units: number, languages: Set<string>}>,
|
|
86
|
+
* includeDirectories: Set<string>,
|
|
87
|
+
* hardening: Map<string, Map<string, number>>,
|
|
88
|
+
* }} `compilers` is keyed by the driver as written; `hardening` maps each
|
|
89
|
+
* setting to the number of units per value
|
|
90
|
+
*/
|
|
91
|
+
export declare function summarizeCompileDatabase(entries: Object[]): {
|
|
92
|
+
units: number;
|
|
93
|
+
compilers: Map<string, {
|
|
94
|
+
driver: string;
|
|
95
|
+
family: string;
|
|
96
|
+
units: number;
|
|
97
|
+
languages: Set<string>;
|
|
98
|
+
}>;
|
|
99
|
+
includeDirectories: Set<string>;
|
|
100
|
+
hardening: Map<string, Map<string, number>>;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Read a compiler's family and version from what it prints for `--version`
|
|
104
|
+
* (or, for MSVC, on start-up).
|
|
105
|
+
*
|
|
106
|
+
* @param {string} banner Output of the version query
|
|
107
|
+
* @param {string} [nameFamily] Family implied by the driver's name
|
|
108
|
+
* @returns {{family: string, version: string|undefined, edgFrontEnd: boolean}}
|
|
109
|
+
*/
|
|
110
|
+
export declare function classifyCompilerBanner(banner: string, nameFamily?: string): {
|
|
111
|
+
family: string;
|
|
112
|
+
version: string | undefined;
|
|
113
|
+
edgFrontEnd: boolean;
|
|
114
|
+
};
|
|
115
|
+
//# sourceMappingURL=compileCommands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compileCommands.d.ts","sourceRoot":"","sources":["../../../lib/parsers/compileCommands.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAcH;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAH9B,MAG8B,GAF5B,MAAM,EAAE,CAoDpB;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAHhC,MAGgC,GAF9B,MAAM,EAAE,CA6CpB;AAQD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAJhC,MAIgC,GAH9B,MAAM,CAwClB;AAKD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAHzB,MAGyB,GAFvB,MAAM,EAAE,CA8BpB;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAJtB,MAAM,EAIgB,EAAE,IAAI,EAH5B,MAG4B,GAF1B,MAAM,CA6ClB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAJ5B,MAAM,EAIsB,EAAE,SAAS,EAHvC,MAGuC,GAFrC,MAAM,EAAE,CAwCpB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAT3B,MAAM,EASqB,GARzB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAgH/B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EATrC,MAAM,EAS+B,GARnC;IACR,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;KAAC,CAAC,CAAC;IAChG,kBAAkB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAChC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CAC7C,CA0CH;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAJlC,MAIkC,EAAE,UAAU,AAHtD,CACA,EADQ,MAG0D,GAFxD;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,GAAC,SAAS,CAAC;IAAC,WAAW,EAAE,OAAO,CAAA;CAAC,CA4B7E"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Strict JSON reading for signed documents.
|
|
3
|
+
*
|
|
4
|
+
* JSF signs the RFC 8785 (JCS) form of a document, and JCS is defined over
|
|
5
|
+
* I-JSON (RFC 7493) input. `JSON.parse` and lenient UTF-8 decoding accept
|
|
6
|
+
* things I-JSON rules out, and each lets two parsers read different values
|
|
7
|
+
* from the same signed bytes:
|
|
8
|
+
*
|
|
9
|
+
* - a member name repeated within one object, where `JSON.parse` keeps the last
|
|
10
|
+
* value and other parsers keep the first or refuse the document;
|
|
11
|
+
* - a number an IEEE 754 double cannot hold exactly, which JavaScript rounds
|
|
12
|
+
* while arbitrary-precision parsers keep every digit;
|
|
13
|
+
* - bytes that are not UTF-8, which lenient decoders turn into U+FFFD while
|
|
14
|
+
* others refuse them or read another encoding;
|
|
15
|
+
* - an unpaired UTF-16 surrogate escape, which some parsers keep and others
|
|
16
|
+
* replace.
|
|
17
|
+
*
|
|
18
|
+
* {@link parseStrictJson} rejects all of them, so the values a verifier checks
|
|
19
|
+
* are the values every consumer of the document reads.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Raised when JSON text is well-formed but breaks one of the rules above.
|
|
23
|
+
*/
|
|
24
|
+
export declare class StrictJsonError extends Error {
|
|
25
|
+
pointer: string;
|
|
26
|
+
/**
|
|
27
|
+
* @param {string} message - Description of the problem
|
|
28
|
+
* @param {string} pointer - RFC 6901 JSON Pointer to the offending member or value
|
|
29
|
+
*/
|
|
30
|
+
constructor(message: string, pointer: string);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Parses JSON the way `JSON.parse` does, but refuses bytes that are not UTF-8,
|
|
34
|
+
* repeated member names within an object, numbers that an IEEE 754 double
|
|
35
|
+
* cannot hold exactly, and unpaired UTF-16 surrogates.
|
|
36
|
+
*
|
|
37
|
+
* Pass the raw bytes of a document rather than text decoded elsewhere, so that
|
|
38
|
+
* invalid UTF-8 is detected instead of being replaced by U+FFFD.
|
|
39
|
+
*
|
|
40
|
+
* @param {string|Uint8Array} input - JSON text, or its UTF-8 bytes
|
|
41
|
+
* @returns {any} - The parsed value
|
|
42
|
+
* @throws {SyntaxError} When the text is not JSON
|
|
43
|
+
* @throws {StrictJsonError} When the input breaks one of the rules above
|
|
44
|
+
*/
|
|
45
|
+
export declare function parseStrictJson(input: string | Uint8Array): any;
|
|
46
|
+
//# sourceMappingURL=strictJson.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strictJson.d.ts","sourceRoot":"","sources":["../../../lib/parsers/strictJson.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;GAEG;AACH,qBAAa,eAAgB,SAAQ,KAAK;IAQjC,OAAO;IAPd;;;OAGG;IACH,YAAY,OAAO,EAHR,MAGQ,EAAE,OAAO,EAFjB,MAEiB,EAI3B;CACF;AAoQD;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAL1B,MAAM,GAAC,UAKmB,GAJxB,GAAG,CAkBf"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure extractor for the Terraform / OpenTofu configuration files in one
|
|
3
|
+
* directory: `*.tf`, `*.tf.json`, `*.tofu` and `*.tofu.json`.
|
|
4
|
+
*
|
|
5
|
+
* Only three things in a configuration matter for a BOM: the `module` blocks
|
|
6
|
+
* (name, `source`, `version`), the `required_providers` entries inside the
|
|
7
|
+
* `terraform` block, and `required_version`. Full HCL is a much larger
|
|
8
|
+
* grammar, so this module scans characters directly — comments, quoted
|
|
9
|
+
* strings with `${…}`/`%{…}` template sequences, heredocs, and
|
|
10
|
+
* bracket-depth-aware attribute boundaries — and skips everything else with
|
|
11
|
+
* balanced matching. It never throws and always terminates: every loop either
|
|
12
|
+
* consumes input or stops at EOF.
|
|
13
|
+
*
|
|
14
|
+
* An expression counts as a literal only when it is exactly one quoted string
|
|
15
|
+
* without template sequences; module inputs, provider configuration and
|
|
16
|
+
* backend settings are never captured, let alone emitted.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Parse one configuration file.
|
|
20
|
+
*
|
|
21
|
+
* @param {string} text File contents
|
|
22
|
+
* @param {Object} [options]
|
|
23
|
+
* @param {boolean} [options.json] Parse as the JSON variant (`.tf.json`)
|
|
24
|
+
* @returns {{ moduleCalls: object[], requiredProviders: object[], requiredVersions: string[], errors: string[] }}
|
|
25
|
+
*/
|
|
26
|
+
export declare function parseTerraformConfig(text: string, { json }?: {
|
|
27
|
+
json?: boolean;
|
|
28
|
+
}): {
|
|
29
|
+
moduleCalls: object[];
|
|
30
|
+
requiredProviders: object[];
|
|
31
|
+
requiredVersions: string[];
|
|
32
|
+
errors: string[];
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Whether a file is a Terraform override file: base name `override` or ending
|
|
36
|
+
* `_override`, with a `.tf`/`.tf.json`/`.tofu`/`.tofu.json` extension.
|
|
37
|
+
*
|
|
38
|
+
* @param {string} fileName File name (a bare name or a path)
|
|
39
|
+
* @returns {boolean}
|
|
40
|
+
*/
|
|
41
|
+
export declare function isTerraformOverrideFile(fileName: string): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Split one directory's configuration file names into primary and override
|
|
44
|
+
* files, applying OpenTofu's `.tofu` precedence when any `.tofu` file exists.
|
|
45
|
+
*
|
|
46
|
+
* @param {string[]} fileNames File names within a single directory
|
|
47
|
+
* @returns {{ primary: string[], overrides: string[] }} Sorted lists
|
|
48
|
+
*/
|
|
49
|
+
export declare function terraformConfigFileSet(fileNames: string[]): {
|
|
50
|
+
primary: string[];
|
|
51
|
+
overrides: string[];
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Merge parsed configuration files (primary files first, then overrides, each
|
|
55
|
+
* group in the given order).
|
|
56
|
+
*
|
|
57
|
+
* @param {{ file: string, override: boolean, result: object }[]} parsedFiles
|
|
58
|
+
* @returns {{ moduleCalls: object[], requiredProviders: object[], requiredVersions: string[], errors: string[] }}
|
|
59
|
+
*/
|
|
60
|
+
export declare function mergeTerraformConfigs(parsedFiles: {
|
|
61
|
+
file: string;
|
|
62
|
+
override: boolean;
|
|
63
|
+
result: object;
|
|
64
|
+
}[]): {
|
|
65
|
+
moduleCalls: object[];
|
|
66
|
+
requiredProviders: object[];
|
|
67
|
+
requiredVersions: string[];
|
|
68
|
+
errors: string[];
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=terraformConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terraformConfig.d.ts","sourceRoot":"","sources":["../../../lib/parsers/terraformConfig.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAL9B,MAK8B,EAAE,EAAE,IAAY,EAAE,AAJxD,CAEA,EADA;IAA0B,IAAI,AAA9B,CACA,EADQ,OAAO,CACf;CAE6D,GAFnD;IAAE,WAAW,EAAE,MAAM,EAAE,CAAC;IAAC,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAAC,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAYhH;AA+2BD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAHrC,MAGqC,GAFnC,OAAO,CAanB;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAHrC,MAAM,EAG+B,GAFnC;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAA;CAAE,CA8CtD;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAHtC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAGb,GAFpC;IAAE,WAAW,EAAE,MAAM,EAAE,CAAC;IAAC,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAAC,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CA2EhH"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure parser for Terraform / OpenTofu module and provider source addresses.
|
|
3
|
+
*
|
|
4
|
+
* A module `source` argument can be a local path, a registry shorthand, a git
|
|
5
|
+
* URL (forced with `git::` or detected from a github.com/gitlab.com/bitbucket.org
|
|
6
|
+
* host or an scp-style `git@host:path` string), a mercurial URL, or an archive
|
|
7
|
+
* URL over http/s3/gcs. The grammar is go-getter's: an optional `<getter>::`
|
|
8
|
+
* prefix, a base address, an optional `//subdirectory` suffix that starts after
|
|
9
|
+
* the `://` of a URL when one is present, and go-getter query parameters such
|
|
10
|
+
* as `ref`, `rev`, `checksum` and `archive`.
|
|
11
|
+
*
|
|
12
|
+
* Source strings are untrusted and can carry credentials (URL passwords, the
|
|
13
|
+
* git `sshkey` parameter, S3 keys), so this module never returns the raw input.
|
|
14
|
+
* The `url` field is rebuilt from parsed, sanitized pieces — userinfo, query
|
|
15
|
+
* and fragment removed — and `displaySource` is assembled from those pieces
|
|
16
|
+
* only. `credentialInSource` flags that a secret-shaped parameter was present
|
|
17
|
+
* without repeating it.
|
|
18
|
+
*
|
|
19
|
+
* Layer 1: no filesystem, no network, no purl construction. Callers turn the
|
|
20
|
+
* returned plain data into components and purls.
|
|
21
|
+
*/
|
|
22
|
+
export declare const TERRAFORM_REGISTRY_HOST = "registry.terraform.io";
|
|
23
|
+
export declare const OPENTOFU_REGISTRY_HOST = "registry.opentofu.org";
|
|
24
|
+
/**
|
|
25
|
+
* Parse a module `source` argument into a classified descriptor.
|
|
26
|
+
*
|
|
27
|
+
* @param {string} source Module source string as written in the configuration
|
|
28
|
+
* @param {Object} [options]
|
|
29
|
+
* @param {string} [options.defaultRegistryHost] Host for 3-segment registry
|
|
30
|
+
* shorthand (`registry.terraform.io` unless the caller knows better)
|
|
31
|
+
* @returns {null|Object} `null` for non-strings, otherwise a descriptor whose
|
|
32
|
+
* `kind` is `local`, `registry`, `git`, `hg`, `http`, `s3`, `gcs`, `file` or
|
|
33
|
+
* `unknown`
|
|
34
|
+
*/
|
|
35
|
+
export declare function parseModuleSource(source: string, { defaultRegistryHost }?: {
|
|
36
|
+
defaultRegistryHost?: string;
|
|
37
|
+
}): null | Object;
|
|
38
|
+
/**
|
|
39
|
+
* Parse a `required_providers` source string into a provider address.
|
|
40
|
+
*
|
|
41
|
+
* @param {string} source Provider source such as `hashicorp/aws` or
|
|
42
|
+
* `registry.terraform.io/hashicorp/aws`
|
|
43
|
+
* @param {Object} [options]
|
|
44
|
+
* @param {string} [options.defaultRegistryHost] Host for 2-segment shorthand
|
|
45
|
+
* @returns {null|Object} `{ host, namespace, type, address }` lower-cased,
|
|
46
|
+
* `{ builtin: true }` for `terraform.io/builtin/*`, or `null`
|
|
47
|
+
*/
|
|
48
|
+
export declare function parseProviderSource(source: string, { defaultRegistryHost }?: {
|
|
49
|
+
defaultRegistryHost?: string;
|
|
50
|
+
}): null | Object;
|
|
51
|
+
/**
|
|
52
|
+
* Classify a module `version` constraint by how tightly it pins.
|
|
53
|
+
*
|
|
54
|
+
* @param {string} constraint Constraint string from the configuration
|
|
55
|
+
* @returns {Object} `{ pinning: "exact", version }`, `{ pinning: "range" }` or
|
|
56
|
+
* `{ pinning: "none" }`
|
|
57
|
+
*/
|
|
58
|
+
export declare function classifyVersionConstraint(constraint: string): Object;
|
|
59
|
+
/**
|
|
60
|
+
* Classify a git/hg ref by how immutably it identifies a commit.
|
|
61
|
+
*
|
|
62
|
+
* @param {string} ref Ref value from `?ref=` or `?rev=`
|
|
63
|
+
* @returns {"sha"|"tag"|"branch"|"none"}
|
|
64
|
+
*/
|
|
65
|
+
export declare function classifyVcsRef(ref: string): "sha" | "tag" | "branch" | "none";
|
|
66
|
+
//# sourceMappingURL=terraformSource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terraformSource.d.ts","sourceRoot":"","sources":["../../../lib/parsers/terraformSource.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,eAAO,MAAM,uBAAuB,0BAA0B,CAAC;AAC/D,eAAO,MAAM,sBAAsB,0BAA0B,CAAC;AA8D9D;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAR7B,MAQ6B,EAAE,EAAE,mBAAmB,EAAE,AAP9D,CAGA,EAFA;IAAyB,mBAAmB,AAA5C,CAEA,EAFQ,MAAM,CAEd;CAImE,GAJzD,IAAI,GAAC,MAAM,CA8IvB;AA8TD;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAP/B,MAO+B,EAAE,EAAE,mBAAmB,EAAE,AALhE,CAEA,EADA;IAAyB,mBAAmB,AAA5C,CACA,EADQ,MAAM,CACd;CAGqE,GAH3D,IAAI,GAAC,MAAM,CA6CvB;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,UAAU,EAJzC,MAIyC,GAHvC,MAAM,CAmBlB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAHvB,MAGuB,GAFrB,KAAK,GAAC,KAAK,GAAC,QAAQ,GAAC,MAAM,CAgBvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../lib/server/server.js"],"names":[],"mappings":"AAWA,OAAO,EACL,iBAAiB,EAGlB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../lib/server/server.js"],"names":[],"mappings":"AAWA,OAAO,EACL,iBAAiB,EAGlB,MAAM,qBAAqB,CAAC;AAuE7B,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAc7B;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAJnB,MAAM,GAAC,MAAM,GAAC,KAAK,CAAC,MAAM,GAAC,MAAM,CAId,GAHjB,MAAM,GAAC,MAAM,GAAC,OAAO,GAAC,KAAK,CAAC,MAAM,GAAC,MAAM,GAAC,OAAO,CAAC,CAwC9D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EALvB,MAKuB,EAAE,IAAI,AAJrC,CACA,EADQ,MAIkC,EAAE,OAAO,AAHnD,CACA,EADQ,MAGgD,GAF9C,MAAM,CAmBlB;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAHvB,MAGuB,GAFrB,MAAM,CAiClB;AAiBD;;;;;GAKG;AACH,QAAA,MAAM,eAAe,iBAHV,OAAO,WAAW,EAAE,MAAM,KACxB,IAOZ,CAAC;AAwBF;;;;;;;;;GASG;AACH,QAAA,MAAM,KAAK,YAHA,MAAM,KACJ,IAyWZ,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgen.d.ts","sourceRoot":"","sources":["../../../../lib/stages/postgen/postgen.js"],"names":[],"mappings":"AAiiBA;;;;;;;;GAQG;AACH,wBAAsB,WAAW,CAAC,SAAS,EANhC,MAMgC,EAAE,OAAO,EALzC,MAKyC,EAAE,QAAQ,AAJ3D,CAEA,EAFQ,MAImD,GAFjD,OAAO,CAAC,MAAM,CAAC,CAsE3B;AAgHD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAL1B,MAK0B,EAAE,OAAO,EAJnC,MAImC,GAFjC,MAAM,
|
|
1
|
+
{"version":3,"file":"postgen.d.ts","sourceRoot":"","sources":["../../../../lib/stages/postgen/postgen.js"],"names":[],"mappings":"AAiiBA;;;;;;;;GAQG;AACH,wBAAsB,WAAW,CAAC,SAAS,EANhC,MAMgC,EAAE,OAAO,EALzC,MAKyC,EAAE,QAAQ,AAJ3D,CAEA,EAFQ,MAImD,GAFjD,OAAO,CAAC,MAAM,CAAC,CAsE3B;AAgHD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAL1B,MAK0B,EAAE,OAAO,EAJnC,MAImC,GAFjC,MAAM,CA2JlB;AAuCD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAL3B,MAK2B,EAAE,OAAO,EAJpC,MAIoC,GAFlC,MAAM,CAqClB;AAqHD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EALvC,MAKuC,EAAE,OAAO,EAJhD,MAIgD,GAF9C,MAAM,EAAE,CAmBpB;AAgBD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EALrC,MAKqC,EAAE,OAAO,EAJ9C,MAI8C,GAF5C,MAAM,CAiClB;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,OAAO,EALtB,MAKsB,EAAE,OAAO,EAJ/B,MAI+B,GAF7B,MAAM,CAoNlB;AAUD;;GAEG;AACH,wBAAgB,UAAU,CAAC,QAAQ,KAAA,QAUlC;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,IAFhB,IAAI,CAYhB;AAMD;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EALrB,MAKqB,EAAE,OAAO,EAJ9B,MAI8B,GAF5B,MAAM,CA2HlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specVersionCompat.d.ts","sourceRoot":"","sources":["../../../../lib/stages/postgen/specVersionCompat.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;
|
|
1
|
+
{"version":3,"file":"specVersionCompat.d.ts","sourceRoot":"","sources":["../../../../lib/stages/postgen/specVersionCompat.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAqTH;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAJrC,MAIqC,EAAE,OAAO,EAH9C,MAG8C,GAF5C,MAAM,CAclB;AAwSD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,EAJ1C,MAI0C,EAAE,OAAO,EAHnD,MAGmD,GAFjD,MAAM,CA6BlB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAL9B,MAK8B,EAAE,MAAM,AAJ9C,CACA,EADQ,MAI2C,EAAE,KAAK,AAH1D,CACA,EADQ,GAAG,CAAC,MAAM,CAGoD,GAF5D,GAAG,CAAC,MAAM,CAAC,CAkBvB;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,aAAa,EAJxC,MAIwC,EAAE,iBAAiB,EAH3D,MAG2D,GAFzD,MAAM,EAAE,CAOpB"}
|
|
@@ -50,12 +50,14 @@ export declare function validateGeneratedBom(bomJson: object): Promise<{
|
|
|
50
50
|
* @param {string} [options.publicKey] If set, verify the BOM signature with this public key.
|
|
51
51
|
* @param {string|Buffer} [options.secretKey] If set, verify an HMAC (HS*) BOM signature with this shared secret.
|
|
52
52
|
* @param {boolean} [options.nestedSignatures] Also verify component, service, and annotation signatures (default true), as cdx-verify does.
|
|
53
|
+
* Parse untrusted BOM text with `parseStrictJson()` from `lib/parsers/strictJson.js` when verifying signatures.
|
|
53
54
|
* @returns {{
|
|
54
55
|
* schemaValid: boolean,
|
|
55
56
|
* deepValid: boolean,
|
|
56
57
|
* validationErrors: Array<{ stage: string, message: string }>,
|
|
57
58
|
* signatureVerified: boolean | null,
|
|
58
59
|
* signatureDetails: object | null,
|
|
60
|
+
* signatureEntries: Array<{ index: number, algorithm: any, keyId: any, verified: boolean }> | null,
|
|
59
61
|
* findings: Array<object>,
|
|
60
62
|
* allFindings: Array<object>,
|
|
61
63
|
* benchmarks: Array<object>,
|
|
@@ -82,6 +84,12 @@ export declare function validateBomAdvanced(bomJson: object, options?: {
|
|
|
82
84
|
}>;
|
|
83
85
|
signatureVerified: boolean | null;
|
|
84
86
|
signatureDetails: object | null;
|
|
87
|
+
signatureEntries: Array<{
|
|
88
|
+
index: number;
|
|
89
|
+
algorithm: any;
|
|
90
|
+
keyId: any;
|
|
91
|
+
verified: boolean;
|
|
92
|
+
}> | null;
|
|
85
93
|
findings: Array<object>;
|
|
86
94
|
allFindings: Array<object>;
|
|
87
95
|
benchmarks: Array<object>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/validator/index.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAgBH;;;;;GAKG;AACH,QAAA,MAAM,cAAc,wBAAuD,CAAC;AA4D5E;;;;;;;;;;;;GAYG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAHvC,MAGuC,GAFrC,OAAO,CAAC;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,IAAI,CAAA;CAAE,CAAC,CAKrE;AAgDD
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/validator/index.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAgBH;;;;;GAKG;AACH,QAAA,MAAM,cAAc,wBAAuD,CAAC;AA4D5E;;;;;;;;;;;;GAYG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAHvC,MAGuC,GAFrC,OAAO,CAAC;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,IAAI,CAAA;CAAE,CAAC,CAKrE;AAgDD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,EA1BtC,MA0BsC,EAAE,OAAO,AAzBvD,CAYA,EAXA;IAA0B,MAAM,AAAhC,CACA,EADQ,OAAO,CACf;IAA0B,IAAI,AAA9B,CACA,EADQ,OAAO,CACf;IAAgC,UAAU,AAA1C,CACA,EADQ,KAAK,CAAC,MAAM,CAAC,CACrB;IAAgC,UAAU,AAA1C,CACA,EADQ,KAAK,CAAC,MAAM,CAAC,CACrB;IAAyB,WAAW,AAApC,CACA,EADQ,MAAM,CACd;IAA0B,aAAa,AAAvC,CACA,EADQ,OAAO,CACf;IAA0B,WAAW,AAArC,CACA,EADQ,OAAO,CACf;IAAyB,SAAS,AAAlC,CACA,EADQ,MAAM,CACd;IAAgC,SAAS,AAAzC,CACA,EADQ,MAAM,GAAC,MAAM,CACrB;IAA0B,gBAAgB,AAA1C,CAEA,EAFQ,OAAO,CAEf;CAa4D,GAblD;IACR,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,gBAAgB,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5D,iBAAiB,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,gBAAgB,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,GAAG,CAAC;QAAC,KAAK,EAAE,GAAG,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC,GAAG,IAAI,CAAC;IACjG,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAA;CAChB,CA2EH;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAPtB,MAOsB,EAAE,IAAI,GALpC;IAAsB,YAAY,AAAlC,CACA,EADQ,MAAM,CACd;IAAuB,MAAM,AAA7B,CACA,EADQ,OAAO,CACf;IAAuB,gBAAgB,AAAvC,CACA,EADQ,OAAO,CACf;CAEyC,GAF/B;IAAE,UAAU,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CA0B1D;AAED,OAAO,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../../lib/validator/reporters/json.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAJlB,MAIkB,EAAE,QAAQ,AAHpC,CACA,EADQ,MAGiC,GAF/B,MAAM,
|
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../../lib/validator/reporters/json.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAJlB,MAIkB,EAAE,QAAQ,AAHpC,CACA,EADQ,MAGiC,GAF/B,MAAM,CA8BlB"}
|