Skip to content

Commit 989a30b

Browse files
authored
OBaaS Image - remove restricted action (#796)
* Add workflow * Update obaas-base-image.yml Change usage to comply with action restrictions
1 parent 473c44a commit 989a30b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/obaas-base-image.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ jobs:
4444
- name: Run Trivy Vulnerability Scanner
4545
id: trivy_scan
4646
if: env.latest_digest != ''
47-
uses: aquasecurity/trivy-action@master
48-
with:
49-
image-ref: ghcr.io/${{ github.repository_owner }}/${{ env.dst_img }}:latest
50-
format: 'table'
51-
exit-code: '1'
52-
ignore-unfixed: true
53-
vuln-type: 'os,library'
54-
severity: 'CRITICAL,HIGH'
47+
env:
48+
TRIVY_DEFAULT: "--format table --ignore-unfixed --exit-code 1"
49+
TRIVY_SCAN: "--severity CRITICAL,HIGH --vuln-type os,library"
50+
run: >
51+
docker run --rm ghcr.io/aquasecurity/trivy:latest image $TRIVY_DEFAULT $TRIVY_SCAN
52+
--username ${{ github.actor }}
53+
--password ${{ secrets.GITHUB_TOKEN }}
54+
ghcr.io/${{ github.repository_owner }}/${{ env.dst_img }}:latest
5555
continue-on-error: true
5656

5757
- name: Update Existing Image

0 commit comments

Comments
 (0)