Skip to content

Commit

Permalink
Merge branch 'main' into km/add_metrics_collection_to_pubsub_and_buck…
Browse files Browse the repository at this point in the history
…et_resources
  • Loading branch information
1101-1 authored Dec 9, 2024
2 parents 0b61d54 + 68832c0 commit dd9ad77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
3 changes: 1 addition & 2 deletions plugins/aws/fix_plugin_aws/resource/inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ def parse_finding(self, source: Json) -> Finding:
if self.remediation and self.remediation.recommendation:
remediation = self.remediation.recommendation.text or ""
updated_at = self.updated_at
details = source.get("packageVulnerabilityDetails", {}) | source.get("codeVulnerabilityDetails", {})
return Finding(finding_title, finding_severity, description, remediation, updated_at, details)
return Finding(finding_title, finding_severity, description, remediation, updated_at, None)

@classmethod
def collect_resources(cls, builder: GraphBuilder) -> None:
Expand Down
6 changes: 1 addition & 5 deletions plugins/gcp/fix_plugin_gcp/resources/scc.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,11 @@ def parse_finding(self, source: Json) -> Optional[Finding]:
else:
remediation = None
title = "unknown"
source_finding = source.get("finding", {})
source_resource = source.get("resource", {})
details = source_finding.get("sourceProperties", {})
aws_metadata = source_resource.get("awsMetadata", {})
azure_metadata = source_resource.get("azureMetadata", {})
severity = SEVERITY_MAPPING.get(finding.severity or "") or Severity.medium
return Finding(
title, severity, description, remediation, finding.event_time, details | aws_metadata | azure_metadata
)
return Finding(title, severity, description, remediation, finding.event_time, aws_metadata | azure_metadata)
return None

@classmethod
Expand Down

0 comments on commit dd9ad77

Please sign in to comment.