module PaintSamplesRegisterEhcHarden
PaintSamples — real formatter output for !ehc harden scans.
Public Instance Methods
Source
# File lib/paint_samples/register_ehc_harden.rb, line 10 def register_all PaintSamples.register("ehc_harden") do summary = EhcHardenReport.format_summary( label: "scan.example", issues: [ { id: 1, title: "Missing Strict-Transport-Security" }, { id: 2, title: "Open TCP ports detected" } ] ) detail = EhcHardenReport.format_issue( issue: { id: 1, title: "Missing Strict-Transport-Security", severity: "medium", summary: "No HSTS header — browsers may fall back to plain HTTP.", detail_lines: ["Add a long max-age HSTS policy on HTTPS vhosts."] }, label: "scan.example" ) (summary.split("\n") + detail.split("\n")) end end