Skip to content

Commit abeabef

Browse files
committed
Add Grype scan
# Conflicts: # .github/workflows/build.yml
1 parent 35fed61 commit abeabef

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
pull_request:
88
branches:
99
- 'main'
10+
schedule:
11+
- cron: '0 5 * * 1'
1012

1113
jobs:
1214
build:
@@ -51,6 +53,22 @@ jobs:
5153
with:
5254
report_paths: '**/target/surefire-reports/TEST-*.xml'
5355

56+
- name: Grype source code
57+
id: grype_source_code
58+
uses: anchore/scan-action@v6
59+
with:
60+
path: .
61+
fail-build: true
62+
severity-cutoff: high
63+
only-fixed: true
64+
65+
- name: Upload Grype source code report
66+
if: always() && steps.grype_source_code.outputs.sarif != ''
67+
uses: github/codeql-action/upload-sarif@v3
68+
with:
69+
sarif_file: ${{ steps.grype_source_code.outputs.sarif }}
70+
category: 'source-code'
71+
5472
- name: Sonar
5573
if: github.event.pull_request.head.repo.fork == false
5674
run: mvn verify sonar:sonar

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
<version>${jib-maven-plugin.version}</version>
148148
<configuration>
149149
<from>
150-
<image>eclipse-temurin:21_35-jre</image>
150+
<image>eclipse-temurin:21-jre-alpine</image>
151151
</from>
152152
<to>
153153
<image>docker.io/loicgreffier/spring-boot-kafka-quickstarts:${project.artifactId}-${project.version}</image>

0 commit comments

Comments
 (0)