-
Notifications
You must be signed in to change notification settings - Fork 21
49 lines (41 loc) · 1.49 KB
/
veracode.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Veracode SAST test
on:
workflow_dispatch: # Trigger manually
schedule:
- cron: '0 0 * * *' # Once a day
jobs:
static_analysis:
name: Static Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Set up Maven
uses: stCarolas/setup-maven@v4.5
with:
maven-version: 3.8.2
- name: Cache maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build
run: mvn package --batch-mode -DskipTests
- uses: actions/upload-artifact@v3
with:
path: 'irs-api/target/*exec.jar'
- name: Veracode Upload And Scan
uses: veracode/veracode-uploadandscan-action@0.2.5
with:
appname: 'IRS'
version: '${{ github.run_id }}'
createprofile: false
vid: '${{ secrets.VERACODE_API_ID || secrets.ORG_VERACODE_API_ID }}'
vkey: '${{ secrets.VERACODE_API_KEY || secrets.ORG_VERACODE_API_KEY }}'
filepath: 'irs-api/target/*exec.jar'
deleteIncompleteScan: 2 #delete a scan of any status except Results Ready to proceed with the uploadandscan action. If errors occur when running this action, the Java wrapper automatically deletes the incomplete scan.