Skip to content

Commit 95a3c55

Browse files
committed
filter
1 parent e229684 commit 95a3c55

File tree

2 files changed

+33
-160
lines changed

2 files changed

+33
-160
lines changed

plugins/tools/pmd/test/expected.sarif

Lines changed: 33 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -3,108 +3,67 @@
33
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
44
"runs": [
55
{
6-
"tool": {
7-
"driver": {
8-
"name": "PMD",
9-
"version": "6.55.0",
10-
"informationUri": "https://pmd.github.io/pmd/",
11-
"rules": [
12-
{
13-
"id": "UnusedPrivateField",
14-
"shortDescription": {
15-
"text": "Avoid unused private fields such as 'unusedField'."
16-
},
17-
"fullDescription": {
18-
"text": "\nDetects when a private field is declared and/or assigned a value, but not used.\n\nSince PMD 6.50.0 private fields are ignored, if the fields are annotated with any annotation or the\nenclosing class has any annotation. Annotations often enable a framework (such as dependency injection, mocking\nor e.g. Lombok) which use the fields by reflection or other means. This usage can't be detected by static code analysis.\nPreviously these frameworks where explicitly allowed by listing their annotations in the property\n\"ignoredAnnotations\", but that turned out to be prone of false positive for any not explicitly considered framework.\n "
19-
},
20-
"helpUri": "https://pmd.github.io/pmd-6.55.0/pmd_rules_java_bestpractices.html#unusedprivatefield",
21-
"help": {
22-
"text": "\nDetects when a private field is declared and/or assigned a value, but not used.\n\nSince PMD 6.50.0 private fields are ignored, if the fields are annotated with any annotation or the\nenclosing class has any annotation. Annotations often enable a framework (such as dependency injection, mocking\nor e.g. Lombok) which use the fields by reflection or other means. This usage can't be detected by static code analysis.\nPreviously these frameworks where explicitly allowed by listing their annotations in the property\n\"ignoredAnnotations\", but that turned out to be prone of false positive for any not explicitly considered framework.\n "
23-
},
24-
"properties": {
25-
"ruleset": "Best Practices",
26-
"priority": 3,
27-
"tags": [
28-
"Best Practices"
29-
]
30-
}
31-
},
32-
{
33-
"id": "UnconditionalIfStatement",
34-
"shortDescription": {
35-
"text": "Do not use if statements that are always true or always false"
36-
},
37-
"fullDescription": {
38-
"text": "\nDo not use \"if\" statements whose conditionals are always true or always false.\n "
39-
},
40-
"helpUri": "https://pmd.github.io/pmd-6.55.0/pmd_rules_java_errorprone.html#unconditionalifstatement",
41-
"help": {
42-
"text": "\nDo not use \"if\" statements whose conditionals are always true or always false.\n "
43-
},
44-
"properties": {
45-
"ruleset": "Error Prone",
46-
"priority": 3,
47-
"tags": [
48-
"Error Prone"
49-
]
50-
}
51-
}
52-
]
6+
"invocations": [
7+
{
8+
"executionSuccessful": true,
9+
"toolConfigurationNotifications": [],
10+
"toolExecutionNotifications": []
5311
}
54-
},
12+
],
5513
"results": [
5614
{
57-
"ruleId": "UnusedPrivateField",
58-
"ruleIndex": 0,
59-
"message": {
60-
"text": "Avoid unused private fields such as 'unusedField'."
61-
},
6215
"locations": [
6316
{
6417
"physicalLocation": {
6518
"artifactLocation": {
66-
"uri": "/plugins/tools/pmd/test/src/Test.java"
19+
"uri": "./Test.java"
6720
},
6821
"region": {
69-
"startLine": 2,
70-
"startColumn": 20,
22+
"endColumn": 30,
7123
"endLine": 2,
72-
"endColumn": 30
24+
"startColumn": 20,
25+
"startLine": 2
7326
}
7427
}
7528
}
76-
]
77-
},
78-
{
79-
"ruleId": "UnconditionalIfStatement",
80-
"ruleIndex": 1,
29+
],
8130
"message": {
82-
"text": "Do not use if statements that are always true or always false"
31+
"text": "Avoid unused private fields such as 'unusedField'."
8332
},
33+
"ruleId": "UnusedPrivateField",
34+
"ruleIndex": 0
35+
},
36+
{
8437
"locations": [
8538
{
8639
"physicalLocation": {
8740
"artifactLocation": {
88-
"uri": "/plugins/tools/pmd/test/src/Test.java"
41+
"uri": "./Test.java"
8942
},
9043
"region": {
91-
"startLine": 5,
92-
"startColumn": 13,
44+
"endColumn": 16,
9345
"endLine": 5,
94-
"endColumn": 16
46+
"startColumn": 13,
47+
"startLine": 5
9548
}
9649
}
9750
}
98-
]
51+
],
52+
"message": {
53+
"text": "Do not use if statements that are always true or always false"
54+
},
55+
"ruleId": "UnconditionalIfStatement",
56+
"ruleIndex": 1
9957
}
10058
],
101-
"invocations": [
102-
{
103-
"executionSuccessful": true,
104-
"toolConfigurationNotifications": [],
105-
"toolExecutionNotifications": []
59+
"tool": {
60+
"driver": {
61+
"informationUri": "https://pmd.github.io/pmd/",
62+
"name": "PMD",
63+
"rules": null,
64+
"version": "6.55.0"
10665
}
107-
]
66+
}
10867
}
10968
]
11069
}

