diff --git a/src/n0s1/reporting/report_sarif.py b/src/n0s1/reporting/report_sarif.py index d3990d9..a58feca 100755 --- a/src/n0s1/reporting/report_sarif.py +++ b/src/n0s1/reporting/report_sarif.py @@ -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( @@ -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,