Skip to content

Commit c981dfc

Browse files
authored
Remove snyk. (#374)
* Remove snyk, use owasp dependency check * Add Makefile option and CI job * Comment out owasp dependency check and implement in separate PR.
1 parent 6ef6c30 commit c981dfc

File tree

3 files changed

+42
-18
lines changed

3 files changed

+42
-18
lines changed

.github/workflows/build.yaml

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -71,21 +71,33 @@ jobs:
7171
JVM_OPTS: -Xmx1g
7272
TERM: dumb
7373

74-
snyk-scan:
75-
runs-on: ubuntu-20.04
76-
steps:
77-
# Set fetch-depth: 0 to fetch commit history and tags for use in version calculation
78-
- name: Check out code
79-
uses: actions/[email protected]
80-
with:
81-
ref: ${{github.event.pull_request.head.ref}}
82-
repository: ${{github.event.pull_request.head.repo.full_name}}
83-
fetch-depth: 0
84-
submodules: true
85-
- name: Setup snyk
86-
uses: snyk/actions/[email protected]
87-
- name: Snyk test
88-
run: snyk test -d --all-sub-projects --org=hypertrace --severity-threshold=low --policy-path=.snyk --configuration-matching="^runtimeClasspath$"
89-
env:
90-
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
91-
GRADLE_OPTS: -Dorg.gradle.workers.max=1
74+
#TODO
75+
# dependency-check:
76+
# runs-on: ubuntu-20.04
77+
# steps:
78+
# - name: Check out code
79+
# uses: actions/[email protected]
80+
# with:
81+
# ref: ${{github.event.pull_request.head.ref}}
82+
# repository: ${{github.event.pull_request.head.repo.full_name}}
83+
# fetch-depth: 0
84+
# submodules: true
85+
#
86+
# - name: create checksum file
87+
# uses: hypertrace/github-actions/checksum@main
88+
#
89+
# - name: Cache packages
90+
# id: cache-packages
91+
# uses: actions/cache@v2
92+
# with:
93+
# path: ~/.gradle
94+
# key: gradle-packages-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/checksum.txt') }}
95+
# restore-keys: |
96+
# gradle-packages-${{ runner.os }}-${{ github.job }}
97+
# gradle-packages-${{ runner.os }}
98+
#
99+
# - name: dependency check
100+
# run: make dependency-check
101+
# env:
102+
# JVM_OPTS: -Xmx1g
103+
# TERM: dumb

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,7 @@ clean:
4646
.PHONY: init-submodules
4747
init-submodules:
4848
git submodule update --init
49+
50+
.PHONY: dependency-check
51+
dependency-check:
52+
./gradlew dependencyCheckAggregate

build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ plugins {
66
id("org.hypertrace.publish-maven-central-plugin") version "1.0.4" apply false
77
id("org.hypertrace.ci-utils-plugin") version "0.3.0"
88
id("org.gradle.test-retry") version "1.2.0" apply false
9+
id("org.owasp.dependencycheck") version "7.1.1"
910
}
1011

1112
allprojects {
@@ -89,3 +90,10 @@ subprojects {
8990
}
9091
}
9192
}
93+
94+
dependencyCheck {
95+
format = org.owasp.dependencycheck.reporting.ReportGenerator.Format.valueOf("ALL")
96+
// suppressionFile = "owasp-suppressions.xml"
97+
scanConfigurations.add("runtimeClasspath")
98+
failBuildOnCVSS = 7.0F
99+
}

0 commit comments

Comments
 (0)