Skip to content

Commit da8882e

Browse files
Merge pull request #84 from veracode/SDEVX-8814
Sdevx 8814
2 parents 132d094 + 44fce13 commit da8882e

File tree

6 files changed

+60
-1
lines changed

6 files changed

+60
-1
lines changed

.github/workflows/veracode-iac-secrets-scan.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ jobs:
4444
needs: [register, validations]
4545
runs-on: ubuntu-latest
4646
name: Veracode IaC/Secrets Scanning
47-
4847
steps:
4948
- uses: actions/checkout@v4
5049
with:
@@ -63,3 +62,13 @@ jobs:
6362
debug: false
6463
fail_build: ${{ github.event.client_payload.user_config.break_build_policy_findings }}
6564
fail_build_on_error: ${{ github.event.client_payload.user_config.break_build_on_error }}
65+
66+
cleanup:
67+
runs-on: ${{ fromJson(github.event.client_payload.user_config.default_runs_on) }}
68+
if: always()
69+
needs: [register, validations, veracode-iac-secrets-scan]
70+
steps:
71+
- name: Cleanup workspace and Docker
72+
run: |
73+
echo "Running final cleanup..."
74+
sudo rm -rf $GITHUB_WORKSPACE/

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,3 +193,9 @@ jobs:
193193
https://api.github.com/repos/${{ inputs.owner }}/${{ inputs.repo }}/check-runs/${{ inputs.check_run_id }} \
194194
-d @"payload.txt"
195195
done
196+
197+
- name: Cleanup workspace and Docker
198+
if: always()
199+
run: |
200+
echo "Running final cleanup..."
201+
sudo rm -rf $GITHUB_WORKSPACE/

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,14 @@ jobs:
179179
repo_name: ${{ inputs.repo }}
180180
github-token: ${{ inputs.token }}
181181
commitHash: ${{ inputs.sha }}
182+
183+
cleanup:
184+
runs-on: ${{ fromJson(github.event.client_payload.user_config.default_runs_on) }}
185+
if: always()
186+
needs: [policy_scan, veracode-remove-sandbox, code-scanning-alert, create-issues]
187+
steps:
188+
- name: Cleanup workspace and Docker
189+
if: always()
190+
run: |
191+
echo "Running final cleanup..."
192+
sudo rm -rf $GITHUB_WORKSPACE/

.github/workflows/veracode-remove-sandbox.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,13 @@ jobs:
4141
vkey: ${{ secrets.VERACODE_API_KEY }}
4242
appname: ${{ github.event.client_payload.user_config.profile_name }}
4343
sandboxname: GitHub App Scans-${{ github.event.client_payload.repository.branch }}
44+
45+
cleanup:
46+
runs-on: ${{ fromJSON(github.event.client_payload.user_config.default_runs_on) }}
47+
if: always()
48+
needs: [create-checks-run, veracode-remove-sandbox]
49+
steps:
50+
- name: Cleanup workspace and Docker
51+
run: |
52+
echo "Running final cleanup..."
53+
sudo rm -rf $GITHUB_WORKSPACE/

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,14 @@ jobs:
6767
failbuild: ${{ github.event.client_payload.user_config.break_build_policy_findings }}
6868
gitRepositoryUrl: ${{ github.server_url }}/${{ github.event.client_payload.repository.full_name }}
6969
deleteincompletescan: true
70+
71+
cleanup:
72+
runs-on: ${{ fromJson(github.event.client_payload.user_config.default_runs_on) }}
73+
if: always()
74+
needs: [build, sandbox_scan]
75+
steps:
76+
- name: Cleanup workspace and Docker
77+
if: always()
78+
run: |
79+
echo "Running final cleanup..."
80+
sudo rm -rf $GITHUB_WORKSPACE/

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,15 @@ jobs:
8989
recursive: true
9090
allow-dirty: true
9191
breakBuildOnPolicyFindings: ${{ github.event.client_payload.user_config.break_build_policy_findings }}
92+
93+
cleanup:
94+
runs-on: ${{ fromJson(github.event.client_payload.user_config.default_runs_on) }}
95+
if: always()
96+
needs: [register, veracode-sca-scan]
97+
steps:
98+
- name: Cleanup workspace and Docker
99+
if: always()
100+
run: |
101+
echo "Running final cleanup..."
102+
sudo rm -rf $GITHUB_WORKSPACE/
103+

0 commit comments

Comments
 (0)