Skip to content

Commit bd29436

Browse files
committed
Re-enable Polaris Scans
1 parent eaafff1 commit bd29436

File tree

2 files changed

+19
-32
lines changed

2 files changed

+19
-32
lines changed

.github/workflows/kf-polaris-scan.yml

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,32 @@
33
name: CI Polaris Scanning
44
on:
55
workflow_call:
6-
secrets:
7-
token:
8-
description: 'Secret token from caller workflow to access private packages'
9-
required: true
106
inputs:
117
scan_branch:
128
description: Incoming branch to release or main
139
required: true
1410
type: string
15-
16-
17-
18-
11+
permissions:
12+
contents: write # Required to push changes or create fix branches
13+
pull-requests: write # Required to add comments or create fix pull requests
1914
jobs:
20-
build:
15+
polaris_scan:
2116
runs-on: [ ubuntu-latest ]
2217
continue-on-error: true
2318
steps:
2419
- name: Checkout Source
25-
uses: actions/checkout@v4
20+
uses: actions/checkout@v6
2621
- name: Polaris Scan
27-
uses: keyfactor/synopsys-action@v1.10.0
22+
uses: blackduck-inc/black-duck-security-scan@v2
2823
with:
2924
### SCANNING: Required fields
30-
polaris_server_url: 'https://polaris.synopsys.com'
31-
polaris_access_token: ${{ secrets.token }}
25+
polaris_server_url: 'https://polaris.blackduck.com'
26+
polaris_access_token: ${{ secrets.POLARIS_TOKEN }}
3227
polaris_assessment_types: "SCA,SAST"
33-
polaris_application_id: 'Integrations'
34-
polaris_project_id: ${{ github.event.repository.name }}
35-
polaris_branch_id: ${{ inputs.scan_branch }}
3628

37-
## SCANNING: Optional fields
38-
polaris_application_name: 'Integrations'
29+
polaris_application_name: "Integrations"
3930
polaris_project_name: ${{ github.event.repository.name }}
40-
polaris_assessment_mode: "SOURCE_UPLOAD"
41-
polaris_branch_name: ${{ github.scan_branch }}
42-
43-
# ## PULL REQUEST COMMENTS: Uncomment below to enable
44-
# polaris_prComment_enabled: false
45-
# github_token: ${{ secrets.GITHUB_TOKEN }} # Required when PR comments is enabled
31+
github_token: ${{ secrets.GITHUB_TOKEN }}
32+
polaris_prComment_enabled: true
33+
polaris_reports_sarif_create: true # Create SARIF report and upload it as artifact
34+

.github/workflows/starter.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,12 @@ jobs:
148148
secrets:
149149
token: ${{ secrets.token }}
150150

151-
# call-polaris-scan-workflow:
152-
# if: github.event_name == 'pull_request' && (startsWith(github.base_ref, 'release-') || github.base_ref == 'main')
153-
# uses: Keyfactor/actions/.github/workflows/kf-polaris-scan.yml@v5
154-
# with:
155-
# scan_branch: ${{ github.event.pull_request.head.ref }}
156-
# secrets:
157-
# token: ${{ secrets.scan_token }}
158-
151+
call-polaris-scan-workflow:
152+
if: github.event_name == 'pull_request' && (startsWith(github.base_ref, 'release-') || github.base_ref == 'main')
153+
uses: Keyfactor/actions/.github/workflows/kf-polaris-scan.yml@v4
154+
with:
155+
scan_branch: ${{ github.event.pull_request.head.ref }}
156+
159157
call-post-release-workflow:
160158
needs: [ call-assign-from-json-workflow, call-create-github-release-workflow ]
161159
if: needs.call-create-github-release-workflow.outputs.IS_FULL_RELEASE == 'True'

0 commit comments

Comments
 (0)