From 9c1640aa6c3d281411511215b4e2172c0d33619a Mon Sep 17 00:00:00 2001 From: James Gomez Date: Wed, 2 Dec 2026 13:48:14 -0800 Subject: [PATCH] docs: align public docs with v0.2.4, VictoriaLogs default, version badge, and CodeQL posture --- README.md | 12 +++++++----- SECURITY.md | 8 ++++---- charts/nxtflow/README.md | 6 +++--- docs/ai-integration.md | 2 +- docs/index.md | 3 ++- docs/standalone-vs-integrated.md | 8 ++++---- 6 files changed, 21 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index e9183cd..cf3adc2 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ ### Interactive Web UI (`nxtflow-ui`) - **Dynamic Host Exclusion (`?exclude=`):** Click any `⊘` **Hide** button on a host or talker row to filter noisy hosts out of Overview KPIs, Sankey diagrams, and Flow Explorer, with an **Exclude** chip bar to restore individual hosts or clear all. -- **Light / Dark Theme Toggle (`☀️` / `🌙`):** Switch between dark and light themes from the top bar (persisted in `localStorage`). +- **Light / Dark Theme Toggle (`☀️` / `🌙`) & Version Badge:** Switch between dark and light themes from the top bar (persisted in `localStorage`), with the active release version badge (e.g., `v0.2.4`, matching `nxtflow --version`) displayed in the header.

