From 6e1685b7185dd5f3379abcf9b56eeae0efc50e3d Mon Sep 17 00:00:00 2001 From: spencerpearlman <150054839+spencerpearlman@users.noreply.github.com> Date: Thu, 23 May 2024 11:28:35 +0200 Subject: [PATCH] Update snyk-security.yml --- .github/workflows/snyk-security.yml | 37 +++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/.github/workflows/snyk-security.yml b/.github/workflows/snyk-security.yml index 362f805..a2d02b4 100644 --- a/.github/workflows/snyk-security.yml +++ b/.github/workflows/snyk-security.yml @@ -1,8 +1,37 @@ -name: Run Snyk Scan for Package Vulnerabilities for gatekeeper-securitycenter -'on': push +name: Run Snyk Scan -- Go +on: push jobs: - snyk-scan-go: + snyk-scan-python: permissions: contents: read id-token: write - uses: epidemicsound/github-workflows/.github/workflows/snyk-scan-go.yaml@main + 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 -d --all-projects + env: + SNYK_TOKEN: ${{ steps.secrets.outputs.token }}