Skip to content

PR-14: Templated report, prompt variant, static ATLAS (scanner) - #42

Merged
emmanuelgjr merged 1 commit into
mainfrom
improve/pr-14-templated-report
Jul 18, 2026
Merged

PR-14: Templated report, prompt variant, static ATLAS (scanner)#42
emmanuelgjr merged 1 commit into
mainfrom
improve/pr-14-templated-report

Conversation

@emmanuelgjr

Copy link
Copy Markdown
Contributor

Phase 4. Depends on PR-07/PR-05.

Deterministic report

  • cli/dsgai_report.py + templates/report.css — the HTML report is rendered by code from DSGAI-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.
  • STRICT mode renders file IDs (F07:12) and writes DSGAI-filemap.json. Accessibility: every status carries a symbol + text label, not colour alone; colours checked for AA contrast on white cards; print-first CSS.
  • Rendered with the standard library (styles in a template file) — no Jinja2 runtime dependency, matching the CLI's zero-dependency ethos.

Sample PNG — regenerated (finally reproducible)

DSGAI-samplereport.png is 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.py generates dsgai_scanner_prompt.md from 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 live site:atlas.mitre.org searches.

Verification

  • Report renders with all required sections, uses file IDs, zero fixture-secret substring.
  • generate_prompt_variant.py --check in sync; ATLAS map validates; pytest19 passed.
  • yamllint/md-links clean.

…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.
@emmanuelgjr
emmanuelgjr merged commit f275cf2 into main Jul 18, 2026
9 checks passed
@emmanuelgjr
emmanuelgjr deleted the improve/pr-14-templated-report branch July 18, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant