Skip to content

Commit

Permalink
trivy wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmaccoll committed Jun 11, 2024
1 parent c761434 commit 340fbb0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 21 deletions.
27 changes: 6 additions & 21 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,11 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: build

on:
push:
branches: [ "main" ]
branches:
- main
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '29 13 * * 2'

permissions:
contents: read

jobs:
build:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
name: Build
runs-on: ubuntu-20.04
steps:
Expand All @@ -30,16 +14,17 @@ jobs:

- name: Build an image from Dockerfile
run: |
docker build -t hello-world-python3-flask-k8s:latest .
docker build -t k8s-test-app:latest .
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.20.0
uses: aquasecurity/trivy-action@0.22.0
with:
image-ref: 'k8s-test-app:latest'
format: 'sarif'
output: 'trivy-results.sarif'

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: 'trivy-results.sarif'
File renamed without changes.

0 comments on commit 340fbb0

Please sign in to comment.