-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Make SARIF file more compact to allow for more findings to be u…
…ploaded to GitHub Make the SARIF report compact to allow for more efficient uploading to GitHub It also allows to upload more defects in a single request (GitHub limit is 10MB)
- Loading branch information
Showing
5 changed files
with
17 additions
and
235 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,231 +1 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/sarif-2.1.0.json", | ||
"version": "2.1.0", | ||
"inlineExternalProperties": [ | ||
{ | ||
"externalizedProperties": { | ||
"tool": "ShellCheck", | ||
"tool-url": "https://www.shellcheck.net/wiki/", | ||
"tool-version": "0.10.0" | ||
} | ||
} | ||
], | ||
"runs": [ | ||
{ | ||
"tool": { | ||
"driver": { | ||
"name": "ShellCheck", | ||
"version": "0.10.0", | ||
"informationUri": "https://www.shellcheck.net/wiki/", | ||
"rules": [ | ||
{ | ||
"id": "SHELLCHECK_WARNING: warning[SC2034]", | ||
"properties": { | ||
"tags": [ | ||
"ShellCheck" | ||
] | ||
}, | ||
"name": "SC2034", | ||
"shortDescription": { | ||
"text": "SC2034" | ||
}, | ||
"help": { | ||
"text": "Defect reference: https://github.com/koalaman/shellcheck/wiki/SC2034", | ||
"markdown": "Defect reference: [SC2034](https://github.com/koalaman/shellcheck/wiki/SC2034)" | ||
}, | ||
"fullDescription": { | ||
"text": "Defect reference: https://github.com/koalaman/shellcheck/wiki/SC2034" | ||
} | ||
}, | ||
{ | ||
"id": "SHELLCHECK_WARNING: warning[SC2115]", | ||
"properties": { | ||
"tags": [ | ||
"ShellCheck" | ||
] | ||
}, | ||
"name": "SC2115", | ||
"shortDescription": { | ||
"text": "SC2115" | ||
}, | ||
"help": { | ||
"text": "Defect reference: https://github.com/koalaman/shellcheck/wiki/SC2115", | ||
"markdown": "Defect reference: [SC2115](https://github.com/koalaman/shellcheck/wiki/SC2115)" | ||
}, | ||
"fullDescription": { | ||
"text": "Defect reference: https://github.com/koalaman/shellcheck/wiki/SC2115" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"results": [ | ||
{ | ||
"ruleId": "SHELLCHECK_WARNING: warning[SC2034]", | ||
"level": "warning", | ||
"locations": [ | ||
{ | ||
"id": 0, | ||
"physicalLocation": { | ||
"artifactLocation": { | ||
"uri": "innocent-script.sh" | ||
}, | ||
"region": { | ||
"startLine": 7, | ||
"endLine": 7 | ||
} | ||
} | ||
} | ||
], | ||
"message": { | ||
"text": "UNUSED_VAR2 appears unused. Verify use (or export if used externally)." | ||
}, | ||
"codeFlows": [ | ||
{ | ||
"threadFlows": [ | ||
{ | ||
"locations": [ | ||
{ | ||
"location": { | ||
"id": 0, | ||
"physicalLocation": { | ||
"artifactLocation": { | ||
"uri": "innocent-script.sh" | ||
}, | ||
"region": { | ||
"startLine": 7, | ||
"endLine": 7 | ||
} | ||
}, | ||
"message": { | ||
"text": "UNUSED_VAR2 appears unused. Verify use (or export if used externally)." | ||
} | ||
}, | ||
"nestingLevel": 0, | ||
"kinds": [ | ||
"warning[SC2034]" | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"fingerprints": { | ||
"csdiff/v0": "64c37c2cd555f4d61c6e05ebd224beb8147d77bf" | ||
} | ||
}, | ||
{ | ||
"ruleId": "SHELLCHECK_WARNING: warning[SC2115]", | ||
"level": "warning", | ||
"locations": [ | ||
{ | ||
"id": 0, | ||
"physicalLocation": { | ||
"artifactLocation": { | ||
"uri": "innocent-script.sh" | ||
}, | ||
"region": { | ||
"startLine": 11, | ||
"endLine": 11 | ||
} | ||
} | ||
} | ||
], | ||
"message": { | ||
"text": "Use \"${var:?}\" to ensure this never expands to / ." | ||
}, | ||
"codeFlows": [ | ||
{ | ||
"threadFlows": [ | ||
{ | ||
"locations": [ | ||
{ | ||
"location": { | ||
"id": 0, | ||
"physicalLocation": { | ||
"artifactLocation": { | ||
"uri": "innocent-script.sh" | ||
}, | ||
"region": { | ||
"startLine": 11, | ||
"endLine": 11 | ||
} | ||
}, | ||
"message": { | ||
"text": "Use \"${var:?}\" to ensure this never expands to / ." | ||
} | ||
}, | ||
"nestingLevel": 0, | ||
"kinds": [ | ||
"warning[SC2115]" | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"fingerprints": { | ||
"csdiff/v0": "d9a3f3f1027ba2a0ca5dc7eb24d7d8b09dbe2b1d" | ||
} | ||
}, | ||
{ | ||
"ruleId": "SHELLCHECK_WARNING: warning[SC2115]", | ||
"level": "warning", | ||
"locations": [ | ||
{ | ||
"id": 0, | ||
"physicalLocation": { | ||
"artifactLocation": { | ||
"uri": "innocent-script.sh" | ||
}, | ||
"region": { | ||
"startLine": 11, | ||
"endLine": 11 | ||
} | ||
} | ||
} | ||
], | ||
"message": { | ||
"text": "Use \"${var:?}\" to ensure this never expands to / ." | ||
}, | ||
"codeFlows": [ | ||
{ | ||
"threadFlows": [ | ||
{ | ||
"locations": [ | ||
{ | ||
"location": { | ||
"id": 0, | ||
"physicalLocation": { | ||
"artifactLocation": { | ||
"uri": "innocent-script.sh" | ||
}, | ||
"region": { | ||
"startLine": 11, | ||
"endLine": 11 | ||
} | ||
}, | ||
"message": { | ||
"text": "Use \"${var:?}\" to ensure this never expands to / ." | ||
} | ||
}, | ||
"nestingLevel": 0, | ||
"kinds": [ | ||
"warning[SC2115]" | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"fingerprints": { | ||
"csdiff/v0": "d9a3f3f1027ba2a0ca5dc7eb24d7d8b09dbe2b1d" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","inlineExternalProperties":[{"externalizedProperties":{"tool":"ShellCheck","tool-url":"https://www.shellcheck.net/wiki/","tool-version":"0.10.0"}}],"runs":[{"tool":{"driver":{"name":"ShellCheck","version":"0.10.0","informationUri":"https://www.shellcheck.net/wiki/","rules":[{"id":"SHELLCHECK_WARNING: warning[SC2034]","properties":{"tags":["ShellCheck"]},"name":"SC2034","shortDescription":{"text":"SC2034"},"help":{"text":"Defect reference: https://github.com/koalaman/shellcheck/wiki/SC2034","markdown":"Defect reference: [SC2034](https://github.com/koalaman/shellcheck/wiki/SC2034)"},"fullDescription":{"text":"Defect reference: https://github.com/koalaman/shellcheck/wiki/SC2034"}},{"id":"SHELLCHECK_WARNING: warning[SC2115]","properties":{"tags":["ShellCheck"]},"name":"SC2115","shortDescription":{"text":"SC2115"},"help":{"text":"Defect reference: https://github.com/koalaman/shellcheck/wiki/SC2115","markdown":"Defect reference: [SC2115](https://github.com/koalaman/shellcheck/wiki/SC2115)"},"fullDescription":{"text":"Defect reference: https://github.com/koalaman/shellcheck/wiki/SC2115"}}]}},"results":[{"ruleId":"SHELLCHECK_WARNING: warning[SC2034]","level":"warning","locations":[{"id":0,"physicalLocation":{"artifactLocation":{"uri":"innocent-script.sh"},"region":{"startLine":7,"endLine":7}}}],"message":{"text":"UNUSED_VAR2 appears unused. Verify use (or export if used externally)."},"codeFlows":[{"threadFlows":[{"locations":[{"location":{"id":0,"physicalLocation":{"artifactLocation":{"uri":"innocent-script.sh"},"region":{"startLine":7,"endLine":7}},"message":{"text":"UNUSED_VAR2 appears unused. Verify use (or export if used externally)."}},"nestingLevel":0,"kinds":["warning[SC2034]"]}]}]}],"fingerprints":{"csdiff/v0":"64c37c2cd555f4d61c6e05ebd224beb8147d77bf"}},{"ruleId":"SHELLCHECK_WARNING: warning[SC2115]","level":"warning","locations":[{"id":0,"physicalLocation":{"artifactLocation":{"uri":"innocent-script.sh"},"region":{"startLine":11,"endLine":11}}}],"message":{"text":"Use \"${var:?}\" to ensure this never expands to / ."},"codeFlows":[{"threadFlows":[{"locations":[{"location":{"id":0,"physicalLocation":{"artifactLocation":{"uri":"innocent-script.sh"},"region":{"startLine":11,"endLine":11}},"message":{"text":"Use \"${var:?}\" to ensure this never expands to / ."}},"nestingLevel":0,"kinds":["warning[SC2115]"]}]}]}],"fingerprints":{"csdiff/v0":"d9a3f3f1027ba2a0ca5dc7eb24d7d8b09dbe2b1d"}},{"ruleId":"SHELLCHECK_WARNING: warning[SC2115]","level":"warning","locations":[{"id":0,"physicalLocation":{"artifactLocation":{"uri":"innocent-script.sh"},"region":{"startLine":11,"endLine":11}}}],"message":{"text":"Use \"${var:?}\" to ensure this never expands to / ."},"codeFlows":[{"threadFlows":[{"locations":[{"location":{"id":0,"physicalLocation":{"artifactLocation":{"uri":"innocent-script.sh"},"region":{"startLine":11,"endLine":11}},"message":{"text":"Use \"${var:?}\" to ensure this never expands to / ."}},"nestingLevel":0,"kinds":["warning[SC2115]"]}]}]}],"fingerprints":{"csdiff/v0":"d9a3f3f1027ba2a0ca5dc7eb24d7d8b09dbe2b1d"}}]}]} |
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 |
---|---|---|
|
@@ -36,5 +36,5 @@ setup () { | |
} | ||
|
||
teardown () { | ||
rm -f test.sarif | ||
rm -f test.sarif full.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
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 |
---|---|---|
|
@@ -86,5 +86,5 @@ teardown () { | |
export \ | ||
INPUT_DISPLAY_ENGINE="" \ | ||
UNIT_TESTS="" | ||
rm -f tmp.sarif | ||
rm -f tmp.sarif full.sarif | ||
} |