-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
440 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/main/java/com/jfrog/ide/idea/scan/data/RuleProperties.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.jfrog.ide.idea.scan.data; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
public class RuleProperties { | ||
|
||
@JsonProperty("conclusion") | ||
private String conclusion; | ||
|
||
@JsonProperty("applicability") | ||
private String applicability; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
178 changes: 178 additions & 0 deletions
178
src/test/resources/sourceCode/applicable_kind_pass_output.sarif
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,178 @@ | ||
{ | ||
"runs": [ | ||
{ | ||
"tool": { | ||
"driver": { | ||
"name": "JFrog Applicability Scanner", | ||
"rules": [ | ||
{ | ||
"id": "applic_CVE-2022-25878", | ||
"properties": { | ||
"conclusion": "positive", | ||
"applicability": "not_applicable" | ||
}, | ||
"fullDescription": { | ||
"text": "The scanner checks whether the vulnerable function `pem.Decode` is called.", | ||
"markdown": "The scanner checks whether the vulnerable function `pem.Decode` is called." | ||
}, | ||
"shortDescription": { | ||
"text": "Scanner for applic_CVE-2022-25878" | ||
} | ||
}, | ||
{ | ||
"id": "applic_CVE-2022-25978", | ||
"properties": { | ||
"conclusion": "negative", | ||
"applicability": "applicable" | ||
}, | ||
"fullDescription": { | ||
"text": "The scanner checks whether the vulnerable function `org.apache.xmlbeans.XmlObject.Factory.parse` is called or an interface that extends `org.apache.xmlbeans.XmlObject` is used.", | ||
"markdown": "The scanner checks whether the vulnerable function `org.apache.xmlbeans.XmlObject.Factory.parse` is called or an interface that extends `org.apache.xmlbeans.XmlObject` is used." | ||
}, | ||
"shortDescription": { | ||
"text": "Scanner for applic_CVE-2022-25978" | ||
} | ||
}, | ||
{ | ||
"id": "applic_CVE-2021-25878", | ||
"fullDescription": { | ||
"text": "The scanner checks whether the vulnerable function `pem.Decode` is called.", | ||
"markdown": "The scanner checks whether the vulnerable function `pem.Decode` is called." | ||
}, | ||
"shortDescription": { | ||
"text": "Scanner for applic_CVE-2021-25878" | ||
} | ||
}, | ||
{ | ||
"id": "applic_CVE-2022-29019", | ||
"fullDescription": { | ||
"text": "The scanner checks whether the vulnerable function `org.apache.xmlbeans.XmlObject.Factory.parse` is called or an interface that extends `org.apache.xmlbeans.XmlObject` is used.", | ||
"markdown": "The scanner checks whether the vulnerable function `org.apache.xmlbeans.XmlObject.Factory.parse` is called or an interface that extends `org.apache.xmlbeans.XmlObject` is used." | ||
}, | ||
"shortDescription": { | ||
"text": "Scanner for applic_CVE-2022-29019" | ||
} | ||
}, | ||
{ | ||
"id": "applic_CVE-2022-29004", | ||
"fullDescription": { | ||
"text": "The scanner checks whether the vulnerable function `org.apache.xmlbeans.XmlObject.Factory.parse` is called or an interface that extends `org.apache.xmlbeans.XmlObject` is used.", | ||
"markdown": "The scanner checks whether the vulnerable function `org.apache.xmlbeans.XmlObject.Factory.parse` is called or an interface that extends `org.apache.xmlbeans.XmlObject` is used." | ||
}, | ||
"shortDescription": { | ||
"text": "Scanner for applic_CVE-2022-29004" | ||
}, "properties": { | ||
"conclusion": "positive", | ||
"applicability": "not_covered" | ||
} | ||
}, | ||
{ | ||
"id": "applic_CVE-2022-29014", | ||
"fullDescription": { | ||
"text": "The scanner checks whether the vulnerable function `org.apache.xmlbeans.XmlObject.Factory.parse` is called or an interface that extends `org.apache.xmlbeans.XmlObject` is used.", | ||
"markdown": "The scanner checks whether the vulnerable function `org.apache.xmlbeans.XmlObject.Factory.parse` is called or an interface that extends `org.apache.xmlbeans.XmlObject` is used." | ||
}, | ||
"shortDescription": { | ||
"text": "Scanner for applic_CVE-2022-29014" | ||
}, "properties": { | ||
"conclusion": "positive", | ||
"applicability": "undetermined" | ||
} | ||
} | ||
], | ||
"version": "APPLIC_SCANNERv0.2.0" | ||
} | ||
}, | ||
"invocations": [ | ||
{ | ||
"executionSuccessful": true, | ||
"arguments": [ | ||
"scan" | ||
], | ||
"workingDirectory": { | ||
"uri": "" | ||
} | ||
} | ||
], | ||
"results": [ | ||
{ | ||
"message": { | ||
"text": "The vulnerable function protobufjs.load is called" | ||
}, | ||
"locations": [ | ||
{ | ||
"physicalLocation": { | ||
"artifactLocation": { | ||
"uri": "file:///examples/applic-demo/index.js" | ||
}, | ||
"region": { | ||
"endColumn": 17, | ||
"endLine": 20, | ||
"snippet": { | ||
"text": "protobuf.parse(p)" | ||
}, | ||
"startColumn": 0, | ||
"startLine": 20 | ||
} | ||
} | ||
} | ||
], | ||
"ruleId": "applic_CVE-2022-25878" | ||
}, | ||
{ | ||
"message": { | ||
"text": "The vulnerable function protobufjs.parse is called." | ||
}, | ||
"locations": [ | ||
{ | ||
"physicalLocation": { | ||
"artifactLocation": { | ||
"uri": "file:///examples/applic-demo/index.js" | ||
}, | ||
"region": { | ||
"endColumn": 73, | ||
"endLine": 22, | ||
"snippet": { | ||
"text": "protobuf.load(\"/path/to/untrusted.proto\", function(err, root) { return })" | ||
}, | ||
"startColumn": 0, | ||
"startLine": 18 | ||
} | ||
} | ||
} | ||
], | ||
"ruleId": "applic_CVE-2022-25978" | ||
}, | ||
{ | ||
"message": { | ||
"text": "The scanner checks whether the vulnerable function `ansi-regex` is called." | ||
}, | ||
"kind": "pass", | ||
"ruleId": "applic_CVE-2021-25878" | ||
}, | ||
{ | ||
"message": { | ||
"text": "The scanner checks whether the vulnerable function `ansi-regex` is called." | ||
}, | ||
"kind": "fail", | ||
"ruleId": "applic_CVE-2022-29019" | ||
}, | ||
{ | ||
"message": { | ||
"text": "The scanner checks whether the vulnerable function `call-all-ansi` is called." | ||
}, | ||
"kind": "pass", | ||
"ruleId": "applic_CVE-2022-29004" | ||
}, | ||
{"message": { | ||
"text": "The scanner checks whether the vulnerable function `not-call-all-ansi` is called." | ||
}, | ||
"kind": "pass", | ||
"ruleId": "applic_CVE-2022-29014" | ||
} | ||
] | ||
} | ||
], | ||
"version": "2.1.0", | ||
"$schema": "https://docs.oasis-open.org/sarif/sarif/v2.1.0/cos02/schemas/sarif-schema-2.1.0.json" | ||
} |
Oops, something went wrong.