File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
plugin/src/main/java/org/owasp/benchmarkutils/score/parsers Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 18
18
package org .owasp .benchmarkutils .score .parsers ;
19
19
20
20
import org .json .JSONArray ;
21
+ import org .json .JSONException ;
21
22
import org .json .JSONObject ;
22
23
import org .owasp .benchmarkutils .score .BenchmarkScore ;
23
24
import org .owasp .benchmarkutils .score .CweNumber ;
@@ -39,9 +40,16 @@ public TestSuiteResults parse(ResultFile resultFile) throws Exception {
39
40
TestSuiteResults tr =
40
41
new TestSuiteResults ("Semgrep" , false , TestSuiteResults .ToolType .SAST );
41
42
43
+ // get engine version
44
+ try {
45
+ String version = resultFile .json ().getString ("version" );
46
+ tr .setToolVersion (version );
47
+ } catch (JSONException e ) {
48
+ // If there is no version value, ignore it.
49
+ }
50
+
42
51
JSONArray results = resultFile .json ().getJSONArray ("results" );
43
52
44
- // engine version
45
53
// duration time
46
54
47
55
// results
You can’t perform that action at this time.
0 commit comments