Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add trivy scanner github action to report vulnarabiliites. #2078

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/trivy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: trivy vulnerability scanner
# yamllint disable-line rule:truthy
on:
push:
branches:
- main
pull_request:
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v3

- name: install go
uses: actions/[email protected]
with:
go-version: ^1.20

- name: build Ceph container images daemon-base and demo
run: |
make build BASEOS_REPO=centos BASEOS_REGISTRY=quay.io/centos BASEOS_TAG=stream8 FLAVORS="main,centos,8" IMAGES_TO_BUILD="daemon-base demo"

- name: run trivy vulnerability scanner against demo
uses: aquasecurity/trivy-action@master
with:
image-ref: 'quay.io/ceph/demo:HEAD-main-centos-stream8-x86_64'
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN'
Loading