Skip to content

Commit

Permalink
fix: add continue on error to jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
clay-lake committed Nov 29, 2024
1 parent 4e0841f commit b0bc953
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/Vulnerability-Scan.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
name: Vulnerability Scan
run-name: 'Vulnerability Scan - ${{ inputs.oci-image-name }} - ${{ github.ref }}'
run-name: "Vulnerability Scan - ${{ inputs.oci-image-name }} - ${{ github.ref }}"

on:
workflow_call:
inputs:
oci-image-name:
description: 'Name of the image to be fetched and tested'
description: "Name of the image to be fetched and tested"
required: true
type: string
oci-image-path:
description: 'Path to the image in this repo (eg. "oci/foo")'
required: true
type: string
date-last-scan:
description: 'If there are new CVEs after this date, we notify'
description: "If there are new CVEs after this date, we notify"
required: false
type: string
default: '9999-12-31T23:59:59'
default: "9999-12-31T23:59:59"
create-issue:
description: 'If to create a GitHub issues for found vulnerabilities'
description: "If to create a GitHub issues for found vulnerabilities"
required: false
type: boolean
default: false

env:
VULNERABILITY_REPORT_SUFFIX: '.vulnerability-report.json' # TODO: inherit string from caller
SKOPEO_IMAGE: 'quay.io/skopeo/stable:v1.15.1'
VULNERABILITY_REPORT_SUFFIX: ".vulnerability-report.json" # TODO: inherit string from caller
SKOPEO_IMAGE: "quay.io/skopeo/stable:v1.15.1"

jobs:
configure-scan:
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
needs: [configure-scan]
with:
oci-archive-name: ${{ needs.configure-scan.outputs.oci-image }}
test-vulnerabilities: true # just incase we set this to false by default in the future
test-vulnerabilities: true # just incase we set this to false by default in the future
test-oci-compliance: false
test-efficiency: false
test_malware: false
Expand All @@ -71,6 +71,7 @@ jobs:
name: "parse-results ${{ inputs.oci-image-name != '' && format('| {0}', inputs.oci-image-name) || ' '}}"
runs-on: ubuntu-22.04
needs: [configure-scan, test-vulnerabilities]
if: ${{ !cancelled() }}
outputs:
notify: ${{ steps.check-report.outputs.notify }}
vulnerabilities: ${{ steps.check-report.outputs.vulnerabilities }}
Expand All @@ -88,7 +89,7 @@ jobs:
- name: Download Vulnerability Report
uses: actions/download-artifact@v4
with:
name: '${{ needs.configure-scan.outputs.vulnerability-report }}'
name: "${{ needs.configure-scan.outputs.vulnerability-report }}"

- name: Process report
if: ${{ !cancelled() }}
Expand Down Expand Up @@ -132,7 +133,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: "3.x"

- name: Get contacts for ${{ inputs.oci-image-name }}
id: get-contacts
Expand All @@ -147,9 +148,9 @@ jobs:
FINAL_STATUS: failure
MM_SERVER: ${{ secrets.MM_SERVER }}
URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
SUMMARY: ''
FOOTER: ''
TITLE: 'Vulnerabilities found for ${{ inputs.oci-image-name }}'
SUMMARY: ""
FOOTER: ""
TITLE: "Vulnerabilities found for ${{ inputs.oci-image-name }}"
run: |
for channel in $(echo ${{ steps.get-contacts.outputs.mattermost-channels }} | tr ',' ' ')
do
Expand All @@ -168,7 +169,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: "3.x"

- run: pip install pydantic==2.8.2

Expand Down

0 comments on commit b0bc953

Please sign in to comment.