Credentials printed to logs and to the dry-run activity summary
Description
In four situations cdxgen writes secrets to its standard output or standard error at default verbosity. Anyone who can read a CI job log, a saved activity report or a server log, but not the repository or the job's secrets, then sees them. In one case the scanned repository chooses which of cdxgen's environment variables is printed.
Details
- Install failures. After a failed
npm install(and the yarn, pnpm and rush paths),createNodejsBom()inlib/cli/jsBom.jsprints the package manager's standard error without redaction;getPipFrozenTree()andcreateUVLock()inlib/ecosystems/pythonutils.jsdo the same for pip and uv. Tokens in dependency URL query strings, such as pre-signed storage URLs or GitLabprivate_token=values, and for pip values that pip expanded from the operator's environment, end up in the log. This needs installs on (the default outside secure mode) and an install failure whose message names the URL. - Dry-run activity summary.
safeSpawnSync()records the joined command line as the activity target without sanitizing it (buildCommandActivityDescriptor()inlib/core/fs.js), althoughdocs/PERMISSIONS.mdsays secret-bearing values are not shown there. With--dry-run, aMAVEN_CENTRAL_MIRRORURL that carries a user name and password is printed in thecljrow fordeps.ednprojects (clojureMirrorArgs()inlib/inventory/mavenCentralMirror.js), and with registry lookups on, network rows show passwords fromMAVEN_CENTRAL_MIRROR,MAVEN_CENTRAL_URLorNPM_URL. - Environment variables chosen by the repository. A
.mvn/maven.configcan name a settings file whose<localRepository>contains${env.NAME}.expandMavenProperties()inlib/inventory/jvmLocalRepos.jssubstitutes the real value of any variable, and the probed path is printed in the dry-run summary. This needs--dry-runwith--introspectand deep analysis,MAVEN_CACHE_DIRunset and secure mode off. - YAML warnings. The modules that use the
yamlpackage do not set itslogLevel, so warnings about unknown tags are written throughprocess.emitWarning(), which bypasses cdxgen's console handling. Each warning quotes up to 80 characters of the tagged line and the line above it, for example a CloudFormation!Substring with a password, or a token in agent front matter that cdxgen keeps out of the BOM. The CI file parsers that run with formulation reach this, as do the AI inventory readers.
Impact
Disclosure of tokens and passwords to readers of logs and activity reports, including the logs of pull-request pipelines and hosted scanners. The BOM itself is not affected by these paths.
Patches
Fixed in @cdxgen/cdxgen 13.8.0. Versions 13.0.0 through 13.7.0 of @cdxgen/cdxgen are affected. The 12.x line, published as @cyclonedx/cdxgen, is also affected by some of the issues above from 10.5.2 through 12.9.1, and no 12.x release contains the fix. Users of 12.x should move to @cdxgen/cdxgen 13.8.0 or apply the workarounds below. File paths in this advisory refer to the 13.x source tree; in 12.x most of the same functions are under lib/helpers/ or in lib/cli/index.js.
First affected release of each issue:
- install failure output: 10.5.2
- dry-run activity summary: 13.6.0 (not in 12.x)
- environment variables chosen by the repository: 13.4.0 (not in 12.x)
- YAML warnings: 12.2.0
Workarounds
- Keep credentials out of registry and mirror URLs; configure them through the package manager's own credential settings.
- Treat cdxgen output in CI as sensitive and restrict who can read it.
- Set
NODE_NO_WARNINGS=1for the cdxgen process to suppress the YAML warnings. - Do not combine
--dry-runwith credentialed mirror URLs, or with--introspectand deep analysis on untrusted repositories.
Credit
These issues were found by Anthropic's OSS Scanner (scan cdxgen-20261108-009) and reported as ANT-2026-XWS361CO, ANT-2026-4QYG8XQP, ANT-2026-KDJIGVFC, ANT-2026-CJHXKAG4.