-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Trivy and SBOM actions (#635)
Signed-off-by: Abolfazl Shahbazi <[email protected]>
- Loading branch information
Showing
1 changed file
with
16 additions
and
4 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -57,11 +57,23 @@ jobs: | |
docker pull ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }} | ||
echo "OPEA_IMAGE_REPO=${OPEA_IMAGE_REPO}" >> $GITHUB_ENV | ||
- name: Scan Container | ||
uses: opea-project/validation/actions/license-scan@main # TODO | ||
- name: SBOM Scan Container | ||
uses: anchore/[email protected] | ||
with: | ||
image: ${{ env.OPEA_IMAGE_REPO }}opea/${{ matrix.image }}:${{ inputs.tag }} | ||
output-file: ${{ matrix.image }}-sbom-scan.txt | ||
format: 'spdx-json' | ||
|
||
- name: Security Scan Container | ||
uses: aquasecurity/[email protected] | ||
with: | ||
image-ref: ${{ env.OPEA_IMAGE_REPO }}opea/${{ matrix.image }}:${{ inputs.tag }} | ||
output: ${{ matrix.image }}-scan.txt | ||
output: ${{ matrix.image }}-trivy-scan.txt | ||
format: 'table' | ||
exit-code: '1' | ||
ignore-unfixed: true | ||
vuln-type: 'os,library' | ||
severity: 'CRITICAL,HIGH' | ||
|
||
- name: Cleanup | ||
if: always() | ||
|
@@ -70,5 +82,5 @@ jobs: | |
- uses: actions/[email protected] | ||
with: | ||
name: ${{ matrix.image }}-scan | ||
path: ${{ matrix.image }}-scan.txt | ||
path: ${{ matrix.image }}-*-scan.txt | ||
overwrite: true |