From 8701cf7696bdfd35b7144d268333fc7d2e286b31 Mon Sep 17 00:00:00 2001 From: "Taher A. Alkhateeb" Date: Wed, 27 Sep 2017 13:17:21 +0000 Subject: [PATCH] Improved: upgraded and cleaned the implementation for OWASP dependency checker This commit achieves the following improvements to the OWASP gradle plugin for dependency checks: - Upgrade the version from 1.4.0 to 2.1.1 - Remove the dependency on MavenCentral and replace it with a custom link to the original source of work using a custom maven URL. Thus all dependencies are downloaded from JCenter to avoid duplication of library downloads. - Update README.md on how to use this task git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1809846 13f79535-47bb-0310-9956-ffa450edef68 --- README.md | 8 +++----- build.gradle | 8 +++++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 25fe3112b3..e1914ad5f6 100644 --- a/README.md +++ b/README.md @@ -491,12 +491,10 @@ Xlint prints output of all warnings detected by the compiler The below command activates a gradle plugin (OWASP) and Identifies and reports known vulnerabilities (CVEs) in OFBiz library dependencies. -This command takes a long time to execute because it needs to download -all plugin dependencies and the CVE identification process is also -time consuming. But it's the only way to check OFBiz does not use -vulnerable libraries. +The task takes time to complete, and once done, a report will be generated in +$OFBIZ_HOME/build/reports/dependency-check-report.html -`gradlew -PenableOwasp dependencyCheck` +`gradlew -PenableOwasp dependencyCheckAnalyze` #### Setup eclipse project for OFBiz diff --git a/build.gradle b/build.gradle index 02d06455ab..5566789e58 100644 --- a/build.gradle +++ b/build.gradle @@ -283,15 +283,17 @@ tasks.eclipse.dependsOn(cleanEclipse) * gradle will download required dependencies and * activate Gradle's OWASP plugin and its related tasks. * - * Syntax: gradlew -PenableOwasp dependencyCheck + * Syntax: gradlew -PenableOwasp dependencyCheckAnalyze */ buildscript { if (project.hasProperty('enableOwasp')) { repositories { - mavenCentral() + maven { + url "https://plugins.gradle.org/m2/" + } } dependencies { - classpath 'org.owasp:dependency-check-gradle:1.4.0' + classpath 'org.owasp:dependency-check-gradle:2.1.1' } } }