Skip to content

Commit

Permalink
Create snyk-container.yml (#28)
Browse files Browse the repository at this point in the history
Add Snyk container vulnerability checker
  • Loading branch information
melikhov-dev authored Nov 16, 2023
1 parent d7f4d09 commit 6637168
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/snyk-container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Snyk Container

on:
workflow_dispatch:
schedule:
- cron: '37 6 * * *'

permissions:
contents: read

jobs:
snyk:
permissions:
contents: read
security-events: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build a Docker image
run: docker build -t your/image-to-test .
- name: Run Snyk to check Docker image for vulnerabilities
continue-on-error: true
uses: snyk/actions/docker@14818c4695ecc4045f33c9cee9e795a788711ca4
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: your/image-to-test
args: --file=Dockerfile --org=${{ vars.SNYK_ORG }}
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: snyk.sarif

0 comments on commit 6637168

Please sign in to comment.