Releases
All versions are on GitHub Releases.
| Version | Type | Date | Focus |
|---|---|---|---|
| v2.5.1 | Stable | 26 November 2026 | Healthcheck for sandbox_log_processor, malicious list header names the sandbox, Grafana removed, prod housekeeping after v2.5.0 |
| v2.5.0 | Stable | 20 November 2026 | Browser sandbox: isolated ungoogled-chromium behind mitmproxy and its own Pi-hole, data in cyber_sentinel_sandbox, abuse.ch / urlscan.io checks, Sandbox page; Firefox removed |
| v2.4.0 | Stable | 18 November 2026 | Pi-hole query log as the DNS source: real client IPs, cached and blocked answers, passive_dns removed, 3-month retention |
| v2.3.0 | Stable | 16 November 2026 | API call log and usage page, VirusTotal budget from the provider's counter, Failure Guard |
| v2.2.0 | Stable | 16 November 2026 | Own Pi-hole blocklists: AI classification, review, daily pull request to sentinel-blocklists |
| v2.1.0 | Stable | 26 October 2026 | VirusTotal budget, urlscan.io and Shodan context, Deep Recon |
| v2.0.0 | Stable | 7 October 2026 | PostgreSQL as the only database, AI agent pipeline, AI Config UI |
| v1.0.3 | Release | 5 September 2026 | Local inference on Hailo-10H (removed in v2.0.0) |
| v1.0.2-rc1 | Release candidate | 5 May 2026 | 1–5 threat scale, partitioning, unified Vault playbook |
| v1.0.1 | Release | — | Ansible deployment |
| v1.0.0 | Release | — | First version |
v2.5.1
Follow-ups of v2.5.0: Docker now knows whether sandbox_log_processor works, the malicious list says where its entries come from, Grafana is gone, and the prod install is tidied up. Upgrades v2.5.0 in place. The grafana container, its data volume and its dashboards are removed.
Changes
- Healthcheck for
sandbox_log_processor(#50) — the processor touches a heartbeat file every 15 s while its main loop runs and Postgres answers (SELECT 1, so a dead server is noticed even when no logs come in). The image'sHEALTHCHECKmarks the containerunhealthyafter 60 s without one. The file lives on a small tmpfs (/run/heartbeat), the root filesystem stays read-only. Closes Trivy DS-0026. - Malicious list header (#51) — the description in
lists/malicious.txtnames both sources: pipeline (VirusTotal detections) and browser sandbox hits. The next Blocklist Publish pull request changes only that line. - Grafana removed (#55) — container,
grafana_datavolume, dashboards (config/grafana/), Nginx entry and certificate, vault keysvault_grafana_*, and thev_grafana_*views (dropped bydb_deployment.sql; nothing else used them). Prometheus and node_exporter stay: they are the data source for the planned health agent (#46). Playbooks 04.2 and 05 remove the container, volume, config directory, server block and certificate on existing hosts.
Prod housekeeping
- Local DNS records
sandbox.prodandsandbox-dns.prodin the main Pi-hole (#52). host_vars/rpi5/vault.ymlmatchesvault.yml.example; spare n8n Vault tokens revoked (#53).- Remaining v2.5.0 sandbox scenarios on prod (#54).
Security
Open code scanning alerts at release time: 31, all from OpenSSF Scorecard and Trivy config checks — none in the stack's own code. The four high ones are Scorecard posture checks (token permissions in trivy.yml and codeql.yml, branch protection, code review); they are deferred to v2.6.0 (#61). No Dependabot or secret scanning alerts.
Upgrading from v2.5.0
No new vault keys. The vault_grafana_password, vault_grafana_api_key, vault_grafana_cert and vault_grafana_key keys are no longer read: delete them from host_vars/rpi5/vault.yml (and dev_vm). The Pi-hole Local DNS record grafana.<suffix> can go too. Rebuild the processor, remove Grafana, update the database and Nginx:
cd ansible
ansible-playbook -i hosts.ini 04_1_prepare_stack.yml --limit rpi5-prod
ansible-playbook -i hosts.ini 04_2_deploy_containers.yml --limit rpi5-prod
ansible-playbook -i hosts.ini 04_3_db_postgres.yml --limit rpi5-prod
ansible-playbook -i hosts.ini 05_deploy_proxy.yml --limit rpi5-prod
Check: docker ps --filter name=sandbox_log_processor shows (healthy) about a minute after the start; docker ps -a --filter name=grafana and docker volume ls | grep grafana show nothing.
Tested
- Dev (2026-11-26): 04.1 → 04.2 → 04.3, all
failed=0.sandbox_log_processorhealthyright after the start. Postgres stopped at 13:12:38 → processorunhealthyat 13:14:28 (log:Postgres unavailable, backoff up to 60 s); Postgres started at 13:14:29 →Connected to Postgres,healthyagain at 13:15:24.blocklist_render()returns the new malicious header. - Dev (2026-11-26), Grafana removal: 04.1 → 04.2 → 04.3 → 05, all
failed=0. Containergrafana, volumecyber-sentinel_grafana_data,config/grafanaon the host, the fivev_grafana_*views and Nginxgrafana.conf/ certificate gone;nginx -tOK; ai-config, n8n, Pi-hole and the sandbox answer through Nginx; all other containers up (healthywhere defined). - Prod (RPi 5, 2026-11-26), upgrade from v2.5.0 with 04.1 → 04.2 → 04.3 → 05, all
failed=0:sandbox_log_processorhealthy; containergrafana, its volume,config/grafanaand the Nginxgrafana.conf/ certificate removed;nginx -tOK; nov_grafana_*view left;blocklist_render()returns the new malicious header. Prod housekeeping:host_vars/rpi5/vault.ymlmatchesvault.yml.example(Proxmox and Grafana keys removed, n8n token keys added) and the spare n8n tokens are revoked (#53);sandbox.prodandsandbox-dns.prodresolve and open (#52). Scenarios (#54): 7 —sudo sandbox-resetgives a fresh browser; 11 — a live URLhaus URL opened in the sandbox gave a hit e-mail; 12 — the Sandbox page shows the session, its requests, DNS and observables.
v2.5.0
Adds a browser sandbox for opening suspicious links: an isolated ungoogled-chromium whose whole traffic goes through mitmproxy and its own Pi-hole. Every request and DNS query lands in a separate schema, cyber_sentinel_sandbox, and is checked against abuse.ch and urlscan.io; hits are e-mailed, shown on a new Sandbox page and blocked for the whole LAN through the own blocklist. Also fixes two queue views that had become slow with the v2.4.0 DNS volume (51 s → 4 s). Upgrades v2.4.0 in place; no data is lost. The firefox container is removed — the sandbox replaces it.
Highlights
- Browser sandbox at
https://sandbox.<suffix>— ungoogled-chromium in the Selkies web viewer, profile on tmpfs, wiped bysudo sandbox-resetand every night at 04:00. - Every request recorded — mitmproxy is the only way out; one record per request, error or blocked attempt (headers, redirects, server IP, body SHA-256, upstream certificate).
- Own Pi-hole without adlists at
https://sandbox-dns.<suffix>/admin, with its own password. - Sandbox data in Postgres — new schema
cyber_sentinel_sandbox, filled by the new containersandbox_log_processor. - CTI checks — new n8n workflow Sandbox Scan: abuse.ch (URLhaus, ThreatFox, MalwareBazaar) for hosts, IPs, URLs and payload hashes; urlscan.io search and private scans for top-level pages; e-mail on hits.
- Sandbox page in the AI Config UI: sessions, requests, DNS, observables and their checks.
- Sandbox hits blocked for the LAN — the full host of every hit goes to the own malicious blocklist and into the daily pull request in sentinel-blocklists.
- Isolated — the sandbox never reaches the LAN, the stack or the main Pi-hole; none of its traffic lands in
cyber_sentinel.dns_queriesor the main queue. - Firefox removed — container, Nginx entry and certificate files.
- Faster queue views — the main workflow's queue and the Blocklists page went from ~50 s to 3–4 s on prod (the Blocklists page no longer returns 503).
Browser Sandbox
- Containers:
sandbox-browser(linuxserver/ungoogled-chromium),sandbox-mitmproxy(mitmproxy/mitmproxy12.3.1),sandbox-pihole(same pin as the main Pi-hole),sandbox_log_processor(built,python:3.12-slim). Images pinned by digest inimages.yml, all multi-arch. - Networks:
sandbox_network10.10.20.0/24isinternal: true(no route out; Nginx joins it only to serve the viewer);sandbox_egress10.10.21.0/24holds only mitmproxy.sandbox_log_processorsits oninternal_network(.5, formerly firefox) and is not reachable from the sandbox. - Chromium is forced through the proxy by a managed policy (
ProxySettings, no bypass; WebRTC only through the proxy). - The mitmproxy addon
config/sandbox/sandbox_logger.pyrefuses any destination that resolves to a non-public address and pins the checked IP, so DNS rebinding cannot reach the LAN. Refused attempts are logged asblocked. - TLS is intercepted with mitmproxy's own CA (created on the host, private key 0600); 04.7 puts the public certificate into the Chromium policy. Upstream certificates are not enforced, but each chain is verified and the result stored.
- Memory limits: browser 1.5 GB (+512 MB shared memory), mitmproxy 384 MB, Pi-hole 256 MB, log processor 128 MB.
Sandbox Data and CTI
db_sandbox.sql(new, playbook 04.3):url_eventsanddns_queries(monthly partitions, 3 months, added topartitioned_tables()),observables,observable_checks,ingest_state, queue and session views, settingssandbox_*inai_settings.sandbox_log_processor: exactly-once ingest (batch and file position in one transaction, resumes across rotation), rolesandbox_ingestwith EXECUTE on four ingest functions only, non-root, read-only file system, no capabilities, only its ownSANDBOX_DB_*variables.- Noise filter: allow-listed hosts (Tranco top N, manual) and their URLs are never looked up; static assets are not stored as URL observables; hashes only for payload types, whatever the host.
- Top-level pages whose server failed (
error, e.g. a dead phishing site) are still URL observables, so urlscan.io search can show older scans. - Blocklist: view
v_blocklist_hits;blocklist_sync_malicious()(Blocklist Publish) adds those hosts toblocklist_entriesasmalicious,approved, new sourcesandbox(check constraint widened indb_blocklists.sql). - Sandbox Scan (every 2 minutes):
claim_checks()→ one HTTP node for all lookups →record_checks(); private urlscan.io scans capped bysandbox_urlscan_daily_limit(20) and fetched by a later run; every request inapi_call_log(callersandbox); Failure Guard as Error Workflow.
AI Config UI
- New Sandbox page (read-only): counters, urlscan budget, ingest heartbeat, sessions, the requests and DNS of a session with hits marked, observables with their latest checks. Only urlscan.io and abuse.ch report links are rendered; URLs from browsed sites are shown as text.
- Settings step 10 Browser sandbox.
Ansible
- New playbook 04.7 (
04_7_browser_sandbox.yml, in00_main.ymlas[00.2.7]): CA policy for Chromium, sandbox Pi-hole without adlists and its password,/usr/local/bin/sandbox-resetand its 04:00 cron. - 04.1 stages
config/sandbox/*and the processor's build context; 04.2 removes the retiredfirefoxcontainer (withpassive_dns); 04.3 runsdb_sandbox.sql; 04.5 grants the UI read access; 04.6 imports Sandbox Scan. - 05: new entries
sandboxandsandbox_dnswith their own certificates (vault_sandbox_*,vault_sandbox_dns_*); while those are empty the old firefox pair and pihole's are used. The oldfirefox.confand its cert files are deleted. - 01:
.envgetsSANDBOX_DB_USER/SANDBOX_DB_PASSWORD.
Per-host Vault Files
- Dev and prod run separate HashiCorp Vaults, so each host now has one complete ansible-vault file,
ansible/host_vars/<host>/vault.yml(rpi5,dev_vm): all shared keys (API keys, Gmail, passwords, certificates) plus that host'svault_root_token,vault_unseal_keys,vault_n8n_vault_tokenandvault_n8n_token_accessor.group_vars/all/vault.ymlis gone. Templates with every key:host_vars/<host>/vault.yml.example(the Proxmox keys of playbook 00.1 only fordev_vm; 00.1 reads them from the dev host);group_vars/all/vault.yml.exampleis removed. Allvault.ymlfiles are git-ignored. ansible/tools/vault_add_password.shgenerates passwords (letters and digits) and adds them to every host's file without printing them, a separate value per host.- 06.1 checks the root token against the host's Vault (
[06.1.2.4]) and stops with a clear message instead of a hidden 403. - 04.2 pulls registry images in a separate, retried step (
[04.2.1.0a]): the sandbox browser image is about 5 GB and a slow registry could time out the wholeup.
Performance Fix
v_pending_observables(main workflow, every minute) andv_blocklist_ai_queue(Blocklists page, Blocklist Candidates) group a week ofdns_queries. Postgres pushed the allow-list checks (is_allowlisted(),blocklist_is_protected()) below theGROUP BY, so they ran for every raw DNS row instead of once per domain. With the Pi-hole log as the source (v2.4.0) that is ~750k rows a week on prod: 51 s and 55 s per call, Postgres at 100% CPU, and the Blocklists page returned 503 (the UI role times out at 15 s). The grouping CTE is nowMATERIALIZED: 3.9 s and 2.6 s on the same data, same results. Ships with 04.3 (db_ai_pipeline.sql2.6,db_blocklists.sql1.1); run 04.5 after it.
Database Helpers
.db/split by OS:.db/mac/(Homebrew YubiKey module, uses ssh-agent afteryk, prod on local port 5433,pgadmin-servers.jsonfor pgAdmin) and.db/linux/(previous scripts). See.db/README.md.
Upgrading from v2.4.0
New keys in ansible/host_vars/rpi5/vault.yml (letters and digits only — they end up in SQL and .env):
| Key | Required | Value |
|---|---|---|
vault_sandbox_db_password | yes | 32 random characters (openssl rand -hex 16) |
vault_sandbox_pihole_admin_password | no | 24+ characters; the main Pi-hole's password is used while empty |
vault_sandbox_cert / vault_sandbox_key | no | certificate for sandbox.<suffix>; the firefox pair is used while empty |
vault_sandbox_dns_cert / vault_sandbox_dns_key | no | certificate for sandbox-dns.<suffix>; pihole's pair is used while empty |
-
Vault file. Move the prod secrets into one file: copy the old
group_vars/all/vault.ymltoansible/host_vars/rpi5/vault.yml(still encrypted, same.vault_pass), make sure it holds prod'svault_root_token,vault_unseal_keys,vault_n8n_vault_tokenandvault_n8n_token_accessor(with the accessor set, 06.1 renews the n8n token instead of minting a new one on every run), then removegroup_vars/all/vault.yml. Add the keys above (VAULT_HOSTS=rpi5 ansible/tools/vault_add_password.shgenerates the two passwords). Check that Ansible sees it: -
RPi memory limits. Docker ignores the sandbox memory limits (browser 1.5 GB) unless the memory cgroup is on. Append
cgroup_enable=memory cgroup_memory=1to the single line in/boot/firmware/cmdline.txt(once — check the line before rebooting), reboot, then check:HashiCorp Vault comes back sealed after the reboot (there is no auto-unsealer): unseal it with three of the keys before the playbooks,
ssh -t <user>@<host> 'for i in 1 2 3; do docker exec -it hashicorp_vault vault operator unseal; done'. -
Disk space. The sandbox browser image is about 5 GB; keep at least 8 GB free on
/before 04.2 (ssh <user>@<host> 'df -h /';docker image prunefrees old layers). - Add two Local DNS records in the main Pi-hole pointing at the host:
sandbox.<suffix>andsandbox-dns.<suffix>. Thefirefox.<suffix>record can go. On a Mac, names ending in.localare resolved by mDNS and never reach Pi-hole: put them in/etc/hostsinstead (not needed for.prod). - Render
.env, stage the files, create the schema, start the containers (this also removesfirefox), grant the UI, import the workflow, configure the sandbox and update Nginx:
cd ansible
ansible-playbook -i hosts.ini 01_setup_secrets.yml --limit rpi5-prod
ansible-playbook -i hosts.ini 04_1_prepare_stack.yml --limit rpi5-prod
ansible-playbook -i hosts.ini 04_3_db_postgres.yml --limit rpi5-prod
ansible-playbook -i hosts.ini 04_2_deploy_containers.yml --limit rpi5-prod
ansible-playbook -i hosts.ini 04_5_ai_config_editor.yml --limit rpi5-prod
ansible-playbook -i hosts.ini 04_6_post_config.yml --limit rpi5-prod
ansible-playbook -i hosts.ini 04_7_browser_sandbox.yml --limit rpi5-prod
ansible-playbook -i hosts.ini 05_deploy_proxy.yml --limit rpi5-prod
ansible-playbook -i hosts.ini 06_3_n8n_api_key.yml --limit rpi5-prod
04.3 runs before 04.2 so the processor finds its role and functions when it starts (it waits and retries otherwise).
- 04.6 re-imports all workflows and leaves them inactive: publish the main workflow, Deep Recon, Blocklist Candidates, Blocklist Publish, API Usage Monitor and the new Sandbox Scan in n8n. 06.3 re-activates Failure Guard.
- Check:
ssh <user>@<host> 'docker ps --filter name=sandbox --format "{{.Names}} {{.Status}}"' # four containers, Up
ssh <user>@<host> 'docker logs --tail 5 sandbox_log_processor' # Connected to Postgres, following both logs
Open https://sandbox.<suffix>, load any HTTPS site, then:
SELECT event, count(*) FROM cyber_sentinel_sandbox.url_events WHERE ts > now() - interval '15 minutes' GROUP BY 1;
SELECT kind, status, verdict, count(*) FROM cyber_sentinel_sandbox.observables GROUP BY 1, 2, 3;
Within a few minutes the observables get a verdict, and the AI Config UI → Sandbox shows the session.
Fresh Installs
Create ansible/host_vars/<host>/vault.yml with every key (templates above) and, on a Raspberry Pi, turn on the memory cgroup (step 2). 00_main.yml runs every playbook above; afterwards copy the Vault credentials 06.1 prints into the host's file. The firefox removal in 04.2 and 05 does nothing on a new host.
Tested
- Dev (2026-11-23): full
00_main.yml. Sandbox: Chromium viewer, traffic only through mitmproxy (direct egress refused),http://192.168.0.1blocked,urls.jsonlwith server IP and upstream TLS, nothing in the maindns_queries, processor following both logs, rows inurl_events/dns_queries/observables, allow-listed hostsskipped_trusted. Sandbox Scan: URLhaus / ThreatFoxno_hitand a private urlscan.io scan for a clean page; two offline URLhaus entries →hiton host and URL, e-mail flagged, both hosts inv_blocklist_hitsand on the rendered malicious list (sync tested in a rolled-back transaction; publishing is off on dev). A dead phishing page (error) now gives a URL observable and an urlscan.io search hit. View fix: same results, Blocklists queries pass under the UI role's 15 s limit. Open:sandbox-reset(needs sudo) and the Sandbox page in the browser. - Prod (RPi 5, 2026-11-23), upgrade from v2.4.0 with the steps above: memory cgroup on (sandbox browser capped at 1.5 GB), Vault unsealed by hand after the reboot, all playbooks
failed=0; the four sandbox containers up,sandbox_log_processorconnected and following both logs, schema and thesandboxblocklist source in place, all workflows published,sandbox.prodandsandbox-dns.prodanswering through Nginx. The view fix was found on prod right after the upgrade (main queue 51 s, Blocklists page 503, Postgres at 100% CPU) and applied with 04.3 + 04.5: 3.9 s and 2.6 s, Postgres at ~5% CPU.
v2.4.0
dns_queries is now filled from Pi-hole's own query log instead of a separate dnsmasq container. Every row carries the real client IP, answers from Pi-hole's cache and blocked answers are captured, and the stack runs one container less. Upgrades v2.3.0 in place. Retention is shortened from 6 to 3 months: the next monthly partition job deletes data older than that.
Highlights
- Real client IPs —
source_ipis the device that asked (e.g.192.168.0.69), for queries and answers. Before, every query came from10.10.10.4(Pi-hole) and every answer had'N/A'. - Cached and blocked answers — new
query_typevaluescached(answered from Pi-hole's cache) andblocked(gravity / denylist), next toqueryandreply. passive_dnsremoved — Pi-hole forwards straight to Unbound (10.10.10.2#53);Dockerfile.pdnsand the dnsmasq container are gone.- LAN clients accepted — Pi-hole
dns.listeningMode = ALL, so devices on the LAN are answered and logged. - 3-month retention for all partitioned tables.
DNS Pipeline
- Chain: LAN client → Pi-hole → Unbound. Pi-hole writes
pihole.log;config/pihole/logon the host is bind-mounted intopihole(rw) anddns_log_processor(ro). - Playbook 04.6 reads four Pi-hole settings and writes only those that differ:
dns.upstreams = ["10.10.10.2#53"],dns.queryLogging = true,misc.extraLogging = true(each line carries the query id and client, so answers are attributed to the device that asked),dns.listeningMode = ALL. - Port 53 is published on the host: the host must not be reachable from the internet on port 53, otherwise Pi-hole becomes an open resolver.
dns_log_processor
- Rewritten; Python 3.12 (
python:3.12-slim, pinned incs_base_images), onlypsycopg2-binaryas dependency. - Writes one row per query and per answer:
query,reply,cached,blocked. An answer gets the client and record type of its query; Pi-hole v6'sUDP/TCPline prefix is supported. - Reopens the log after rotation (inode change) or truncation (
copytruncate). - Batched inserts (
BATCH_SIZE200 rows or everyFLUSH_INTERVAL2 s); after a Postgres restart it reconnects with backoff and keeps up toMAX_BUFFERrows; SIGTERM flushes the buffer. - Skips queries Pi-hole makes itself (
127.0.0.1,::1: the 30-secondpi.holehealthcheck, reverse lookups of client names);SKIP_CLIENTSoverrides the list. - Starts at the end of the file, like
tail -f: lines written while it was down are not imported.
Database
sp_drop_old_partitions()keeps 3 months (was 6) fordns_queries,network_events,threat_indicatorsandapi_call_log. One value for all tables, sothreat_indicators.dns_query_idnever points at a dropped row.- No table changes.
cachedandblockedare new values ofdns_queries.query_type. The queue views (v_pending_observables,v_blocklist_ai_queue) still take public IPv4 answers only, so blocked answers (0.0.0.0) never enter them. - Cached answers now count towards
query_countin the queue views, soblocklist_min_queriesis reached sooner than before. Raise it in the AI Config UI if the blocklist queue grows too fast.
Upgrading from v2.3.0
No new vault.yml keys. The SQL scripts are idempotent; existing rows stay, apart from the shorter retention.
- Before the upgrade: export whatever you want to keep that is older than 3 months. The partition job on the 1st of the month at 02:00 drops it.
- Check that port 53 of the host is not reachable from the internet (no port forward on the router).
- Stage the new files:
- Switch Pi-hole to Unbound before 04.2. 04.2 removes
passive_dns, while Pi-hole still forwards to it (10.10.10.3) until 04.6 runs. Without this step the LAN has no DNS between 04.2 and 04.6:
- Remove
passive_dns, rebuilddns_log_processor, apply the retention change and set the Pi-hole options:
ansible-playbook -i hosts.ini 04_2_deploy_containers.yml --limit rpi5-prod
ansible-playbook -i hosts.ini 04_3_db_postgres.yml --limit rpi5-prod
ansible-playbook -i hosts.ini 04_6_post_config.yml --limit rpi5-prod
- 04.6 re-imports all workflows and leaves them inactive: publish the main workflow, Deep Recon, Blocklist Candidates, Blocklist Publish and API Usage Monitor again in n8n. Run
06_3_n8n_api_key.ymlafterwards to re-activate Failure Guard. - Check:
ssh <user>@<host> 'docker logs --tail 5 dns_log_processor' # "Following /var/log/pihole/pihole.log", "Connected to Postgres"
SELECT query_type, count(*), count(DISTINCT source_ip)
FROM cyber_sentinel.dns_queries
WHERE timestamp > LOCALTIMESTAMP - interval '10 minutes'
GROUP BY 1;
Rows written between 04.2 and 04.6 (before extraLogging is on) may have source_ip = 'N/A'; they are harmless.
Fresh Installs
A new installation from this release needs no extra steps: 00_main.yml sets up the Pi-hole log, the processor and the Pi-hole options. Upgrade-only code changes nothing on a new host, because each step is guarded or only removes something that is not there:
[04.1.2.3]removes the leftovers ofpassive_dns; on a new host there is nothing to remove.[04.2.1.0]removes thepassive_dnscontainer only if it exists.- The Upgrade from v2.2 block in
db_ai_pipeline.sqlruns only whilevt_lookup_logis still a table.
These steps stay for one or two releases so that older installations can upgrade, and will be removed after that.
Tested
- Dev, fresh install of the release branch: full
00_main.ymlon a VM restored from a base backup,failed=0; Pi-hole options set, the processor waited forpihole.logand then followed it; queries from a LAN device stored asquery/reply/blockedwith its own IP and queued inv_pending_observables; retention function at 3 months. - Dev, during development: real Pi-hole lines (400) parsed; every
reply/cached/blockedrow has a client IP; a query from a LAN device stored with its own IP;v_pending_observables.source_ipsshows real clients; 04.1 and the 04.6 Pi-hole task re-run without changes; log rotation and truncation tested locally. - Prod (RPi 5), upgrade from v2.3.0 with the steps above: within minutes
query/reply/cached/blockedrows from LAN devices and containers, no new rows without a client,v_pending_observablesfilling with real client IPs.
v2.3.0
Counts every outgoing API request and stops a failing workflow after a few runs instead of thousands. Upgrades v2.2.0 in place; no data is lost.
API Call Log
- New table
api_call_log(partitioned by month, kept 6 months): one row per request to VirusTotal, Gemini, urlscan.io, Shodan, abuse.ch, RDAP and crt.sh — provider, caller, endpoint, HTTP status, outcome.vt_lookup_logbecame a view on it; its rows are moved once. - All workflows log their calls in one Log API calls node; the main workflow logs VirusTotal right after the call. The VirusTotal request is no longer retried inside a run, so one claim is one call.
- The partition jobs (
sp_add_future_partitions(),sp_drop_old_partitions()) handle tables of both schemas throughcyber_sentinel.partitioned_tables().
VirusTotal Budget From the Provider
- New workflow API Usage Monitor (hourly at :05) stores VirusTotal's own counter for the key (
overall_quotas; free, it does not use the quota).v_vt_budgetuses the higher of this and the local count, so calls from the dev environment and manual tests reduce the budget too. - The AI Config UI simulator goes through the same budget (
api_claim()): same per-minute limit and reserve; its separate in-memory limit (AI_UI_VT_MIN_INTERVAL,AI_UI_VT_DAILY_LIMIT) is gone. - One e-mail per provider and UTC day when usage crosses
api_alert_threshold_pct(80 %) ofvt_daily_limit/api_daily_limit_<provider>. Only VirusTotal is stopped by its budget.
Failure Guard
- New workflow Failure Guard, set as the Error Workflow of every workflow. After
failure_guard_threshold(10) failed runs in a row it deactivates the workflow and sends one e-mail per streak; a successful run resets the count. - Works while Vault is sealed: n8n credentials only, sender and recipient in
ops_settings(written by 04.3). - New playbook 06.3 issues its n8n API key (rotated on every run) and activates it — n8n runs an Error Workflow only while it is active.
AI Config UI
- API usage page: today per provider (local count, VirusTotal's counter, limit), per caller and per hour, the last 30 days, rate limits and errors, usage alerts and Failure Guard alerts.
- Settings step 9 API usage and failures.
Upgrading from v2.2.0
The SQL scripts are idempotent; existing data stays.
cd ansible
ansible-playbook 04_3_db_postgres.yml --limit rpi5-prod
ansible-playbook 04_5_ai_config_editor.yml --limit rpi5-prod
ansible-playbook 04_6_post_config.yml --limit rpi5-prod \
--start-at-task "[04.6.4.1] Verify workflow JSON exists on control host"
ansible-playbook 06_3_n8n_api_key.yml --limit rpi5-prod
- 04.3 must run before 04.5: it moves
vt_lookup_logand recreatesv_vt_budget, whose UI grant 04.5 restores. - 04.6 re-imports all six workflows and leaves them inactive: publish the main workflow, Deep Recon, both blocklist workflows and API Usage Monitor again in n8n. 06.3 runs after 04.6 and activates Failure Guard itself.
- Optional:
vault_n8n_alert_toinvault.ymlfor a different recipient (default: the sender).
v2.2.0
Own Pi-hole blocklists: domains that get through Pi-hole but should not — malicious, tracking, telemetry — are published as plain domain lists to the public repository sentinel-blocklists, which Pi-hole pulls as adlists. Upgrades v2.1.0 in place; no data is lost.
Three Lists
lists/malicious.txt— every Pi-hole auto-block of the main workflow, approved automatically. A domain staysblocklist_malicious_ttl_days(default 90) after its last block; a new block extends it. The backup Pi-hole gets these blocks too.lists/tracking.txt,lists/telemetry.txt— AI classification, approved by a human.- Domains only, exact match, one per line: Pi-hole does not block IPs, and telemetry often shares CDN IPs with normal sites.
- The database is the source of truth;
blocklist_render()generates the files from it.
Blocklist Candidates (n8n, daily 03:20)
- Candidates: domains with a public IPv4 answer in the last
blocklist_lookback_days, queried at leastblocklist_min_queriestimes, whose name contains an active pattern (telemetry,metrics,analytics,track, …), not classified yet and not on any list. - Gemini in batches (
blocklist_ai_batch_size, at mostblocklist_ai_daily_limitper day), no VirusTotal calls. Returns category (telemetry / tracking / ads / functional / unknown), vendor, confidence, breakage risk and a reason. - Telemetry and tracking at or above
blocklist_ai_min_confidencebecome review candidates; an e-mail announces them. Answers about domains that were not in the batch are dropped. - A classified or rejected domain is never sent to the AI or proposed again.
Blocklist Publish (n8n, daily 05:20)
- The branch
n8n/daily-updateis rebuilt frommainon every run with the full generated files, so there is always one pull request showing the whole difference. A pull request left open after the lists became equal tomainagain is closed. - The merge stays manual (a ruleset on
mainof sentinel-blocklists requires a pull request). blocklist_publish_enabled = 0(default) is a dry run: lists are generated, compared and logged only.- Every run is logged in
blocklist_publish_log(dry run / no change / published / error); a new or updated pull request and errors are e-mailed. - A domain covered by a manual allow-list entry (the domain or a parent) is never published. Tranco entries and trusted infrastructure do not protect: telemetry usually sits on popular vendor domains.
AI Config UI
- Blocklists page: candidates with vendor, confidence and breakage risk; approve / reject selected rows; published, expired and rejected entries per list; manual additions; last publish runs with links to the pull request; preview of the generated files.
- Remove on a published entry sets it to rejected, so neither the AI nor the malicious sync adds it again.
- Name patterns editor and a versioned classifier prompt.
- Settings for all
blocklist_*keys.
Database
New script db_blocklists.sql (playbook 04.3): blocklist_entries, blocklist_classifications, blocklist_name_patterns, blocklist_prompt_templates, blocklist_publish_log, views v_blocklist_ai_queue and v_blocklist_published, functions blocklist_record_classifications(), blocklist_sync_malicious(), blocklist_render(), blocklist_is_protected(). The AI Config UI role gets matching grants (no DELETE on blocklist_entries).
Upgrading from v2.1.0
The SQL scripts are idempotent; existing data and tuned settings stay.
- Create a fine-grained GitHub token for
lukaszFD/sentinel-blocklistsonly — Contents and Pull requests read/write — and set it asvault_github_blocklists_tokeninvault.yml. - Run the playbooks:
cd ansible
ansible-playbook 06_1_initialize_provision_vault.yml --limit rpi5-prod
ansible-playbook 04_3_db_postgres.yml --limit rpi5-prod
ansible-playbook 04_5_ai_config_editor.yml --limit rpi5-prod
ansible-playbook 04_6_post_config.yml --limit rpi5-prod
- In n8n: publish Blocklist Candidates and Blocklist Publish (imported inactive).
- Check a dry run in the AI Config UI (Blocklists → publish log), then set
blocklist_publish_enabled = 1. - In Pi-hole, add the adlists and run a gravity update:
https://raw.githubusercontent.com/lukaszFD/sentinel-blocklists/main/lists/malicious.txt
https://raw.githubusercontent.com/lukaszFD/sentinel-blocklists/main/lists/tracking.txt
https://raw.githubusercontent.com/lukaszFD/sentinel-blocklists/main/lists/telemetry.txt
Next
API call monitoring: counting real requests per provider and caller, VirusTotal's own quota counter, usage in the AI Config UI and alerts before the daily limit. Delivered in v2.3.0.
v2.1.0
More context for each verdict and a second look at high-scored domains. Upgrades v2.0.0 in place; no data is lost.
VirusTotal Budget
The main workflow runs every minute instead of every 3 minutes, and claim_next_observable() decides whether a run may call VirusTotal.
- Daily limit (500), per-minute limit (4) and a reserve kept per hour until the 00:00 UTC reset —
vt_daily_limit,vt_per_minute_limit,vt_reserve_per_hour. - A backlog is cleared at up to 60 observables per hour instead of 20.
- Every call is logged in
vt_lookup_log; overlapping runs never take the same pair, and a failed run is retried after 15 minutes. - Calls used and left today are shown in the AI Config UI settings.
More Context in the Main Workflow
- Shodan InternetDB for every IP (free, no key): open ports, software, known CVEs, tags and the hostnames seen on the IP.
- urlscan.io search for observables above the VirusTotal gate: earlier scans of the domain's page (title, HTTP status, TLS issuer and certificate age, urlscan verdict) and other sites seen on the same IP.
- Both are context for the AI agent and the e-mail; the rule score is unchanged. Prompt version 1.2 (inactive draft) describes the new evidence.
- E-mail shows hostnames on the IP, related sites and the certificate; CVEs stay in the data for the AI only.
Deep Recon
New hourly workflow that re-assesses verdicts scored ≥ recon_min_score (default 3).
- Sources: RDAP (domain age, registrar), crt.sh (certificate history), urlscan.io page scan (page text, forms, certificate, domains the page loads from).
- AI analyst without tools: confirms or contradicts the verdict and may propose a score within
recon_max_deviation. Verdicts are never changed automatically. - E-mail when the proposed score differs from the verdict.
- Page content is treated as untrusted: data only, scripts and comments stripped, URLs defanged.
- New table
deep_recon, queuev_pending_recon, versioned prompt inrecon_prompt_templates.
AI Config UI
- Deep recon page: results, filters, re-queue, links to urlscan.io reports.
- Recon prompt editor with versions.
- Settings for the VirusTotal budget, urlscan.io, Shodan and Deep Recon with plain descriptions.
Upgrading from v2.0.0
The SQL scripts are idempotent; existing data stays.
cd ansible
ansible-playbook 04_3_db_postgres.yml --limit rpi5-prod
ansible-playbook 04_5_ai_config_editor.yml --limit rpi5-prod
ansible-playbook 04_6_post_config.yml --limit rpi5-prod
- Set
vault_urlscanio_api_keyinvault.yml; if it was empty before, also run06_1_initialize_provision_vault.yml. - In n8n: publish Deep Recon and the re-imported main workflow; delete Site Recon if it was ever imported.
- In the AI Config UI: activate prompt version 1.2.
v2.0.0
Stable production release. Not a release candidate: the database schema, the AI pipeline and the deployment are complete and running in production on the Raspberry Pi 5. It replaces the v1.0.2-rc1 line, which was never promoted to a final v1.0.2.
v2.0.0 does three things: moves all data to one PostgreSQL database, turns the AI step into an agent with memory and guardrails, and moves its configuration out of the workflow into the database and a web UI.
One Database
MySQL and MongoDB are removed. Everything now lives in PostgreSQL 16 with pgvector and pg_cron.
- Two schemas:
cyber_sentinelfor DNS traffic and verdicts,cyber_sentinel_aifor the AI pipeline. - Raw CTI responses moved from MongoDB to a JSONB table (
threat_data_raw). - Native declarative partitioning by month for
dns_queries,threat_indicatorsandnetwork_events; 6-month retention run bypg_cron. - Foreign keys restored where PostgreSQL allows them on partitioned tables.
- Plain, idempotent SQL files applied in a fixed order by Ansible; Liquibase is no longer used.
- Separate roles for n8n and for the AI Config UI, each with only the access it needs.
Details: Database.
AI Pipeline
The workflow was rebuilt around a deterministic score that the AI reviews, rather than an AI that scores from scratch.
- VirusTotal gate — observables below
vt_gate_min_maliciousdetections are closed as clean without further API calls or AI tokens. - Rule engine in the database —
compute_threat_score()returns a 1–5 score with a step-by-step trace from VirusTotal, ThreatFox and URLhaus. - AI agent — Gemini reviews the evidence and the rule score and may adjust it by at most
ai_max_deviation. Output is a fixed JSON schema with a rationale in English and Polish. - Vector memory — every verdict is embedded and stored in pgvector; the agent searches similar past cases with the
historical_verdictstool. - Guardrails enforced by the workflow — score clamped to the allowed range, rule score kept if the agent fails, CTI data treated as untrusted input.
- Audit —
verdict_auditrecords rule score, final score, what the agent changed and why, model and prompt version. - Pi-hole auto-block — domains above
pihole_block_min_vt_maliciousdetections (not trusted infrastructure) are added to the Pi-hole denylist; every attempt is logged. - Allow-list — Tranco top domains (weekly sync) plus manual entries are skipped; exclusions keep user-content platforms such as
github.iounder analysis.
Details: n8n Workflow.
AI Config UI
New web UI (ai-config-ui) for everything the pipeline reads from the database: thresholds, versioned prompts, allow-lists, trusted infrastructure and threat level wording. Includes a simulator that runs live lookups without touching the queue. Every change is logged with the user who made it.
Simplified Stack
- Removed: MySQL, MongoDB, Hailo-10H /
hailo-ollama, Open WebUI, local models. AI runs on Gemini only. - All images pinned by digest.
- n8n and Vault listen on loopback only; web UIs are reached through Nginx.
- n8n credentials created automatically with fixed IDs (playbook 06.2), so the imported workflow runs without manual setup.
- Documentation rewritten and shortened.
Upgrading from v1.x
There is no in-place migration from MySQL/MongoDB. Deploy v2.0.0 on a clean host or a clean Docker setup; historical v1 data is not carried over.
New secrets are required in vault.yml — see Deployment.
v1.0.3
Added local inference on the Hailo-10H accelerator: hailo-ollama as a systemd service and Open WebUI behind Nginx. Testing showed that the 1.5–3B models available on the device were not reliable enough for multi-source threat scoring, so Gemini stayed the reasoning engine. Removed in v2.0.0.
v1.0.2-rc1
Introduced the 1–5 threat scale loaded from the database, URLhaus as a supporting source only, a score cap for trusted infrastructure, monthly partitioning with 6-month retention (MySQL), severity-coloured alert emails and a single Vault lifecycle playbook. Never promoted to a final release; superseded by v2.0.0.
v1.0.1
Moved the whole deployment to Ansible, merged the Vault playbooks and updated the Grafana dashboards.
v1.0.0
First version: DNS capture, CTI enrichment and the first AI workflow.