-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dcfb99f
commit d046ecd
Showing
3 changed files
with
52 additions
and
15 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: scan image | ||
description: scan a container image for vulnerabilities | ||
inputs: | ||
image: | ||
required: true | ||
description: container image to scan | ||
|
||
outputs: | ||
sarif: | ||
value: ${{ steps.output-sarif.outputs.sarif }} | ||
description: results of the container scan in SARIF format | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: scan container image | ||
uses: anchore/scan-action@v3 | ||
id: scan | ||
with: | ||
image: ${{ inputs.image }} | ||
acs-report-enable: true | ||
fail-build: false | ||
severity-cutoff: high | ||
|
||
- id: output-sarif | ||
run: echo "sarif=${{ steps.scan.outputs.sarif }}" >> $GITHUB_OUTPUT | ||
shell: bash | ||
|
||
- name: inspect action SARIF report | ||
run: cat ${{ steps.scan.outputs.sarif }} | ||
shell: bash | ||
|
||
# TODO: submit sarif report to an API endpoint | ||
# PAT auth to an API that stores sarif reports. | ||
- name: submit SARIF report | ||
run: echo "submitting SARIF report" | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters