Skip to content

Commit

Permalink
Snyk test k8s IAC (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmarques authored Dec 8, 2024
2 parents 520824b + 49fb447 commit 5cf54f5
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/snyk-iac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Snyk scan

on:
push:
branches:
- 'master'
paths:
- 'k8s/**'
pull_request:
branches:
- master
paths:
- 'k8s/**'

permissions:
contents: read

jobs:
security:
runs-on: ubuntu-24.04

permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Run Snyk to check IAC
uses: snyk/actions/iac@b98d498629f1c368650224d6d212bf7dfa89e4bf #v0.4.0
continue-on-error: true # To make sure that SARIF upload gets called
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
file: k8s
args: --sarif-file-output=snyk.sarif

- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@0b21cf2492b6b02c465a3e5d7c473717ad7721ba # v3.23.1
with:
sarif_file: snyk.sarif

0 comments on commit 5cf54f5

Please sign in to comment.