feat: wire threat-model.md into Phase 6 reporting context#54
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughPhase 6 reporting now optionally uses ChangesPhase 6 threat-model integration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Coverage Report
Generated by pytest-cov on |
Greptile SummaryThis PR wires
Confidence Score: 5/5All changes are additive, documentation-only, and correctly conditioned on artifact presence — no behavior change for projects without a threat model. Every instruction layer (prompt, reporter agent, skill, template) is updated consistently. Conditional language is present in all four files. Previously raised concerns about missing Limitations guidance in the reporter agent and the unconditional Limitations example in the template are both addressed in this revision. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
TM[("itemdb/notes/threat-model.md\n(optional)")]
subgraph Phase6["Phase 6 – Report Generation"]
P6["prompts/phase-6-report.md\n(required reading + guardrail rule)"]
RA[".opencode/agents/reporter.md\n(required reading + section guidance)"]
SK[".opencode/skills/report-writing/SKILL.md\n(inputs list)"]
end
subgraph Template["Report Template"]
RPT["templates/report.md\n(Methodology / Scope / Limitations)"]
end
TM -->|"If present"| P6
TM -->|"If present"| RA
TM -->|"If present"| SK
P6 --> RPT
RA --> RPT
RPT --> M["Methodology\n(attacker model summary)"]
RPT --> S["Scope\n(trust boundaries, assets)"]
RPT --> L["Limitations\n(open assumptions — conditional)"]
style TM fill:#f9f,stroke:#999,stroke-dasharray:5
style M fill:#dff,stroke:#aaa
style S fill:#dff,stroke:#aaa
style L fill:#dff,stroke:#aaa
Reviews (2): Last reviewed commit: "feat: wire threat-model.md into Phase 6 ..." | Re-trigger Greptile |
Closes #37. - prompts/phase-6-report.md: add threat-model.md to required reading (conditional), add reporting rule for grounding Methodology/Scope/ Limitations from the threat model without inflating severity beyond confirmed evidence, add threat-model limitation example. - .opencode/agents/reporter.md: add conditional threat-model.md to required reading, add guidance to Methodology (attacker model summary), Scope (trust boundaries, assets, security objectives), and Limitations (open assumptions affecting severity or exploitability) sections. - .opencode/skills/report-writing/SKILL.md: add conditional threat-model.md to inputs. - templates/report.md: add threat-model placeholders to Methodology (attacker model, threat assumptions, trust boundaries), Scope (trust boundaries, assets, attacker postures), and Limitations (conditional qualifier). - tests/test_prompts_threat_model.py: add 14 tests covering Phase 6 prompt, reporter agent (including Limitations), report-writing skill, and report template. All references are conditional (if present / when available) so projects without threat-model.md continue to work unchanged.
51e0162 to
d3cbeb5
Compare
|
All three P2 findings addressed in d3cbeb5:
814 tests passing. |
Summary
Wires
itemdb/notes/threat-model.mdinto Phase 6 (reporting) so the report can draw on the operational threat model for methodology context, attacker assumptions, trust boundaries, affected assets, and limitations — without duplicating the artifact or inflating severity beyond what confirmed evidence supports.Closes #37.
Changes
prompts/phase-6-report.mdthreat-model.mdto required reading (conditional), added reporting rule for grounding Methodology/Scope/Limitations from the threat model with an explicit guardrail against speculative severity inflation, added threat-model limitation example.opencode/agents/reporter.mdthreat-model.mdto required reading, added guidance to Methodology (attacker model summary), Scope (trust boundaries, assets, security objectives), and Limitations (open assumptions affecting severity or exploitability).opencode/skills/report-writing/SKILL.mdthreat-model.mdto inputstemplates/report.mdtests/test_prompts_threat_model.pyDesign decisions
If present,when available) — projects withoutthreat-model.mdsee no change in behavior (acceptance criteria web: spaces #4).Acceptance criteria coverage
itemdb/notes/threat-model.mdwhen present.Review feedback addressed
All three Greptile P2 findings from the first review round have been fixed:
templates/report.md— Limitations example now conditional: Added(only when \itemdb/notes/threat-model.md` is present)` qualifier, consistent with Methodology and Scope additions in the same file..opencode/agents/reporter.md— Limitations guidance added: Reporter agent now includes open-assumption guidance in its Limitations section, closing the gap vs. the prompt and template.tests/test_prompts_threat_model.py— Guardrail test tightened: Removed the redundant"do not"assert that would pass trivially from pre-existing directives. Added a dedicated test for reporter agent Limitations guidance (test_reporter_agent_mentions_threat_model_in_limitations).Testing
make testspasses (814 tests, frontmatter validation, artifact checks).Summary by CodeRabbit
Documentation
Tests