Skip to content

Commit 9972f3e

Browse files
Introduce .snyk options (#369)
* Introduce .snyk options * Circumvent SNYK-JAVA-ORGYAML-2806360
1 parent 1c30d6b commit 9972f3e

File tree

4 files changed

+27
-3
lines changed

4 files changed

+27
-3
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
- name: Setup snyk
8686
uses: snyk/actions/[email protected]
8787
- name: Snyk test
88-
run: snyk test -d --all-sub-projects --org=hypertrace --severity-threshold=low --configuration-matching="^runtimeClasspath$"
88+
run: snyk test -d --all-sub-projects --org=hypertrace --severity-threshold=low --policy-path=.snyk --configuration-matching="^runtimeClasspath$"
8989
env:
9090
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
9191
GRADLE_OPTS: -Dorg.gradle.workers.max=1

.snyk

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
2+
version: v1.22.1
3+
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
4+
ignore:
5+
SNYK-JAVA-ORGJETBRAINSKOTLIN-2393744:
6+
- '*':
7+
reason: no available replacement
8+
expires: 2022-11-30T00:00:00.000Z

javaagent-core/build.gradle.kts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,13 @@ dependencies {
99
api("io.opentelemetry:opentelemetry-api:${versions["opentelemetry"]}")
1010
api("io.opentelemetry.javaagent:opentelemetry-javaagent-instrumentation-api:${versions["opentelemetry_java_agent"]}")
1111
implementation("org.slf4j:slf4j-api:${versions["slf4j"]}")
12-
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.3")
12+
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.3") {
13+
constraints {
14+
implementation("org.yaml:snakeyaml:1.31") {
15+
because(
16+
"SNYK error SNYK-JAVA-ORGYAML-2806360"
17+
)
18+
}
19+
}
20+
}
1321
}

otel-extensions/build.gradle.kts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,15 @@ dependencies {
4747
api("com.google.protobuf:protobuf-java")
4848
api("com.google.protobuf:protobuf-java-util")
4949
// convert yaml to json, since java protobuf impl supports only json
50-
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.3")
50+
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.3") {
51+
constraints {
52+
implementation("org.yaml:snakeyaml:1.31") {
53+
because(
54+
"SNYK error SNYK-JAVA-ORGYAML-2806360"
55+
)
56+
}
57+
}
58+
}
5159
// fix vulnerability
5260
constraints {
5361
api("com.google.code.gson:gson:2.8.9")

0 commit comments

Comments
 (0)