Skip to content

Commit c796115

Browse files
authored
Make deps check task run in CI/CD (#88)
1 parent b685579 commit c796115

File tree

4 files changed

+18
-15
lines changed

4 files changed

+18
-15
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
- ~/.gradle/wrapper
8888
- run:
8989
name: Audit Dependencies
90-
command: ./gradlew dependencyCheckAnalyze
90+
command: ./gradlew dependencyCheckAnalyze -PrunWithDependencyCheck
9191
- run:
9292
name: Run Unit Tests
9393
command: ./gradlew test --daemon

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 2.5.4 (May 11, 2022)
2+
* Made an automated vulnerability check run in CI/CD
3+
14
## 2.5.3 (May 06, 2022)
25
* Add an automated vulnerability check
36

build.gradle

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,18 @@ apply plugin: 'java'
33
apply plugin: 'idea'
44
apply plugin: 'eclipse'
55
apply plugin: 'groovy'
6-
apply plugin: org.owasp.dependencycheck.gradle.DependencyCheckPlugin
6+
7+
if (hasProperty('runWithDependencyCheck')) {
8+
apply plugin: org.owasp.dependencycheck.gradle.DependencyCheckPlugin
9+
10+
check.dependsOn dependencyCheckAnalyze
11+
12+
dependencyCheck {
13+
format = 'HTML'
14+
failBuildOnCVSS = 7
15+
suppressionFile='./dependencyCheck-suppression.xml'
16+
}
17+
}
718

819
sourceSets {
920
integrationTest {
@@ -72,23 +83,12 @@ dependencies {
7283
testCompile 'org.spockframework:spock-core:1.1-groovy-2.4'
7384
}
7485

75-
check.dependsOn dependencyCheckAnalyze
76-
77-
dependencyCheck {
78-
format = 'ALL'
79-
// Dependency Check script will fail in case there are critical (9.0-10.0) vulnerabilities.
80-
// It should be configured to 7 (high and critical), but so far is not possible as 'axis' library
81-
// and log4j issues which does not have any updates that solve the problem
82-
failBuildOnCVSS = 7
83-
suppressionFile='./dependencyCheck-suppression.xml'
84-
}
85-
8686
buildscript {
8787
repositories {
8888
mavenCentral()
8989
}
9090
dependencies {
91-
classpath 'org.owasp:dependency-check-gradle:6.0.3'
91+
classpath 'org.owasp:dependency-check-gradle:7.1.0.1'
9292
}
9393
}
9494

component.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"title": "Database",
33
"description": "Database JDBC connector",
4-
"version": "2.5.3",
4+
"version": "2.5.4",
55
"credentials": {
66
"verifier": "io.elastic.jdbc.JdbcCredentialsVerifier",
77
"fields": {

0 commit comments

Comments
 (0)