Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cycode/cli/commands/scan/code_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ def _enrich_scan_result_with_data_from_detection_rules(

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


def _get_scan_documents_thread_func(
Expand Down
4 changes: 4 additions & 0 deletions cycode/cyclient/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,8 @@ class DetectionRule:
classification_data: List[ClassificationData]
detection_rule_id: str
custom_remediation_guidelines: Optional[str] = None
remediation_guidelines: Optional[str] = None
description: Optional[str] = None


class DetectionRuleSchema(Schema):
Expand All @@ -449,6 +451,8 @@ class Meta:
classification_data = fields.Nested(ClassificationDataSchema, many=True)
detection_rule_id = fields.String()
custom_remediation_guidelines = fields.String(allow_none=True)
remediation_guidelines = fields.String(allow_none=True)
description = fields.String(allow_none=True)

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