From a8fb89c257148a6146f0d290617f8732dad95377 Mon Sep 17 00:00:00 2001 From: Philippe Arteau Date: Wed, 5 Apr 2017 12:31:55 -0400 Subject: [PATCH 1/2] Update the CLI version +Gradle build for automation.. --- cli/.gitignore | 1 + cli/README.md | 11 +++++++++++ cli/banner.txt | 8 -------- cli/build.gradle | 15 +++++++++++++++ cli/findsecbugs.bat | 2 +- cli/findsecbugs.sh | 3 +-- cli/include.xml | 5 +++++ 7 files changed, 34 insertions(+), 11 deletions(-) create mode 100644 cli/.gitignore create mode 100644 cli/README.md delete mode 100644 cli/banner.txt create mode 100644 cli/build.gradle create mode 100644 cli/include.xml diff --git a/cli/.gitignore b/cli/.gitignore new file mode 100644 index 000000000..f1ff06d60 --- /dev/null +++ b/cli/.gitignore @@ -0,0 +1 @@ +lib/ \ No newline at end of file diff --git a/cli/README.md b/cli/README.md new file mode 100644 index 000000000..3b9fd2b7a --- /dev/null +++ b/cli/README.md @@ -0,0 +1,11 @@ +# Find Security Bugs - Command Line Version + +The latest package version is made available in the release section : https://github.com/find-sec-bugs/find-sec-bugs/releases + +## Building the package + +``` +gradle copyRuntimeLibs +``` + +The spotbugs dependencies and the latest FindSecurityBugs plugin will be place in the lib directory. \ No newline at end of file diff --git a/cli/banner.txt b/cli/banner.txt deleted file mode 100644 index b4bbd1b52..000000000 --- a/cli/banner.txt +++ /dev/null @@ -1,8 +0,0 @@ - ______ _ _ _____ ____ - | ____(_) | | / ____| | _ \ - | |__ _ _ __ __| | | (___ ___ ___ | |_) |_ _ __ _ ___ - | __| | | '_ \ / _` | \___ \ / _ \/ __| | _ <| | | |/ _` / __| - | | | | | | | (_| | ____) | __/ (__ | |_) | |_| | (_| \__ \ - |_| |_|_| |_|\__,_| |_____/ \___|\___| |____/ \__,_|\__, |___/ - __/ | - - Security Analysis for Java Applications - |___/ diff --git a/cli/build.gradle b/cli/build.gradle new file mode 100644 index 000000000..fce9c3e5b --- /dev/null +++ b/cli/build.gradle @@ -0,0 +1,15 @@ +apply plugin: 'java' + +repositories { + mavenCentral() +} + +dependencies { + compile 'com.github.spotbugs:spotbugs:3.1.0-RC1' + compile 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.6.0' +} + +task copyRuntimeLibs(type: Copy) { + into "lib" + from configurations.runtime +} \ No newline at end of file diff --git a/cli/findsecbugs.bat b/cli/findsecbugs.bat index ea287bcc6..c6816f50a 100644 --- a/cli/findsecbugs.bat +++ b/cli/findsecbugs.bat @@ -1,2 +1,2 @@ @echo off -java -jar findbugs.jar -quiet -pluginList findsecbugs-1.4.6.jar %* \ No newline at end of file +java -cp lib/* edu.umd.cs.findbugs.LaunchAppropriateUI -quiet -pluginList lib/findsecbugs-plugin-1.6.0.jar -include include.xml %* diff --git a/cli/findsecbugs.sh b/cli/findsecbugs.sh index e3540d289..5d19d126c 100644 --- a/cli/findsecbugs.sh +++ b/cli/findsecbugs.sh @@ -1,2 +1 @@ -@echo off -java -jar findbugs.jar -quiet -pluginList findsecbugs-1.4.4.jar $@ \ No newline at end of file +java -cp lib/\* edu.umd.cs.findbugs.LaunchAppropriateUI -quiet -pluginList lib/findsecbugs-plugin-1.6.0.jar -include include.xml $@ diff --git a/cli/include.xml b/cli/include.xml new file mode 100644 index 000000000..489e7c67d --- /dev/null +++ b/cli/include.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file From f18317dcc44026bf1bdf56f1b0c570025fea695d Mon Sep 17 00:00:00 2001 From: Philippe Arteau Date: Wed, 5 Apr 2017 12:34:01 -0400 Subject: [PATCH 2/2] Update proper include file. --- cli/include.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/include.xml b/cli/include.xml index 489e7c67d..69e87f62a 100644 --- a/cli/include.xml +++ b/cli/include.xml @@ -1,5 +1,5 @@ - - - + + + \ No newline at end of file