Skip to content

Commit 47eaf12

Browse files
committed
Leverage DataStax's Snyk version as opposed to OSS version
1 parent 05bf0b5 commit 47eaf12

File tree

2 files changed

+46
-9
lines changed

2 files changed

+46
-9
lines changed

.github/workflows/snyk-cli-scan.yml

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,46 @@
1-
# GitHub action CI
2-
# trigger by:
3-
# any push on any protected branch: main, v6.8, releases/**
4-
# any PR crteated against any protected branch: main, v6.8, releases/**
1+
name: 🔬 Snyk cli SCA
52

6-
on:
3+
on:
74
push:
85
branches: [ main ]
96
pull_request:
107
branches: [ main ]
118
workflow_dispatch:
129

1310
env:
14-
SNYK_SEVERITY_THRESHOLD_LEVEL: critical
11+
SNYK_SEVERITY_THRESHOLD_LEVEL: high
12+
13+
jobs:
14+
snyk-cli-scan:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Git checkout
18+
uses: actions/checkout@v3
19+
20+
- name: prepare for snyk scan
21+
uses: datastax/shared-github-actions/actions/snyk-prepare@main
22+
23+
- name: Set up JDK 8
24+
uses: actions/setup-java@v3
25+
with:
26+
distribution: 'temurin'
27+
java-version: '8'
28+
cache: maven
29+
30+
- name: run maven install prepare for snyk
31+
run: |
32+
mvn -B -V install -DskipTests -Dmaven.javadoc.skip=true
33+
- name: snyk scan java
34+
uses: datastax/shared-github-actions/actions/snyk-scan-java@main
35+
with:
36+
directories: .
37+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
38+
SNYK_ORG_ID: ${{ secrets.SNYK_ORG_ID }}
39+
extra-snyk-options: "-DskipTests -Dmaven.javadoc.skip=true"
40+
41+
- name: Snyk scan result
42+
uses: datastax/shared-github-actions/actions/snyk-process-scan-results@main
43+
with:
44+
gh_repo_token: ${{ secrets.GITHUB_TOKEN }}
45+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
46+
SNYK_ORG_ID: ${{ secrets.SNYK_ORG_ID }}

.github/workflows/snyk-pr-cleanup.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
# GitHub Action CI
2-
# Snyk clean-up when PR is merged/closed
1+
name: 🗑️ Snyk PR cleanup - merged/closed
32

43
on:
54
pull_request:
65
types:
76
- closed
8-
branches:
7+
branches:
98
- main
109
workflow_dispatch:
1110

11+
jobs:
12+
snyk_project_cleanup_when_pr_closed:
13+
uses: datastax/shared-github-actions/.github/workflows/snyk-pr-cleanup.yml@main
14+
secrets:
15+
snyk_token: ${{ secrets.SNYK_TOKEN }}
16+
snyk_org_id: ${{ secrets.SNYK_ORG_ID }}

0 commit comments

Comments
 (0)