plugins/tools/semgrep/test/expected.sarif

Lines changed: 0 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -188,92 +188,6 @@
188188
"tool": {
189189
"driver": {
190190
"name": "Semgrep OSS",
191-
"rules": [
192-
{
193-
"defaultConfiguration": {
194-
"level": "warning"
195-
},
196-
"fullDescription": {
197-
"text": "Unsafe command execution with os.system"
198-
},
199-
"help": {
200-
"markdown": "Unsafe command execution with os.system",
201-
"text": "Unsafe command execution with os.system"
202-
},
203-
"id": "codacy.tools-configs.python.lang.security.audit.os-system.os-system",
204-
"name": "codacy.tools-configs.python.lang.security.audit.os-system.os-system",
205-
"properties": {
206-
"precision": "very-high",
207-
"tags": []
208-
},
209-
"shortDescription": {
210-
"text": "Semgrep Finding: codacy.tools-configs.python.lang.security.audit.os-system.os-system"
211-
}
212-
},
213-
{
214-
"defaultConfiguration": {
215-
"level": "warning"
216-
},
217-
"fullDescription": {
218-
"text": "Unsafe deserialization with pickle"
219-
},
220-
"help": {
221-
"markdown": "Unsafe deserialization with pickle",
222-
"text": "Unsafe deserialization with pickle"
223-
},
224-
"id": "codacy.tools-configs.python.lang.security.audit.pickle.avoid-pickle",
225-
"name": "codacy.tools-configs.python.lang.security.audit.pickle.avoid-pickle",
226-
"properties": {
227-
"precision": "very-high",
228-
"tags": []
229-
},
230-
"shortDescription": {
231-
"text": "Semgrep Finding: codacy.tools-configs.python.lang.security.audit.pickle.avoid-pickle"
232-
}
233-
},
234-
{
235-
"defaultConfiguration": {
236-
"level": "warning"
237-
},
238-
"fullDescription": {
239-
"text": "Hardcoded password detected"
240-
},
241-
"help": {
242-
"markdown": "Hardcoded password detected",
243-
"text": "Hardcoded password detected"
244-
},
245-
"id": "codacy.tools-configs.python.lang.security.audit.hardcoded-password.hardcoded-password",
246-
"name": "codacy.tools-configs.python.lang.security.audit.hardcoded-password.hardcoded-password",
247-
"properties": {
248-
"precision": "very-high",
249-
"tags": []
250-
},
251-
"shortDescription": {
252-
"text": "Semgrep Finding: codacy.tools-configs.python.lang.security.audit.hardcoded-password.hardcoded-password"
253-
}
254-
},
255-
{
256-
"defaultConfiguration": {
257-
"level": "warning"
258-
},
259-
"fullDescription": {
260-
"text": "Unsafe command execution with shell=True"
261-
},
262-
"help": {
263-
"markdown": "Unsafe command execution with shell=True",
264-
"text": "Unsafe command execution with shell=True"
265-
},
266-
"id": "codacy.tools-configs.python.lang.security.audit.subprocess-shell-true.subprocess-shell-true",
267-
"name": "codacy.tools-configs.python.lang.security.audit.subprocess-shell-true.subprocess-shell-true",
268-
"properties": {
269-
"precision": "very-high",
270-
"tags": []
271-
},
272-
"shortDescription": {
273-
"text": "Semgrep Finding: codacy.tools-configs.python.lang.security.audit.subprocess-shell-true.subprocess-shell-true"
274-
}
275-
}
276-
],
277191
"semanticVersion": "1.78.0"
278192
}
279193
}

0 commit comments

Comments
 (0)