Skip to content

Commit

Permalink
Add an automated vulnerability check (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
A3a3e1 authored May 4, 2022
1 parent 967060d commit 5ca71ab
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 1.0.5 (May 6, 2022)
* Add an automated vulnerability check

## 1.0.4 (April 08, 2022)
* Updated the Sailor version to 3.3.9

Expand Down
21 changes: 21 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'java-library-distribution'
apply plugin: org.owasp.dependencycheck.gradle.DependencyCheckPlugin

group = 'io.elastic'

Expand Down Expand Up @@ -48,6 +49,26 @@ uploadArchives {
}
}

check.dependsOn dependencyCheckAnalyze

dependencyCheck {
format = 'ALL'
// Dependency Check script will fail in case there are critical (9.0-10.0) vulnerabilities.
// It should be configured to 7 (high and critical), but so far is not possible as 'axis' library
// and log4j issues which does not have any updates that solve the problem
failBuildOnCVSS = 7
suppressionFile='./dependencyCheck-suppression.xml'
}

buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.owasp:dependency-check-gradle:6.0.3'
}
}

wrapper {
gradleVersion = '5.4.1'
}
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "Petstore API (Java)",
"description": "elastic.io component for the Petstore API",
"docsUrl": "https://github.com/elasticio/petstore-component-java",
"version": "1.0.4",
"version": "1.0.5",
"credentials": {
"fields": {
"apiKey": {
Expand Down
28 changes: 28 additions & 0 deletions dependencyCheck-suppression.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<suppressions xmlns="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.3.xsd">
<suppress>
<notes><![CDATA[
file name: logback-jackson-0.1.5.jar
]]>
</notes>
<packageUrl regex="true">^pkg:maven/ch\.qos\.logback\.contrib/logback\-jackson@.*$</packageUrl>
<cve>CVE-2017-5929</cve>
<cve>CVE-2021-42550</cve>
</suppress>
<suppress>
<notes><![CDATA[
file name: logback-json-classic-0.1.5.jar
]]>
</notes>
<packageUrl regex="true">^pkg:maven/ch\.qos\.logback\.contrib/logback\-json\-classic@.*$</packageUrl>
<cpe>cpe:/a:qos:logback</cpe>
</suppress>
<suppress>
<notes><![CDATA[
file name: logback-json-core-0.1.5.jar
]]>
</notes>
<packageUrl regex="true">^pkg:maven/ch\.qos\.logback\.contrib/logback\-json\-core@.*$</packageUrl>
<cpe>cpe:/a:qos:logback</cpe>
</suppress>
</suppressions>

0 comments on commit 5ca71ab

Please sign in to comment.