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

ci: add trivy #4

Open
wants to merge 1 commit into
base: immutable-root-fs
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
ci: add trivy
  • Loading branch information
IronCore864 committed Nov 28, 2021
commit 70f6d6af3d96173999aea2564acc2769e01b7482
27 changes: 27 additions & 0 deletions .github/workflows/ci.yaml
@@ -0,0 +1,27 @@
name: build

on:
push:
branches:
- main
pull_request:

jobs:
build:
name: Build
runs-on: ubuntu-18.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build an image from Dockerfile
run: docker build -t ironcore864/k8s-security-demo:${{ github.sha }} .

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'docker.io/ironcore864/k8s-security-demo:${{ github.sha }}'
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'