Skip to content

Commit 5049a46

Browse files
author
Black Duck
committed
Black Duck Security: Committed new-polaris-workflow.yml
1 parent e5791ba commit 5049a46

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Quickstart: Black Duck Security Scan Action with polaris:
2+
# https://documentation.blackduck.com/bundle/bridge/page/documentation/t_github-polaris-quickstart.html
3+
name: Polaris Security Scan
4+
on:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
branches:
10+
- release-*.*
11+
workflow_dispatch: {}
12+
# GitHub token permissions for post-scan actions. Required for built-in GITHUB_TOKEN; if using a PAT with equivalent scopes, permissions block can be commented out.
13+
permissions:
14+
contents: write # Required to push changes or create fix branches
15+
pull-requests: write # Required to add comments or create fix pull requests
16+
jobs:
17+
polaris:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout Source
21+
uses: actions/checkout@v4
22+
23+
- name: Polaris Security Scan
24+
id: polaris-scan
25+
uses: blackduck-inc/black-duck-security-scan@v2
26+
with:
27+
### SCANNING: Required fields
28+
polaris_server_url: ${{ vars.POLARIS_URL }}
29+
polaris_access_token: ${{ secrets.POLARIS_ACCESS_TOKEN }}
30+
### ASSESSMENT TYPES
31+
polaris_assessment_types: SAST,SCA # Comma-separated list: SAST,SCA,DAST
32+
### Mark build status if policy violating issues are found
33+
mark_build_status: success # Set to success, failure, or skip
34+
### GITHUB TOKEN
35+
github_token: ${{ secrets.GITHUB_TOKEN }} # Required when PR comments or sarif reports enabled
36+
polaris_prComment_enabled: true
37+
38+
39+
### SCAN CONFIGURATION: Uncomment below to enable
40+
# polaris_waitForScan: true # Wait for scan completion before proceeding
41+
42+
### Uncomment below configuration if Bridge diagnostic files needs to be uploaded
43+
# include_diagnostics: false
44+
45+
### SARIF report parameters
46+
polaris_reports_sarif_create: true # Create SARIF report and upload it as artifact
47+
# polaris_upload_sarif_report: false # Upload SARIF report in GitHub Advanced Security tab

0 commit comments

Comments
 (0)