MIT open source · v0.3.0ai-security-monitor
A working website can still have expired certificates, missing security headers or known vulnerabilities. A computer that seems fine can still make suspicious connections. ai-security-monitor brings host monitoring and optional website scanning into your own Security Hub, so you can see what was found, what needs attention and what remains after a fix.

A travel eSIM covering 190+ destinations worldwide
Use TRAVEL30 for 30% off sitewide. Cannot be combined with other promo codes.
Affiliate link. Buying through it may earn this site a small commission, at no extra cost to you.
Do any of these problems sound familiar?
Once websites are live and hosts multiply, the challenge is keeping risks visible and checking that each issue gets addressed.
The website works. Is it vulnerable?
Check your own websites with httpx, tlsx, nuclei and testssl.sh for certificate, TLS, security-header, known-vulnerability and configuration issues.
Too many reports to make sense of
Hub parses and deduplicates scanner results in one place. Missing core security headers become a single finding to reduce repetitive alerts.
You fixed it. Is the issue still there?
Rescan to compare with previous results and track resolved or recurring findings, so each fix has a follow-up.
Where is this computer connecting?
Every connection is labelled outbound, inbound, listening or local, with the process, country and organization. One table instead of netstat.
Which connections are a problem?
It matches public blocklists such as Spamhaus, abuse.ch and blocklist.de, plus behaviour like running from a temp folder, scripts calling out and periodic beacons, then rates each one.
Are the doors closed?
It reads the firewall rules and works out whether each listening port can really be reached from the network, not just whether it is open.
Is everything patched?
OS support dates, days since the last update and software versions with known vulnerabilities. A CISA KEV match (actively exploited) is raised to critical.
Why did it just crash?
It reads Windows event logs, blue-screen codes, the Linux journal and macOS crash reports, lists likely causes and fixes, and flags brute force, new accounts, account lockouts and Remote Desktop logins.
Is every machine in the company OK?
Each host enrolls into your self-hosted Security Hub: overview, score trends, open findings and remote block approvals in one place.
Your website is live. Who checks it next?
An expiring certificate, missing security headers or a component with a known vulnerability may leave the homepage looking fine. Security Hub combines findings from several scanners into one list and compares the next scan with the previous one.
- 1
Register a website you may inspect
Add a URL to start with passive checks that make a few requests. Active scanning of public websites requires ownership verification through DNS TXT, a verification file or an HTML meta tag. Verification lasts 90 days.
- 2
Let each scanner check its specialty
httpx checks website fingerprints and recommended security headers; tlsx checks certificates. After verification, nuclei checks known vulnerabilities and configuration issues, while testssl.sh checks TLS protocols and cipher suites.
- 3
Review findings, fix and scan again
Hub parses and deduplicates results so you can review findings by severity. Run another scan after fixing issues to see what was resolved or reappeared, without comparing separate tool outputs by hand.
Know what was scanned: if a site sits behind Cloudflare or another CDN/WAF, findings may describe edge TLS and header settings rather than origin vulnerabilities. A scan with no findings does not prove the website is secure.
Website scanning is disabled by default. Use a webscan Compose configuration and set AI_SECURITY_MONITOR_HUB_WEBSCAN_TOKEN to at least 32 characters in .env. Standard Hub configurations do not start a runner. Private-network targets require an administrator to allow their subnet first.
Read the website scanning setup and workflowFrom one computer to your own websites
Use the agent or desktop app for a host, and Hub to manage several. Enable a separate website scan runner when you need to check your websites.
ai-security-monitor (agent)
agent/ · single Rust binary
- Runs on the computers and servers you protect: Windows, Windows Server (including Server Core and domain controllers), macOS and Linux
- Scans connections, intel, firewall, ports, vulnerabilities, hardening, events and traffic
- Use the CLI on its own, or enroll into the Hub to report on a schedule
- Starts at boot (system service or at login); ai-security-monitor self-update verifies SHA256SUMS
Security Hub
hub/ · Next.js + PostgreSQL
- Overview, hosts, connections, findings, vulnerabilities, hardening, traffic, events and intel
- Suspicious IP ranking by severity and times seen, with your own notes on each IP
- Office computers find the Hub (LAN or company DNS) and ask to join; an admin approves, or chosen subnets are approved automatically; a fingerprint stops look-alike Hubs
- Remote blocks need approval; actions are HMAC-signed and pinned to the host identity
- Enrollment keys, read-only API tokens, audit log, CSV export
- Standalone (localhost only) or server mode for a fleet; English and Chinese, dark mode, mobile layout
AI and MCP
ai-security-monitor ai · ai-security-monitor mcp · Hub /ai
- ai-security-monitor ai ask / analyze hands off to Claude Code or Codex CLI with read-only tools
- ai-security-monitor mcp lets Claude Code, Codex, Cursor and VS Code query this computer directly
- The Hub is an MCP server too, for questions about the whole fleet
- The AI assistant in the Hub explains current risks in plain words
Desktop app (AI Security Monitor)
desktop/ · Tauri 2
- For people who would rather not type commands: lives in the tray, opens a window
- Overview scores, connections filtered by verdict and direction, scan results, threat-intel status
- Settings: enter the Hub URL, or find your company’s Hub and ask to join
- Two startup options: report in the background after boot, and open the app at sign-in (tray only)
Website scan runner (optional)
web-scan-runner · Separate container
- Claims Hub jobs, runs httpx, tlsx, nuclei and testssl.sh, then uploads results
- Hub parses, deduplicates and compares scans; the runner makes website requests
- Limits request rate, concurrency and runtime, connecting only to addresses that passed scope checks
- Enabled with compose.webscan.yml or compose.standalone.webscan.yml
Architecture
The agent on each host scans on a schedule and reports to your self-hosted Hub; the Hub aggregates it into dashboards, and AI reads it through MCP and explains it in plain words.
- 1🦀
Agent on each host
Scans connections, firewall, ports, vulnerabilities, hardening, events and traffic, checks them against locally cached threat intel and rates them from safe to dangerous.
- 2📤
Scheduled reports
Sends a connection snapshot every minute and a full report every 10 minutes to the Hub (HTTPS plus a per-host token), queuing locally while offline.
- 3🛡️
Security Hub
Next.js and PostgreSQL bring every host together: scores, suspicious IP ranking, findings, remote block approvals and an audit log.
- 4🤖
AI explains it
Both the agent and the Hub are MCP servers; Claude Code or Codex get read-only tools, look up the data and explain risks and fixes in plain words.
Repository layout
One repository holds the agent, the Hub, the desktop app and deployment files.
- agent/
- Rust agent (the ai-security-monitor binary): connections, intel, firewall, vulnerabilities, hardening, events, traffic, MCP, AI, service and self-update
- hub/
- Security Hub: Next.js App Router pages and APIs, Drizzle schema and migrations, i18n, tests
- desktop/
- Tauri 2 desktop app: Rust shell (src-tauri) plus web UI (ui)
- contract/
- JSON contracts between agent and Hub (register, report, snapshot, remote actions)
- feeds/
- Threat-intel source registry, known-good services, hardening rules (YAML), OS support dates, event descriptions
- docker/
- Hub image Dockerfile and compose files (standalone, server, development)
- scripts/
- One-line installers (install.sh / install.ps1), version check, demo data and screenshot generation
- docs/
- Per-feature documentation in Chinese and English, plus screenshots
Design choices worth knowing
Security tools fail when they cry wolf or change settings carelessly, so these parts get extra care.
Every verdict cites its source
The matching feed, vendor, confidence, license and source URL are all shown. No black-box scores.
Preview by default
Commands that change the system (blocking IPs, closing ports, installing services, updating) only show what they would do unless you pass --yes.
Blocks can be undone
fw sync-blocklist only syncs high-confidence intel, runs a dry run first, asks to confirm, and every rule can be removed.
Respects feed licenses
Non-commercial feeds such as DShield only alert by default and are never used for blocking. The full list is in THIRD_PARTY_NOTICES.
Reserved ranges filtered
Blocklist sync drops reserved ranges like 0/8, 10/8 and 192.168/16 and checks overlap with your own IPs, so you never lock yourself out.
60 hardening checks
UAC, Defender, BitLocker, SMBv1, RDP NLA, SSH, kernel settings, FileVault, Gatekeeper and more, with severity-weighted scores and YAML overrides.
Traffic without packet capture
flow-lite shows where each process connects; with a pcap it also analyses DNS, TLS SNI, cleartext protocols, large uploads and periodic connections.
AI gets read-only access
When Claude Code or Codex analyses your system it only gets read-only tools. It can look, not touch.
Built-in threat-intel sources (excerpt)
26 sources in total. AbuseIPDB, GreyNoise and CrowdSec lookups work with your own keys, and outbound lookups can be turned off completely.
What it looks like
Screenshots use the repo’s demo data (fictional hosts, documentation IP ranges): the Security Hub first, the Windows desktop app in the last four.















