@cdxgen/cdxgen 13.4.0 → 13.5.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 +7 -7
- package/bin/cdxgen-secure.js +15 -0
- package/bin/cdxgen.js +25 -5
- package/bin/evinse.js +5 -0
- package/bin/hbom.js +15 -7
- package/bin/repl.js +29 -0
- package/data/cbomosdb-queries.json +13 -1
- package/data/component-tags.json +8 -0
- package/data/queries-darwin.json +25 -1
- package/data/queries-win.json +19 -1
- package/data/queries.json +41 -0
- package/data/remediations.json +283 -1
- package/data/rules/cbom-security.yaml +235 -4
- package/data/rules/go-binaries.yaml +46 -0
- package/data/rules/golem-go.yaml +80 -0
- package/data/rules/hbom-compliance.yaml +40 -22
- package/data/rules/hbom-performance.yaml +7 -1
- package/data/rules/host-topology.yaml +1 -1
- package/data/rules/obom-runtime.yaml +31 -2
- package/data/rules/php-runtime.yaml +143 -0
- package/lib/audit/index.js +14 -0
- package/lib/cli/bomAssembly.js +28 -3
- package/lib/cli/cliOptions.js +110 -3
- package/lib/cli/index.js +73 -4
- package/lib/cli/jvmBom.js +126 -20
- package/lib/cli/managedBom.js +711 -71
- package/lib/cli/nativeBom.js +225 -28
- package/lib/core/env.js +30 -8
- package/lib/core/fs.js +28 -19
- package/lib/core/httpClient.js +74 -45
- package/lib/core/projectConfig.js +1 -0
- package/lib/core/projectTooling.js +97 -0
- package/lib/core/propertySanitizer.js +72 -0
- package/lib/ecosystems/golem.js +550 -6
- package/lib/ecosystems/gradleutils.js +30 -20
- package/lib/ecosystems/parsers-dotnet.js +117 -18
- package/lib/ecosystems/parsers-go.js +1090 -367
- package/lib/ecosystems/parsers-jvm.js +259 -17
- package/lib/ecosystems/parsers-misc.js +229 -44
- package/lib/ecosystems/parsers-python.js +11 -10
- package/lib/ecosystems/rubyutils.js +6 -3
- package/lib/ecosystems/rusi.js +10 -0
- package/lib/ecosystems/scalacliutils.js +2 -1
- package/lib/ecosystems/scalasem.js +3 -1
- package/lib/evinser/evinser.js +126 -18
- package/lib/evinser/swiftsem.js +68 -5
- package/lib/inventory/agentSkillSpec.js +17 -0
- package/lib/inventory/apkInstalledDb.js +243 -0
- package/lib/inventory/atomUtils.js +33 -0
- package/lib/inventory/auditCategories.js +3 -3
- package/lib/inventory/cacheDir.js +52 -9
- package/lib/inventory/certificates.js +2371 -0
- package/lib/inventory/communityAiConfigParser.js +4 -9
- package/lib/inventory/deps.js +6 -4
- package/lib/inventory/display.js +200 -3
- package/lib/inventory/dosai.js +500 -58
- package/lib/inventory/dynamic.js +45 -3
- package/lib/inventory/envcontext.js +168 -5
- package/lib/inventory/evidenceUtils.js +436 -23
- package/lib/inventory/formulationParsers.js +3 -2
- package/lib/inventory/goBuildInfo.js +140 -0
- package/lib/inventory/hbom.js +67 -7
- package/lib/inventory/hbomAnalysis.js +16 -0
- package/lib/inventory/hostTopology.js +21 -0
- package/lib/inventory/osPackagePurl.js +244 -0
- package/lib/inventory/osPackageResolver.js +89 -87
- package/lib/inventory/osinfo.js +79 -31
- package/lib/inventory/osqueryTransform.js +114 -5
- package/lib/inventory/phpBuildInfo.js +487 -0
- package/lib/inventory/phpHostProbe.js +641 -0
- package/lib/inventory/rootfsCerts.js +426 -0
- package/lib/inventory/source.js +207 -3
- package/lib/inventory/spdx.js +144 -0
- package/lib/inventory/traceRunner.js +5 -1
- package/lib/inventory/tracedCrypto.js +129 -0
- package/lib/managers/binary.js +529 -183
- package/lib/managers/docker.js +166 -12
- package/lib/parsers/email.js +277 -0
- package/lib/parsers/largeJson.js +34 -2
- package/lib/server/server.js +186 -1
- package/lib/stages/postgen/annotator.js +17 -1
- package/lib/stages/postgen/introspection/reflect.js +4 -1
- package/lib/stages/postgen/postgen.js +5 -5
- package/lib/stages/postgen/ruleEngine.js +58 -1
- package/lib/stages/postgen/specVersionCompat.js +30 -0
- package/lib/stages/pregen/pregen.js +117 -5
- package/lib/validator/bomValidator.js +26 -5
- package/lib/validator/generated/runtime.mjs +13 -0
- package/lib/validator/generated/validate-1.6.mjs +26 -7
- package/lib/validator/generated/validate-1.7.mjs +31 -12
- package/lib/validator/generated/validate-2.0.mjs +30 -11
- package/package.json +17 -17
- package/types/bin/cdxgen-secure.d.ts +3 -0
- package/types/bin/cdxgen-secure.d.ts.map +1 -0
- package/types/bin/repl.d.ts.map +1 -1
- package/types/lib/audit/index.d.ts.map +1 -1
- package/types/lib/cli/bomAssembly.d.ts +9 -2
- package/types/lib/cli/bomAssembly.d.ts.map +1 -1
- package/types/lib/cli/cliOptions.d.ts +43 -0
- package/types/lib/cli/cliOptions.d.ts.map +1 -1
- package/types/lib/cli/index.d.ts.map +1 -1
- package/types/lib/cli/jvmBom.d.ts +20 -0
- package/types/lib/cli/jvmBom.d.ts.map +1 -1
- package/types/lib/cli/managedBom.d.ts.map +1 -1
- package/types/lib/cli/nativeBom.d.ts.map +1 -1
- package/types/lib/core/env.d.ts +18 -2
- 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.map +1 -1
- package/types/lib/core/projectConfig.d.ts.map +1 -1
- package/types/lib/core/projectTooling.d.ts +41 -0
- package/types/lib/core/projectTooling.d.ts.map +1 -0
- package/types/lib/core/propertySanitizer.d.ts +26 -0
- package/types/lib/core/propertySanitizer.d.ts.map +1 -1
- package/types/lib/ecosystems/cppEvidence.d.ts +1 -1
- package/types/lib/ecosystems/golem.d.ts +81 -1
- package/types/lib/ecosystems/golem.d.ts.map +1 -1
- package/types/lib/ecosystems/gradleutils.d.ts +10 -8
- package/types/lib/ecosystems/gradleutils.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-dotnet.d.ts +40 -4
- package/types/lib/ecosystems/parsers-dotnet.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-go.d.ts +85 -13
- package/types/lib/ecosystems/parsers-go.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-jvm.d.ts +28 -2
- package/types/lib/ecosystems/parsers-jvm.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-misc.d.ts +18 -58
- package/types/lib/ecosystems/parsers-misc.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-python.d.ts +4 -3
- package/types/lib/ecosystems/parsers-python.d.ts.map +1 -1
- package/types/lib/ecosystems/pythonutils.d.ts +1 -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/scalacliutils.d.ts.map +1 -1
- package/types/lib/ecosystems/scalasem.d.ts.map +1 -1
- package/types/lib/evinser/evinser.d.ts +25 -0
- package/types/lib/evinser/evinser.d.ts.map +1 -1
- package/types/lib/evinser/swiftsem.d.ts +10 -0
- package/types/lib/evinser/swiftsem.d.ts.map +1 -1
- package/types/lib/inventory/agentSkillSpec.d.ts +13 -0
- package/types/lib/inventory/agentSkillSpec.d.ts.map +1 -0
- package/types/lib/inventory/apkInstalledDb.d.ts +42 -0
- package/types/lib/inventory/apkInstalledDb.d.ts.map +1 -0
- package/types/lib/inventory/atomUtils.d.ts +14 -0
- package/types/lib/inventory/atomUtils.d.ts.map +1 -1
- package/types/lib/inventory/cacheDir.d.ts +12 -4
- package/types/lib/inventory/cacheDir.d.ts.map +1 -1
- package/types/lib/inventory/certificates.d.ts +205 -0
- package/types/lib/inventory/certificates.d.ts.map +1 -0
- package/types/lib/inventory/communityAiConfigParser.d.ts.map +1 -1
- package/types/lib/inventory/deps.d.ts +2 -1
- package/types/lib/inventory/deps.d.ts.map +1 -1
- package/types/lib/inventory/display.d.ts +18 -0
- package/types/lib/inventory/display.d.ts.map +1 -1
- package/types/lib/inventory/dosai.d.ts +145 -6
- package/types/lib/inventory/dosai.d.ts.map +1 -1
- package/types/lib/inventory/dynamic.d.ts +6 -1
- package/types/lib/inventory/dynamic.d.ts.map +1 -1
- package/types/lib/inventory/envcontext.d.ts +40 -2
- package/types/lib/inventory/envcontext.d.ts.map +1 -1
- package/types/lib/inventory/evidenceUtils.d.ts +29 -10
- package/types/lib/inventory/evidenceUtils.d.ts.map +1 -1
- package/types/lib/inventory/formulationParsers.d.ts.map +1 -1
- package/types/lib/inventory/goBuildInfo.d.ts +10 -0
- package/types/lib/inventory/goBuildInfo.d.ts.map +1 -0
- package/types/lib/inventory/hbom.d.ts.map +1 -1
- package/types/lib/inventory/hbomAnalysis.d.ts +10 -0
- package/types/lib/inventory/hbomAnalysis.d.ts.map +1 -1
- package/types/lib/inventory/hostTopology.d.ts.map +1 -1
- package/types/lib/inventory/osPackagePurl.d.ts +99 -0
- package/types/lib/inventory/osPackagePurl.d.ts.map +1 -0
- package/types/lib/inventory/osPackageResolver.d.ts +6 -2
- package/types/lib/inventory/osPackageResolver.d.ts.map +1 -1
- package/types/lib/inventory/osinfo.d.ts +31 -6
- package/types/lib/inventory/osinfo.d.ts.map +1 -1
- package/types/lib/inventory/osqueryTransform.d.ts +51 -0
- package/types/lib/inventory/osqueryTransform.d.ts.map +1 -1
- package/types/lib/inventory/phpBuildInfo.d.ts +142 -0
- package/types/lib/inventory/phpBuildInfo.d.ts.map +1 -0
- package/types/lib/inventory/phpHostProbe.d.ts +35 -0
- package/types/lib/inventory/phpHostProbe.d.ts.map +1 -0
- package/types/lib/inventory/rootfsCerts.d.ts +27 -0
- package/types/lib/inventory/rootfsCerts.d.ts.map +1 -0
- package/types/lib/inventory/source.d.ts +28 -0
- package/types/lib/inventory/source.d.ts.map +1 -1
- package/types/lib/inventory/spdx.d.ts +15 -0
- package/types/lib/inventory/spdx.d.ts.map +1 -1
- package/types/lib/inventory/traceRunner.d.ts +4 -1
- package/types/lib/inventory/traceRunner.d.ts.map +1 -1
- package/types/lib/inventory/tracedCrypto.d.ts +22 -0
- package/types/lib/inventory/tracedCrypto.d.ts.map +1 -1
- package/types/lib/managers/binary.d.ts +10 -0
- package/types/lib/managers/binary.d.ts.map +1 -1
- package/types/lib/managers/docker.d.ts +12 -0
- package/types/lib/managers/docker.d.ts.map +1 -1
- package/types/lib/parsers/email.d.ts +19 -0
- package/types/lib/parsers/email.d.ts.map +1 -0
- package/types/lib/parsers/largeJson.d.ts +13 -0
- package/types/lib/parsers/largeJson.d.ts.map +1 -1
- package/types/lib/server/server.d.ts +8 -0
- package/types/lib/server/server.d.ts.map +1 -1
- package/types/lib/stages/postgen/annotator.d.ts.map +1 -1
- package/types/lib/stages/postgen/introspection/reflect.d.ts.map +1 -1
- package/types/lib/stages/postgen/ruleEngine.d.ts +7 -4
- package/types/lib/stages/postgen/ruleEngine.d.ts.map +1 -1
- package/types/lib/stages/postgen/specVersionCompat.d.ts.map +1 -1
- package/types/lib/stages/pregen/pregen.d.ts +14 -1
- package/types/lib/stages/pregen/pregen.d.ts.map +1 -1
- package/types/lib/validator/bomValidator.d.ts.map +1 -1
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ cdxgen is a CLI tool, library, [REPL](./ADVANCED.md), and server to create, vali
|
|
|
16
16
|
|
|
17
17
|
Supported BOM formats:
|
|
18
18
|
|
|
19
|
-
- Hardware (HBOM) - For supported live hosts such as Apple Silicon macOS and
|
|
19
|
+
- Hardware (HBOM) - For supported live hosts such as Apple Silicon macOS, Linux amd64/arm64, and Windows amd64/arm64 systems.
|
|
20
20
|
- Software (SBOM) - For many languages and container images.
|
|
21
21
|
- Cryptography (CBOM) - For Java keystores and certificates, plus JavaScript and TypeScript source-level algorithm inventory.
|
|
22
22
|
- Operations (OBOM) - For Linux container images and VMs running Linux or Windows operating systems.
|
|
@@ -175,7 +175,7 @@ Regardless of how you install, the following commands are available:
|
|
|
175
175
|
| `obom` | Alias for `cdxgen -t os` | yes |
|
|
176
176
|
| `saasbom` | Alias for SaaSBOM-oriented `cdxgen` defaults | yes |
|
|
177
177
|
| `spdxgen` | Alias for `cdxgen --format spdx` | use `cdxgen` |
|
|
178
|
-
| `cdxgen-secure` |
|
|
178
|
+
| `cdxgen-secure` | `cdxgen` in secure mode, with dependency installation always off | use `cdxgen` |
|
|
179
179
|
|
|
180
180
|
Standalone GitHub release binaries are published for `cdxgen`, `cdxgen-slim`, `aibom`, `cbom`, `obom`, `saasbom`, `hbom`, `hbom-slim`, `cdx-audit`, `cdx-convert`, `cdx-sign`, `cdx-validate`, `cdx-verify`, and `tracebom`.
|
|
181
181
|
|
|
@@ -187,7 +187,7 @@ The `cbom` and `saasbom` release binaries bundle the Atom analysis stack (`@appt
|
|
|
187
187
|
|
|
188
188
|
For AI-heavy repositories, cdxgen also supports an AI-BOM workflow via the `aibom` command or the `-t ai` project type aliases (`ai`, `aibom`, `ai-bom`). This emits AI service/model evidence and pairs naturally with the `ai-bom` BOM-audit category alias for governance, security, performance, AI-agent, and MCP findings.
|
|
189
189
|
|
|
190
|
-
For host inventories, `hbom --include-runtime` produces a merged HBOM + OBOM view with strict topology links such as interface-name, driver-module, storage/runtime, and explicit secure-boot trust matches, plus a `host-topology` BOM audit pack for higher-confidence host findings. When the live hardware collector reports missing utilities or permission-sensitive enrichments, use `hbom diagnostics` (or inspect the derived `cdx:hbom:analysis:*` summary properties) before deciding whether a rerun with `--privileged` is justified.
|
|
190
|
+
For host inventories, `hbom --include-runtime` produces a merged HBOM + OBOM view with strict topology links such as interface-name, driver-module, storage/runtime (including Windows drive letters), and explicit secure-boot trust matches, plus a `host-topology` BOM audit pack for higher-confidence host findings. When the live hardware collector reports missing utilities or permission-sensitive enrichments, use `hbom diagnostics` (or inspect the derived `cdx:hbom:analysis:*` summary properties) before deciding whether a rerun with `--privileged` is justified. On Windows, `--privileged` only helps from an already-elevated session, and a non-administrator over SSH or WinRM is denied every WMI query; see [HBOM permissions](docs/PERMISSIONS.md#hbom-permissions).
|
|
191
191
|
|
|
192
192
|
### Standalone executables (recommended)
|
|
193
193
|
|
|
@@ -216,7 +216,7 @@ Common asset names:
|
|
|
216
216
|
#### Linux
|
|
217
217
|
|
|
218
218
|
```bash
|
|
219
|
-
VERSION="v13.
|
|
219
|
+
VERSION="v13.5.0"
|
|
220
220
|
ASSET="cdx-audit-linux-amd64"
|
|
221
221
|
BASE_URL="https://github.com/cdxgen/cdxgen/releases/download/${VERSION}"
|
|
222
222
|
|
|
@@ -230,7 +230,7 @@ chmod +x "${ASSET}"
|
|
|
230
230
|
#### macOS
|
|
231
231
|
|
|
232
232
|
```bash
|
|
233
|
-
VERSION="v13.
|
|
233
|
+
VERSION="v13.5.0"
|
|
234
234
|
ASSET="cdx-audit-darwin-arm64"
|
|
235
235
|
BASE_URL="https://github.com/cdxgen/cdxgen/releases/download/${VERSION}"
|
|
236
236
|
|
|
@@ -244,7 +244,7 @@ chmod +x "${ASSET}"
|
|
|
244
244
|
#### Windows (PowerShell)
|
|
245
245
|
|
|
246
246
|
```powershell
|
|
247
|
-
$Version = "v13.
|
|
247
|
+
$Version = "v13.5.0"
|
|
248
248
|
$Asset = "cdx-audit-windows-amd64.exe"
|
|
249
249
|
$BaseUrl = "https://github.com/cdxgen/cdxgen/releases/download/$Version"
|
|
250
250
|
|
|
@@ -269,7 +269,7 @@ steps:
|
|
|
269
269
|
env:
|
|
270
270
|
GH_TOKEN: ${{ github.token }}
|
|
271
271
|
run: |
|
|
272
|
-
gh release download v13.
|
|
272
|
+
gh release download v13.5.0 \
|
|
273
273
|
--repo cdxgen/cdxgen \
|
|
274
274
|
--pattern 'cdx-audit-linux-amd64' \
|
|
275
275
|
--pattern 'cdx-audit-linux-amd64.sha256'
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// cdxgen-secure: cdxgen in secure mode.
|
|
3
|
+
//
|
|
4
|
+
// This is an entry point of its own rather than a second name for
|
|
5
|
+
// bin/cdxgen.js. cdxgen recognised the command from the script path in
|
|
6
|
+
// process.argv[1], but bun reports the real file behind a symlink there and
|
|
7
|
+
// the npm shims on Windows always name bin/cdxgen.js, so in both cases a
|
|
8
|
+
// `cdxgen-secure` that pointed at bin/cdxgen.js ran as plain cdxgen. Turning
|
|
9
|
+
// secure mode on here, before any cdxgen module loads, also means the modules
|
|
10
|
+
// that read CDXGEN_SECURE_MODE once at import see it.
|
|
11
|
+
import process from "node:process";
|
|
12
|
+
|
|
13
|
+
process.env.CDXGEN_SECURE_MODE = "true";
|
|
14
|
+
|
|
15
|
+
await import("./cdxgen.js");
|
package/bin/cdxgen.js
CHANGED
|
@@ -4,7 +4,6 @@ import crypto from "node:crypto";
|
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import http from "node:http";
|
|
6
6
|
import https from "node:https";
|
|
7
|
-
import { tmpdir } from "node:os";
|
|
8
7
|
import {
|
|
9
8
|
basename,
|
|
10
9
|
dirname,
|
|
@@ -22,6 +21,7 @@ import { hideBin } from "yargs/helpers";
|
|
|
22
21
|
import { getExactAiInventoryType } from "../lib/cli/bomAssembly.js";
|
|
23
22
|
import {
|
|
24
23
|
applyAdvancedOptions as applyAdvancedOptionsImpl,
|
|
24
|
+
applyOperatorToolingChoice,
|
|
25
25
|
buildOptionsFromArgs,
|
|
26
26
|
isUserProvided,
|
|
27
27
|
validateSpecVersion,
|
|
@@ -39,6 +39,7 @@ import {
|
|
|
39
39
|
PROJECT_CONFIG_FILENAMES,
|
|
40
40
|
sanitizeProjectConfig,
|
|
41
41
|
} from "../lib/core/projectConfig.js";
|
|
42
|
+
import { isSecureModeActive } from "../lib/core/projectTooling.js";
|
|
42
43
|
import {
|
|
43
44
|
ui as defaultUi,
|
|
44
45
|
installConsoleShim,
|
|
@@ -103,6 +104,7 @@ import {
|
|
|
103
104
|
printSummary,
|
|
104
105
|
printTable,
|
|
105
106
|
} from "../lib/inventory/display.js";
|
|
107
|
+
import { runsEvidenceAnalysis } from "../lib/inventory/dosai.js";
|
|
106
108
|
import {
|
|
107
109
|
ensureNoMixedHbomProjectTypes,
|
|
108
110
|
ensureSupportedHbomSpecVersion,
|
|
@@ -138,6 +140,11 @@ import { prepareEnv } from "../lib/stages/pregen/pregen.js";
|
|
|
138
140
|
import { validateSpdx } from "../lib/validator/bomValidator.js";
|
|
139
141
|
import { validateGeneratedBom } from "../lib/validator/index.js";
|
|
140
142
|
|
|
143
|
+
// The environment as the operator launched cdxgen. The CLI later copies some
|
|
144
|
+
// parsed options into the environment (--introspect becomes
|
|
145
|
+
// CDXGEN_INTROSPECT), so the operator's own choices are read from this copy.
|
|
146
|
+
const launchEnv = { ...process.env };
|
|
147
|
+
|
|
141
148
|
// Support for config files. The config file lives in the directory under
|
|
142
149
|
// analysis, so it carries that directory's trust level; see
|
|
143
150
|
// sanitizeProjectConfig for the boundary this applies.
|
|
@@ -1127,8 +1134,10 @@ let autoLedgerSidecar;
|
|
|
1127
1134
|
if (options.introspect) {
|
|
1128
1135
|
process.env.CDXGEN_INTROSPECT = "true";
|
|
1129
1136
|
if (!isDryRun && !readEnvironmentVariable("CDXGEN_INTROSPECT_LEDGER")) {
|
|
1137
|
+
// The temp directory, not the OS one: under the permission model it is
|
|
1138
|
+
// the directory cdxgen is granted writes to.
|
|
1130
1139
|
autoLedgerSidecar = join(
|
|
1131
|
-
|
|
1140
|
+
getTmpDir(),
|
|
1132
1141
|
`cdxgen-introspect-ledger-${process.pid}.jsonl`,
|
|
1133
1142
|
);
|
|
1134
1143
|
process.env.CDXGEN_INTROSPECT_LEDGER = autoLedgerSidecar;
|
|
@@ -1266,7 +1275,15 @@ if (options.lifecycle) {
|
|
|
1266
1275
|
}
|
|
1267
1276
|
const isHbomOnlyInvocation = isHbomOnlyProjectTypes(options.projectType);
|
|
1268
1277
|
const advancedWarnings = applyAdvancedOptionsImpl(options, {
|
|
1269
|
-
isSecureMode,
|
|
1278
|
+
isSecureMode: isSecureModeActive(),
|
|
1279
|
+
});
|
|
1280
|
+
// The config file comes from the working directory, usually the scanned
|
|
1281
|
+
// project, so whether the project's own code may run stays the operator's
|
|
1282
|
+
// choice from the command line and environment.
|
|
1283
|
+
applyOperatorToolingChoice(options, {
|
|
1284
|
+
env: launchEnv,
|
|
1285
|
+
isSecureMode: isSecureModeActive(),
|
|
1286
|
+
projectConfig: config,
|
|
1270
1287
|
});
|
|
1271
1288
|
if (options?.technique && Array.isArray(options.technique)) {
|
|
1272
1289
|
if (options.technique.length === 1) {
|
|
@@ -2128,7 +2145,7 @@ const writeCycloneDxOutput = (jsonFile, bomJson, options) => {
|
|
|
2128
2145
|
}
|
|
2129
2146
|
}
|
|
2130
2147
|
let internalCycloneDxInputPath = outputPlan.outputs.cyclonedx;
|
|
2131
|
-
if ((options
|
|
2148
|
+
if (runsEvidenceAnalysis(options) && bomNSData?.bomJson) {
|
|
2132
2149
|
if (!internalCycloneDxInputPath) {
|
|
2133
2150
|
internalCycloneDxInputPath = join(
|
|
2134
2151
|
getTmpDir(),
|
|
@@ -2151,7 +2168,10 @@ const writeCycloneDxOutput = (jsonFile, bomJson, options) => {
|
|
|
2151
2168
|
}
|
|
2152
2169
|
}
|
|
2153
2170
|
// Evidence generation
|
|
2154
|
-
|
|
2171
|
+
// The same helper decides in createCsharpBom whether the dosai methods
|
|
2172
|
+
// report may be trimmed: --include-crypto alone runs evinse too, so testing
|
|
2173
|
+
// options.evidence alone here would trim a report this scan needs full.
|
|
2174
|
+
if (runsEvidenceAnalysis(options)) {
|
|
2155
2175
|
if (isDryRun) {
|
|
2156
2176
|
recordActivity({
|
|
2157
2177
|
kind: "write",
|
package/bin/evinse.js
CHANGED
|
@@ -226,6 +226,11 @@ const args = yargs(hideBin(process.argv))
|
|
|
226
226
|
default: false,
|
|
227
227
|
type: "boolean",
|
|
228
228
|
})
|
|
229
|
+
.option("install-deps", {
|
|
230
|
+
description:
|
|
231
|
+
"Let evinse run the project's own build tools, such as Maven and SwiftPM, to collect evidence. On by default, and off in secure mode. Pass --no-install-deps for projects you do not trust.",
|
|
232
|
+
type: "boolean",
|
|
233
|
+
})
|
|
229
234
|
.option("with-deep-jar-collector", {
|
|
230
235
|
description:
|
|
231
236
|
"Enable collection of all jars from maven cache directory. Useful to improve the recall for callstack evidence.",
|
package/bin/hbom.js
CHANGED
|
@@ -26,7 +26,10 @@ import {
|
|
|
26
26
|
ensureSupportedHbomSpecVersion,
|
|
27
27
|
hasHbomProjectType,
|
|
28
28
|
} from "../lib/inventory/hbom.js";
|
|
29
|
-
import {
|
|
29
|
+
import {
|
|
30
|
+
getHbomPrivilegeGuidance,
|
|
31
|
+
getHbomSummary,
|
|
32
|
+
} from "../lib/inventory/hbomAnalysis.js";
|
|
30
33
|
import {
|
|
31
34
|
importProtobomModule,
|
|
32
35
|
isProtoBomPath,
|
|
@@ -130,12 +133,13 @@ const args = _yargs
|
|
|
130
133
|
})
|
|
131
134
|
.option("privileged", {
|
|
132
135
|
description:
|
|
133
|
-
"Enable privileged Linux enrichment and non-interactive sudo retries for
|
|
136
|
+
"Enable privileged enrichment for documented permission-sensitive sources. Linux: privileged enrichment and non-interactive sudo retries. Windows: the TPM, BitLocker, storage-reliability and Secure Boot batch, which only an already-elevated (Run as administrator) session can read; HBOM never prompts for UAC and records permission-denied diagnostics otherwise. No effect on macOS.",
|
|
134
137
|
type: "boolean",
|
|
135
138
|
default: false,
|
|
136
139
|
})
|
|
137
140
|
.option("plist-enrichment", {
|
|
138
|
-
description:
|
|
141
|
+
description:
|
|
142
|
+
"Enable additional plist-based enrichment. Darwin only; ignored on Linux and Windows.",
|
|
139
143
|
type: "boolean",
|
|
140
144
|
default: false,
|
|
141
145
|
})
|
|
@@ -172,7 +176,10 @@ const args = _yargs
|
|
|
172
176
|
["$0", "Generate an HBOM file for the current host"],
|
|
173
177
|
["$0 -p", "Print the generated HBOM to stdout"],
|
|
174
178
|
["$0 --platform linux --arch amd64", "Override target selection"],
|
|
175
|
-
[
|
|
179
|
+
[
|
|
180
|
+
"$0 --privileged --pretty",
|
|
181
|
+
"Enable privileged enrichment: sudo retries on Linux, the elevated-only batch on Windows (run from an administrator prompt)",
|
|
182
|
+
],
|
|
176
183
|
[
|
|
177
184
|
"$0 diagnostics",
|
|
178
185
|
"Run a live HBOM diagnostic pass and summarize missing commands or permission-sensitive enrichments",
|
|
@@ -226,6 +233,9 @@ const options = {
|
|
|
226
233
|
arch: args.arch,
|
|
227
234
|
command: selectedCommand,
|
|
228
235
|
commandName: hbomCommandName,
|
|
236
|
+
// yargs turns `--no-command-enrichment` into `commandEnrichment: false` and
|
|
237
|
+
// leaves `noCommandEnrichment` at its default, so forward both spellings.
|
|
238
|
+
commandEnrichment: args.commandEnrichment,
|
|
229
239
|
dryRun: args.dryRun,
|
|
230
240
|
input: args.input ? resolve(args.input) : undefined,
|
|
231
241
|
noCommandEnrichment: args.noCommandEnrichment,
|
|
@@ -420,9 +430,7 @@ function printHbomDiagnosticsReport(bomJson) {
|
|
|
420
430
|
}
|
|
421
431
|
|
|
422
432
|
if (hbomSummary.requiresPrivilegedEnrichment) {
|
|
423
|
-
console.log(
|
|
424
|
-
"\nSome Linux enrichments can likely succeed only with --privileged and a target environment that allows non-interactive sudo.",
|
|
425
|
-
);
|
|
433
|
+
console.log(`\n${getHbomPrivilegeGuidance(hbomSummary.platform)}`);
|
|
426
434
|
}
|
|
427
435
|
}
|
|
428
436
|
|
package/bin/repl.js
CHANGED
|
@@ -25,6 +25,8 @@ import {
|
|
|
25
25
|
printAiBomPedigree,
|
|
26
26
|
printAiBomVariants,
|
|
27
27
|
printCallStack,
|
|
28
|
+
printCertificateChain,
|
|
29
|
+
printCertificatesTable,
|
|
28
30
|
printDependencyTree,
|
|
29
31
|
printFormulation,
|
|
30
32
|
printOccurrences,
|
|
@@ -1224,6 +1226,32 @@ cdxgenRepl.defineCommand("cryptos", {
|
|
|
1224
1226
|
this.displayPrompt();
|
|
1225
1227
|
},
|
|
1226
1228
|
});
|
|
1229
|
+
cdxgenRepl.defineCommand("certs", {
|
|
1230
|
+
help: "print the certificate components with role, issuer, expiry and SPKI prefix",
|
|
1231
|
+
action() {
|
|
1232
|
+
if (sbom) {
|
|
1233
|
+
printCertificatesTable(sbom);
|
|
1234
|
+
} else {
|
|
1235
|
+
console.log(
|
|
1236
|
+
"⚠ No BOM is loaded. Use .import command to import an existing BOM",
|
|
1237
|
+
);
|
|
1238
|
+
}
|
|
1239
|
+
this.displayPrompt();
|
|
1240
|
+
},
|
|
1241
|
+
});
|
|
1242
|
+
cdxgenRepl.defineCommand("certchain", {
|
|
1243
|
+
help: "show the issuer chain above a certificate and the certificates issued under it (.certchain <bom-ref|spki-prefix|cert-prefix>)",
|
|
1244
|
+
action(selector) {
|
|
1245
|
+
if (sbom) {
|
|
1246
|
+
printCertificateChain(sbom, selector);
|
|
1247
|
+
} else {
|
|
1248
|
+
console.log(
|
|
1249
|
+
"⚠ No BOM is loaded. Use .import command to import an existing BOM",
|
|
1250
|
+
);
|
|
1251
|
+
}
|
|
1252
|
+
this.displayPrompt();
|
|
1253
|
+
},
|
|
1254
|
+
});
|
|
1227
1255
|
cdxgenRepl.defineCommand("sourcecryptos", {
|
|
1228
1256
|
help: "show source-derived cryptographic assets detected from JS AST analysis",
|
|
1229
1257
|
action() {
|
|
@@ -2203,6 +2231,7 @@ cdxgenRepl.defineCommand("tagcloud", {
|
|
|
2203
2231
|
});
|
|
2204
2232
|
// Let's dynamically define more commands from the queries
|
|
2205
2233
|
[
|
|
2234
|
+
"apk_packages",
|
|
2206
2235
|
"apt_sources",
|
|
2207
2236
|
"behavioral_reverse_shell",
|
|
2208
2237
|
"certificates",
|
|
@@ -17,6 +17,12 @@
|
|
|
17
17
|
"purlType": "rpm",
|
|
18
18
|
"componentType": "library"
|
|
19
19
|
},
|
|
20
|
+
"pacman_packages": {
|
|
21
|
+
"query": "select * from pacman_packages where name like '%ssl%' OR name like '%crypto%';",
|
|
22
|
+
"description": "Retrieves the crypto and TLS libraries pacman installed on Arch Linux and the distros built on it.",
|
|
23
|
+
"purlType": "alpm",
|
|
24
|
+
"componentType": "library"
|
|
25
|
+
},
|
|
20
26
|
"python_packages": {
|
|
21
27
|
"query": "select * from python_packages where name like '%ssl%' OR name like '%crypto%';",
|
|
22
28
|
"description": "Python packages installed on system.",
|
|
@@ -32,7 +38,13 @@
|
|
|
32
38
|
"homebrew_packages": {
|
|
33
39
|
"query": "SELECT * FROM homebrew_packages where name like '%ssl%' OR name like '%crypto%';",
|
|
34
40
|
"description": "List all homebrew_packages.",
|
|
35
|
-
"purlType": "
|
|
41
|
+
"purlType": "brew",
|
|
42
|
+
"componentType": "library"
|
|
43
|
+
},
|
|
44
|
+
"macports_packages": {
|
|
45
|
+
"query": "select * from macports_packages where name like '%ssl%' OR name like '%crypto%';",
|
|
46
|
+
"description": "Retrieves the crypto and TLS libraries among the active MacPorts ports.",
|
|
47
|
+
"purlType": "macports",
|
|
36
48
|
"componentType": "library"
|
|
37
49
|
},
|
|
38
50
|
"authorized_keys": {
|
package/data/component-tags.json
CHANGED
|
@@ -164,6 +164,7 @@
|
|
|
164
164
|
"windows_programs",
|
|
165
165
|
"processor",
|
|
166
166
|
"services_snapshot",
|
|
167
|
+
"apk_packages",
|
|
167
168
|
"apt_sources",
|
|
168
169
|
"apt_ppa_sources",
|
|
169
170
|
"behavioral_reverse_shell",
|
|
@@ -180,6 +181,13 @@
|
|
|
180
181
|
"gatekeeper",
|
|
181
182
|
"vscode_extensions",
|
|
182
183
|
"homebrew_packages",
|
|
184
|
+
"macports_packages",
|
|
185
|
+
"pacman_packages",
|
|
186
|
+
"snap_packages",
|
|
187
|
+
"flatpak_packages",
|
|
188
|
+
"ai_agent_skills",
|
|
189
|
+
"gpu_info",
|
|
190
|
+
"chrome_search_engines",
|
|
183
191
|
"installed_applications",
|
|
184
192
|
"interface_addresses",
|
|
185
193
|
"kernel_info",
|
package/data/queries-darwin.json
CHANGED
|
@@ -29,6 +29,18 @@
|
|
|
29
29
|
"purlType": "vscode-extension",
|
|
30
30
|
"componentType": "application"
|
|
31
31
|
},
|
|
32
|
+
"chrome_search_engines": {
|
|
33
|
+
"query": "SELECT chrome_search_engines.*, chrome_search_engines.browser_type || '/' || chrome_search_engines.uid || '/' || chrome_search_engines.profile AS label FROM users JOIN chrome_search_engines USING (uid);",
|
|
34
|
+
"description": "The default search engine of every Chromium-based browser profile, for each user.",
|
|
35
|
+
"purlType": "swid",
|
|
36
|
+
"componentType": "data"
|
|
37
|
+
},
|
|
38
|
+
"ai_agent_skills": {
|
|
39
|
+
"query": "SELECT ai_agent_skills.*, hash.sha256 FROM users JOIN ai_agent_skills USING (uid) LEFT JOIN hash ON hash.path = ai_agent_skills.path UNION ALL SELECT ai_agent_skills.*, hash.sha256 FROM ai_agent_skills LEFT JOIN hash ON hash.path = ai_agent_skills.path WHERE ai_agent_skills.scope = 'system';",
|
|
40
|
+
"description": "AI agent skills (SKILL.md packages) installed for each user, through Claude Code plugins and system-wide, with the SHA-256 of each SKILL.md. Skills have no package identity, so they get no purl.",
|
|
41
|
+
"purlType": "generic",
|
|
42
|
+
"componentType": "file"
|
|
43
|
+
},
|
|
32
44
|
"apps": {
|
|
33
45
|
"query": "select * from apps;",
|
|
34
46
|
"description": "macOS applications installed in known search paths (e.g., /Applications).",
|
|
@@ -47,6 +59,12 @@
|
|
|
47
59
|
"purlType": "swid",
|
|
48
60
|
"componentType": "application"
|
|
49
61
|
},
|
|
62
|
+
"gpu_info": {
|
|
63
|
+
"query": "SELECT *, driver_version AS version, vendor AS publisher FROM gpu_info;",
|
|
64
|
+
"description": "GPU inventory with the vendor, model and installed driver version.",
|
|
65
|
+
"purlType": "swid",
|
|
66
|
+
"componentType": "device"
|
|
67
|
+
},
|
|
50
68
|
"certificates": {
|
|
51
69
|
"query": "SELECT * FROM certificates WHERE path != 'Other People';",
|
|
52
70
|
"description": "List all certificates in the trust store.",
|
|
@@ -74,7 +92,13 @@
|
|
|
74
92
|
"homebrew_packages": {
|
|
75
93
|
"query": "SELECT * FROM homebrew_packages;",
|
|
76
94
|
"description": "Homebrew formula and cask inventory including auto-update behavior.",
|
|
77
|
-
"purlType": "
|
|
95
|
+
"purlType": "brew",
|
|
96
|
+
"componentType": "application"
|
|
97
|
+
},
|
|
98
|
+
"macports_packages": {
|
|
99
|
+
"query": "select * from macports_packages;",
|
|
100
|
+
"description": "Retrieves the active ports of the MacPorts registry.",
|
|
101
|
+
"purlType": "macports",
|
|
78
102
|
"componentType": "application"
|
|
79
103
|
},
|
|
80
104
|
"npm_packages": {
|
package/data/queries-win.json
CHANGED
|
@@ -30,6 +30,18 @@
|
|
|
30
30
|
"purlType": "vscode-extension",
|
|
31
31
|
"componentType": "application"
|
|
32
32
|
},
|
|
33
|
+
"chrome_search_engines": {
|
|
34
|
+
"query": "SELECT chrome_search_engines.*, chrome_search_engines.browser_type || '/' || chrome_search_engines.uid || '/' || chrome_search_engines.profile AS label FROM users JOIN chrome_search_engines USING (uid);",
|
|
35
|
+
"description": "The default search engine of every Chromium-based browser profile, for each user.",
|
|
36
|
+
"purlType": "swid",
|
|
37
|
+
"componentType": "data"
|
|
38
|
+
},
|
|
39
|
+
"ai_agent_skills": {
|
|
40
|
+
"query": "SELECT ai_agent_skills.*, hash.sha256 FROM users JOIN ai_agent_skills USING (uid) LEFT JOIN hash ON hash.path = ai_agent_skills.path UNION ALL SELECT ai_agent_skills.*, hash.sha256 FROM ai_agent_skills LEFT JOIN hash ON hash.path = ai_agent_skills.path WHERE ai_agent_skills.scope = 'system';",
|
|
41
|
+
"description": "AI agent skills (SKILL.md packages) installed for each user, through Claude Code plugins and system-wide, with the SHA-256 of each SKILL.md. Skills have no package identity, so they get no purl.",
|
|
42
|
+
"purlType": "generic",
|
|
43
|
+
"componentType": "file"
|
|
44
|
+
},
|
|
33
45
|
"browser_plugins": {
|
|
34
46
|
"query": "select browser_plugins.* from users join browser_plugins using (uid);",
|
|
35
47
|
"description": "Retrieves the list of C/NPAPI browser plugin in the target system.",
|
|
@@ -88,6 +100,12 @@
|
|
|
88
100
|
"purlType": "swid",
|
|
89
101
|
"componentType": "data"
|
|
90
102
|
},
|
|
103
|
+
"gpu_info": {
|
|
104
|
+
"query": "SELECT *, driver_version AS version, vendor AS publisher FROM gpu_info;",
|
|
105
|
+
"description": "GPU inventory with the vendor, model and installed driver version.",
|
|
106
|
+
"purlType": "swid",
|
|
107
|
+
"componentType": "device"
|
|
108
|
+
},
|
|
91
109
|
"users_snapshot": {
|
|
92
110
|
"query": "SELECT username as name, uuid as version, description, directory, uid, type, gid FROM users;",
|
|
93
111
|
"description": "Local and domain-backed user account inventory on Windows endpoints.",
|
|
@@ -167,7 +185,7 @@
|
|
|
167
185
|
"componentType": "data"
|
|
168
186
|
},
|
|
169
187
|
"windows_bitlocker_info": {
|
|
170
|
-
"query": "SELECT device_id as name, drive_letter as version, encryption_method as description, persistent_volume_id, conversion_status, protection_status, percentage_encrypted, lock_status FROM bitlocker_info;",
|
|
188
|
+
"query": "SELECT device_id as name, drive_letter as version, encryption_method as description, persistent_volume_id, conversion_status, protection_status, percentage_encrypted, lock_status, protector_types FROM bitlocker_info;",
|
|
171
189
|
"description": "BitLocker protection and encryption state for local drives.",
|
|
172
190
|
"purlType": "swid",
|
|
173
191
|
"componentType": "data"
|
package/data/queries.json
CHANGED
|
@@ -30,6 +30,18 @@
|
|
|
30
30
|
"purlType": "vscode-extension",
|
|
31
31
|
"componentType": "application"
|
|
32
32
|
},
|
|
33
|
+
"chrome_search_engines": {
|
|
34
|
+
"query": "SELECT chrome_search_engines.*, chrome_search_engines.browser_type || '/' || chrome_search_engines.uid || '/' || chrome_search_engines.profile AS label FROM users JOIN chrome_search_engines USING (uid);",
|
|
35
|
+
"description": "The default search engine of every Chromium-based browser profile, for each user.",
|
|
36
|
+
"purlType": "swid",
|
|
37
|
+
"componentType": "data"
|
|
38
|
+
},
|
|
39
|
+
"ai_agent_skills": {
|
|
40
|
+
"query": "SELECT ai_agent_skills.*, hash.sha256 FROM users JOIN ai_agent_skills USING (uid) LEFT JOIN hash ON hash.path = ai_agent_skills.path UNION ALL SELECT ai_agent_skills.*, hash.sha256 FROM ai_agent_skills LEFT JOIN hash ON hash.path = ai_agent_skills.path WHERE ai_agent_skills.scope = 'system';",
|
|
41
|
+
"description": "AI agent skills (SKILL.md packages) installed for each user, through Claude Code plugins and system-wide, with the SHA-256 of each SKILL.md. Skills have no package identity, so they get no purl.",
|
|
42
|
+
"purlType": "generic",
|
|
43
|
+
"componentType": "file"
|
|
44
|
+
},
|
|
33
45
|
"deb_packages": {
|
|
34
46
|
"query": "select * from deb_packages;",
|
|
35
47
|
"description": "Retrieves all the installed DEB packages in the target Linux system.",
|
|
@@ -69,6 +81,29 @@
|
|
|
69
81
|
"description": "Retrieves all the installed RPM packages in the target Linux system.",
|
|
70
82
|
"purlType": "rpm"
|
|
71
83
|
},
|
|
84
|
+
"pacman_packages": {
|
|
85
|
+
"query": "select * from pacman_packages;",
|
|
86
|
+
"description": "Retrieves all the packages pacman installed on Arch Linux and the distros built on it.",
|
|
87
|
+
"purlType": "alpm"
|
|
88
|
+
},
|
|
89
|
+
"snap_packages": {
|
|
90
|
+
"query": "select * from snap_packages;",
|
|
91
|
+
"description": "Retrieves the installed snap packages at their current revision.",
|
|
92
|
+
"purlType": "snap",
|
|
93
|
+
"componentType": "application"
|
|
94
|
+
},
|
|
95
|
+
"flatpak_packages": {
|
|
96
|
+
"query": "select app_id as name, name as display_name, version, arch, branch, commit_hash, origin, runtime, type, installation, summary, description, license, homepage, developer_name from flatpak_packages;",
|
|
97
|
+
"description": "Retrieves the Flatpak applications and runtimes installed system-wide and for each user.",
|
|
98
|
+
"purlType": "flatpak",
|
|
99
|
+
"componentType": "application"
|
|
100
|
+
},
|
|
101
|
+
"homebrew_packages": {
|
|
102
|
+
"query": "SELECT * FROM homebrew_packages;",
|
|
103
|
+
"description": "Homebrew formula and cask inventory including auto-update behavior.",
|
|
104
|
+
"purlType": "brew",
|
|
105
|
+
"componentType": "application"
|
|
106
|
+
},
|
|
72
107
|
"python_packages": {
|
|
73
108
|
"query": "select * from python_packages;",
|
|
74
109
|
"description": "Python packages installed on system.",
|
|
@@ -85,6 +120,12 @@
|
|
|
85
120
|
"purlType": "swid",
|
|
86
121
|
"componentType": "data"
|
|
87
122
|
},
|
|
123
|
+
"gpu_info": {
|
|
124
|
+
"query": "SELECT *, driver_version AS version, vendor AS publisher FROM gpu_info;",
|
|
125
|
+
"description": "GPU inventory with the vendor, model and installed driver version.",
|
|
126
|
+
"purlType": "swid",
|
|
127
|
+
"componentType": "device"
|
|
128
|
+
},
|
|
88
129
|
"users_snapshot": {
|
|
89
130
|
"query": "SELECT username as name, uuid as version, description, directory, shell, uid, gid FROM users;",
|
|
90
131
|
"description": "Local user inventory for account and shell posture analysis.",
|