Creates CycloneDX Bill of Materials (BOM) for your projects from source and container images. Supports many languages and package managers. Integrate in your CI/CD pipeline with automatic submission to Dependency Track server. GPT: https://chatgpt.com/g/g-673bfeb4037481919be8a2cd1bf868d2-cdxgen
behaves differently when naming a project with the same name as an existing Python package and when not including the license scan.
For example, naming a local Python project after an existing Python package and running cdxgen without license scanning with the following pyproject.toml file:
[project]
name = "typing-extensions"
...
will give us the following component without license scanning:
I would say that it is problematic because it changes the component that the SBOM describes.
Then again, it is solved by not using a name already in use by a Python package BUT it can be abused if, for example, an attacker knows the name of local projects which companies produce SBOMs for and can manipulate the SBOMs component with false information by creating and publishing a Python package with the same name as that project.
@johennin, I will keep this issue open. While I do not agree that cdxgen must deal with dependency confusion attacks it could at least add more properties to describe the source file it started the analysis from.
During some internal testing, it was discovered that running cdxgen with license scanning such as:
FETCH_LICENCE=true cdxgen --type python --output sbom.json /path/to/project
behaves differently when naming a project with the same name as an existing Python package and when not including the license scan.
For example, naming a local Python project after an existing Python package and running cdxgen without license scanning with the following pyproject.toml file:
will give us the following component without license scanning:
and a different component with license scanning activated:
I would say that it is problematic because it changes the component that the SBOM describes.
Then again, it is solved by not using a name already in use by a Python package BUT it can be abused if, for example, an attacker knows the name of local projects which companies produce SBOMs for and can manipulate the SBOMs component with false information by creating and publishing a Python package with the same name as that project.
Thank you in advance!