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
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No files matched your search
@@ -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.
|
- 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.
|
- 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
|
### Fixed
|
||||||
- The executive report cover still read "XEXÉU"; it now shows the Harpia name.
|
- 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.
|
- The interface screenshots in `docs/img` still showed the old Xexéu name and v0.1.0; they were retaken from the current build.
|
||||||
|
|||||||
@@ -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.
|
- 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.
|
- 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
|
### Corrigido
|
||||||
- A capa do relatório executivo ainda mostrava "XEXÉU"; agora mostra o nome Harpia.
|
- 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.
|
- 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.
|
||||||
|
|||||||
|
After Width: | Height: | Size: 26 KiB |
@@ -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",
|
"<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("<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");
|
html.push_str("</style>\n</head>\n<body>\n");
|
||||||
|
|
||||||
// 1. Cover Page
|
// 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 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("<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-top\">\n");
|
||||||
html.push_str(" <div class=\"cover-brand\"><img class=\"cover-logo\" src=\"");
|
html.push_str(" <div class=\"cover-brand\">HARPIA</div>\n");
|
||||||
html.push_str(&logo_data_uri());
|
|
||||||
html.push_str("\" alt=\"\">HARPIA</div>\n");
|
|
||||||
html.push_str(" <div class=\"cover-badges\">\n");
|
html.push_str(" <div class=\"cover-badges\">\n");
|
||||||
html.push_str(&format!(
|
html.push_str(&format!(
|
||||||
" <div class=\"cover-tlp\" style=\"color:{0};border-color:{0}\">{1}</div>\n",
|
" <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>\n");
|
html.push_str(" </div>\n");
|
||||||
html.push_str(
|
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(" <h1 class=\"cover-title\">");
|
||||||
html.push_str(&html_escape(&self.title));
|
html.push_str(&html_escape(&self.title));
|
||||||
@@ -586,25 +595,20 @@ impl ExecutiveReport {
|
|||||||
html.push_str(&html_escape(&self.subtitle));
|
html.push_str(&html_escape(&self.subtitle));
|
||||||
html.push_str("</div>\n");
|
html.push_str("</div>\n");
|
||||||
|
|
||||||
// Cover verdict / severity cards
|
// Headline numbers strip
|
||||||
html.push_str(" <div class=\"cover-cards\">\n");
|
html.push_str(" <div class=\"cover-cards\">\n");
|
||||||
html.push_str(&format!(
|
for (cls, num, lbl) in [
|
||||||
" <div class=\"cover-card sev-crit\"><span class=\"cc-num\">{}</span><span class=\"cc-lbl\">Críticos (9.0+)</span></div>\n",
|
("sev-crit", s.critical_count.to_string(), "Críticos (9.0+)"),
|
||||||
self.scope_summary.critical_count
|
("sev-high", s.high_count.to_string(), "Altos (7.0 a 8.9)"),
|
||||||
));
|
("sev-kev", s.kev_count.to_string(), "No CISA KEV"),
|
||||||
html.push_str(&format!(
|
("sev-max", max_cvss_display.clone(), "Maior CVSS"),
|
||||||
" <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 {cls}\"><span class=\"cc-num\">{num}</span><span class=\"cc-lbl\">{lbl}</span></div>\n"
|
||||||
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
|
|
||||||
));
|
|
||||||
html.push_str(" </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
|
// Cover meta footer
|
||||||
html.push_str(" <div class=\"cover-meta\">\n");
|
html.push_str(" <div class=\"cover-meta\">\n");
|
||||||
@@ -614,12 +618,13 @@ impl ExecutiveReport {
|
|||||||
html.push_str(&emitted_date);
|
html.push_str(&emitted_date);
|
||||||
html.push_str("</span></div>\n");
|
html.push_str("</span></div>\n");
|
||||||
html.push_str(&format!(
|
html.push_str(&format!(
|
||||||
" <div class=\"cm-col\"><span class=\"cm-dt\">Escopo</span><span class=\"cm-dd\">{} hosts · {} portas</span></div>\n",
|
" <div class=\"cm-col\"><span class=\"cm-dt\">Escopo</span><span class=\"cm-dd\">{} · {}</span></div>\n",
|
||||||
self.scope_summary.active_hosts_count, self.scope_summary.open_ports_count
|
plural(s.active_hosts_count, "host", "hosts"),
|
||||||
|
plural(s.open_ports_count, "porta", "portas")
|
||||||
));
|
));
|
||||||
html.push_str(&format!(
|
html.push_str(&format!(
|
||||||
" <div class=\"cm-col\"><span class=\"cm-dt\">Achados</span><span class=\"cm-dd\">{} vulnerabilidades</span></div>\n",
|
" <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 class=\"cm-col\"><span class=\"cm-dt\">Classificação</span><span class=\"cm-dd\">Restrito / Interno</span></div>\n");
|
||||||
html.push_str(" </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
|
/// The Harpia logo, embedded so the report renders identically whether it's
|
||||||
/// viewed live from `/relatorio` or saved as a standalone offline HTML file
|
/// viewed live from `/relatorio` or saved as a standalone offline HTML file
|
||||||
/// (same reasoning as `Sabiá/crates/sabia-core/src/report.rs`, which this
|
/// (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+/";
|
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 {
|
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,");
|
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 b0 = chunk[0];
|
||||||
let b1 = chunk.get(1).copied();
|
let b1 = chunk.get(1).copied();
|
||||||
let b2 = chunk.get(2).copied();
|
let b2 = chunk.get(2).copied();
|
||||||
@@ -858,6 +954,10 @@ fn logo_data_uri() -> String {
|
|||||||
out
|
out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn plural(n: usize, one: &str, many: &str) -> String {
|
||||||
|
format!("{n} {}", if n == 1 { one } else { many })
|
||||||
|
}
|
||||||
|
|
||||||
fn html_escape(raw: &str) -> String {
|
fn html_escape(raw: &str) -> String {
|
||||||
raw.replace('&', "&")
|
raw.replace('&', "&")
|
||||||
.replace('<', "<")
|
.replace('<', "<")
|
||||||
@@ -884,7 +984,7 @@ fn format_markdown_bold(raw: &str) -> String {
|
|||||||
|
|
||||||
const REPORT_CSS: &str = r#"
|
const REPORT_CSS: &str = r#"
|
||||||
:root {
|
:root {
|
||||||
--primary: #0369a1;
|
--primary: #0284c7;
|
||||||
--primary-deep: #0c4a6e;
|
--primary-deep: #0c4a6e;
|
||||||
--primary-dark: #072738;
|
--primary-dark: #072738;
|
||||||
--accent: #38bdf8;
|
--accent: #38bdf8;
|
||||||
@@ -902,8 +1002,8 @@ const REPORT_CSS: &str = r#"
|
|||||||
--med-bg: #fefce8;
|
--med-bg: #fefce8;
|
||||||
--low: #0284c7;
|
--low: #0284c7;
|
||||||
--low-bg: #f0f9ff;
|
--low-bg: #f0f9ff;
|
||||||
--font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
--font-sans: system-ui, 'Inter', 'Segoe UI', Roboto, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
||||||
--font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
--font-mono: ui-monospace, 'JetBrains Mono', 'IBM Plex Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
* { box-sizing: border-box; }
|
* { box-sizing: border-box; }
|
||||||
@@ -920,26 +1020,37 @@ body {
|
|||||||
margin: 24mm 16mm 22mm 16mm;
|
margin: 24mm 16mm 22mm 16mm;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
@top-left {
|
@top-left {
|
||||||
content: "Harpia · Auditoria Contínua de Segurança";
|
content: "";
|
||||||
font-family: var(--font-sans);
|
background: url("HARPIA_REPORT_LOGO_MARKER") no-repeat left bottom / 8mm 8mm;
|
||||||
font-size: 7.5pt;
|
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;
|
font-weight: 600;
|
||||||
|
letter-spacing: 0.16em;
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
padding-bottom: 4mm;
|
padding-bottom: 4.5mm;
|
||||||
}
|
}
|
||||||
@top-right {
|
@top-right {
|
||||||
content: "HARPIA_REPORT_TLP_MARKER · USO AUTORIZADO";
|
content: "HARPIA_REPORT_TLP_MARKER · USO AUTORIZADO";
|
||||||
font-family: var(--font-mono);
|
font-family: var(--font-mono);
|
||||||
font-size: 7pt;
|
font-size: 6.8pt;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
letter-spacing: 0.1em;
|
letter-spacing: 0.1em;
|
||||||
color: var(--primary);
|
color: #b45309;
|
||||||
|
white-space: nowrap;
|
||||||
|
width: 55mm;
|
||||||
|
text-align: right;
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
padding-bottom: 4mm;
|
padding-bottom: 4.5mm;
|
||||||
}
|
}
|
||||||
@bottom-left {
|
@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-family: var(--font-sans);
|
||||||
font-size: 7.5pt;
|
font-size: 7.5pt;
|
||||||
color: var(--faint);
|
color: var(--faint);
|
||||||
@@ -959,8 +1070,9 @@ body {
|
|||||||
|
|
||||||
@page cover {
|
@page cover {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
background: var(--primary-dark);
|
background: #03101c;
|
||||||
@top-left { content: none; }
|
@top-left { content: none; background: none; }
|
||||||
|
@top-center { content: none; }
|
||||||
@top-right { content: none; }
|
@top-right { content: none; }
|
||||||
@bottom-left { content: none; }
|
@bottom-left { content: none; }
|
||||||
@bottom-right { content: none; }
|
@bottom-right { content: none; }
|
||||||
@@ -972,138 +1084,164 @@ body {
|
|||||||
break-after: page;
|
break-after: page;
|
||||||
height: 297mm;
|
height: 297mm;
|
||||||
width: 210mm;
|
width: 210mm;
|
||||||
padding: 24mm 20mm;
|
background:
|
||||||
display: flex;
|
radial-gradient(120mm 120mm at 140mm 158mm, #0b3352 0%, rgba(11, 51, 82, 0) 70%),
|
||||||
flex-direction: column;
|
linear-gradient(165deg, #06213a 0%, #041628 45%, #020b15 100%);
|
||||||
justify-content: space-between;
|
|
||||||
background: linear-gradient(170deg, #072738 0%, #03141f 100%);
|
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
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 {
|
.cover-top {
|
||||||
|
position: absolute;
|
||||||
|
left: 18mm;
|
||||||
|
right: 18mm;
|
||||||
|
top: 16mm;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-bottom: 1px solid rgba(56, 189, 248, 0.25);
|
border-bottom: 1px solid rgba(56, 189, 248, 0.22);
|
||||||
padding-bottom: 5mm;
|
padding-bottom: 4mm;
|
||||||
}
|
}
|
||||||
.cover-brand {
|
.cover-brand {
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 3mm;
|
|
||||||
font-family: var(--font-mono);
|
font-family: var(--font-mono);
|
||||||
font-size: 16pt;
|
font-size: 11pt;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
letter-spacing: 0.18em;
|
letter-spacing: 0.42em;
|
||||||
color: var(--accent);
|
color: #e0f2fe;
|
||||||
}
|
}
|
||||||
.cover-logo {
|
.cover-badges { display: flex; align-items: center; gap: 2.5mm; }
|
||||||
width: 9mm;
|
.cover-tlp, .cover-classification {
|
||||||
height: 9mm;
|
|
||||||
object-fit: contain;
|
|
||||||
}
|
|
||||||
.cover-badges {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 2.5mm;
|
|
||||||
}
|
|
||||||
.cover-tlp {
|
|
||||||
font-family: var(--font-mono);
|
font-family: var(--font-mono);
|
||||||
font-size: 8pt;
|
font-size: 7.5pt;
|
||||||
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-weight: 700;
|
font-weight: 700;
|
||||||
letter-spacing: 0.12em;
|
letter-spacing: 0.16em;
|
||||||
color: #fbbf24;
|
border: 1px solid;
|
||||||
border: 1px solid #fbbf24;
|
padding: 3px 8px;
|
||||||
padding: 2px 8px;
|
border-radius: 2px;
|
||||||
border-radius: 4px;
|
|
||||||
}
|
}
|
||||||
|
.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 {
|
.cover-eyebrow {
|
||||||
font-family: var(--font-mono);
|
font-family: var(--font-mono);
|
||||||
font-size: 8pt;
|
font-size: 7.5pt;
|
||||||
font-weight: 700;
|
font-weight: 600;
|
||||||
letter-spacing: 0.2em;
|
letter-spacing: 0.22em;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
color: var(--accent);
|
color: #38bdf8;
|
||||||
margin-top: 25mm;
|
padding-top: 40mm;
|
||||||
}
|
}
|
||||||
.cover-title {
|
.cover-title {
|
||||||
font-size: 32pt;
|
font-size: 38pt;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
line-height: 1.1;
|
line-height: 1.02;
|
||||||
letter-spacing: -0.02em;
|
letter-spacing: -0.025em;
|
||||||
margin: 4mm 0 3mm;
|
margin-top: 5mm;
|
||||||
|
margin-bottom: 0;
|
||||||
|
max-width: 150mm;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
.cover-subtitle {
|
.cover-subtitle {
|
||||||
font-size: 11pt;
|
font-size: 11pt;
|
||||||
line-height: 1.5;
|
line-height: 1.55;
|
||||||
color: #cbd5e1;
|
color: #b9d3e6;
|
||||||
max-width: 150mm;
|
max-width: 100mm;
|
||||||
margin-bottom: 12mm;
|
margin-top: 6mm;
|
||||||
}
|
}
|
||||||
.cover-cards {
|
.cover-cards {
|
||||||
|
position: absolute;
|
||||||
|
left: 18mm;
|
||||||
|
right: 18mm;
|
||||||
|
bottom: 40mm;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(4, 1fr);
|
grid-template-columns: repeat(4, 1fr);
|
||||||
gap: 3.5mm;
|
gap: 4mm;
|
||||||
margin: 6mm 0 16mm;
|
|
||||||
}
|
}
|
||||||
.cover-card {
|
.cover-card {
|
||||||
padding: 4mm 3mm;
|
padding: 3mm 3.5mm;
|
||||||
border-radius: 6px;
|
background: rgba(3, 16, 28, 0.72);
|
||||||
background: rgba(255, 255, 255, 0.05);
|
border-top: 3px solid var(--accent);
|
||||||
border: 1px solid rgba(255, 255, 255, 0.12);
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 1.5mm;
|
gap: 1.5mm;
|
||||||
}
|
}
|
||||||
.cover-card.sev-crit { border-left: 3.5px solid var(--crit); }
|
.cover-card.sev-crit { border-top-color: #fb7185; }
|
||||||
.cover-card.sev-high { border-left: 3.5px solid var(--high); }
|
.cover-card.sev-high { border-top-color: #fb923c; }
|
||||||
.cover-card.sev-kev { border-left: 3.5px solid #fbbf24; }
|
.cover-card.sev-kev { border-top-color: #fbbf24; }
|
||||||
.cover-card.sev-max { border-left: 3.5px solid var(--accent); }
|
.cover-card.sev-max { border-top-color: #38bdf8; }
|
||||||
.cc-num {
|
.cc-num {
|
||||||
font-family: var(--font-mono);
|
font-family: var(--font-mono);
|
||||||
font-size: 18pt;
|
font-size: 20pt;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
.cc-lbl {
|
.cc-lbl {
|
||||||
font-size: 7.5pt;
|
font-family: var(--font-mono);
|
||||||
|
font-size: 6.6pt;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
text-transform: uppercase;
|
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;
|
letter-spacing: 0.06em;
|
||||||
color: #94a3b8;
|
text-transform: uppercase;
|
||||||
|
color: #6f93ad;
|
||||||
}
|
}
|
||||||
.cover-meta {
|
.cover-meta {
|
||||||
|
position: absolute;
|
||||||
|
left: 18mm;
|
||||||
|
right: 18mm;
|
||||||
|
bottom: 14mm;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(4, 1fr);
|
grid-template-columns: repeat(4, 1fr);
|
||||||
gap: 4mm;
|
gap: 6mm;
|
||||||
border-top: 1px solid rgba(255, 255, 255, 0.16);
|
border-top: 1px solid rgba(255, 255, 255, 0.18);
|
||||||
padding-top: 5mm;
|
padding-top: 4.5mm;
|
||||||
}
|
}
|
||||||
.cm-col { display: flex; flex-direction: column; gap: 1mm; }
|
.cm-col { display: flex; flex-direction: column; gap: 1mm; }
|
||||||
.cm-dt {
|
.cm-dt {
|
||||||
font-family: var(--font-mono);
|
font-family: var(--font-mono);
|
||||||
font-size: 6.8pt;
|
font-size: 6.6pt;
|
||||||
font-weight: 700;
|
font-weight: 600;
|
||||||
letter-spacing: 0.12em;
|
letter-spacing: 0.16em;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
color: #64748b;
|
color: #6f93ad;
|
||||||
}
|
}
|
||||||
.cm-dd {
|
.cm-dd {
|
||||||
font-size: 8.5pt;
|
font-size: 9pt;
|
||||||
font-weight: 600;
|
font-weight: 500;
|
||||||
color: #e2e8f0;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* CHAPTER / PAGE BREAKS */
|
/* CHAPTER / PAGE BREAKS */
|
||||||
@@ -1482,5 +1620,10 @@ alvos = ["10.0.0.1/32"]
|
|||||||
assert!(html.contains("CVE-2024-CRIT"));
|
assert!(html.contains("CVE-2024-CRIT"));
|
||||||
assert!(html.contains("Execução remota crítica"));
|
assert!(html.contains("Execução remota crítica"));
|
||||||
assert!(html.contains("paged.polyfill.js"));
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 706 KiB After Width: | Height: | Size: 706 KiB |
|
Before Width: | Height: | Size: 607 KiB After Width: | Height: | Size: 607 KiB |
|
Before Width: | Height: | Size: 537 KiB After Width: | Height: | Size: 537 KiB |
|
Before Width: | Height: | Size: 257 KiB After Width: | Height: | Size: 704 KiB |
|
Before Width: | Height: | Size: 689 KiB After Width: | Height: | Size: 688 KiB |
@@ -46,7 +46,7 @@ dashboard asks for it. It is kept for the browser tab only.
|
|||||||
|
|
||||||
## Executive report
|
## Executive report
|
||||||
|
|
||||||
<p align="center"><img src="img/relatorio-executivo-pt.png" width="900" alt="Harpia executive security report cover page: authorized-use and confidentiality badges, title, subtitle, KPI strip and the table of contents"></p>
|
<p align="center"><img src="img/relatorio-executivo-pt.png" width="900" alt="Harpia executive security report cover: the Harpia logo over a radar of findings (nearer the center means more severe), TLP and authorized-use badges, title, headline numbers and the metadata grid"></p>
|
||||||
|
|
||||||
`GET /relatorio` renders a print-oriented A4 report (cover, table of
|
`GET /relatorio` renders a print-oriented A4 report (cover, table of
|
||||||
contents, KPIs, prioritized findings table, host inventory, glossary),
|
contents, KPIs, prioritized findings table, host inventory, glossary),
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ dashboard pedir. Ele fica guardado só naquela aba do navegador.
|
|||||||
|
|
||||||
## Relatório executivo
|
## Relatório executivo
|
||||||
|
|
||||||
<p align="center"><img src="../img/relatorio-executivo-pt.png" width="900" alt="Capa do relatório executivo de segurança da Harpia: selos de uso autorizado e confidencialidade, título, subtítulo, faixa de KPIs e o sumário"></p>
|
<p align="center"><img src="../img/relatorio-executivo-pt.png" width="900" alt="Capa do relatório executivo de segurança da Harpia: o logo da Harpia sobre um radar de achados (mais perto do centro, mais grave), selos TLP e de uso autorizado, título, números principais e a grade de metadados"></p>
|
||||||
|
|
||||||
`GET /relatorio` renderiza um relatório A4 orientado a impressão (capa,
|
`GET /relatorio` renderiza um relatório A4 orientado a impressão (capa,
|
||||||
sumário, KPIs, tabela de achados prioritários, inventário de hosts,
|
sumário, KPIs, tabela de achados prioritários, inventário de hosts,
|
||||||
|
|||||||