Before you start, define the scope
Better to state the limits up front than explain them later.
- 1
Host monitoring and website scanning have different scopes
The agent checks its own host. The optional website runner sends requests to websites you own or have written authorization to scan. Public active scans require ownership verification; private targets require an administrator allowlist. It does not perform injection, DoS or fuzz testing.
- 2
Some checks need admin rights
Reading firewall rules and event logs, or installing a system service, needs admin or root. Without them those checks are skipped and ai-security-monitor doctor explains why. On Windows Server, checks that do not apply (Defender removed, no SmartScreen on Server Core) are marked not applicable instead of failing.
- 3
Intel verdicts are evidence, not proof
Public blocklists have false positives (CDN domains, for example), so every hit cites its source. Domain-level matches are downgraded to suspicious.
- 4
The Hub needs Docker and PostgreSQL
The compose files include PostgreSQL. For a single computer, use the standalone mode, which binds only to 127.0.0.1.
- 5
AI analysis needs Claude Code or Codex
ai-security-monitor calls the CLI you are already signed in to. The Hub's latest image includes both CLIs; the slim image does not. Everything else works without AI.
Install ai-security-monitor
One command downloads the latest release and verifies it against SHA256SUMS, stopping on any mismatch.
Which download do I need?
Pick the one that matches your situation. Everything is on GitHub Releases, with SHA256SUMS to verify.
Desktop installer
AI-Security-Monitor-<version>-windows-x64-setup.exe / macOS .dmg / Linux .AppImage or .deb
Double-click to install. It is unsigned: on Windows SmartScreen click “More info” → “Run anyway”; on macOS right-click → Open the first time.
Command-line version
Use the one-line install command below
Downloads, verifies SHA256 and sets up autostart. The bare ai-security-monitor-<version>-<os> binary is a terminal tool: run it in a terminal, don’t double-click it.
Security Hub (Docker)
ghcr.io/markku636/ai-security-monitor-hub
Once the Hub runs, office computers can find it and ask to join; you just click Approve in the Hub, no keys to hand out.
Security Hub + website scan runner
docker/compose.standalone.webscan.yml or docker/compose.webscan.yml
Set the shared scan token and start a webscan configuration, then register and verify your website in Hub. Installing only the desktop app or host agent does not enable website scanning.
Ignore them
asa-*
Only for old asa 0.1.x installs to self-update.
Linux / macOS
Windows (PowerShell)
You can also download the binaries from GitHub Releases. After installing, run ai-security-monitor doctor to check permissions, intel freshness and the Hub connection. To report at boot run ai-security-monitor service install --yes (add --system on servers); in the desktop app, turn on “report in the background after boot” in Settings. Upgrading from the old asa (0.1.x): re-run the install command above, then ai-security-monitor service install --yes; settings, keys and Hub enrollment carry over. Uninstall the old “AI Security Agent” desktop app first.
Run Security Hub
- 1
Get Docker. The Hub image ghcr.io/markku636/ai-security-monitor-hub supports amd64 and arm64 and can be pulled directly.
- 2
Copy .env.example to .env and set AI_SECURITY_MONITOR_HUB_ADMIN_SECRET and AI_SECURITY_MONITOR_HUB_DB_PASSWORD (openssl rand -hex 32 works).
- 3
Standalone: docker/compose.standalone.yml, then open http://127.0.0.1:8088. Server: docker/compose.yml, ideally behind a TLS reverse proxy.
- 4
Sign in with the admin key and open “Add a host”: hand out the one-line install command (no key needed), or let computers use “Find my company’s Hub” → “Ask to join” in the desktop app, then approve them under “Hosts waiting for approval”.
Start the standalone Hub in one go (fill in .env first):
Common commands
Commands that change the system only preview without --yes. Use --lang en for English and --json for scripts.
ai-security-monitor doctorEnvironment check: permissions, intel freshness, external tools, Hub connection.
ai-security-monitor intel updateDownload threat intel; ai-security-monitor watch keeps it fresh afterwards.
ai-security-monitor connections --intelAll current connections and their verdicts.
ai-security-monitor scanFull scan: connections, intel, firewall, ports, events, vulnerabilities, hardening.
ai-security-monitor fw sync-blocklist --dry-runPreview which high-confidence intel IPs would be blocked.
ai-security-monitor ai ask "Is this computer talking to anything dangerous?"Let Claude Code or Codex explain it in plain words.
ai-security-monitor enroll https://hub.example.com --key asa_ek_…Enroll into Security Hub and report on a schedule.
Tech stack
The agent is one binary with no runtime dependencies; Docker brings everything the Hub needs.
License and data sources
Released under the MIT license: commercial use, modification and redistribution are all fine. Threat intel, vulnerability and geo data come from their own providers under their own licenses (DShield is non-commercial, DB-IP requires attribution), and every hit links to its source. Optional scanners have their own licenses: testssl.sh is GPL-2.0, runs as a separate program and includes its license in the image.
Find the issues. Then check the fixes.
Start with one host or a website you are authorized to manage. Gather the findings, make your fixes and scan again to track what changed.
Every tool here is free and open source
No paywall, no sign-up, and the source is public on GitHub. If one of them saved you time, buy me a coffee so the updates and the next tool keep coming.

Deal
Stay online when you work abroad
eSIM 226 is a travel eSIM covering 190+ destinations worldwide: buy the plan before you fly, scan the QR code on landing and you are online. No SIM swap, no roaming bill, and your own number stays in the phone to keep receiving bank SMS. Japan 3GB / 15 days starts around US$3.4, so a short trip never costs a full month. Use TRAVEL30 for 30% off sitewide. Cannot be combined with other promo codes.
- 190+ destinations across Asia, Europe and the Americas
- Instant QR activation, nothing to ship or queue for
- Local rates instead of roaming, no bill shock at home
Affiliate link. Buying through it may earn this site a small commission, at no extra cost to you.

