Skip to content

Remove snyk. #374

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

Merged
merged 3 commits into from
Oct 24, 2022
Merged
Show file tree
Hide file tree
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
48 changes: 30 additions & 18 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,33 @@ jobs:
JVM_OPTS: -Xmx1g
TERM: dumb

snyk-scan:
runs-on: ubuntu-20.04
steps:
# Set fetch-depth: 0 to fetch commit history and tags for use in version calculation
- name: Check out code
uses: actions/[email protected]
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
fetch-depth: 0
submodules: true
- name: Setup snyk
uses: snyk/actions/[email protected]
- name: Snyk test
run: snyk test -d --all-sub-projects --org=hypertrace --severity-threshold=low --policy-path=.snyk --configuration-matching="^runtimeClasspath$"
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
GRADLE_OPTS: -Dorg.gradle.workers.max=1
#TODO
# dependency-check:
# runs-on: ubuntu-20.04
# steps:
# - name: Check out code
# uses: actions/[email protected]
# with:
# ref: ${{github.event.pull_request.head.ref}}
# repository: ${{github.event.pull_request.head.repo.full_name}}
# fetch-depth: 0
# submodules: true
#
# - name: create checksum file
# uses: hypertrace/github-actions/checksum@main
#
# - name: Cache packages
# id: cache-packages
# uses: actions/cache@v2
# with:
# path: ~/.gradle
# key: gradle-packages-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/checksum.txt') }}
# restore-keys: |
# gradle-packages-${{ runner.os }}-${{ github.job }}
# gradle-packages-${{ runner.os }}
#
# - name: dependency check
# run: make dependency-check
# env:
# JVM_OPTS: -Xmx1g
# TERM: dumb
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@ clean:
.PHONY: init-submodules
init-submodules:
git submodule update --init

.PHONY: dependency-check
dependency-check:
./gradlew dependencyCheckAggregate
8 changes: 8 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ plugins {
id("org.hypertrace.publish-maven-central-plugin") version "1.0.4" apply false
id("org.hypertrace.ci-utils-plugin") version "0.3.0"
id("org.gradle.test-retry") version "1.2.0" apply false
id("org.owasp.dependencycheck") version "7.1.1"
}

allprojects {
Expand Down Expand Up @@ -89,3 +90,10 @@ subprojects {
}
}
}

dependencyCheck {
format = org.owasp.dependencycheck.reporting.ReportGenerator.Format.valueOf("ALL")
// suppressionFile = "owasp-suppressions.xml"
scanConfigurations.add("runtimeClasspath")
failBuildOnCVSS = 7.0F
}