Skip to main content
Plans: Every plan. Refused with 402 while the workspace is read-only. Who: an owner or admin creates the API token; a Dependency-Track administrator sets up the alert.
If you already upload BOMs to Dependency-Track, it can send each one on to Pharus as soon as it has processed it, so there is no script to maintain. Dependency-Track’s BOM_PROCESSED notification carries the BOM; Pharus stores it for a product family exactly as if it came through POST /api/v1/sboms.

Before you start

  • Dependency-Track 4.11 or a later 4.x release. Version 5 leaves the BOM out of its notifications, and versions before 4.11 can’t send the token in a header. For those, use the export job below.
  • BOMs uploaded to Dependency-Track as CycloneDX JSON. Dependency-Track forwards the BOM exactly as it was uploaded, and Pharus doesn’t read XML.
  • BOMs up to about 3 MB. Notifications aren’t compressed, and a request may be at most 4 MB. Use the export job for larger BOMs.

Map projects to product families

A token belongs to one product family, so you set up one alert per family:
Without a limit to projects, BOMs from every project in Dependency-Track end up in that one product family.

Set up the alert

1

Create a token in Pharus

Under Settings → API tokens, create a token for the product family that the Dependency-Track projects belong to. See create a token.
2

Create the alert in Dependency-Track

In Dependency-Track, go to Administration → Notifications → Alerts and choose Create Alert. Name it Pharus, then set Scope to Portfolio, Notification level to Informational and Publisher to Outbound Webhook.
3

Point it at Pharus

Open the new alert and fill in:
  • Destination: https://app.pharussecurity.com/api/v1/connectors/dependency-track
  • API token header: Authorization
  • API token: type Bearer, a space, then the token from step 1. Dependency-Track sends it in a header, never in the URL.
Under Group, tick BOM_PROCESSED only, then choose Submit.
4

Limit it to the family's projects

Choose Limit To and add this family’s projects under Limit to projects.
5

Test it

Choose Perform Test. When the token’s Last used time under Settings → API tokens changes, the alert works. From then on, each BOM shows up under SBOMs in Pharus shortly after Dependency-Track has processed it.
The Dependency-Track tab of Connect a pipeline on the SBOMs page has the same steps, with your destination URL ready to copy.

Authentication

Pharus reads the token from the Authorization header, as Bearer phr_... or a bare phr_..., or from Dependency-Track’s default X-Api-Key header. It never accepts the token in the URL.

What Pharus does with a notification

The SBOM shows Dependency-Track as its Source, and the Dependency-Track project’s name as the Repository in its Pipeline card. Requests count towards the token’s rate limit of 60 per hour, test notifications too.

Responses

A stored BOM gets the same 202 and 200 answers as POST /api/v1/sboms. The endpoint also answers: The other errors (402, 413, 415 unsupported_format, 422 too_many_components, 429) are the same as for POST /api/v1/sboms. Dependency-Track logs the response, so the message is there when an alert fails.

Or push from a job

For Dependency-Track 5, versions before 4.11 and BOMs above about 3 MB, export the project’s BOM through the Dependency-Track API and send it to Pharus, for example from a nightly job. The Dependency-Track API key needs the VIEW_PORTFOLIO permission.
Pharus ignores a BOM it already has, so running the job every night is safe.

Upload an SBOM

API introduction

SBOMs

Product families