PR-14: Templated report, prompt variant, static ATLAS (scanner) - #42
Merged
Conversation
…c ATLAS (PR-14) - cli/dsgai_report.py + templates/report.css: the HTML report is rendered BY CODE from the checkpoint (deterministic, testable) with a golden structural test. The LLM contributes only prose (--prose) injected as data. STRICT mode renders file IDs (F07:12) + writes DSGAI-filemap.json; accessibility — every status carries a symbol + text label, not colour alone. Rendered with stdlib (styles in a template file) — no Jinja2 runtime dependency. - DSGAI-samplereport.png regenerated from the fixture app via the renderer + headless Chrome (~45 KB, fully reproducible, zero real-repo disclosure). - build/generate_prompt_variant.py: dsgai_scanner_prompt.md is now generated from the skill (frontmatter + cc-only blocks stripped); drift is a CI failure (--check). Single-sourced so the two variants can't diverge — the variant is now comprehensive rather than a separately-curated condensation. - rules/atlas-map.yaml: static MITRE ATLAS technique->control map; the skill's unreliable live site:atlas.mitre.org searches are removed in favour of it. - .gitignore: scanner generated artifacts (checkpoint/filemap/baseline/reports). Verified: report renders with all sections, uses file IDs, zero secret leakage; prompt-variant --check in sync; ATLAS map validates; pytest 19 passed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 4. Depends on PR-07/PR-05.
Deterministic report
cli/dsgai_report.py+templates/report.css— the HTML report is rendered by code fromDSGAI-scan.json, so its structure is fixed and testable (golden structural test). The LLM contributes only prose (executive summary / remediation) via--prose, injected as data.F07:12) and writesDSGAI-filemap.json. Accessibility: every status carries a symbol + text label, not colour alone; colours checked for AA contrast on white cards; print-first CSS.Sample PNG — regenerated (finally reproducible)
DSGAI-samplereport.pngis now generated from the fixture app via the renderer + headless Chrome: ~45 KB (was 352 KB interim), zero real-repo disclosure, fully reproducible.Single-sourced prompt variant
build/generate_prompt_variant.pygeneratesdsgai_scanner_prompt.mdfrom the skill (frontmatter +<!-- cc-only -->blocks stripped). Drift is a CI failure (--check). Note: the variant is now comprehensive/single-sourced rather than a separately-curated condensation — that's the point (no drift).Static ATLAS
rules/atlas-map.yaml(ATLAS v4.9.0) replaces the skill's unreliable livesite:atlas.mitre.orgsearches.Verification
generate_prompt_variant.py --checkin sync; ATLAS map validates;pytest→ 19 passed.yamllint/md-links clean.