Skip to content

Commit 939dff4

Browse files
pdabelf5AlexFenlon
authored andcommitted
remove sarif artifact upload for images in feature branches (#5850)
1 parent 4357b9b commit 939dff4

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed

.github/workflows/build-oss.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,10 @@ jobs:
177177
- name: Make directory for security scan results
178178
run: |
179179
mkdir -p "${{ inputs.image }}-results/"
180+
if: ${{ inputs.authenticated && steps.build-push.conclusion == 'success' }}
180181

181182
- name: Run Trivy vulnerability scanner
182183
uses: aquasecurity/trivy-action@7c2007bcb556501da015201bcba5aa14069b74e2 # 0.23.0
183-
continue-on-error: true
184184
with:
185185
image-ref: nginx/nginx-ingress:${{ steps.meta.outputs.version }}
186186
format: "sarif"
@@ -198,7 +198,6 @@ jobs:
198198
- name: Run Docker Scout vulnerability scanner
199199
id: docker-scout
200200
uses: docker/scout-action@fc749439af4870e8f6feb592250ab728600d10a6 # v1.10.0
201-
continue-on-error: true
202201
with:
203202
command: cves,recommendations
204203
image: ${{ steps.meta.outputs.tags }}
@@ -209,11 +208,3 @@ jobs:
209208
github-token: ${{ secrets.GITHUB_TOKEN }} # to be able to write the comment
210209
summary: true
211210
if: ${{ inputs.authenticated && steps.build-push.conclusion == 'success' }}
212-
213-
- name: Upload Scan Results to Github Artifacts
214-
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
215-
continue-on-error: true
216-
with:
217-
name: "${{ inputs.image }}-results"
218-
path: "${{ inputs.image }}-results/"
219-
if: ${{ inputs.authenticated && steps.build-push.conclusion == 'success' }}

.github/workflows/build-plus.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ jobs:
194194
- name: Make directory for security scan results
195195
run: |
196196
mkdir -p "${{ inputs.image }}-results/"
197+
if: ${{ inputs.authenticated && steps.build-push.conclusion == 'success' }}
197198

198199
- name: Extract image name for Scans
199200
id: scan-tag
@@ -204,7 +205,6 @@ jobs:
204205

205206
- name: Run Trivy vulnerability scanner
206207
uses: aquasecurity/trivy-action@7c2007bcb556501da015201bcba5aa14069b74e2 # 0.23.0
207-
continue-on-error: true
208208
with:
209209
image-ref: ${{ steps.scan-tag.outputs.tag }}
210210
format: "sarif"
@@ -222,7 +222,6 @@ jobs:
222222
- name: Run Docker Scout vulnerability scanner
223223
id: docker-scout
224224
uses: docker/scout-action@fc749439af4870e8f6feb592250ab728600d10a6 # v1.10.0
225-
continue-on-error: true
226225
with:
227226
command: cves,recommendations
228227
image: ${{ steps.scan-tag.outputs.tag }}
@@ -233,11 +232,3 @@ jobs:
233232
github-token: ${{ secrets.GITHUB_TOKEN }} # to be able to write the comment
234233
summary: true
235234
if: ${{ inputs.authenticated && steps.build-push.conclusion == 'success' }}
236-
237-
- name: Upload Scan Results
238-
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
239-
continue-on-error: true
240-
with:
241-
name: "${{ inputs.image }}-results"
242-
path: "${{ inputs.image }}-results/"
243-
if: ${{ inputs.authenticated && steps.build-push.conclusion == 'success' }}

0 commit comments

Comments
 (0)