wollomatic/dtrack-uploader-pipe

Sponsored OSS

By wollomatic

Updated 9 days ago

Bitbucket Pipe to upload a CycloneDX SBOM to Dependency-Track

Image
Security
Developer tools
0

10K+

wollomatic/dtrack-uploader-pipe repository overview

Bitbucket Pipelines Pipe: Dependency-Track Upload

Uploads a CycloneDX SBOM to Dependency-Track. The project is automatically created when it does not exist.

YAML definition

script:
  - pipe: docker://wollomatic/dtrack-uploader-pipe:latest
    variables:
      DTRACK_URL: $DTRACK_URL
      DTRACK_APIKEY: $DTRACK_APIKEY
      PROJECT_NAME: "my-project"
      PROJECT_VERSION: $BITBUCKET_COMMIT
      # SBOM_FILE: sbom.cdx.json
      # HTTP_TIMEOUT: 60s
      # HTTP_RETRIES: "2"
      # HTTP_RETRY_BUDGET: 5m

Variables

VariableRequiredDefaultDescription
SBOM_FILENosbom.cdx.jsonCycloneDX SBOM path
DTRACK_URLYesDependency-Track HTTPS base URL
DTRACK_APIKEYYesDependency-Track API key; use a secured Bitbucket variable
PROJECT_NAMEYesProject name
PROJECT_VERSIONYesProject version
HTTP_TIMEOUTNo60sTimeout per HTTP attempt
HTTP_RETRIESNo2Retries only explicit HTTP 429 rate-limit responses
HTTP_RETRY_BUDGETNo5mMaximum total time for retries; Retry-After is honored fully within this budget

Permissions

The API key needs BOM_UPLOAD. Because the pipe uses autoCreate=true, it also needs PROJECT_CREATION_UPLOAD when the project does not already exist.

Behavior

The pipe streams the SBOM to POST /api/v1/bom using multipart/form-data. Dependency-Track accepts the upload for asynchronous processing and may return a processing token. The pipe reports successful acceptance, not completion of asynchronous analysis.

To avoid duplicate asynchronous ingestion, network failures and HTTP 5xx responses are not retried automatically. Their upload status is unknown and requires an explicit pipeline retry. A 429 response is retried only when the full Retry-After delay fits within HTTP_RETRY_BUDGET; otherwise the pipe fails with a clear rate-limit error.

License

Apache License 2.0. See LICENSE.

Tag summary

Content type

Image

Digest

sha256:262ef3c33

Size

6.3 MB

Last updated

about 1 year ago

docker pull wollomatic/dtrack-uploader-pipe

This week's pulls

Pulls:

1,637

Last week