Skip to content

Commit

Permalink
add trivy security scanning
Browse files Browse the repository at this point in the history
  • Loading branch information
Thijs van Loef committed Feb 20, 2024
1 parent 63e2001 commit 9ee85a7
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Security
on:
pull_request:

jobs:
container-scanning:
name: Security - Container Scan
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and export to Docker
uses: docker/build-push-action@v5
with:
file: ./Dockerfile
load: true
tags: security

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'security'
ignore-unfixed: true
format: 'sarif'
output: 'trivy-results.sarif'

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivy-results.sarif'
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ palworld
.idea
!charts/*
values*.yaml
.env
.env
.vscode

0 comments on commit 9ee85a7

Please sign in to comment.