Skip to content

Commit e4d9962

Browse files
authored
Add trivy job #49 from valitydev/trivy
2 parents 719d11e + 77500a1 commit e4d9962

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

.github/workflows/maven-library-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,4 @@ jobs:
6767
6868
- name: Upload code coverage
6969
uses: codecov/codecov-action@v3
70+

.github/workflows/maven-service-build.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
uses: actions/checkout@v3
3232

3333
- name: Run Build Java
34-
uses: valitydev/action-jdk-build@v0.0.14
34+
uses: valitydev/action-jdk-build@trivy
3535
with:
3636
jdk-version: ${{ inputs.java-version }}
3737
jdk-distribution: ${{ inputs.java-distribution }}
@@ -45,7 +45,7 @@ jobs:
4545
uses: actions/checkout@v3
4646

4747
- name: Run Build Java
48-
uses: valitydev/action-jdk-build@v0.0.14
48+
uses: valitydev/action-jdk-build@trivy
4949
with:
5050
jdk-version: ${{ inputs.java-version }}
5151
jdk-distribution: ${{ inputs.java-distribution }}
@@ -54,3 +54,18 @@ jobs:
5454
- name: Upload code coverage
5555
uses: codecov/codecov-action@v3
5656

57+
scan:
58+
name: Scan with Trivy
59+
needs: build
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v3
63+
- name: Install Trivy CLI
64+
run: |
65+
wget https://github.com/aquasecurity/trivy/releases/download/v0.39.1/trivy_0.39.1_Linux-64bit.deb
66+
sudo dpkg -i trivy_0.39.1_Linux-64bit.deb
67+
- uses: actions/download-artifact@v3
68+
with:
69+
name: bom.json
70+
- name: Run Trivy with SBOM
71+
run: trivy sbom --exit-code 1 --severity CRITICAL,HIGH ./bom.json

0 commit comments

Comments
 (0)