Skip to content

Commit 326acf0

Browse files
committed
Bump HAM dependency to 1.3.0, replace '-json' and '-simple-json' flags with '-full-json' and '-json' (respectively)
1 parent 29e5fb5 commit 326acf0

2 files changed

Lines changed: 17 additions & 7 deletions

File tree

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@
8080
<dependency>
8181
<groupId>com.github.secdec.astam-correlator</groupId>
8282
<artifactId>threadfix-entities</artifactId>
83-
<version>1.2.18</version>
83+
<version>1.3.0</version>
8484
</dependency>
8585
<dependency>
8686
<groupId>com.github.secdec.astam-correlator</groupId>
8787
<artifactId>threadfix-ham</artifactId>
88-
<version>1.2.18</version>
88+
<version>1.3.0</version>
8989
</dependency>
9090
<dependency>
9191
<groupId>org.owasp</groupId>

src/com/denimgroup/threadfix/cli/endpoints/EndpointMain.java

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -303,9 +303,9 @@ private static boolean checkArguments(String[] args) {
303303
} else if (arg.equals("-lint")) {
304304
printFormat = Endpoint.PrintFormat.LINT;
305305
} else if (arg.equals("-json")) {
306-
printFormat = FULL_JSON;
307-
} else if (arg.equals("-simple-json")) {
308306
printFormat = SIMPLE_JSON;
307+
} else if (arg.equals("-full-json")) {
308+
printFormat = FULL_JSON;
309309
} else if (arg.contains(FRAMEWORK_COMMAND)) {
310310
String frameworkName = arg.substring(arg.indexOf(
311311
FRAMEWORK_COMMAND) + FRAMEWORK_COMMAND.length(), arg.length());
@@ -357,9 +357,11 @@ private static boolean checkArguments(String[] args) {
357357
}
358358
}
359359
}
360-
360+
} else if (arg.equalsIgnoreCase("-help")) {
361+
printHelp();
362+
return false;
361363
} else {
362-
println("Received unsupported option " + arg + ", valid arguments are -lint, -debug, -simple-json, -json, -path-list-file, and -simple");
364+
println("Received unsupported option " + arg + ", run with -help to see available flags.");
363365
return false;
364366
}
365367
}
@@ -374,7 +376,15 @@ private static boolean checkArguments(String[] args) {
374376
}
375377

376378
static void printError() {
377-
println("The first argument should be a valid file path to scan. Other flags supported: -lint, -debug, -simple-json, -json, -path-list-file=..., -output-file=..., -simple");
379+
println("The first argument should be a valid file path to scan. Run with -help to see available flags and usage.");
380+
}
381+
382+
static void printHelp() {
383+
StringBuilder helpMessage = new StringBuilder();
384+
385+
helpMessage.append("Attack Surface Detector CLI Tool");
386+
387+
println(helpMessage.toString());
378388
}
379389

380390
private static int printEndpointWithVariants(int i, int currentDepth, Endpoint endpoint) {

0 commit comments

Comments
 (0)