Skip to content

Commit 10d6a30

Browse files
executing remove-sandbox action after completing execution of policy scan
1 parent f4b245e commit 10d6a30

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

.github/workflows/binary-ready-veracode-sast-policy-scan.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,20 @@ jobs:
102102
fail_checks_on_error: ${{ github.event.client_payload.user_config.break_build_on_error }}
103103
filter_mitigated_flaws: ${{ github.event.client_payload.user_config.filter_mitigated_flaws }}
104104

105+
veracode-remove-sandbox:
106+
needs: policy_scan
107+
runs-on: ubuntu-latest
108+
if: ${{ github.event.client_payload.user_config.sandbox_scan.execute_remove_sandbox_action && always() }}
109+
name: Remove Sandbox
110+
steps:
111+
- uses: veracode/github-actions-integration-helper@main
112+
with:
113+
action: 'removeSandbox'
114+
vid: ${{ secrets.VERACODE_API_ID }}
115+
vkey: ${{ secrets.VERACODE_API_KEY }}
116+
appname: ${{ github.event.client_payload.user_config.profile_name }}
117+
sandboxname: GitHub App Scans-${{ github.event.client_payload.user_config.sandbox_scan.branch }}
118+
105119
code-scanning-alert:
106120
needs: policy_scan
107121
runs-on: ubuntu-latest

.github/workflows/template-register.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ jobs:
2424
check_run_name: ${{ github.workflow }}
2525
head_sha: ${{ github.event.client_payload.sha }}
2626
event_type: ${{ github.event.client_payload.event_type }}
27-
branch: ${{ github.event.client_payload.repository.branch }}
27+
branch: ${{ github.event.client_payload.user_config.sandbox_scan.branch }}

.github/workflows/veracode-policy-scan.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,20 @@ jobs:
102102
fail_checks_on_error: ${{ inputs.break_build_on_error }}
103103
filter_mitigated_flaws: ${{ inputs.filter_mitigated_flaws }}
104104

105+
veracode-remove-sandbox:
106+
needs: policy_scan
107+
runs-on: ubuntu-latest
108+
if: ${{ github.event.client_payload.user_config.sandbox_scan.execute_remove_sandbox_action && always() }}
109+
name: Remove Sandbox
110+
steps:
111+
- uses: veracode/github-actions-integration-helper@main
112+
with:
113+
action: 'removeSandbox'
114+
vid: ${{ secrets.VERACODE_API_ID }}
115+
vkey: ${{ secrets.VERACODE_API_KEY }}
116+
appname: ${{ github.event.client_payload.user_config.profile_name }}
117+
sandboxname: GitHub App Scans-${{ github.event.client_payload.user_config.sandbox_scan.branch }}
118+
105119
code-scanning-alert:
106120
needs: policy_scan
107121
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)