nxtflow-ui Overview Dashboard (Dark Mode) @@ -168,15 +168,15 @@ Forward Grafana locally and open `http://localhost:3000/d/nxtflow-overview`: kubectl port-forward -n nxtflow svc/nxtflow-grafana 3000:80 ``` -### 2. Integrated (Existing Loki, Prometheus & Grafana) +### 2. Integrated (Existing VictoriaLogs, Loki, or ClickHouse + Prometheus & Grafana) -Connects to an existing Loki (or VictoriaLogs/ClickHouse) endpoint and provisions `ServiceMonitor`, `PrometheusRule`, and the Grafana dashboard ConfigMap: +Connects to an existing VictoriaLogs (default), Loki, or ClickHouse endpoint and provisions `ServiceMonitor`, `PrometheusRule`, and the Grafana dashboard ConfigMap: ```bash helm install nxtflow oci://ghcr.io/nertwork/charts/nxtflow \ --namespace monitoring \ -f examples/values-integrated.yaml \ - --set externalLoki.url="https://loki.example.com" + --set externalVictoriaLogs.url="https://victorialogs.example.com" ``` ### 3. Collector-Only (Remote Edge Site) @@ -243,6 +243,7 @@ Query VictoriaLogs (default) from your terminal: ```bash export NXTFLOW_VICTORIALOGS_URL="http://localhost:9428" +nxtflow --version nxtflow status nxtflow summary --range 1h nxtflow top-talkers 10 --range 15m @@ -292,6 +293,7 @@ Every push and pull request runs automated GitHub Actions verification: - **Python Lint & Unit Tests:** `ruff` static checks and `pytest` coverage across CLI, enricher, and MCP tools. - **Helm Lint, Schema & Template:** `helm lint`, JSON Schema validation (`values.schema.json`), `ct lint`, and multi-mode template rendering tests. - **Docker Build & Kind Helm Install:** Builds container images and executes an end-to-end `helm install` + `helm test` inside an ephemeral Kind cluster. +- **CodeQL, Dependabot & Supply-Chain Security:** Continuous GitHub **CodeQL** static analysis (`codeql.yml` for Python and GitHub Actions), **Dependabot** vulnerability & malware alerts, **Secret Scanning + Push Protection**, and **Private Vulnerability Reporting**. See [SECURITY.md](SECURITY.md) for architecture details and private vulnerability reporting. @@ -314,7 +316,7 @@ Full hosted documentation is automatically published to **[`https://nertwork.git Thank you to everyone contributing code, exporter guides, bug reports, and platform improvements to **nxtflow**! -- **[@nertwork](https://github.com/nertwork) (James Farr Gomez)** — Creator & Maintainer (Helm chart architecture, `nxtflow-enricher`, bounded-cardinality Loki pipeline, 18-panel Grafana dashboard, `nxtflow` CLI & FastMCP server). +- **[@nertwork](https://github.com/nertwork) (James Farr Gomez)** — Creator & Maintainer (Helm chart architecture, `nxtflow-enricher`, multi-backend flow pipeline (VictoriaLogs, Loki, ClickHouse), 18-panel Grafana dashboard, `nxtflow` CLI & FastMCP server). See the full **[GitHub Contributors Graph](https://github.com/nertwork/nxtflow/graphs/contributors)** and our **[Contributing Guide](CONTRIBUTING.md)** to get involved. diff --git a/SECURITY.md b/SECURITY.md index 8572ab9..08e43ea 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,15 +4,15 @@ | Version | Supported | | :--- | :--- | -| `0.1.x` (`main`) | :white_check_mark: | +| `0.2.x` (`main`, current `v0.2.4`) | :white_check_mark: | ## Security Architecture - **Non-Root Containers:** `nxtflow-enricher` runs as UID/GID `100:65533` (`flow:nogroup`, matching upstream `netsampler/goflow2:v2.2.7`), and `nxtflow-mcp` runs as UID/GID `65532:65532` with `allowPrivilegeEscalation: false`. -- **LogQL Injection Prevention:** All user-supplied `site`, `dir`, `search`, and `host` inputs in `nxtflow` CLI and `nxtflow-mcp` pass through `validate_range()`, `validate_dir()`, `escape_logql_label()`, and `sanitize_logql_regex()`. +- **Query Injection Prevention:** All user-supplied `site`, `dir`, `search`, and `host` inputs in `nxtflow` CLI, `nxtflow-ui`, and `nxtflow-mcp` pass through strict validators and backend-specific escaping (`validate_range()`, `validate_dir()`, `escape_logql_label()`, `sanitize_logql_regex()`, LogsQL quoting, and ClickHouse parameterized escaping). - **Bounded Memory & Query Cardinality:** Enricher queues use bounded ring buffers (`ringBufferMaxFlows`), rDNS uses a bounded LRU+TTL cache (`maxEntries`), Loki streams use strictly bounded labels (`{job, site, dir}`), and ephemeral ports (`>=10000`) are filtered from `top-ports` aggregations to prevent 5000-series exhaustion. -- **Secret Isolation:** Loki and NetBox credentials are injected via Kubernetes `Secret` environment variables (`NXTFLOW_LOKI_*`, `NXTFLOW_NETBOX_TOKEN`), never rendered into ConfigMaps, and redacted by `nxtflow config`. -- **Automated Security & Static Analysis:** CI runs `scripts/security_audit.py` across all source, chart, SVG, workflow, and documentation files to catch exposed credentials, private keys, and syntax errors alongside Ruff linting and Helm schema validation. +- **Secret Isolation:** Storage backend (VictoriaLogs, Loki, ClickHouse) and NetBox credentials are injected via Kubernetes `Secret` environment variables (`NXTFLOW_LOKI_*`, `NXTFLOW_CLICKHOUSE_*`, `NXTFLOW_NETBOX_TOKEN`) and `secret-grafana-datasources.yaml`, never rendered into ConfigMaps, and redacted by `nxtflow config`. +- **Automated Security & Static Analysis:** Every PR and push runs GitHub **CodeQL** static analysis (`codeql.yml` across Python and GitHub Actions), `scripts/security_audit.py` (scanning source, chart, SVG, workflow, and documentation files for exposed credentials, private keys, and syntax errors), Ruff linting, and Helm schema validation. GitHub **Dependabot** vulnerability & malware alerts, **Secret Scanning**, and **Push Protection** are enabled on the repository. ## Reporting a Vulnerability diff --git a/charts/nxtflow/README.md b/charts/nxtflow/README.md index e760685..923a50a 100644 --- a/charts/nxtflow/README.md +++ b/charts/nxtflow/README.md @@ -4,7 +4,7 @@ nxtflow icon

