Skip to content

Commit 3753991

Browse files
fix(ci): Fix grype output file and dependency
1 parent 3365da6 commit 3753991

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

.github/workflows/docker-image-scan.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,9 @@ on:
1010
tags:
1111
- '*'
1212

13-
env:
14-
HAS_ACCESS_TO_GITHUB_TOKEN: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
15-
1613
jobs:
1714
test-scan-docker-image:
18-
if: ${{ env.HAS_ACCESS_TO_GITHUB_TOKEN == 'true' }}
15+
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
1916
name: Test Scan Docker Image
2017
runs-on: ubuntu-22.04
2118
env:

code-check-actions/rustcheck/action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ runs:
128128

129129
# Don't fail during report generation
130130
- name: Vulnerability analysis of SBOM
131-
uses: anchore/scan-action@v3.3.4
131+
uses: anchore/scan-action@v3.3.5
132132
id: grype_analysis_sarif
133133
if: ${{ steps.sbom_report.outputs.files_exists == 'true' }}
134134
with:
@@ -140,7 +140,7 @@ runs:
140140
# Don't fail during report generation
141141
# JSON format will report any ignored rules
142142
- name: Vulnerability analysis of SBOM
143-
uses: anchore/scan-action@v3.3.4
143+
uses: anchore/scan-action@v3.3.5
144144
id: grype_analysis_json
145145
if: ${{ steps.sbom_report.outputs.files_exists == 'true' }}
146146
with:
@@ -153,7 +153,7 @@ runs:
153153
uses: andstor/file-existence-action@v2
154154
id: grype_report
155155
with:
156-
files: "${{ steps.grype_analysis_sarif.outputs.sarif }}, ${{ steps.grype_analysis_json.outputs.report }}"
156+
files: "${{ steps.grype_analysis_sarif.outputs.sarif }}, ${{ steps.grype_analysis_json.outputs.json }}"
157157
fail: true
158158

159159
# Grype CVE Action generates an ./results.sarif or ./results.report and no way to customize output file name
@@ -162,7 +162,7 @@ runs:
162162
shell: bash
163163
run: |
164164
mv ${{ steps.grype_analysis_sarif.outputs.sarif }} ${{ steps.meta.outputs.grype_sarif_file }}
165-
mv ${{ steps.grype_analysis_json.outputs.report }} ${{ steps.meta.outputs.grype_json_file }}
165+
mv ${{ steps.grype_analysis_json.outputs.json }} ${{ steps.meta.outputs.grype_json_file }}
166166
167167
- name: Upload grype analysis report
168168
uses: actions/upload-artifact@v3
@@ -185,7 +185,7 @@ runs:
185185
# Notify grype quick scan results in table format
186186
# Table format will supress any specified ignore rules
187187
- name: Inspect Vulnerability analysis of SBOM
188-
uses: anchore/scan-action@v3.3.4
188+
uses: anchore/scan-action@v3.3.5
189189
if: ${{ steps.sbom_report.outputs.files_exists == 'true' }}
190190
with:
191191
sbom: ${{ steps.meta.outputs.sbom_spdx_file }}

security-actions/scan-docker-image/action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ runs:
111111

112112
# Don't fail during report generation
113113
- name: Vulnerability analysis of SBOM
114-
uses: anchore/scan-action@v3.3.4
114+
uses: anchore/scan-action@v3.3.5
115115
id: grype_analysis_sarif
116116
if: ${{ steps.sbom_report.outputs.files_exists == 'true' }}
117117
with:
@@ -123,7 +123,7 @@ runs:
123123
# Don't fail during report generation
124124
# JSON format will report any ignored rules
125125
- name: Vulnerability analysis of SBOM
126-
uses: anchore/scan-action@v3.3.4
126+
uses: anchore/scan-action@v3.3.5
127127
id: grype_analysis_json
128128
if: ${{ steps.sbom_report.outputs.files_exists == 'true' }}
129129
with:
@@ -136,7 +136,7 @@ runs:
136136
uses: andstor/file-existence-action@v2
137137
id: grype_report
138138
with:
139-
files: "${{ steps.grype_analysis_sarif.outputs.sarif }}, ${{ steps.grype_analysis_json.outputs.report }}"
139+
files: "${{ steps.grype_analysis_sarif.outputs.sarif }}, ${{ steps.grype_analysis_json.outputs.json }}"
140140
fail: true
141141

142142
# Grype CVE Action generates an ./results.sarif or ./results.report and no way to customize output file name
@@ -145,7 +145,7 @@ runs:
145145
shell: bash
146146
run: |
147147
mv ${{ steps.grype_analysis_sarif.outputs.sarif }} ${{ steps.meta.outputs.grype_sarif_file }}
148-
mv ${{ steps.grype_analysis_json.outputs.report }} ${{ steps.meta.outputs.grype_json_file }}
148+
mv ${{ steps.grype_analysis_json.outputs.json }} ${{ steps.meta.outputs.grype_json_file }}
149149
150150
- name: Upload grype analysis report
151151
uses: actions/upload-artifact@v3
@@ -193,7 +193,7 @@ runs:
193193
# Notify grype quick scan results in table format
194194
# Table format will supress any specified ignore rules
195195
- name: Inspect Vulnerability analysis of SBOM
196-
uses: anchore/scan-action@v3.3.4
196+
uses: anchore/scan-action@v3.3.5
197197
if: ${{ steps.sbom_report.outputs.files_exists == 'true' }}
198198
with:
199199
sbom: ${{ steps.meta.outputs.sbom_spdx_file }}

0 commit comments

Comments
 (0)