feat(report): new cover and layout for the executive report
Release / Plan (reuse the published image?) (push) Successful in 4s
CI / Docker image (build and smoke test) (push) Skipped
CI / Tests (Linux) (push) Successful in 1m29s
CI / Dependency audit (push) Successful in 11s
CI / Format and clippy (push) Successful in 5m37s
Release / ci (push) Successful in 5m38s
Release / Build image (arm64) (push) Failing after 31s
Release / Build image (amd64) (push) Successful in 8m49s
Release / Publish tags (push) Skipped
Release / Gitea release (push) Skipped
Release / CLI (linux-aarch64) (push) Skipped
Release / CLI (linux-x86_64) (push) Skipped
Release / Plan (reuse the published image?) (push) Successful in 4s
CI / Docker image (build and smoke test) (push) Skipped
CI / Tests (Linux) (push) Successful in 1m29s
CI / Dependency audit (push) Successful in 11s
CI / Format and clippy (push) Successful in 5m37s
Release / ci (push) Successful in 5m38s
Release / Build image (arm64) (push) Failing after 31s
Release / Build image (amd64) (push) Successful in 8m49s
Release / Publish tags (push) Skipped
Release / Gitea release (push) Skipped
Release / CLI (linux-aarch64) (push) Skipped
Release / CLI (linux-x86_64) (push) Skipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d3c3b91e82
commit
9c0d00a9db
11 files changed
+265
-118
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
+259
-116
@@ -550,7 +550,11 @@ impl ExecutiveReport {
|
||||
"<script src=\"/paged.polyfill.js\"></script>\n<script>window.Paged || document.write('<script src=\"https://unpkg.com/pagedjs/dist/paged.polyfill.js\"><\\/script>')</script>\n",
|
||||
);
|
||||
html.push_str("<style>\n");
|
||||
html.push_str(&REPORT_CSS.replace("HARPIA_REPORT_TLP_MARKER", self.tlp.label()));
|
||||
html.push_str(
|
||||
&REPORT_CSS
|
||||
.replace("HARPIA_REPORT_TLP_MARKER", self.tlp.label())
|
||||
.replace("HARPIA_REPORT_LOGO_MARKER", &png_data_uri(LOGO_MARK_PNG)),
|
||||
);
|
||||
html.push_str("</style>\n</head>\n<body>\n");
|
||||
|
||||
// 1. Cover Page
|
||||
@@ -562,11 +566,16 @@ impl ExecutiveReport {
|
||||
|
||||
let emitted_date = self.emitted_at.format("%d/%m/%Y %H:%M UTC").to_string();
|
||||
|
||||
let logo = logo_data_uri();
|
||||
let s = &self.scope_summary;
|
||||
html.push_str("<div class=\"cover\">\n");
|
||||
html.push_str(&self.cover_radar_svg());
|
||||
html.push_str(" <div class=\"cover-glow\"></div>\n");
|
||||
html.push_str(" <img class=\"cover-hero\" src=\"");
|
||||
html.push_str(&logo);
|
||||
html.push_str("\" alt=\"Harpia\">\n");
|
||||
html.push_str(" <div class=\"cover-top\">\n");
|
||||
html.push_str(" <div class=\"cover-brand\"><img class=\"cover-logo\" src=\"");
|
||||
html.push_str(&logo_data_uri());
|
||||
html.push_str("\" alt=\"\">HARPIA</div>\n");
|
||||
html.push_str(" <div class=\"cover-brand\">HARPIA</div>\n");
|
||||
html.push_str(" <div class=\"cover-badges\">\n");
|
||||
html.push_str(&format!(
|
||||
" <div class=\"cover-tlp\" style=\"color:{0};border-color:{0}\">{1}</div>\n",
|
||||
@@ -577,7 +586,7 @@ impl ExecutiveReport {
|
||||
html.push_str(" </div>\n");
|
||||
html.push_str(" </div>\n");
|
||||
html.push_str(
|
||||
" <div class=\"cover-eyebrow\">CIBERFAUNA · AUDITORIA CONTÍNUA DE SEGURANÇA</div>\n",
|
||||
" <div class=\"cover-eyebrow\">CIBERFAUNA · AUDITORIA CONTÍNUA DE SUPERFÍCIE DE ATAQUE</div>\n",
|
||||
);
|
||||
html.push_str(" <h1 class=\"cover-title\">");
|
||||
html.push_str(&html_escape(&self.title));
|
||||
@@ -586,25 +595,20 @@ impl ExecutiveReport {
|
||||
html.push_str(&html_escape(&self.subtitle));
|
||||
html.push_str("</div>\n");
|
||||
|
||||
// Cover verdict / severity cards
|
||||
// Headline numbers strip
|
||||
html.push_str(" <div class=\"cover-cards\">\n");
|
||||
html.push_str(&format!(
|
||||
" <div class=\"cover-card sev-crit\"><span class=\"cc-num\">{}</span><span class=\"cc-lbl\">Críticos (9.0+)</span></div>\n",
|
||||
self.scope_summary.critical_count
|
||||
));
|
||||
html.push_str(&format!(
|
||||
" <div class=\"cover-card sev-high\"><span class=\"cc-num\">{}</span><span class=\"cc-lbl\">Altos (7.0–8.9)</span></div>\n",
|
||||
self.scope_summary.high_count
|
||||
));
|
||||
html.push_str(&format!(
|
||||
" <div class=\"cover-card sev-kev\"><span class=\"cc-num\">{}</span><span class=\"cc-lbl\">No CISA KEV</span></div>\n",
|
||||
self.scope_summary.kev_count
|
||||
));
|
||||
html.push_str(&format!(
|
||||
" <div class=\"cover-card sev-max\"><span class=\"cc-num\">{}</span><span class=\"cc-lbl\">Maior CVSS</span></div>\n",
|
||||
max_cvss_display
|
||||
));
|
||||
for (cls, num, lbl) in [
|
||||
("sev-crit", s.critical_count.to_string(), "Críticos (9.0+)"),
|
||||
("sev-high", s.high_count.to_string(), "Altos (7.0 a 8.9)"),
|
||||
("sev-kev", s.kev_count.to_string(), "No CISA KEV"),
|
||||
("sev-max", max_cvss_display.clone(), "Maior CVSS"),
|
||||
] {
|
||||
html.push_str(&format!(
|
||||
" <div class=\"cover-card {cls}\"><span class=\"cc-num\">{num}</span><span class=\"cc-lbl\">{lbl}</span></div>\n"
|
||||
));
|
||||
}
|
||||
html.push_str(" </div>\n");
|
||||
html.push_str(" <p class=\"cover-mark-cap\">Radar: cada ponto é um achado do relatório; quanto mais perto do centro, mais grave. Âmbar com halo: presente no CISA KEV.</p>\n");
|
||||
|
||||
// Cover meta footer
|
||||
html.push_str(" <div class=\"cover-meta\">\n");
|
||||
@@ -614,12 +618,13 @@ impl ExecutiveReport {
|
||||
html.push_str(&emitted_date);
|
||||
html.push_str("</span></div>\n");
|
||||
html.push_str(&format!(
|
||||
" <div class=\"cm-col\"><span class=\"cm-dt\">Escopo</span><span class=\"cm-dd\">{} hosts · {} portas</span></div>\n",
|
||||
self.scope_summary.active_hosts_count, self.scope_summary.open_ports_count
|
||||
" <div class=\"cm-col\"><span class=\"cm-dt\">Escopo</span><span class=\"cm-dd\">{} · {}</span></div>\n",
|
||||
plural(s.active_hosts_count, "host", "hosts"),
|
||||
plural(s.open_ports_count, "porta", "portas")
|
||||
));
|
||||
html.push_str(&format!(
|
||||
" <div class=\"cm-col\"><span class=\"cm-dt\">Achados</span><span class=\"cm-dd\">{} vulnerabilidades</span></div>\n",
|
||||
self.scope_summary.total_findings_count
|
||||
s.total_findings_count
|
||||
));
|
||||
html.push_str(" <div class=\"cm-col\"><span class=\"cm-dt\">Classificação</span><span class=\"cm-dd\">Restrito / Interno</span></div>\n");
|
||||
html.push_str(" </div>\n");
|
||||
@@ -827,6 +832,88 @@ impl ExecutiveReport {
|
||||
}
|
||||
}
|
||||
|
||||
impl ExecutiveReport {
|
||||
/// Data-driven radar motif for the cover: one dot per finding listed in the
|
||||
/// findings table, nearer the center (the logo) means a higher CVSS, KEV
|
||||
/// entries are amber with a halo. Coordinates are in millimetres (A4).
|
||||
fn cover_radar_svg(&self) -> String {
|
||||
let (cx, cy) = (140.0_f64, 158.0_f64);
|
||||
let radii = [70.0, 82.0, 94.0, 106.0, 118.0];
|
||||
let mut svg = String::with_capacity(8 * 1024);
|
||||
svg.push_str(" <svg class=\"cover-radar\" viewBox=\"0 0 210 297\" preserveAspectRatio=\"none\" aria-hidden=\"true\">\n");
|
||||
svg.push_str(" <defs><linearGradient id=\"sweep\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"0\"><stop offset=\"0\" stop-color=\"#38bdf8\" stop-opacity=\"0\"/><stop offset=\"1\" stop-color=\"#38bdf8\" stop-opacity=\"0.16\"/></linearGradient></defs>\n");
|
||||
let (sr, sa) = (radii[4], -2.35_f64);
|
||||
svg.push_str(&format!(
|
||||
" <path d=\"M {cx} {cy} L {:.1} {:.1} A {sr} {sr} 0 0 1 {:.1} {:.1} Z\" fill=\"url(#sweep)\"/>\n",
|
||||
cx + sr * (sa - 0.5).cos(), cy + sr * (sa - 0.5).sin(),
|
||||
cx + sr * sa.cos(), cy + sr * sa.sin()
|
||||
));
|
||||
svg.push_str(&format!(" <line x1=\"0\" x2=\"210\" y1=\"{cy}\" y2=\"{cy}\" stroke=\"#38bdf8\" stroke-opacity=\"0.12\" stroke-width=\"0.25\"/>\n"));
|
||||
svg.push_str(&format!(" <line x1=\"{cx}\" x2=\"{cx}\" y1=\"20\" y2=\"297\" stroke=\"#38bdf8\" stroke-opacity=\"0.12\" stroke-width=\"0.25\"/>\n"));
|
||||
for (i, r) in radii.iter().enumerate() {
|
||||
let dash = if i % 2 == 1 {
|
||||
" stroke-dasharray=\"0.6 1.8\""
|
||||
} else {
|
||||
""
|
||||
};
|
||||
svg.push_str(&format!(
|
||||
" <circle cx=\"{cx}\" cy=\"{cy}\" r=\"{r}\" fill=\"none\" stroke=\"#38bdf8\" stroke-opacity=\"{:.2}\" stroke-width=\"0.3\"{dash}/>\n",
|
||||
0.34 - i as f64 * 0.05
|
||||
));
|
||||
}
|
||||
let rows = self.sections.iter().find_map(|sec| match sec {
|
||||
ReportSection::Table { id, rows, .. } if id == "achados-criticos" => Some(rows),
|
||||
_ => None,
|
||||
});
|
||||
if let Some(rows) = rows {
|
||||
for (i, row) in rows.iter().enumerate() {
|
||||
let cvss: f64 = row.get(2).and_then(|c| c.parse().ok()).unwrap_or(0.0);
|
||||
let kev = row.get(3).map(|c| c == "SIM").unwrap_or(false);
|
||||
let (ring, color) = if cvss >= 9.0 {
|
||||
(0, "#fb7185")
|
||||
} else if cvss >= 7.0 {
|
||||
(1, "#fb923c")
|
||||
} else if cvss >= 4.0 {
|
||||
(2, "#facc15")
|
||||
} else {
|
||||
(3, "#38bdf8")
|
||||
};
|
||||
let color = if kev { "#fbbf24" } else { color };
|
||||
// Golden-angle spread, skipping spots that would sit under the
|
||||
// title block, the caption, the number strip or off the page.
|
||||
let r = radii[ring] + if i % 2 == 1 { 5.0 } else { 0.0 };
|
||||
let free = |x: f64, y: f64| {
|
||||
(6.0..204.0).contains(&x)
|
||||
&& (108.0..232.0).contains(&y)
|
||||
&& !(x < 88.0 && y > 212.0)
|
||||
};
|
||||
let mut deg = i as f64 * 137.508 + ring as f64 * 31.0;
|
||||
let (mut x, mut y) = (cx, cy);
|
||||
for _ in 0..64 {
|
||||
let a = deg.to_radians();
|
||||
(x, y) = (cx + r * a.cos(), cy - r * a.sin());
|
||||
if free(x, y) {
|
||||
break;
|
||||
}
|
||||
deg += 23.7;
|
||||
}
|
||||
svg.push_str(&format!(
|
||||
" <line x1=\"{cx}\" y1=\"{cy}\" x2=\"{x:.1}\" y2=\"{y:.1}\" stroke=\"{color}\" stroke-opacity=\"0.10\" stroke-width=\"0.25\"/>\n"
|
||||
));
|
||||
if kev {
|
||||
svg.push_str(&format!(" <circle cx=\"{x:.1}\" cy=\"{y:.1}\" r=\"3.4\" fill=\"none\" stroke=\"{color}\" stroke-opacity=\"0.7\" stroke-width=\"0.35\"/>\n"));
|
||||
}
|
||||
svg.push_str(&format!(" <circle cx=\"{x:.1}\" cy=\"{y:.1}\" r=\"2.2\" fill=\"{color}\" fill-opacity=\"0.18\"/>\n"));
|
||||
svg.push_str(&format!(
|
||||
" <circle cx=\"{x:.1}\" cy=\"{y:.1}\" r=\"1.05\" fill=\"{color}\"/>\n"
|
||||
));
|
||||
}
|
||||
}
|
||||
svg.push_str(" </svg>\n");
|
||||
svg
|
||||
}
|
||||
}
|
||||
|
||||
/// The Harpia logo, embedded so the report renders identically whether it's
|
||||
/// viewed live from `/relatorio` or saved as a standalone offline HTML file
|
||||
/// (same reasoning as `Sabiá/crates/sabia-core/src/report.rs`, which this
|
||||
@@ -836,11 +923,20 @@ const LOGO_PNG: &[u8] = include_bytes!("../../../logo.png");
|
||||
|
||||
const B64: &[u8; 64] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
|
||||
/// Encodes `bytes` as a `data:image/png;base64,...` URI.
|
||||
/// Encodes the full-size logo as a `data:image/png;base64,...` URI (cover only).
|
||||
fn logo_data_uri() -> String {
|
||||
let mut out = String::with_capacity(LOGO_PNG.len().div_ceil(3) * 4 + 22);
|
||||
png_data_uri(LOGO_PNG)
|
||||
}
|
||||
|
||||
/// 128 px copy of the logo for the running header of the inner pages, so the
|
||||
/// full-size PNG is embedded only once (on the cover).
|
||||
const LOGO_MARK_PNG: &[u8] = include_bytes!("../assets/logo-mark.png");
|
||||
|
||||
/// Encodes PNG `bytes` as a `data:image/png;base64,...` URI.
|
||||
fn png_data_uri(bytes: &[u8]) -> String {
|
||||
let mut out = String::with_capacity(bytes.len().div_ceil(3) * 4 + 22);
|
||||
out.push_str("data:image/png;base64,");
|
||||
for chunk in LOGO_PNG.chunks(3) {
|
||||
for chunk in bytes.chunks(3) {
|
||||
let b0 = chunk[0];
|
||||
let b1 = chunk.get(1).copied();
|
||||
let b2 = chunk.get(2).copied();
|
||||
@@ -858,6 +954,10 @@ fn logo_data_uri() -> String {
|
||||
out
|
||||
}
|
||||
|
||||
fn plural(n: usize, one: &str, many: &str) -> String {
|
||||
format!("{n} {}", if n == 1 { one } else { many })
|
||||
}
|
||||
|
||||
fn html_escape(raw: &str) -> String {
|
||||
raw.replace('&', "&")
|
||||
.replace('<', "<")
|
||||
@@ -884,7 +984,7 @@ fn format_markdown_bold(raw: &str) -> String {
|
||||
|
||||
const REPORT_CSS: &str = r#"
|
||||
:root {
|
||||
--primary: #0369a1;
|
||||
--primary: #0284c7;
|
||||
--primary-deep: #0c4a6e;
|
||||
--primary-dark: #072738;
|
||||
--accent: #38bdf8;
|
||||
@@ -902,8 +1002,8 @@ const REPORT_CSS: &str = r#"
|
||||
--med-bg: #fefce8;
|
||||
--low: #0284c7;
|
||||
--low-bg: #f0f9ff;
|
||||
--font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
||||
--font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
||||
--font-sans: system-ui, 'Inter', 'Segoe UI', Roboto, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
||||
--font-mono: ui-monospace, 'JetBrains Mono', 'IBM Plex Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
@@ -920,26 +1020,37 @@ body {
|
||||
margin: 24mm 16mm 22mm 16mm;
|
||||
background: #ffffff;
|
||||
@top-left {
|
||||
content: "Harpia · Auditoria Contínua de Segurança";
|
||||
font-family: var(--font-sans);
|
||||
font-size: 7.5pt;
|
||||
content: "";
|
||||
background: url("HARPIA_REPORT_LOGO_MARKER") no-repeat left bottom / 8mm 8mm;
|
||||
vertical-align: bottom;
|
||||
padding-bottom: 3mm;
|
||||
width: 30mm;
|
||||
}
|
||||
@top-center {
|
||||
content: "HARPIA · RELATÓRIO EXECUTIVO";
|
||||
font-family: var(--font-mono);
|
||||
font-size: 6.8pt;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.16em;
|
||||
color: var(--muted);
|
||||
vertical-align: bottom;
|
||||
padding-bottom: 4mm;
|
||||
padding-bottom: 4.5mm;
|
||||
}
|
||||
@top-right {
|
||||
content: "HARPIA_REPORT_TLP_MARKER · USO AUTORIZADO";
|
||||
font-family: var(--font-mono);
|
||||
font-size: 7pt;
|
||||
font-size: 6.8pt;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.1em;
|
||||
color: var(--primary);
|
||||
color: #b45309;
|
||||
white-space: nowrap;
|
||||
width: 55mm;
|
||||
text-align: right;
|
||||
vertical-align: bottom;
|
||||
padding-bottom: 4mm;
|
||||
padding-bottom: 4.5mm;
|
||||
}
|
||||
@bottom-left {
|
||||
content: "Ciberfauna · Inteligência Defensiva e Ofensiva Contínua";
|
||||
content: "Ciberfauna · Harpia · Auditoria Contínua de Superfície de Ataque";
|
||||
font-family: var(--font-sans);
|
||||
font-size: 7.5pt;
|
||||
color: var(--faint);
|
||||
@@ -959,8 +1070,9 @@ body {
|
||||
|
||||
@page cover {
|
||||
margin: 0;
|
||||
background: var(--primary-dark);
|
||||
@top-left { content: none; }
|
||||
background: #03101c;
|
||||
@top-left { content: none; background: none; }
|
||||
@top-center { content: none; }
|
||||
@top-right { content: none; }
|
||||
@bottom-left { content: none; }
|
||||
@bottom-right { content: none; }
|
||||
@@ -972,138 +1084,164 @@ body {
|
||||
break-after: page;
|
||||
height: 297mm;
|
||||
width: 210mm;
|
||||
padding: 24mm 20mm;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
background: linear-gradient(170deg, #072738 0%, #03141f 100%);
|
||||
background:
|
||||
radial-gradient(120mm 120mm at 140mm 158mm, #0b3352 0%, rgba(11, 51, 82, 0) 70%),
|
||||
linear-gradient(165deg, #06213a 0%, #041628 45%, #020b15 100%);
|
||||
color: #ffffff;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
.cover-radar {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
width: 210mm;
|
||||
height: 297mm;
|
||||
}
|
||||
.cover-glow {
|
||||
position: absolute;
|
||||
left: 50mm;
|
||||
top: 68mm;
|
||||
width: 180mm;
|
||||
height: 180mm;
|
||||
border-radius: 50%;
|
||||
background: radial-gradient(circle, rgba(249, 115, 22, 0.40) 0%, rgba(251, 146, 60, 0.16) 38%, rgba(251, 146, 60, 0) 68%);
|
||||
}
|
||||
.cover-hero {
|
||||
position: absolute;
|
||||
left: 76mm;
|
||||
top: 94mm;
|
||||
width: 128mm;
|
||||
height: 128mm;
|
||||
object-fit: contain;
|
||||
filter: drop-shadow(0 0 6mm rgba(249, 115, 22, 0.35));
|
||||
}
|
||||
.cover-top {
|
||||
position: absolute;
|
||||
left: 18mm;
|
||||
right: 18mm;
|
||||
top: 16mm;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid rgba(56, 189, 248, 0.25);
|
||||
padding-bottom: 5mm;
|
||||
border-bottom: 1px solid rgba(56, 189, 248, 0.22);
|
||||
padding-bottom: 4mm;
|
||||
}
|
||||
.cover-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 3mm;
|
||||
font-family: var(--font-mono);
|
||||
font-size: 16pt;
|
||||
font-size: 11pt;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.18em;
|
||||
color: var(--accent);
|
||||
letter-spacing: 0.42em;
|
||||
color: #e0f2fe;
|
||||
}
|
||||
.cover-logo {
|
||||
width: 9mm;
|
||||
height: 9mm;
|
||||
object-fit: contain;
|
||||
}
|
||||
.cover-badges {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2.5mm;
|
||||
}
|
||||
.cover-tlp {
|
||||
.cover-badges { display: flex; align-items: center; gap: 2.5mm; }
|
||||
.cover-tlp, .cover-classification {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 8pt;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.1em;
|
||||
border: 1.5px solid;
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.cover-classification {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 8pt;
|
||||
font-size: 7.5pt;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.12em;
|
||||
color: #fbbf24;
|
||||
border: 1px solid #fbbf24;
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
letter-spacing: 0.16em;
|
||||
border: 1px solid;
|
||||
padding: 3px 8px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.cover-classification { color: #cbd5e1; border-color: rgba(203, 213, 225, 0.5); }
|
||||
.cover-eyebrow, .cover-title, .cover-subtitle { position: relative; margin-left: 18mm; }
|
||||
.cover-eyebrow {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 8pt;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.2em;
|
||||
font-size: 7.5pt;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.22em;
|
||||
text-transform: uppercase;
|
||||
color: var(--accent);
|
||||
margin-top: 25mm;
|
||||
color: #38bdf8;
|
||||
padding-top: 40mm;
|
||||
}
|
||||
.cover-title {
|
||||
font-size: 32pt;
|
||||
font-size: 38pt;
|
||||
font-weight: 800;
|
||||
line-height: 1.1;
|
||||
letter-spacing: -0.02em;
|
||||
margin: 4mm 0 3mm;
|
||||
line-height: 1.02;
|
||||
letter-spacing: -0.025em;
|
||||
margin-top: 5mm;
|
||||
margin-bottom: 0;
|
||||
max-width: 150mm;
|
||||
color: #ffffff;
|
||||
}
|
||||
.cover-subtitle {
|
||||
font-size: 11pt;
|
||||
line-height: 1.5;
|
||||
color: #cbd5e1;
|
||||
max-width: 150mm;
|
||||
margin-bottom: 12mm;
|
||||
line-height: 1.55;
|
||||
color: #b9d3e6;
|
||||
max-width: 100mm;
|
||||
margin-top: 6mm;
|
||||
}
|
||||
.cover-cards {
|
||||
position: absolute;
|
||||
left: 18mm;
|
||||
right: 18mm;
|
||||
bottom: 40mm;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 3.5mm;
|
||||
margin: 6mm 0 16mm;
|
||||
gap: 4mm;
|
||||
}
|
||||
.cover-card {
|
||||
padding: 4mm 3mm;
|
||||
border-radius: 6px;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border: 1px solid rgba(255, 255, 255, 0.12);
|
||||
padding: 3mm 3.5mm;
|
||||
background: rgba(3, 16, 28, 0.72);
|
||||
border-top: 3px solid var(--accent);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.5mm;
|
||||
}
|
||||
.cover-card.sev-crit { border-left: 3.5px solid var(--crit); }
|
||||
.cover-card.sev-high { border-left: 3.5px solid var(--high); }
|
||||
.cover-card.sev-kev { border-left: 3.5px solid #fbbf24; }
|
||||
.cover-card.sev-max { border-left: 3.5px solid var(--accent); }
|
||||
.cover-card.sev-crit { border-top-color: #fb7185; }
|
||||
.cover-card.sev-high { border-top-color: #fb923c; }
|
||||
.cover-card.sev-kev { border-top-color: #fbbf24; }
|
||||
.cover-card.sev-max { border-top-color: #38bdf8; }
|
||||
.cc-num {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 18pt;
|
||||
font-size: 20pt;
|
||||
font-weight: 800;
|
||||
color: #ffffff;
|
||||
line-height: 1;
|
||||
}
|
||||
.cc-lbl {
|
||||
font-size: 7.5pt;
|
||||
font-family: var(--font-mono);
|
||||
font-size: 6.6pt;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.1em;
|
||||
color: #8fb3cc;
|
||||
}
|
||||
.cover-mark-cap {
|
||||
position: absolute;
|
||||
left: 18mm;
|
||||
bottom: 64mm;
|
||||
width: 64mm;
|
||||
margin: 0;
|
||||
font: 400 6.5pt/1.5 var(--font-mono);
|
||||
letter-spacing: 0.06em;
|
||||
color: #94a3b8;
|
||||
text-transform: uppercase;
|
||||
color: #6f93ad;
|
||||
}
|
||||
.cover-meta {
|
||||
position: absolute;
|
||||
left: 18mm;
|
||||
right: 18mm;
|
||||
bottom: 14mm;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 4mm;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.16);
|
||||
padding-top: 5mm;
|
||||
gap: 6mm;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.18);
|
||||
padding-top: 4.5mm;
|
||||
}
|
||||
.cm-col { display: flex; flex-direction: column; gap: 1mm; }
|
||||
.cm-dt {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 6.8pt;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.12em;
|
||||
font-size: 6.6pt;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.16em;
|
||||
text-transform: uppercase;
|
||||
color: #64748b;
|
||||
color: #6f93ad;
|
||||
}
|
||||
.cm-dd {
|
||||
font-size: 8.5pt;
|
||||
font-weight: 600;
|
||||
color: #e2e8f0;
|
||||
font-size: 9pt;
|
||||
font-weight: 500;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
/* CHAPTER / PAGE BREAKS */
|
||||
@@ -1482,5 +1620,10 @@ alvos = ["10.0.0.1/32"]
|
||||
assert!(html.contains("CVE-2024-CRIT"));
|
||||
assert!(html.contains("Execução remota crítica"));
|
||||
assert!(html.contains("paged.polyfill.js"));
|
||||
// Cover: hero logo, radar with one dot per listed finding, KEV ring.
|
||||
assert!(html.contains("class=\"cover-hero\" src=\"data:image/png;base64,"));
|
||||
assert!(html.contains("AUDITORIA CONTÍNUA DE SUPERFÍCIE DE ATAQUE"));
|
||||
assert_eq!(html.matches("r=\"1.05\"").count(), 3);
|
||||
assert_eq!(html.matches("r=\"3.4\"").count(), 1);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user