Mer informative røde dager #156
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: Run trivy-scan on frontend | |
on: | |
pull_request: | |
paths: | |
- 'packages/frontend/**' | |
permissions: | |
contents: read | |
jobs: | |
build: | |
permissions: | |
contents: read # for actions/checkout to fetch code | |
name: Run trivy-scan on frontend | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Build an image from Dockerfile | |
run: | | |
docker build -t frontend:${{ github.sha }} ./packages/frontend/ | |
- name: Run Trivy vulnerability scanner | |
id: runtrivy | |
uses: aquasecurity/trivy-action@master | |
with: | |
image-ref: 'frontend:${{ github.sha }}' | |
format: 'template' | |
template: '@/contrib/sarif.tpl' | |
output: 'trivy-results.sarif' | |
- name: Post results as comment | |
uses: github/codeql-action/upload-sarif@v1 | |
with: | |
sarif_file: 'trivy-results.sarif' |