-Multi-protocol **NetFlow v5/v9, IPFIX, and sFlow v5** Kubernetes observability platform pairing upstream [`netsampler/goflow2`](https://github.com/netsampler/goflow2) with `nxtflow-enricher`, multi-backend flow storage (**Grafana Loki**, **VictoriaLogs**, or **ClickHouse**), Prometheus metrics & alerts, an 18-panel Grafana Sankey dashboard, and the read-only `nxtflow-mcp` server. +Multi-protocol **NetFlow v5/v9, IPFIX, and sFlow v5** Kubernetes observability platform pairing upstream [`netsampler/goflow2`](https://github.com/netsampler/goflow2) with `nxtflow-enricher`, multi-backend flow storage (**VictoriaLogs** default, **Grafana Loki**, or **ClickHouse**), Prometheus metrics & alerts, an 18-panel Grafana Sankey dashboard, and the read-only `nxtflow-mcp` server. --- @@ -59,14 +59,14 @@ helm install nxtflow oci://ghcr.io/nertwork/charts/nxtflow \ -f https://raw.githubusercontent.com/nertwork/nxtflow/main/examples/values-clickhouse.yaml ``` -### Integrated (Existing Loki, Prometheus & Grafana) +### Integrated (Existing VictoriaLogs, Loki, or ClickHouse + Prometheus & Grafana) ```bash helm install nxtflow oci://ghcr.io/nertwork/charts/nxtflow \ --version 0.2.4 \ --namespace monitoring \ -f https://raw.githubusercontent.com/nertwork/nxtflow/main/examples/values-integrated.yaml \ - --set externalLoki.url="https://loki.example.com" + --set externalVictoriaLogs.url="https://victorialogs.example.com" ``` ### Collector-Only (Remote Edge Site) diff --git a/docs/ai-integration.md b/docs/ai-integration.md index 6eb673d..90e1dbd 100644 --- a/docs/ai-integration.md +++ b/docs/ai-integration.md @@ -25,7 +25,7 @@ | `nxtflow directory` | — | Discovered IP-to-hostname directory | | `nxtflow config` | — | Display active configuration with secrets redacted | -Common flags work before or after any subcommand: `--range 1h`, `--site `, `--dir up|down|lan`, `-n `, `--json`, `--config `. +Common flags work before or after any subcommand: `--range 1h`, `--site `, `--dir up|down|lan`, `-n `, `--json`, `--config `, and `--version` (`nxtflow --version`, matching the version badge shown in `nxtflow-ui`). --- diff --git a/docs/index.md b/docs/index.md index 530cf86..34c9515 100644 --- a/docs/index.md +++ b/docs/index.md @@ -4,7 +4,7 @@ # nxtflow Documentation -Welcome to **`nxtflow`** — an open-source, AI-ready NetFlow v5/v9, IPFIX, and sFlow telemetry platform designed for Docker Compose, Kubernetes, Grafana Loki, VictoriaLogs, ClickHouse, Prometheus, and AI coding assistants. +Welcome to **`nxtflow`** — an open-source, AI-ready NetFlow v5/v9, IPFIX, and sFlow telemetry platform designed for Docker Compose, Kubernetes, VictoriaLogs, Grafana Loki, ClickHouse, Prometheus, and AI coding assistants. ## Fastest — 60s Setup (Docker Compose) @@ -99,3 +99,4 @@ Every release and pull request is validated through automated GitHub Actions che - **Lint, Syntax & Security Audit:** Automated credential, private key, and Python/JSON syntax checks (`scripts/security_audit.py`). - **Python Lint & Unit Tests:** `ruff` checks and `pytest` suites covering the CLI, enricher, Compose config, and MCP server. - **Helm Lint, Schema & Template:** Multi-mode `helm lint`, `values.schema.json` validation, `ct lint`, and Kind cluster `helm test` smoke tests. +- **CodeQL & Supply-Chain Security:** Continuous GitHub **CodeQL** analysis (`codeql.yml`), **Dependabot** vulnerability & malware alerts, **Secret Scanning**, and **Private Vulnerability Reporting**. diff --git a/docs/standalone-vs-integrated.md b/docs/standalone-vs-integrated.md index 4f2d326..afeff4a 100644 --- a/docs/standalone-vs-integrated.md +++ b/docs/standalone-vs-integrated.md @@ -1,6 +1,6 @@ # Standalone vs. Integrated Deployment Modes -The `charts/nxtflow` Helm chart supports three deployment topologies controlled by `tags.standalone`, `storage.backend` (`loki`, `victorialogs`, or `clickhouse`), and external backend URLs. +The `charts/nxtflow` Helm chart supports three deployment topologies controlled by `tags.standalone`, `storage.backend` (`victorialogs` default, `loki`, or `clickhouse`), and external backend URLs. ## Mode Comparison @@ -58,7 +58,7 @@ Use Integrated mode when your cluster already runs Loki, VictoriaLogs, or ClickH helm install nxtflow oci://ghcr.io/nertwork/charts/nxtflow \ --namespace monitoring \ -f examples/values-integrated.yaml \ - --set externalLoki.url="https://loki.example.com" + --set externalVictoriaLogs.url="https://victorialogs.example.com" ``` ### Configuration Guardrails @@ -80,7 +80,7 @@ helm install nxtflow-branch oci://ghcr.io/nertwork/charts/nxtflow \ --set externalVictoriaLogs.url="https://victorialogs.example.com" ``` -Every site registers dynamically in the Grafana `Site` dropdown via `label_values({job="nxtflow"}, site)` and appears in `nxtflow status`. +Every site registers dynamically in the Grafana `Site` dropdown (LogsQL field values in VictoriaLogs, `label_values({job="nxtflow"}, site)` in Loki, or `DISTINCT site` in ClickHouse) and appears in `nxtflow status`. ## Sankey Visualization Engine (`echarts` vs. `netsage`) @@ -89,7 +89,7 @@ Every site registers dynamically in the Grafana `Site` dropdown via `label_value ## Interactive Web UI (`ui.enabled`) & Pre-NAT Correlation -- **Interactive Web Explorer (`ui.enabled=true`):** Deploys `nxtflow-ui` on port `8080` (with optional `ui.ingress` and automatic wiring to whichever `storage.backend` is active). Provides live `site`/`dir`/`pair` flow browsing, `via ` NAT correlation pills, Host Deep-Dive drawers with observed IPs + 3-tier Host Sankey, and click-to-pivot 5-tuple sessions alongside Grafana's `dataLinks` and `Host & Flow Deep-Dive` panel. +- **Interactive Web Explorer (`ui.enabled=true`):** Deploys `nxtflow-ui` on port `8080` (with optional `ui.ingress` and automatic wiring to whichever `storage.backend` is active). Displays the running release version badge in the header and provides live `site`/`dir`/`pair` flow browsing, `via ` NAT correlation pills, Host Deep-Dive drawers with observed IPs + 3-tier Host Sankey, and click-to-pivot 5-tuple sessions alongside Grafana's `dataLinks` and `Host & Flow Deep-Dive` panel. - **5-Tuple Pre-NAT Reverse-Correlation (`enricher.classification.natCorrelation`):** Enabled by default (`enabled: true`, `ttlSeconds: 600`, `maxEntries: 100000`) in `configmap-enricher.yaml` so pre-NAT router WAN downloads (`external-cdn -> wan-gateway`) correlate back to the internal host (`external-cdn -> (via wan-gateway) -> internal-host`). ## Alloy Sidecar Mode