diff --git a/CHANGELOG.md b/CHANGELOG.md
index 20e730b..2e20292 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,8 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versio
- Documentation brought up to date for 2.x (README status, releases, install example) and rewritten without em dashes.
- The executive report title and the dashboard's page title, finding and group-dialog titles no longer use an em dash.
+- Executive report redesign: full-bleed navy cover with the Harpia logo as the hero over an orange glow, a data-driven radar (one dot per listed finding, nearer the center means higher CVSS, KEV highlighted), headline numbers and a meta grid; inner pages carry the logo, document title, TLP and page counter in the margins.
+
### Fixed
- The executive report cover still read "XEXÉU"; it now shows the Harpia name.
- The interface screenshots in `docs/img` still showed the old Xexéu name and v0.1.0; they were retaken from the current build.
diff --git a/CHANGELOG.pt-BR.md b/CHANGELOG.pt-BR.md
index 442b147..65b88e1 100644
--- a/CHANGELOG.pt-BR.md
+++ b/CHANGELOG.pt-BR.md
@@ -10,6 +10,8 @@ Formato baseado no [Keep a Changelog](https://keepachangelog.com/pt-BR/1.1.0/);
- Documentação atualizada para a série 2.x (status do README, releases, exemplo de instalação) e reescrita sem travessões.
- O título do relatório executivo e os títulos da página, dos achados e do diálogo de grupo no dashboard não usam mais travessão.
+- Novo visual do relatório executivo: capa azul-marinho de página inteira com o logo do Harpia em destaque sobre um brilho laranja, um radar guiado pelos dados (um ponto por achado listado, mais perto do centro significa CVSS maior, KEV em destaque), números principais e grade de metadados; as páginas internas trazem logo, título do documento, TLP e contador de páginas nas margens.
+
### Corrigido
- A capa do relatório executivo ainda mostrava "XEXÉU"; agora mostra o nome Harpia.
- As capturas de tela da interface em `docs/img` ainda mostravam o nome antigo Xexéu e a v0.1.0; foram refeitas a partir da versão atual.
diff --git a/crates/harpia-core/assets/logo-mark.png b/crates/harpia-core/assets/logo-mark.png
new file mode 100644
index 0000000..56e897b
Binary files /dev/null and b/crates/harpia-core/assets/logo-mark.png differ
diff --git a/crates/harpia-core/src/report.rs b/crates/harpia-core/src/report.rs
index b2625e3..b7a5575 100644
--- a/crates/harpia-core/src/report.rs
+++ b/crates/harpia-core/src/report.rs
@@ -550,7 +550,11 @@ impl ExecutiveReport {
"\n\n",
);
html.push_str("\n\n
\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("\n");
+ html.push_str(&self.cover_radar_svg());
+ html.push_str("
\n");
+ html.push_str("
\n");
html.push_str("
\n");
- html.push_str("
HARPIA
\n");
+ html.push_str("
HARPIA
\n");
html.push_str("
\n");
html.push_str(&format!(
"
{1}
\n",
@@ -577,7 +586,7 @@ impl ExecutiveReport {
html.push_str("
\n");
html.push_str("
\n");
html.push_str(
- "
CIBERFAUNA · AUDITORIA CONTÍNUA DE SEGURANÇA
\n",
+ "
CIBERFAUNA · AUDITORIA CONTÍNUA DE SUPERFÍCIE DE ATAQUE
\n",
);
html.push_str("
");
html.push_str(&html_escape(&self.title));
@@ -586,25 +595,20 @@ impl ExecutiveReport {
html.push_str(&html_escape(&self.subtitle));
html.push_str(" \n");
- // Cover verdict / severity cards
+ // Headline numbers strip
html.push_str(" \n");
- html.push_str(&format!(
- "
{} Críticos (9.0+)
\n",
- self.scope_summary.critical_count
- ));
- html.push_str(&format!(
- "
{} Altos (7.0–8.9)
\n",
- self.scope_summary.high_count
- ));
- html.push_str(&format!(
- "
{} No CISA KEV
\n",
- self.scope_summary.kev_count
- ));
- html.push_str(&format!(
- "
{} Maior CVSS
\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!(
+ "
{num} {lbl}
\n"
+ ));
+ }
html.push_str("
\n");
+ html.push_str(" Radar: cada ponto é um achado do relatório; quanto mais perto do centro, mais grave. Âmbar com halo: presente no CISA KEV.
\n");
// Cover meta footer
html.push_str(" \n");
@@ -614,12 +618,13 @@ impl ExecutiveReport {
html.push_str(&emitted_date);
html.push_str("
\n");
html.push_str(&format!(
- " Escopo {} hosts · {} portas
\n",
- self.scope_summary.active_hosts_count, self.scope_summary.open_ports_count
+ " Escopo {} · {}
\n",
+ plural(s.active_hosts_count, "host", "hosts"),
+ plural(s.open_ports_count, "porta", "portas")
));
html.push_str(&format!(
" Achados {} vulnerabilidades
\n",
- self.scope_summary.total_findings_count
+ s.total_findings_count
));
html.push_str(" Classificação Restrito / Interno
\n");
html.push_str(" \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(" \n");
+ svg.push_str(" \n");
+ let (sr, sa) = (radii[4], -2.35_f64);
+ svg.push_str(&format!(
+ " \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!(" \n"));
+ svg.push_str(&format!(" \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!(
+ " \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!(
+ " \n"
+ ));
+ if kev {
+ svg.push_str(&format!(" \n"));
+ }
+ svg.push_str(&format!(" \n"));
+ svg.push_str(&format!(
+ " \n"
+ ));
+ }
+ }
+ svg.push_str(" \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);
}
}
diff --git a/docs/img/achados-dark-pt.png b/docs/img/achados-dark-pt.png
index f40cb74..901b6ff 100644
Binary files a/docs/img/achados-dark-pt.png and b/docs/img/achados-dark-pt.png differ
diff --git a/docs/img/grupos-dark-pt.png b/docs/img/grupos-dark-pt.png
index e5df5d0..1c1153c 100644
Binary files a/docs/img/grupos-dark-pt.png and b/docs/img/grupos-dark-pt.png differ
diff --git a/docs/img/hosts-dark-pt.png b/docs/img/hosts-dark-pt.png
index 132346a..0ce3816 100644
Binary files a/docs/img/hosts-dark-pt.png and b/docs/img/hosts-dark-pt.png differ
diff --git a/docs/img/relatorio-executivo-pt.png b/docs/img/relatorio-executivo-pt.png
index fdf7d6f..02982d9 100644
Binary files a/docs/img/relatorio-executivo-pt.png and b/docs/img/relatorio-executivo-pt.png differ
diff --git a/docs/img/visao-geral-dark-pt.png b/docs/img/visao-geral-dark-pt.png
index 1404b5c..140943a 100644
Binary files a/docs/img/visao-geral-dark-pt.png and b/docs/img/visao-geral-dark-pt.png differ
diff --git a/docs/interface.md b/docs/interface.md
index 8a379d5..b64517b 100644
--- a/docs/interface.md
+++ b/docs/interface.md
@@ -46,7 +46,7 @@ dashboard asks for it. It is kept for the browser tab only.
## Executive report
-
+
`GET /relatorio` renders a print-oriented A4 report (cover, table of
contents, KPIs, prioritized findings table, host inventory, glossary),
diff --git a/docs/pt-BR/interface.md b/docs/pt-BR/interface.md
index 07aabd8..43d565a 100644
--- a/docs/pt-BR/interface.md
+++ b/docs/pt-BR/interface.md
@@ -49,7 +49,7 @@ dashboard pedir. Ele fica guardado só naquela aba do navegador.
## Relatório executivo
-
+
`GET /relatorio` renderiza um relatório A4 orientado a impressão (capa,
sumário, KPIs, tabela de achados prioritários, inventário de hosts,