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.
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: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-trackAPI token header:AuthorizationAPI token: typeBearer, a space, then the token from step 1. Dependency-Track sends it in a header, never in the URL.
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.Authentication
Pharus reads the token from theAuthorization 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 same202 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 theVIEW_PORTFOLIO permission.