assets_guardian.core.domain.models.reportο
Classes
|
Container for audit findings, allowing tracking of metrics. |
- class assets_guardian.core.domain.models.report.Report(findings: Iterable[Finding] | None = None)[source]ο
Bases:
objectContainer for audit findings, allowing tracking of metrics.
Can operate either in βmemoryβ mode (classic list) or in βstreamingβ mode (external iterable such as a cache) to prevent RAM saturation.
Initializes the report, possibly in streaming mode.
- Parameters:
findings β An optional iterable of findings (e.g., from cache). If present, the report switches to streaming mode.
- add_finding(finding: Finding) None[source]ο
Adds a finding to the report and updates severity counters.
- Parameters:
finding β The detected anomaly to integrate.
- extend(findings: Iterable[Finding]) None[source]ο
Adds multiple findings to the report in bulk.
- Parameters:
findings β An iterable of findings to process.
- get_count_by_severity(severity: SeverityType) int[source]ο
Returns the count of findings for a given severity.
- property total_count: intο
Total count of detected findings.