Skip to content

API Reference parrot_tools.security.parsers.aggregator

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_tools.security.parsers.aggregator

View source

Catalog-level Aggregator passthrough parser.

For WEEKLY_SUMMARY / MONTHLY_SUMMARY report kinds, the content IS already a serialized summary JSON produced by the summarizer. The aggregator parser extracts the severity breakdown and executive paragraph directly from that structure without re-parsing scanner output.

Class AggregatorParser

Passthrough parser for weekly / monthly aggregated summary reports.

The expected JSON shape mirrors the output of WeeklySummarizer / MonthlySummarizer:

.. code-block:: json

{
  "severity_summary": {"critical": 2, "high": 5, ...},
  "top_findings": [
    {"finding_id": "...", "severity": "CRITICAL", "title": "...", ...}
  ],
  "executive_paragraph": "Overall posture improved this week..."
}

Attributes:

Attribute Type Description
parser_version str Fixed at "1.0.0" for v1 of this catalog.

Method AggregatorParser.parse

Parse an aggregated summary JSON into a ParsedReport.

parse(content: bytes | Path) -> ParsedReport

Parameter Type Default Description
content bytes | Path Raw summary JSON bytes or path to the JSON file.

Returns: ParsedReport — Deterministic ParsedReport reflecting the pre-computed severity summary and top findings.

Method AggregatorParser.extract_section

Extract a named section from the aggregated summary JSON.

For "executive", returns the executive_paragraph text if present (only meaningful for this parser — others return "").

extract_section(content: bytes | Path, section: str) -> dict

Parameter Type Default Description
content bytes | Path Raw summary JSON bytes or path to the JSON file.
section str One of "summary", "critical", "high", "medium", "low", "executive", "full".

Returns: dict — Dictionary with section-specific content.

Raises:

  • ValueError — If section is not in the supported set.

Alias ParsedReport

Re-exported from parrot_tools.security.parsers._types.ParsedReport.

Alias load_bytes

Re-exported from parrot_tools.security.parsers._types.load_bytes.

Alias sort_findings

Re-exported from parrot_tools.security.parsers._types.sort_findings.

Alias validate_section

Re-exported from parrot_tools.security.parsers._types.validate_section.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally