Skip to content

Skriv om til moduler #34

Skriv om til moduler

Skriv om til moduler #34

Workflow file for this run

name: Snyk Container
on:
release:
types: [published]
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
snyk:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ github.token }}
steps:
- uses: actions/checkout@v4
- name: R setup
uses: r-lib/actions/setup-r@v2
- name: Build package (tarball)
run: R CMD build .
- name: Build docker image
run: docker build -t snyktest --secret id=GITHUB_PAT .
- name: Run Snyk to check Docker image for vulnerabilities
continue-on-error: true
uses: snyk/actions/docker@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: snyktest
args: --file=Dockerfile --severity-threshold=high
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: snyk.sarif
- name: Accept only vulnerability levels below high
continue-on-error: false
uses: snyk/actions/docker@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: snyktest
args: --file=Dockerfile --severity-threshold=high