Black Duck
Bring your software composition analysis (SCA) results from Black Duck SCA (formerly Black Duck Hub) into the JupiterOne graph: the projects Black Duck tracks, each project's versions with their lifecycle phase and distribution, the open-source and third-party components in each version's bill of materials (BOM) with their license names, and the known vulnerabilities on those components, with severity, numeric score, CVE and CWE identifiers, and the remediation status Black Duck records for each project version. Use it to find which released project versions still carry open critical or high vulnerabilities, see every project version that ships a given component or is affected by a given CVE, and tell findings that are still open from those already marked patched, mitigated or ignored in Black Duck. The integration works with hosted and self-managed Black Duck instances, reads data only, and never changes anything in Black Duck.
- Installation
- Authorization
- Data Model
- Types
Installation
This integration connects to Black Duck SCA (formerly Black Duck Hub) using the Black Duck REST API (https://<your-black-duck-host>/api/...) and ingests projects, project versions, the components in each version's bill of materials (BOM), and the known vulnerabilities on those components. Black Duck can be hosted by Black Duck or deployed in your own environment, so the integration supports both ways of running it. It can run in the JupiterOne cloud when your Black Duck instance is reachable from the internet, or on a JupiterOne collector inside your network when the instance is only reachable internally. For self-managed instances that use a self-signed or internal-CA TLS certificate, you can supply the CA certificate.
Prerequisites
- A Black Duck SCA instance, hosted or self-managed, and its base URL, for example
https://blackduck.example.com. - A Black Duck user account that can view the projects you want to ingest, and an access token for that user.
- Network access from where the integration runs to the Black Duck instance: from the JupiterOne cloud for an internet-reachable instance, or from a JupiterOne collector for an instance that is only reachable inside your network.
- Access to JupiterOne with permission to configure integrations.
Configuration in Black Duck
The integration authenticates in two steps, as described in the Black Duck API documentation:
- It sends your access token to
POST /api/tokens/authenticatein the headerAuthorization: token <access-token>. - Black Duck returns a short-lived bearer token, which the integration sends as
Authorization: Bearer <bearer-token>on every other request. When the bearer token expires, the integration requests a new one.
Every other request is a GET. The integration never writes to Black Duck.
Choose the account
Black Duck access tokens have the same role as the user who created them, so the integration can see exactly what that user can see. Projects the user cannot view are not returned by the API and are not ingested. We recommend a dedicated user that has:
- The Global Project Viewer global role. Black Duck describes it as read-only access to all projects, with permission to view all projects and BOMs, but not to modify BOMs or project settings.
To limit ingestion to some projects only, you can instead leave the user without global roles and give it the Project Viewer project role ("read-only access to assigned projects") on just those projects.
The integration does not need any role that changes data, such as Project Manager, BOM Manager or Security Manager. Black Duck describes Security Manager as managing vulnerability remediation, which the integration never does.
The Authorization information generated for this integration lists Security Manager next to Global Project Viewer for the Vulnerabilities data source. Start with Global Project Viewer only. If the Vulnerabilities data source fails with a 403 Forbidden error while Projects and Components succeed, the user cannot read vulnerability data on your instance, and you need to review its roles.
Create the access token
Access tokens can only be created by the user they belong to, so sign in to Black Duck as the dedicated user.
- From the user menu in the top navigation bar, select My Access Tokens.
- Click Create New Token.
- Enter a name and, optionally, a description. For the scope, select read access only. The integration does not need write access.
- Click Create, then copy the token. Black Duck shows the token value only once. Store it somewhere safe; you will paste it into JupiterOne.
- Click Close.
Black Duck access tokens do not expire, but:
- A Black Duck user administrator can purge tokens that have been inactive for a set number of weeks, or purge all tokens. Running the integration on a polling interval keeps the token in use.
- Deactivating the user invalidates its tokens.
If the token is purged or invalidated, the integration stops ingesting until you add a new token to the instance.
Configuration in JupiterOne
To install the Black Duck integration in JupiterOne, navigate to the Integrations tab in JupiterOne and select Black Duck. Click New Instance to begin configuring your integration.
Creating an instance requires the following:
-
The Account Name used to identify the Black Duck account in JupiterOne. Ingested entities will have this value stored in
tag.AccountNamewhen theAccountNametoggle is enabled. -
Description to assist in identifying the integration instance, if desired.
-
Polling Interval that you feel is sufficient for your monitoring needs. You may leave this as
DISABLEDand manually execute the integration. -
If your Black Duck instance cannot be reached from the internet, set the instance to run on a JupiterOne collector in your network.
-
The Authentication fields below.
Authentication fields
| Field | Required | Description |
|---|---|---|
| Black Duck URL | Yes | The base URL of your Black Duck instance, including https://, for example https://blackduck.example.com. Do not add /api. Trailing slashes are removed. |
| API Token | Yes | The access token created above. It is exchanged for a bearer token at POST /api/tokens/authenticate. |
When you save the instance, JupiterOne checks the credentials by exchanging the access token for a bearer token and reading GET /api/current-version. This confirms that the token is valid and the instance is reachable. It does not check which projects the user can view.
Connection Options
Both options are optional. They are only needed for a self-managed Black Duck instance whose TLS certificate is not signed by a publicly trusted certificate authority.
| Field | Default | Description |
|---|---|---|
| Disable TLS Certificate Verification | Off | Skip TLS certificate verification for the Black Duck instance. Not recommended: use CA Certificate instead. |
| CA Certificate | Empty | The PEM-encoded certificate of the CA that signed your Black Duck instance's TLS certificate. Used to verify a self-signed or internal-CA certificate. |
Filters
All filters are optional. Leave them empty to ingest everything the user can view.
| Field | Default | Description |
|---|---|---|
| Project Version Phases | Empty (all phases) | Ingest only project versions in these phases. Options are Planning, Development, Pre-release, Released, Deprecated and Archived. Components and vulnerabilities are read only for the project versions that are ingested. When set, project versions with no phase are skipped. |
| Vulnerability Severities | Empty (all severities) | Ingest only vulnerabilities at these severities. Options are Critical, High, Medium and Low. When set, vulnerabilities with no severity are skipped. |
Click Create once all values are provided to finalize the integration.
Both filters are applied by the integration after the data is read, not by the Black Duck API:
- Project Version Phases still lists every version of every project, but components and vulnerabilities are only requested for the versions that match. Setting it to, for example, Released reduces the number of requests on instances with many development versions.
- Vulnerability Severities does not reduce the number of requests. Every vulnerable component is still read, and the ones outside the selected severities are dropped.
Narrowing a filter later removes data from JupiterOne. On the next run, project versions that no longer match Project Version Phases are deleted from the graph together with their vulnerabilities and their links to components, and vulnerabilities that no longer match Vulnerability Severities are deleted as well.
Data Sources
Each data source can be enabled or disabled on its own. All data sources are disabled by default, so enable the ones you want to ingest. The blackduck_account entity for the Black Duck instance and the blackduck_service entity are always created, even with every data source disabled.
| Data Source | Description | Entities Created |
|---|---|---|
| Projects | Projects tracked in Black Duck, with their name, description and created and updated dates, and each project's versions, with their phase, distribution and created date. Project versions are limited by Project Version Phases when set. | blackduck_project, blackduck_project_version |
| Components | The open-source and third-party components in the BOM of each ingested project version, with their name, version and license names. Requires Projects. | blackduck_component |
| Vulnerabilities | Known vulnerabilities on the components of each ingested project version, with their severity, numeric score, CVE and CWE identifiers, source (for example NVD or BDSA), published date and remediation status. Limited by Vulnerability Severities when set. Requires Projects. Components is not required. | blackduck_vulnerability, blackduck_component |
To ingest everything the integration supports, enable all three data sources.
Projects must be enabled for any other Black Duck data to be ingested. Components and vulnerabilities are read per project version, and project versions belong to the Projects data source. If Projects is disabled, the Components and Vulnerabilities data sources do not run at all, even when they are enabled.
Vulnerabilities does not depend on Components. When Components is disabled, Vulnerabilities still creates a blackduck_component entity, with its name and version, for each component that has a vulnerability, so that the vulnerability can be linked to its component. It does not create the blackduck_project_version HAS blackduck_component relationship, and components without vulnerabilities are not ingested.
Relationships are built only when every data source they need is enabled:
| Relationship | Requires |
|---|---|
blackduck_account PROVIDES blackduck_service | Always created |
blackduck_account HAS blackduck_project | Projects |
blackduck_project HAS blackduck_project_version | Projects |
blackduck_project_version HAS blackduck_component | Projects and Components |
blackduck_project_version HAS blackduck_vulnerability | Projects and Vulnerabilities |
blackduck_component HAS blackduck_vulnerability | Projects and Vulnerabilities |
blackduck_service IDENTIFIED blackduck_vulnerability | Projects and Vulnerabilities |
The blackduck_project_version HAS blackduck_component relationship describes how that project version uses the component. It carries the component's usages, policyStatus and reviewStatus in that version's BOM.
Components and vulnerabilities in the graph
- A component is shared across project versions. Each component name and version, for example
log4j-core 2.14.1, is oneblackduck_componententity, linked to every ingested project version whose BOM contains it. BOM entries without a resolved component version are skipped. - A vulnerability is scoped to one project version. Black Duck records the remediation status of a vulnerability separately in each project version, so the same CVE on the same component appears as one
blackduck_vulnerabilityper affected project version, each with its ownremediationStatus. - Remediated vulnerabilities are ingested too.
openisfalsewhen the remediation status isPATCHED,MITIGATED,IGNORED,REMEDIATION_COMPLETEorDUPLICATE, andtrueotherwise. Filter onopen = trueto see what still needs work. - CVE and BDSA advisories. When a vulnerability is a CVE, or a Black Duck Security Advisory (BDSA) linked to a CVE, the entity has the classes
FindingandVulnerabilityand itscveIdis set. A BDSA advisory without a related CVE has only theFindingclass. - Severity and score.
severityis normalized tocritical,high,mediumorlow.numericSeverityis the vulnerability's overall score from Black Duck, or its base score when no overall score is reported.
Example queries
Open critical and high vulnerabilities in released project versions:
FIND blackduck_project_version WITH phase = 'RELEASED' AS v
THAT HAS blackduck_vulnerability WITH open = true AND severity = ('critical' or 'high') AS f
RETURN v.displayName, f.displayName, f.severity, f.remediationStatus
Every project version affected by a given CVE:
FIND blackduck_project_version
THAT HAS blackduck_vulnerability WITH cveId = 'CVE-2021-44228'
Every project version that ships a given component (requires Components):
FIND blackduck_project_version AS v
THAT HAS blackduck_component WITH name = 'log4j-core' AS c
RETURN v.displayName, v.phase, c.displayName
What the integration does not collect
- Users, groups, and their roles.
- Policy rules and policy violations. Only each component's
policyStatusin a project version is recorded. - Licenses as separate entities, license risk, and license obligations. Only license names are recorded on components.
- Scans, code locations, and the files in which components were found.
- Remediation comments and the Black Duck users who created or changed a remediation status.
- Vulnerability reports, notifications, and project tags.
Rate limits and request volume
The integration makes requests in this order: the projects list, then the versions of each project, then, for each ingested project version, its BOM components (Components) and its vulnerable BOM components (Vulnerabilities). Lists are read 100 items per page. On an instance with many projects and versions, most requests come from the per-version BOM reads, so each run takes longer as the number of ingested project versions grows. Use Project Version Phases to reduce it.
The integration does not throttle its own requests. When Black Duck answers with 429 Too Many Requests or a 5xx error, the integration makes up to three attempts with an increasing delay between them, and waits for the time in the Retry-After header when Black Duck sends one.
Next steps
Now that your integration instance has been configured, it will begin running on the polling interval you provided, populating data within JupiterOne. Continue on to our Instance management guide to learn more about working with and editing integration instances.
Additional resources
- Managing user access tokens — creating access tokens and their scope
- Access Tokens — how administrators purge inactive tokens
- Authenticating with the API — exchanging an access token for a bearer token
- Getting started with the Black Duck API
- Understanding roles
- Global Roles Reference — Global Project Viewer
- Project Roles Reference — Project Viewer
Roles
RBAC roles that must be assigned to the integration principal.
Show Roles (3)
Any authenticated Black Duck tokenGlobal Project ViewerSecurity Manager
Endpoints
API endpoints that the integration makes requests to.
Show Endpoints (5)
https://<black-duck-host>/api/current-versionhttps://<black-duck-host>/api/projectshttps://<black-duck-host>/api/projects/{projectId}/versionshttps://<black-duck-host>/api/projects/{projectId}/versions/{versionId}/componentshttps://<black-duck-host>/api/projects/{projectId}/versions/{versionId}/vulnerable-bom-components
Documentation Links
Links to provider documentation relevant to setup and configuration.
Show Documentation Links (2)
Per-Step Breakdown
Detailed authorization requirements for each ingestion step.
Show all steps (3)
| Step | Roles | Endpoints |
|---|---|---|
| Fetch Components | Global Project Viewer | https://<black-duck-host>/api/projects/{projectId}/versions/{versionId}/components |
| Fetch Project Versions | Global Project Viewer | https://<black-duck-host>/api/projects/{projectId}/versions |
| Fetch Vulnerabilities | Global Project Viewer, Security Manager | https://<black-duck-host>/api/projects/{projectId}/versions/{versionId}/vulnerable-bom-components |
Entities
The following entities are created:
| Resources | Entity _type | Entity _class |
|---|---|---|
| Account | blackduck_account | Account |
| Component | blackduck_component | Application |
| Project | blackduck_project | Project |
| Project Version | blackduck_project_version | Project |
| Service | blackduck_service | Service |
| Vulnerability | blackduck_vulnerability | Finding, Vulnerability |
Relationships
The following relationships are created:
Source Entity _type | Relationship _class | Target Entity _type |
|---|---|---|
blackduck_account | PROVIDES | blackduck_service |
blackduck_account | HAS | blackduck_project |
blackduck_component | HAS | blackduck_vulnerability |
blackduck_project | HAS | blackduck_project_version |
blackduck_project_version | HAS | blackduck_component |
blackduck_project_version | HAS | blackduck_vulnerability |
blackduck_service | IDENTIFIED | blackduck_vulnerability |
Blackduck Account
blackduck_account inherits from Account
| Property | Type | Description | Specifications |
|---|---|---|---|
version * | string | null | Black Duck Hub software version, from GET /api/current-version. |
Blackduck Component
blackduck_component inherits from Application
| Property | Type | Description | Specifications |
|---|---|---|---|
version * | string | null | The component version name as reported by Black Duck. |
Blackduck Project
blackduck_project inherits from Project
Blackduck Project Version
blackduck_project_version inherits from Project
| Property | Type | Description | Specifications |
|---|---|---|---|
distribution * | string | null | Distribution type of the project version (e.g. EXTERNAL, INTERNAL). | |
phase * | string | null | Lifecycle phase of the project version (e.g. RELEASED, DEVELOPMENT). |
Blackduck Service
blackduck_service inherits from Service
Blackduck Vulnerability
blackduck_vulnerability inherits from Finding, Vulnerability
| Property | Type | Description | Specifications |
|---|---|---|---|
cweId * | string | null | CWE identifier reported for the vulnerability, if any. | |
publishedOn * | number | null | Timestamp (ms) the vulnerability was published. | |
remediationStatus * | string | null | Black Duck remediation status in this project version (e.g. NEW, NEEDS_REVIEW, PATCHED). | |
source * | string | null | Vulnerability data source as reported by Black Duck (e.g. NVD, BDSA). |