Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CM-35356 - Add titles for SAST detections #226

Merged
merged 1 commit into from
May 13, 2024
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
1 change: 1 addition & 0 deletions cycode/cli/commands/scan/code_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ def _enrich_scan_result_with_data_from_detection_rules(
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
detection.detection_details['policy_display_name'] = detection_rule.display_name


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 @@ -441,6 +441,8 @@ class DetectionRule:
custom_remediation_guidelines: Optional[str] = None
remediation_guidelines: Optional[str] = None
description: Optional[str] = None
policy_name: Optional[str] = None
display_name: Optional[str] = None


class DetectionRuleSchema(Schema):
Expand All @@ -452,6 +454,8 @@ class Meta:
custom_remediation_guidelines = fields.String(allow_none=True)
remediation_guidelines = fields.String(allow_none=True)
description = fields.String(allow_none=True)
policy_name = fields.String(allow_none=True)
display_name = fields.String(allow_none=True)

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