Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SECURITY-1506] Implementing Snyk into Github Actions #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/snyk-security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "Snyk Workflow -- Go"

on: push

jobs:
snyk-scan:
permissions:
contents: "read"
id-token: "write"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Authenticate to Google Cloud for accessing Snyk token
uses: "google-github-actions/auth@v2"
with:
workload_identity_provider: "projects/747834912006/locations/global/workloadIdentityPools/epidemicsound/providers/github"
service_account: "sast-dast-sa@es-platform-staging-fc6c.iam.gserviceaccount.com"

- id: "secrets"
name: Access Snyk secret token
uses: "google-github-actions/get-secretmanager-secrets@v2"
with:
secrets: |-
token:es-platform-staging-fc6c/snyk-token-secret

- name: Setup Snyk
uses: snyk/actions/setup@master

- name: Add Snyk scan results to Snyk dashboard
run: snyk monitor -d --all-projects
continue-on-error: true
env:
SNYK_TOKEN: ${{ steps.secrets.outputs.token }}

- name: Run Snyk to check for vulnerabilities
run: snyk test --severity-threshold=critical --all-projects
env:
SNYK_TOKEN: ${{ steps.secrets.outputs.token }}
Loading