Skip to main content
Menu
Advisories

Scanned repository can make the --bom-audit gate pass and replace tool metadata

GHSA-W6H8-55CH-5H4HPublished Updated GitHub

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() in lib/inventory/ciParsers/githubActions.js merges the results of all workflow files in one loop with components.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, makes addFormulationSection() 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() in lib/cli/cliOptions.js expands profiles after the command line has been merged with the config file from the working directory, and the ml-tiny profile sets bomAudit = false unconditionally. A config file with "profile": "ml-tiny" therefore turns off the operator's --bom-audit with no message, although "bom-audit": false in 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() in lib/inventory/plugins.js looks for plugins-manifest.json relative to the working directory, and the containment check in loadPluginManifest() accepts it. Its entries then replace the metadata.tools entries 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-tiny profile 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.json in the repository are not read, and pass --profile explicitly.
  • 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

Affected versions

References

GitHub · cdxgen/cdxgen