Skip to content

Commit ed45fad

Browse files
authored
CM-30183 - Add severity for secret detections (#185)
1 parent 081eda6 commit ed45fad

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cycode/cli/commands/scan/code_scanner.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ def _enrich_scan_result_with_data_from_detection_rules(
122122
# we want to make sure that BE returned it. better to not map data instead of failed scan
123123
continue
124124

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

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

0 commit comments

Comments
 (0)