assets_guardian.core.domain.models.findingο
Classes
|
Normalized representation of a discrepancy or anomaly detected by an audit rule. |
|
|
|
- class assets_guardian.core.domain.models.finding.Finding(*, rule_id: str, rule_category: RuleCategory, severity: SeverityType, title: str, description: str | None = None, source: str, instance_id: str, entities_impacted: list[str], timestamp: datetime | None = None, metadata: dict[str, Any] | None = None)[source]ο
Bases:
objectNormalized representation of a discrepancy or anomaly detected by an audit rule.
A finding is produced by the evaluation of an IRule (IComparisonRule, IComplianceRule, or IMatrixRule). It is then aggregated by the ComplianceEngine and rendered in the PDF report, where it can be filtered by severity and grouped by source.
- Variables:
rule_id (str) β Unique identifier of the rule that produced this finding (e.g., βIAM-001β, βCMP-001β, βMTX-001β).
rule_category (assets_guardian.core.domain.models.finding.RuleCategory) β Category of the rule that produced this finding (comparison, compliance, matrix).
severity (assets_guardian.core.domain.models.finding.SeverityType) β Severity level of the finding (CRITICAL, DANGER, WARNING, INFO).
title (str) β Readable title of the finding (e.g., βUsers without 2FAβ).
description (str | None) β Detailed description of the detected anomaly.
entities_impacted (list[str]) β List of impacted entities (users, projects, groups, etc.) as human-readable labels.
source (str) β Source where the finding originated (gitlab, microsoft365, dolibarr, etc.).
instance_id (str) β Identifier of the audited instance (e.g., βgitlab.comβ).
timestamp (datetime.datetime | None) β Creation date and time of the finding.
metadata (dict[str, Any] | None) β Custom arbitrary metadata dict (e.g., raw data useful for debugging or drilling down in reports).