Skip to content

Commit

Permalink
Merge bef8dc0 into ab1324a
Browse files Browse the repository at this point in the history
  • Loading branch information
fiddlermikey authored Jul 11, 2024
2 parents ab1324a + bef8dc0 commit 5262e15
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/kf-polaris-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ on:
token:
description: 'Secret token from caller workflow to access private packages'
required: true
inputs:
scan_branch:
description: Incoming branch to release or main
required: true
type: string




Expand All @@ -25,13 +31,13 @@ jobs:
polaris_assessment_types: "SCA,SAST"
polaris_application_id: 'Integrations'
polaris_project_id: ${{ github.event.repository.name }}
polaris_branch_id: ${{ github.ref_name }}
polaris_branch_id: ${{ inputs.scan_branch }}

## SCANNING: Optional fields
polaris_application_name: 'Integrations'
polaris_project_name: ${{ github.event.repository.name }}
polaris_assessment_mode: "SOURCE_UPLOAD"
polaris_branch_name: ${{ github.ref_name }}
polaris_branch_name: ${{ github.scan_branch }}

# ## PULL REQUEST COMMENTS: Uncomment below to enable
# polaris_prComment_enabled: false
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/starter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,10 @@ jobs:
token: ${{ secrets.token }}

call-polaris-scan-workflow:
if: github.event_name == 'push' && (startsWith(github.ref_name, 'release-') || github.ref_name == 'main')
if: github.event_name == 'pull_request' && (startsWith(github.base_ref, 'release-') || github.base_ref == 'main')
uses: Keyfactor/actions/.github/workflows/kf-polaris-scan.yml@v3
with:
scan_branch: ${{ github.event.pull_request.head.ref }}
secrets:
token: ${{ secrets.scan_token }}

Expand Down

0 comments on commit 5262e15

Please sign in to comment.