forked from spring-projects/spring-pulsar
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.23 KB
/
trivy-scan.yml
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
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
curdir=$(pwd)
echo "*** BONO curdir = $curdir"
mkdir $curdir/maven-repo-local
echo "*** BONO created..."
mrl=$(ls $curdir/maven-repo-local)
echo $mrl
./gradlew --info -Dmaven.repo.local=$curdir/maven-repo-local pTML
echo "*** BONO after pTML..."
mrl=$(ls $curdir/maven-repo-local)
echo $mrl
- name: Run Trivy scan in repo mode
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
scan-ref: '/github/workspace/maven-repo-local/org/springframework/pulsar'
trivy-config: trivy.yaml
format: 'table'
exit-code: 0
- name: Upload Trivy scan results
uses: actions/upload-artifact@v3
with:
name: trivy-results
path: /home/runner/work/spring-pulsar/spring-pulsar/trivy-results.txt'
retention-days: 3