137 lines
4.2 KiB
JSON
137 lines
4.2 KiB
JSON
|
{
|
||
|
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
|
||
|
"version": "2.1.0",
|
||
|
"runs": [
|
||
|
{
|
||
|
"tool": {
|
||
|
"driver": {
|
||
|
"name": "PMD",
|
||
|
"version": "<pmd-version>",
|
||
|
"informationUri": "https://pmd.github.io/pmd/",
|
||
|
"rules": [
|
||
|
{
|
||
|
"id": "ApexSharingViolations",
|
||
|
"shortDescription": {
|
||
|
"text": "Apex classes should declare a sharing model if DML or SOQL/SOSL is used"
|
||
|
},
|
||
|
"helpUri": "https://pmd.github.io/pmd/pmd_rules_apex_security.html#apexsharingviolations",
|
||
|
"properties": {
|
||
|
"ruleset": "Security",
|
||
|
"priority": 3
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"id": "ApexDoc",
|
||
|
"shortDescription": {
|
||
|
"text": "Missing ApexDoc comment"
|
||
|
},
|
||
|
"helpUri": "https://pmd.github.io/pmd/pmd_rules_apex_documentation.html#apexdoc",
|
||
|
"properties": {
|
||
|
"ruleset": "Documentation",
|
||
|
"priority": 3
|
||
|
}
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
},
|
||
|
"results": [
|
||
|
{
|
||
|
"ruleId": "ApexSharingViolations",
|
||
|
"ruleIndex": 0,
|
||
|
"message": {
|
||
|
"text": "Apex classes should declare a sharing model if DML or SOQL/SOSL is used"
|
||
|
},
|
||
|
"locations": [
|
||
|
{
|
||
|
"physicalLocation": {
|
||
|
"artifactLocation": {
|
||
|
"uri": "/Users/user/pmd/unhappy-soup/force-app/main/default/classes/ApexSOQLInjection.cls"
|
||
|
},
|
||
|
"region": {
|
||
|
"startLine": 1,
|
||
|
"startColumn": 14,
|
||
|
"endLine": 1,
|
||
|
"endColumn": 30
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"physicalLocation": {
|
||
|
"artifactLocation": {
|
||
|
"uri": "/Users/user/pmd/unhappy-soup/force-app/main/default/classes/ApexSharingViolations.cls"
|
||
|
},
|
||
|
"region": {
|
||
|
"startLine": 1,
|
||
|
"startColumn": 14,
|
||
|
"endLine": 1,
|
||
|
"endColumn": 34
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"ruleId": "ApexDoc",
|
||
|
"ruleIndex": 1,
|
||
|
"message": {
|
||
|
"text": "Missing ApexDoc comment"
|
||
|
},
|
||
|
"locations": [
|
||
|
{
|
||
|
"physicalLocation": {
|
||
|
"artifactLocation": {
|
||
|
"uri": "/Users/user/pmd/unhappy-soup/force-app/main/default/classes/ApexSOQLInjection.cls"
|
||
|
},
|
||
|
"region": {
|
||
|
"startLine": 1,
|
||
|
"startColumn": 14,
|
||
|
"endLine": 6,
|
||
|
"endColumn": 1
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"physicalLocation": {
|
||
|
"artifactLocation": {
|
||
|
"uri": "/Users/user/pmd/unhappy-soup/force-app/main/default/classes/ApexSOQLInjection.cls"
|
||
|
},
|
||
|
"region": {
|
||
|
"startLine": 3,
|
||
|
"startColumn": 17,
|
||
|
"endLine": 5,
|
||
|
"endColumn": 2
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"physicalLocation": {
|
||
|
"artifactLocation": {
|
||
|
"uri": "/Users/user/pmd/unhappy-soup/force-app/main/default/classes/ApexSharingViolations.cls"
|
||
|
},
|
||
|
"region": {
|
||
|
"startLine": 1,
|
||
|
"startColumn": 14,
|
||
|
"endLine": 6,
|
||
|
"endColumn": 1
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"physicalLocation": {
|
||
|
"artifactLocation": {
|
||
|
"uri": "/Users/user/pmd/unhappy-soup/force-app/main/default/classes/ApexSharingViolations.cls"
|
||
|
},
|
||
|
"region": {
|
||
|
"startLine": 3,
|
||
|
"startColumn": 14,
|
||
|
"endLine": 5,
|
||
|
"endColumn": 2
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
}
|