Skip to content

Mer informative røde dager #156

Mer informative røde dager

Mer informative røde dager #156

# 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'