Veracode SAST test #341
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Set up Maven | |
uses: stCarolas/[email protected] | |
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/[email protected] | |
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. |