Scanned repository can make the --bom-audit gate pass and replace tool metadata
Description
Three gaps let the content of a scanned tree change the outcome of cdxgen's BOM audit, or the tool provenance it records, without running any code. A pull request that would fail a --bom-audit gate can make it pass, and a repository can write what metadata.tools says about the tools that cdxgen ran.
Details
- One workflow file hides all of them.
githubActionsParser.parse()inlib/inventory/ciParsers/githubActions.jsmerges the results of all workflow files in one loop withcomponents.push(...result.components)and has no per-file error handling. A single well-formed workflow that makes the parser throw, for example one large step list shared through a YAML anchor by many jobs, which overflows the spread, makesaddFormulationSection()discard the results of every workflow. The CI permission rules then have nothing to evaluate, and a secure-mode audit gate that failed with high-severity findings exits 0. - Profile from a config file.
applyAdvancedOptions()inlib/cli/cliOptions.jsexpands profiles after the command line has been merged with the config file from the working directory, and theml-tinyprofile setsbomAudit = falseunconditionally. A config file with"profile": "ml-tiny"therefore turns off the operator's--bom-auditwith no message, although"bom-audit": falsein the same file is correctly overruled. This needs cdxgen to be started inside the repository without--profile. - Plugin manifest in the working directory. On installs without the plugins package (for example
npm install -g @cdxgen/cdxgen --omit=optional),resolveCdxgenPlugins()inlib/inventory/plugins.jslooks forplugins-manifest.jsonrelative to the working directory, and the containment check inloadPluginManifest()accepts it. Its entries then replace themetadata.toolsentries of tools such as git and pnpm, including group, version, purl, bom-ref, hashes and external references.
Impact
Loss of integrity of audit results and BOM provenance in CI gates that scan contributions. Nothing is executed or disclosed.
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 from 12.2.0 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:
- one workflow file hides all of them: 12.2.0
ml-tinyprofile from a config file: 12.2.0- plugin manifest in the working directory: 12.4.0
Workarounds
- Start cdxgen from outside the checkout and pass the path, so that config files and
plugins-manifest.jsonin the repository are not read, and pass--profileexplicitly. - Install the optional plugins package.
- Check that the formulation section lists the expected workflows before trusting an audit pass.
Credit
These issues were found by Anthropic's OSS Scanner (scan cdxgen-20261108-009) and reported as ANT-2026-05EAXBFD, ANT-2026-NBOD6W8J, ANT-2026-AF1BQX3D.
References
- github.com/
cdxgen/ cdxgen/ security/ advisories/ GHSA-phj7-7j69-xmfh (earlier advisory about config files in a scanned repository) - github.com/
cdxgen/ cdxgen/ blob/ master/ SECURITY.md - github.com/
cdxgen/ cdxgen/ blob/ master/ docs/ THREAT_MODEL.md - Fixed in: github.com/
cdxgen/ cdxgen/ pull/ 4787