1.7 KiB
1.7 KiB
Path Explanation Service with Multi-Format Rendering
Module
Scanner
Status
IMPLEMENTED
Description
Service that converts raw reachability graph paths (entrypoint-to-sink) into human-readable explanations with gate annotations, supporting text, markdown, and JSON output formats for display in CLI, UI, and API responses.
Implementation Details
- Path Explanation Service:
src/Scanner/__Libraries/StellaOps.Scanner.Reachability/Explanation/PathExplanationService.cs-PathExplanationServiceconverts raw reachability graph paths into human-readable explanations with gate annotationssrc/Scanner/__Libraries/StellaOps.Scanner.Reachability/Explanation/PathExplanationModels.cs- Models for path explanation data including node descriptions, gate annotations, and confidence levels
- Multi-Format Rendering:
src/Scanner/__Libraries/StellaOps.Scanner.Reachability/Explanation/PathRenderer.cs-PathRendererrenders path explanations in multiple formats: plain text, markdown, and JSON for CLI, UI, and API consumption
E2E Test Plan
- Generate a reachability path from an entrypoint to a vulnerable sink and verify the explanation service produces a human-readable description
- Verify gate annotations (auth, admin-only, feature flags) appear in the path explanation
- Verify text format rendering produces a clean CLI-readable output
- Verify markdown format rendering produces properly formatted markdown with code blocks and links
- Verify JSON format rendering produces structured data suitable for API responses and UI consumption
- Verify multi-hop paths (entrypoint -> intermediate -> sink) include all intermediate nodes with descriptions