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
70 lines
2.5 KiB
Python
70 lines
2.5 KiB
Python
from __future__ import annotations
|
|
|
|
from reports.base import RenderContext, Section
|
|
from reports.config import SectionConfig, choice, flag, paragraph
|
|
from shared.definitions.reports import SectionGroup, SectionRole
|
|
|
|
_STANDARDS = {
|
|
"": "None",
|
|
"ptes": "Penetration Testing Execution Standard",
|
|
"nist": "NIST SP 800-115",
|
|
"osstmm": "OSSTMM 3",
|
|
"owasp": "OWASP Web Security Testing Guide",
|
|
}
|
|
|
|
|
|
class MethodologyConfig(SectionConfig):
|
|
show_stages: bool = flag(True, title="List stages")
|
|
show_tools: bool = flag(True, title="List tools")
|
|
show_timing: bool = flag(True, title="Show timing")
|
|
show_scope: bool = flag(True, title="Show scope and exclusions")
|
|
standard: str = choice("ptes", title="Reference standard", options=_STANDARDS)
|
|
note: str = paragraph(
|
|
"", title="Additional note", description="Markdown appended to this section."
|
|
)
|
|
|
|
|
|
class MethodologySection(Section):
|
|
name = "methodology"
|
|
title = "Scope and methodology"
|
|
description = "Scope, stages and tools."
|
|
group = SectionGroup.APPENDIX.value
|
|
order = 10
|
|
role = SectionRole.FURNITURE.value
|
|
config_model = MethodologyConfig
|
|
|
|
def build(self, ctx: RenderContext, cfg: MethodologyConfig) -> dict:
|
|
source = ctx.data
|
|
scan = source.scan
|
|
stages = []
|
|
if cfg.show_stages:
|
|
try:
|
|
from stages.registry import stages as specs # noqa: PLC0415
|
|
|
|
table = {spec.name: spec for spec in specs()}
|
|
except ImportError:
|
|
table = {}
|
|
for name in source.planned_stages:
|
|
spec = table.get(name)
|
|
stages.append(
|
|
{
|
|
"name": name,
|
|
"title": spec.title if spec else name.replace("_", " ").title(),
|
|
"description": spec.description if spec else "",
|
|
"phase": spec.phase if spec else "",
|
|
}
|
|
)
|
|
return {
|
|
"scan": scan,
|
|
"stages": stages,
|
|
"tools": source.tools_used if cfg.show_tools else [],
|
|
"excluded": source.excluded() if cfg.show_scope else {},
|
|
"standard": _STANDARDS.get(cfg.standard, ""),
|
|
"timing": cfg.show_timing,
|
|
"note": cfg.note,
|
|
"intensity": (scan.execution_config or {}).get("intensity")
|
|
if scan
|
|
else None,
|
|
"context": scan.context_name if scan else None,
|
|
}
|