File tree Expand file tree Collapse file tree
java/com/denimgroup/threadfix/cli/endpoints Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 <groupId >com.github.secdec.astam-correlator</groupId >
77 <artifactId >attack-surface-detector-cli</artifactId >
88 <name >attack-surface-detector-cli</name >
9- <version >1.3.0 </version >
9+ <version >1.3.1 </version >
1010
1111 <description >
1212 This is a standalone tool that uses the ASTAM Correlator HAM module to detect endpoints from source code for
8080 <dependency >
8181 <groupId >com.github.secdec.astam-correlator</groupId >
8282 <artifactId >threadfix-entities</artifactId >
83- <version >1.3.0 </version >
83+ <version >1.3.1 </version >
8484 </dependency >
8585 <dependency >
8686 <groupId >com.github.secdec.astam-correlator</groupId >
8787 <artifactId >threadfix-ham</artifactId >
88- <version >1.3.0 </version >
88+ <version >1.3.1 </version >
8989 </dependency >
9090 <dependency >
9191 <groupId >org.owasp</groupId >
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ enum Logging {
7373 static boolean simplePrint = false ;
7474 static String pathListFile = null ;
7575 static String outputFilePath = null ;
76+ static boolean cleanSourceCode = true ;
7677
7778 static int totalDetectedEndpoints = 0 ;
7879 static int totalDistinctEndpoints = 0 ;
@@ -309,6 +310,8 @@ private static boolean checkArguments(String[] args) {
309310 String frameworkName = arg .substring (arg .indexOf (
310311 FRAMEWORK_COMMAND ) + FRAMEWORK_COMMAND .length (), arg .length ());
311312 defaultFramework = FrameworkType .getFrameworkType (frameworkName );
313+ } else if (arg .contains ("-keep-source" )) {
314+ cleanSourceCode = false ;
312315 } else if (arg .equals ("-simple" )) {
313316 simplePrint = true ;
314317 } else if (arg .startsWith ("-output-file=" )) {
@@ -636,7 +639,7 @@ private static Endpoint.Info[] getEndpointInfo(List<Endpoint> endpoints) {
636639 Endpoint .Info [] endpointsInfos = new Endpoint .Info [allEndpoints .size ()];
637640
638641 for (int i = 0 ; i < allEndpoints .size (); i ++) {
639- endpointsInfos [i ] = Endpoint .Info .fromEndpoint (allEndpoints .get (i ));
642+ endpointsInfos [i ] = Endpoint .Info .fromEndpoint (allEndpoints .get (i ), ! cleanSourceCode );
640643 }
641644
642645 return endpointsInfos ;
Original file line number Diff line number Diff line change 3131[JSON Output]
3232 -json -- Print only simple-format JSON to the console
3333 Simple-format JSON uses a common format for all generated endpoints
34- regardless of framework.
34+ regardless of framework. Source code information is not included.
35+
36+ -keep-source -- Include source code information when combined with the -json flag
3537
3638 -full-json -- Print full JSON information to the console
3739 Full-format JSON uses unique data formats depending on the framework
You can’t perform that action at this time.
0 commit comments