dependency-track: Error was: Input length = 1 while publishing bom.xml in Jenkins pipeline for node.js applications

Current Behavior

After an upgrade from 4.5.0 to 4.6.2 all Jenkins nodejs pipelines started to fail with the same error code. Error was: Input length = 1

[Pipeline] sh
+ case $- in
+ return
+ npx @cyclonedx/bom@3.10.6 --include-dev -o bom.xml
npx: installed 76 in 9.844s
[Pipeline] dependencyTrackPublisher
[DependencyTrack] Publishing artifact to Dependency-Track 
[DependencyTrack] An error occurred processing artifact "/home/jenkins/workspace/i-project_minimal-project_master/bom.xml". Error was: Input length = 1
[Pipeline] }
[Pipeline] // script
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: Uploading artifact failed
[Bitbucket] Notifying commit build result
[Bitbucket] Build result notified
Finished: FAILURE

So far my troubleshooting included:

  1. Downgrading OWASP Dependency Track Jenkins plugin from 4.2.0 to 4.0.0 since it was upgraded in the same time as pipelines started to fail.
  2. Checked project files for UTF-8 Encoding
  3. Changed npx @cyclonedx/cyclonedx-npm to npx @cyclonedx/bom@3.10.6

Steps to Reproduce

  1. Upgrade Dependency Track from 4.5.0 to 4.6.2
  2. Upgrade OWASP Dependency Track Plugin from 4.0.0 to 4.2.0
  3. Nothing else, nodejs pipelines just breaks on publishing to D-Track from now.

Expected Behavior

Publish bom.xml to Dependency Track

Dependency-Track Version

4.6.2

Dependency-Track Distribution

Container Image

Database Server

PostgreSQL

Database Server Version

No response

Browser

Mozilla Firefox

Checklist

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

Here’s bom. bom.xml.gz

OWASP Plugin has been downgraded as well from 4.2.0 to 4.0.0 (It has been updated in the same time as D-Track) I’ll see what I can do about providing SBOM here.