Skip to content

Trivy Vulnerability Scan (Repo mode) #3

Trivy Vulnerability Scan (Repo mode)

Trivy Vulnerability Scan (Repo mode) #3

Workflow file for this run

name: Trivy Vulnerability Scan (Repo mode)
on:
workflow_dispatch:
jobs:
run_trivy_scan:
name: Run Trivy Scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: spring-io/spring-gradle-build-action@v2
- name: Build
run: |
./gradlew clean build -x integrationTest -x test
mkdir maven-repo-local
./gradlew --info -Dmaven.repo.local=maven-repo-local pTML
echo "*** BONO"
ls maven-repo-local/repository/org/springframework/pulsar
- name: Run Trivy scan in repo mode
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
ignore-unfixed: true
format: 'table'
output: 'trivy-results.txt'
severity: 'CRITICAL,HIGH'
file-patterns: 'pom:.*\.pom'
scan-ref: './maven-repo-local/repository/org/springframework/pulsar'
exit-code: 1
- name: Upload Trivy scan results
if: failure()
uses: actions/upload-artifact@v3
with:
name: trivy-results
path: 'trivy-results.txt'
retention-days: 3