Skip to content

Commit

Permalink
add trivy
Browse files Browse the repository at this point in the history
  • Loading branch information
jiaqiluo committed Apr 30, 2024
1 parent f921bd4 commit f6f4772
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/trivy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Run Fossa Scan

on:
push:
tags:
- '*'
branches:
- "gha-*" # for testing
pull_request:


jobs:
fossa:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Get base image
id: base
run: |
image= ${grep hyperkube-base Dockerfile | awk '{ print $$2 }'}
echo "hyberkube=${image}" >> "$GITHUB_ENV"
- name: Run Trivy scanner
uses: aquasecurity/trivy-action@d710430a6722f083d3b36b8339ff66b32f22ee55 # v0.19.0
with:
image-ref: ${{ steps.base.outputs.hyberkube }}
exit-code: '1'
severity: 'CRITICAL,HIGH'

0 comments on commit f6f4772

Please sign in to comment.