assets_guardian.core.domain.models.finding

Classes

Finding(*,Β rule_id,Β rule_category,Β severity,Β ...)

Normalized representation of a discrepancy or anomaly detected by an audit rule.

RuleCategory(*values)

SeverityType(*values)

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: object

Normalized 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).

class assets_guardian.core.domain.models.finding.RuleCategory(*values)[source]

Bases: StrEnum

class assets_guardian.core.domain.models.finding.SeverityType(*values)[source]

Bases: StrEnum