Skip to content

Commit

Permalink
CM-30183 - Add severity for secret detections (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshalX authored Dec 13, 2023
1 parent 081eda6 commit ed45fad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cycode/cli/commands/scan/code_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ def _enrich_scan_result_with_data_from_detection_rules(
# we want to make sure that BE returned it. better to not map data instead of failed scan
continue

# TODO(MarshalX): here we can also map severity without migrating secrets to async flow
if detection_rule.classification_data:
# it's fine to take the first one, because:
# - for "secrets" and "iac" there is only one classification rule per detection rule
# - for "sca" and "sast" we get severity from detection service
detection.severity = detection_rule.classification_data[0].severity

# detection_details never was typed properly. so not a problem for now
detection.detection_details['custom_remediation_guidelines'] = detection_rule.custom_remediation_guidelines
Expand Down

0 comments on commit ed45fad

Please sign in to comment.