Skip to content

Commit

Permalink
Merge pull request #414 from thijsvanloef/add-sec-scan
Browse files Browse the repository at this point in the history
add trivy security scanning
  • Loading branch information
thijsvanloef authored Feb 20, 2024
2 parents 63e2001 + 97c9754 commit 3dc53db
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Release
on: # yamllint disable-line rule:truthy
on: # yamllint disable-line rule:truthy
release:
types: [published]

Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Security
on: # yamllint disable-line rule:truthy
pull_request:
schedule:
- cron: 0 0 * * *

jobs:
container-scanning:
name: 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 3dc53db

Please sign in to comment.