Repository navigation
fix: retain action safety warnings in HTML reports - #70
Merged
alexshapalov merged 1 commit intoSep 22, 2026
Merged
Conversation
The HTML report displayed remediation but omitted the structured blocking caveats carried by other output formats. Render each guard's action, explanation and verification condition, making prohibitions explicit and preserving HTML escaping. Tests cover a real renderer regression, multiple guards, prohibitions, suppressed findings, untrusted display characters and absent safety metadata. The regression fails before the fix; report, render and CLI race tests pass. No execution or JSON contract changes are introduced. Closes pgrundev#68
This was referenced Sep 22, 2026
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.
What and why
Closes #68.
The HTML report displayed remediation but omitted
Finding.Safety.BlockingCaveats. Render every guard's action, explanation and verification condition so the exported report carries the operational qualifications already present in other outputs. Prohibitions say "Do not run"; conditional cautions retain their "Only after" verification text.All guard text remains HTML-escaped. Warnings also remain visible for suppressed findings; missing safety metadata does not create fabricated warnings.
Verification
Verified commit:
aea46b69d19026cc87f84617c2c2a8216c4465d2.a1e6561e366455756c45a16a46647f882b3b6a1c: remediation is present but required guard text is absent.go test -race ./internal/report -run 'TestRenderReportCarries|TestReportGuards|TestReportWithoutSafety' -count=20: passed.bash scripts/gate.sh: passed on the committed HEAD, including build, vet, pinned lint, tests and all six release-target builds.go test -race ./...: passed. Formatting andgit diff --checkare clean.Scope and risk
Only the HTML presentation and its tests change. No database queries, dependencies, migrations, finding semantics or JSON contract changes are introduced. Testing exercises the real renderer with synthetic finding fixtures; no browser visual or PostgreSQL integration claim is made. Reverting this commit restores the prior rendering.
Checklist