forked from GoogleCloudPlatform/gatekeeper-securitycenter
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (32 loc) · 1.21 KB
/
snyk-security.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Run Snyk Scan -- Go
on: push
jobs:
snyk-scan-python:
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: "[email protected]"
- 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 }}