Files
violin/tests/pentest_docs/test_pentest_docs_task6_atomic_findings.py
Violin ea7e094528 Remediate audit P0/P1 findings; migrate tests to green
- state.py: fcntl/msvcrt file locking, reservation+finalization, history
  verification, remove dead subprocess bridges (p1-lock)
- hypotheses.py: enforce canonical status, phase/host/service/port match,
  reject unrelated hypotheses (p1-hyp)
- tools.py/__init__.py: retain kwargs (task_id), lifecycle hooks wired
  (REGISTERED_TOOLS + no-op-then-active hooks) (p1-life)
- Migrate tests from tests/*.py to tests/guard + tests/pentest_docs; align
  to actual API (handle_target returns ips[0], handle_exec_burst fail-closed,
  PTT self-certify uses real batch_id, post-exploitation requires hypothesis)
- scoping.md: add checkpoint.json continuity-artifact drift note
- pyproject.toml: v1.2.0, per-file-ignores for tests/scripts (E402/S101)
- Add .pytest-tmp-plugin/ to .gitignore

64 passed; ruff clean.
2026-07-12 20:57:55 +01:00

43 lines
1.2 KiB
Python

from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
PENTEST = ROOT / "skills/pentest"
REPORTING = PENTEST / "playbooks/reporting.md"
TEMPLATE = PENTEST / "templates/report-template.md"
STANDARDS = PENTEST / "references/standards.md"
def test_reporting_defines_atomic_finding_rule():
text = REPORTING.read_text(encoding="utf-8").lower()
required = [
"atomic finding",
"one root cause",
"one affected asset",
"one reproducible proof",
"do not bundle",
"split into separate findings",
]
for phrase in required:
assert phrase in text
def test_report_template_has_atomic_finding_fields():
text = TEMPLATE.read_text(encoding="utf-8").lower()
required = [
"atomic finding check",
"root cause",
"affected asset",
"verification receipt",
"attack chain ids",
]
for phrase in required:
assert phrase in text
def test_standards_keep_atomic_finding_guidance_canonical():
text = STANDARDS.read_text(encoding="utf-8").lower()
assert "atomic finding rule" in text
assert "one finding per" in text
assert "roll-up" in text
assert "shared root cause" in text