mirror of
https://github.com/yogeshojha/rengine.git
synced 2026-10-20 15:21:30 +02:00
Repo-wide sweep of every user-facing string: frontend components, routes, config and stores; API details and route docs; shared definitions and models; stage config help; report prose; MCP, toolbox, interest and connector text; notification and worker messages. Descriptions that explained, reassured, justified or restated their title are deleted. Confirm dialogs name what is removed and stop. Failed actions read "<Noun> not <verbed>", successes "<Noun> <verbed>". No reader address, no product-as-subject, no em-dashes or parentheticals in prose. Mirrors updated on both sides: EPSS band help, compare refusal reasons, interest labels. Four tests asserting on old wording follow the new text. The rules are condensed into CLAUDE.md under Writing. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SK5o8xR96cbSnAfjYSTPSe
37 lines
1.1 KiB
Python
37 lines
1.1 KiB
Python
from __future__ import annotations
|
|
|
|
from reports.base import RenderContext, Section
|
|
from reports.config import SectionConfig, flag, limit
|
|
from shared.definitions.reports import SectionGroup
|
|
|
|
|
|
class AttackPathsConfig(SectionConfig):
|
|
top: int = limit(6, title="Paths shown", minimum=1, maximum=20)
|
|
show_assets: bool = flag(True, title="Show affected assets")
|
|
show_evidence: bool = flag(True, title="Show evidence")
|
|
|
|
|
|
class AttackPathsSection(Section):
|
|
name = "attack_paths"
|
|
title = "Attack paths"
|
|
description = "Conditions that combine into an attack route."
|
|
group = SectionGroup.SUMMARY.value
|
|
order = 30
|
|
config_model = AttackPathsConfig
|
|
|
|
def build(self, ctx: RenderContext, cfg: AttackPathsConfig) -> dict | None:
|
|
paths = ctx.brief.paths[: cfg.top]
|
|
if not paths:
|
|
return None
|
|
return {
|
|
"paths": [
|
|
{
|
|
"path": path,
|
|
"detail": ctx.narrator.attack_path(path),
|
|
}
|
|
for path in paths
|
|
],
|
|
"show_assets": cfg.show_assets,
|
|
"show_evidence": cfg.show_evidence,
|
|
}
|