Skip to content

Commit

Permalink
Include Finding ID in CodeTF Only When Provided by the Tool
Browse files Browse the repository at this point in the history
In cases where a tool does not provide a finding identifier that has the same semantics as [guid from SARIF](https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/sarif-v2.1.0-errata01-os-complete.html#_Toc141790891), codemodder does more harm than good when it uses some fallback value to satisfy the required field constraint. I know this, because I'm currently working on the data model for correlating codemod changes to tool issues :-)

We should make the result identifier for fixed / unfixed findings optional. If the tool provides a result ID, then codemodder shall use it. But when the tool provides no such identifier (Snyk 👀), codemodder should not make one up.
  • Loading branch information
gilday committed Aug 19, 2024
1 parent ce7ada1 commit 2e5d6a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions codetf.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,22 +268,22 @@
"properties": {
"id": {
"type": "string",
"description": "A unique identifier for the finding (e.g. 'guid' from SARIF)"
"description": "A unique identifier for the finding, if provided by the detection tool. Concerning logically equivalent findings across scans, this identifier has the same semantics as `guid` from SARIF."
},
"rule": {
"$ref": "#/definitions/detector/rule",
"description": "The rule that detected the issue"
}
},
"additionalProperties": true,
"required": ["id", "rule"]
"required": ["rule"]
},
"unfixedFinding": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "A unique identifier for the finding (e.g. 'guid' from SARIF)"
"description": "A unique identifier for the finding, if provided by the detection tool. Concerning logically equivalent findings across scans, this identifier has the same semantics as `guid` from SARIF."
},
"rule": {
"$ref": "#/definitions/detector/rule",
Expand All @@ -303,7 +303,7 @@
}
},
"additionalProperties": true,
"required": ["id", "rule", "path", "reason"]
"required": ["rule", "path", "reason"]
},
"rule": {
"type": "object",
Expand Down

0 comments on commit 2e5d6a0

Please sign in to comment.