Skip to content

Commit

Permalink
Added findings unique ID for SARIF report
Browse files Browse the repository at this point in the history
  • Loading branch information
blupants committed Jul 28, 2024
1 parent 72c4bc7 commit 6ba0b14
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/n0s1/reporting/report_sarif.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def add_vulns(self, n0s1_data: dict):
ruleId = match_id
match_description = match.get("description", "")
ruleIndex = self.get_rule_index(ruleId)
finding_id = d.get("id", "None")

if ruleId not in self.seen_rules:
self.rules.append(
Expand Down Expand Up @@ -110,7 +111,7 @@ def add_vulns(self, n0s1_data: dict):
"locations": [
{
"physicalLocation": {
"artifactLocation": {"uri": "None", "uriBaseId": "ROOTPATH"},
"artifactLocation": {"uri": finding_id, "uriBaseId": "ROOTPATH"},
"region": {
"startLine": 1,
"startColumn": 1,
Expand Down

0 comments on commit 6ba0b14

Please sign in to comment.