docs: refresh README and screenshots for 2.x, drop em dashes, add scripts/screenshots.sh
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e0d67af3fe
commit
d3c3b91e82
32 files changed
+286
-124
No files matched your search
+10
-10
@@ -14,9 +14,9 @@ an unprivileged analytical server (`harpia`), sharing one binary and one
|
||||
|---|---|---|
|
||||
| Core engine & CLI | Rust 2021 (MSRV 1.88) | Memory safety, native networking performance, single binary deployment. |
|
||||
| API layer | Axum + Tokio | Asynchronous HTTP service with minimal overhead. |
|
||||
| Web dashboard | Vanilla HTML/CSS/JS | Zero-dependency frontend embedded directly into the binary via `include_str!`/`include_bytes!` — no `rust-embed`, no build step. |
|
||||
| Raw-socket engine | `socket2`, hand-built TCP headers | A single `SOCK_RAW`/`IPPROTO_TCP` socket for both sending SYN probes and receiving replies — see [Scan engine](#scan-engine) below. |
|
||||
| Storage engine | SQLite (`rusqlite`, bundled) + Parquet | Embedded, zero-ops storage. **Not DuckDB**: an early design draft specified DuckDB for its analytical query strengths, but SQLite was chosen instead for v1.0 — no external `libduckdb.so` to link or ship, one less moving part, and the query patterns `harpia serve` actually needs (point lookups by asset key, small aggregate counts) don't benefit from a columnar engine. Sweep batches themselves stay in Parquet (immutable, one file per sweep, not touched by this choice). |
|
||||
| Web dashboard | Vanilla HTML/CSS/JS | Zero-dependency frontend embedded directly into the binary via `include_str!`/`include_bytes!`, no `rust-embed`, no build step. |
|
||||
| Raw-socket engine | `socket2`, hand-built TCP headers | A single `SOCK_RAW`/`IPPROTO_TCP` socket for both sending SYN probes and receiving replies, see [Scan engine](#scan-engine) below. |
|
||||
| Storage engine | SQLite (`rusqlite`, bundled) + Parquet | Embedded, zero-ops storage. **Not DuckDB**: an early design draft specified DuckDB for its analytical query strengths, but SQLite was chosen instead for v1.0: no external `libduckdb.so` to link or ship, one less moving part, and the query patterns `harpia serve` actually needs (point lookups by asset key, small aggregate counts) don't benefit from a columnar engine. Sweep batches themselves stay in Parquet (immutable, one file per sweep, not touched by this choice). |
|
||||
| Deployment | Docker Compose | Strict privilege isolation, container hardening, immutable batches over named volumes. |
|
||||
|
||||
## System topology & data flow
|
||||
@@ -41,7 +41,7 @@ scanner (NET_RAW, host net, uid 0) harpia (uid 10001, zero capabilities)
|
||||
|
||||
- **`scanner`:** emits raw network packets to discover hosts and scan ports,
|
||||
and writes sweep batches. It requires `network_mode: host` and
|
||||
`cap_add: [NET_RAW]` (hence `user: "0:0"` — see
|
||||
`cap_add: [NET_RAW]` (hence `user: "0:0"`, see
|
||||
[`docker.md`](docker.md#why-scanner-runs-as-uid-0-restricted-to-net_raw)
|
||||
for why Docker makes that necessary), but drops every other capability
|
||||
(`cap_drop: [ALL]`), runs with a read-only root filesystem, and only
|
||||
@@ -61,7 +61,7 @@ either can feed the rest of the pipeline unchanged:
|
||||
|
||||
- **`nativo` (raw SYN, `scan::syn_scan`):** one `SOCK_RAW`/`IPPROTO_TCP`
|
||||
socket per scan, used for both sending and receiving. On Linux, such a
|
||||
socket needs no `IP_HDRINCL` to send — the kernel fills in the IP header,
|
||||
socket needs no `IP_HDRINCL` to send; the kernel fills in the IP header,
|
||||
so each probe is just a hand-built 20-byte TCP segment (SYN flag, correct
|
||||
checksum over the IPv4 pseudo-header). On receive, the kernel does the
|
||||
opposite and hands back the full IP+TCP packet, so replies are parsed by
|
||||
@@ -76,7 +76,7 @@ either can feed the rest of the pipeline unchanged:
|
||||
|
||||
`execute_scan_for_group` in `harpia-cli` picks `nativo` whenever a profile
|
||||
asks for it **and** `CAP_NET_RAW` is actually usable, and falls back to
|
||||
`nativo-sem-raw` with a logged warning otherwise — the engine that actually
|
||||
`nativo-sem-raw` with a logged warning otherwise, the engine that actually
|
||||
ran, not the one requested, is what gets recorded in the sweep manifest, so
|
||||
an operator reading `/api/status` or a manifest never has to guess.
|
||||
|
||||
@@ -94,7 +94,7 @@ filesystem batches, never a network call between the two containers:
|
||||
### 4. Tiered scheduling & scope boundaries
|
||||
|
||||
Target configuration in `harpia.toml` decouples asset definitions from
|
||||
execution policy — see [`configuration.md`](configuration.md) for the full
|
||||
execution policy, see [`configuration.md`](configuration.md) for the full
|
||||
reference:
|
||||
|
||||
- **`[escopo]`:** mandatory boundary. Any target or DNS resolution outside
|
||||
@@ -118,7 +118,7 @@ covered:
|
||||
- **Scoped diff algorithm:** ports outside a group's scanned profile are
|
||||
never marked closed by that group's sweep.
|
||||
- **Oscillation debounce:** a host needs `ausencias_para_sumir` consecutive
|
||||
missed sweeps before `host_sumiu` fires — one dropped sweep never reads as
|
||||
missed sweeps before `host_sumiu` fires; one dropped sweep never reads as
|
||||
a disappearance.
|
||||
- **Event log:** append-only log of `host_novo`, `porta_aberta`,
|
||||
`servico_alterado`, `vulnerabilidade_nova`, `vulnerabilidade_corrigida`
|
||||
@@ -130,7 +130,7 @@ covered:
|
||||
raw SSH banner, TLS certificate). `vuln::matcher` turns that into a
|
||||
candidate CPE and matches it against the local CVE/KEV database
|
||||
(`vuln::feeds`), producing `Finding`s with a CVSS score, KEV status and a
|
||||
confidence level (`alta`/`média`/`baixa` — lower when a distro backport is
|
||||
confidence level (`alta`/`média`/`baixa`, lower when a distro backport is
|
||||
suspected, since a backported security fix can leave an old-looking version
|
||||
string on an actually-patched package). `vuln::checks` adds a small set of
|
||||
safe, non-intrusive configuration checks (expired/soon-to-expire TLS
|
||||
@@ -140,7 +140,7 @@ matching.
|
||||
### 7. Determinism
|
||||
|
||||
Every documented source of variation in a result is explicit, not
|
||||
incidental — the opposite of the intermittent flakiness traditional `nmap`
|
||||
incidental, the opposite of the intermittent flakiness traditional `nmap`
|
||||
runs are known for: timeouts and network congestion are the *only*
|
||||
documented sources of run-to-run difference (a dropped packet reads as
|
||||
`Filtered`, never as a silently different `Open`/`Closed` verdict), results
|
||||
|
||||
Reference in new issue
Block a user