Skip to content

Commit e1e159c

Browse files
authored
CM-34678 - Add Remediation Guidelines and Description to JSON output (#218)
1 parent ee6d006 commit e1e159c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

cycode/cli/commands/scan/code_scanner.py

+2
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ def _enrich_scan_result_with_data_from_detection_rules(
146146

147147
# detection_details never was typed properly. so not a problem for now
148148
detection.detection_details['custom_remediation_guidelines'] = detection_rule.custom_remediation_guidelines
149+
detection.detection_details['remediation_guidelines'] = detection_rule.remediation_guidelines
150+
detection.detection_details['description'] = detection_rule.description
149151

150152

151153
def _get_scan_documents_thread_func(

cycode/cyclient/models.py

+4
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,8 @@ class DetectionRule:
440440
classification_data: List[ClassificationData]
441441
detection_rule_id: str
442442
custom_remediation_guidelines: Optional[str] = None
443+
remediation_guidelines: Optional[str] = None
444+
description: Optional[str] = None
443445

444446

445447
class DetectionRuleSchema(Schema):
@@ -449,6 +451,8 @@ class Meta:
449451
classification_data = fields.Nested(ClassificationDataSchema, many=True)
450452
detection_rule_id = fields.String()
451453
custom_remediation_guidelines = fields.String(allow_none=True)
454+
remediation_guidelines = fields.String(allow_none=True)
455+
description = fields.String(allow_none=True)
452456

453457
@post_load
454458
def build_dto(self, data: Dict[str, Any], **_) -> DetectionRule:

0 commit comments

Comments
 (0)