Skip to content

Commit

Permalink
update sarif type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
jxdv committed Jan 12, 2024
1 parent 44f02df commit 34a248d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guarddog/reporters/sarif.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def report_verify_sarif(package_path: str, rule_names: list[str], scan_results:
text = f"On package: {package} version: {version}\n" + "\n".join(map(
lambda x: x["message"],
scan_result_details[rule_name]
)) if type(scan_result_details[rule_name]) == list else scan_result_details[rule_name]
)) if isinstance(scan_result_details[rule_name], list) else scan_result_details[rule_name]
key = f"{rule_name}-{text}"
partial_fingerprints = {
f"guarddog/v1/{rule_name}": hashlib.sha256(key.encode('utf-8')).hexdigest()
Expand Down

0 comments on commit 34a248d

Please sign in to comment.