Use component policies to automate actions when components with specific properties are detected in an SCA test.
Component policy overview
Rules
You can add up to five rules to each component policy. Rules control what actions occur when test results violate a policy (when components with specific properties are detected in an SCA test). Set up rules to monitor tests for components with any combination of the following properties:
- Included or excluded from your SBOM.
Exposure of identified vulnerabilities in components (Reachable and/or Undetermined).
- Declared and/or deep licenses. All or specify license families.Note: Deep license data, which is disabled by default, must be enabled for it to be included in violations.
- License status
- Direct or transitive dependencies.
- Different security risks.
- Components that contain issues on the CISA KEV list.
- Subject to specific licenses.
- Specific names of components.
- Specific match scores.
Actions
You can assign the following actions to each rule in a component policy:
Note: You can add any action to a rule, but actions only function as expected when the prerequisites are met, and only run after a test is complete.
| Action | Description | Prerequisites |
|---|---|---|
| Send Notification | Send an email notification to Organization Admins when components with specific properties are found in a test. Each email includes the names of one or more violated component policies, the violated rules in each policy, the total quantity of violating components for each rule, and helpful links. Click a component quantity to view the components that violate the rule in Polaris. Note: Email notifications for issue and component policies are only sent to Organization Admins. One email is sent each time a test's results violate one or more policies, and each email can include components that violate more than one of each policy's rules. If a test's results violate issue and component policies, violated issue and component policies are listed in the same email.
|
Notifications must be enabled for the organization, and your personal notification settings must allow Policy notifications. |
| Attempt Build Break | For SCA tests run via Bridge (including the Black Duck Security Scan Extension for Azure DevOps, the GitHub Action, the GitLab Template, and Black Duck Security Scan Plugin for Jenkins), attempt to break a build after components with specific properties are found in a SCA test. | The action only affects SCA tests run using Bridge CLI Bundle 3.2.0 or later, or Bridge CLI Thin Client 3.0.16 or later. Additionally, polaris.waitForScan must be set to true (default) in your pipeline. |
| Create a fix pull request (for direct deps. with vulnerabilities) | Automatically create a fix pull request (Fix PR) for components with direct dependency vulnerabilities detected by the SCA scan of SCM-integrated projects based on assignment of this policy and customizable Fix PR settings. | See Fix Pull Requests (Fix PR) for prerequisites. |
Example component policy
For example, say you create a component policy with the following rule:
| Rule | Component properties | Actions |
|---|---|---|
| Rule one | Components with Permissive, AGPL, or Unknown licenses with a Security Risk of Critical or High. | Send Notification |
In tests subject to this example component policy:
- An email notification is sent to Organization Admins when critical or high-risk components with permissive, AGPL, or unknown licenses are detected in a test.
View a component policy's details
Create a component policy
Tip: Instead of creating a new component policy, you can use a preexisting policy as a starting point (and adjust the policy as you wish). Click the options
icon at the end of a policy's row and select Duplicate.
The component policy is saved. To apply it, you can:
- Assign it to specific applications, projects, or branches. See Change the policies assigned to applications, projects, and branches for more information.
- Add the policy to your organization's default policies (provided you have Organization Admin permissions). See Change your organization's default component policy for more information.
Modify a component policy
- Go to Policies and open the Component Policies tab.
- Click the options
icon at the end of the policy's row and select Edit.
- Modify the policy, as required.
- Select Save.
Change your organization's default component policy
Organization Admins can change your organization's default component policies. See Manage your default policies for more information.