Skip to content

Drop dev dependency @cyclonedx/cyclonedx-npm - #1561

Merged
nscuro merged 1 commit into
DependencyTrack:mainfrom
ColorfulRhino:test-dep-update
Jun 4, 2026
Merged

nscuro merged 1 commit into
DependencyTrack:mainfrom
ColorfulRhino:test-dep-update

Conversation

@ColorfulRhino

@ColorfulRhino ColorfulRhino commented Jun 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

This updates the transitive dependency "libxmljs2" which before did no longer compile from source with Node >=22, breaking reproducable builds from source (e.g. nixpkgs).

This SBOM generator was superseded by "@cyclonedx/webpack-plugin", but was
never removed.

This also removes the transitive dependency "libxmljs2" which before did no
longer compile from source with Node >=22, breaking reproducable builds
from source (e.g. nixpkgs).

See NixOS/nixpkgs#515284 (comment)

Addressed Issue

n/a

Additional Details

n/a

Checklist

@owasp-dt-bot

owasp-dt-bot commented Jun 3, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@nscuro

nscuro commented Jun 3, 2026

Copy link
Copy Markdown
Member

Double-checking this, it looks like the dependency on @cyclonedx/cyclonedx-npm is dead code, since we actually use @cyclonedx/webpack-plugin to emit SBOMs. Can you try removing it entirely?

@nscuro nscuro added this to the 5.0 milestone Jun 3, 2026
@ColorfulRhino

Copy link
Copy Markdown
Contributor Author

Double-checking this, it looks like the dependency on @cyclonedx/cyclonedx-npm is dead code, since we actually use @cyclonedx/webpack-plugin to emit SBOMs. Can you try removing it entirely?

Done. It seems to build just fine without it. But not sure where/how it was used. I am not familiar with the codebase.

Maybe there are other dependencies that are no longer needed or at least could be updated? This would reduce the number of vulnerabilities and deprecation warnings from NPM. I am happy to assist.

@ColorfulRhino

Copy link
Copy Markdown
Contributor Author

Will need to update the PR title and commit message tomorrow if the removal is the solution.

@nscuro

nscuro commented Jun 3, 2026

Copy link
Copy Markdown
Member

Builds and runs fine with the dependency removed.

But not sure where/how it was used

It's an alternative SBOM generator for NPM. It was used before the Webpack plugin was adopted and apparently never removed. It is intended to be invoked directly, not used as a library. That's why nothing breaks when removed.

Maybe there are other dependencies that are no longer needed or at least could be updated?

I already did a sweep the other day which addressed various vulns: #1560

This SBOM generator was superseded by "@cyclonedx/webpack-plugin", but was
never removed.

This also removes the transitive dependency "libxmljs2" which before did no
longer compile from source with Node >=22, breaking reproducable builds
from source (e.g. nixpkgs).

Signed-off-by: ColorfulRhino <[email protected]>
@ColorfulRhino ColorfulRhino changed the title Bump @cyclonedx/cyclonedx-npm to 4.2.1 Drop dev dependency @cyclonedx/cyclonedx-npm Jun 4, 2026
@ColorfulRhino

Copy link
Copy Markdown
Contributor Author

It's an alternative SBOM generator for NPM. It was used before the Webpack plugin was adopted and apparently never removed. It is intended to be invoked directly, not used as a library. That's why nothing breaks when removed.

Sounds good, thanks for the explanation!

Maybe there are other dependencies that are no longer needed or at least could be updated?
I already did a sweep the other day which addressed various vulns: #1560

I will try to address some more vulnerabilities and see what I can do via npm update if that's alright.

The good thing is, with this PR alone we went from

142 vulnerabilities (15 low, 73 moderate, 42 high, 12 critical)

to

135 vulnerabilities (15 low, 72 moderate, 39 high, 9 critical)

I know you said the removed dependency was intended to be invoked directly, but still.

@nscuro
nscuro merged commit c841a50 into DependencyTrack:main Jun 4, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants