forked from phoedos/pmd
156 lines
5.3 KiB
JSON
156 lines
5.3 KiB
JSON
{
|
|
"$schema": "https://json.schemastore.org/sarif-2.1.0.json",
|
|
"version": "2.1.0",
|
|
"runs": [
|
|
{
|
|
"tool": {
|
|
"driver": {
|
|
"name": "PMD",
|
|
"version": "<pmd-version>",
|
|
"informationUri": "https://docs.pmd-code.org/latest/",
|
|
"rules": [
|
|
{
|
|
"id": "ApexSharingViolations",
|
|
"shortDescription": {
|
|
"text": "Apex classes should declare a sharing model if DML or SOQL/SOSL is used"
|
|
},
|
|
"fullDescription": {
|
|
"text": "Detect classes declared without explicit sharing mode if DML methods are used. This forces the developer to take access restrictions into account before modifying objects."
|
|
},
|
|
"helpUri": "https://docs.pmd-code.org/latest/pmd_rules_apex_security.html#apexsharingviolations",
|
|
"help": {
|
|
"text": "Detect classes declared without explicit sharing mode if DML methods are used. This forces the developer to take access restrictions into account before modifying objects."
|
|
},
|
|
"properties": {
|
|
"ruleset": "Security",
|
|
"priority": 3,
|
|
"tags":[
|
|
"Security"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "ApexDoc",
|
|
"shortDescription": {
|
|
"text": "Missing ApexDoc comment"
|
|
},
|
|
"fullDescription": {
|
|
"text": "This rule validates that: ApexDoc comments are present for classes, methods, and properties that are public or global, excluding overrides and test classes (as well as the contents of test classes)."
|
|
},
|
|
"helpUri": "https://docs.pmd-code.org/latest/pmd_rules_apex_documentation.html#apexdoc",
|
|
"help": {
|
|
"text": "This rule validates that: ApexDoc comments are present for classes, methods, and properties that are public or global, excluding overrides and test classes (as well as the contents of test classes)."
|
|
},
|
|
"properties": {
|
|
"ruleset": "Documentation",
|
|
"priority": 3,
|
|
"tags": [
|
|
"Documentation"
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"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
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|