Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.
Python agentic-aiai-securityalert-triageblue-teamcybersecuritydetection-engineeringincident-responselanggraphllm-agentsmcpmitre-attackmodel-context-protocolpurple-teamsecurity-operationsself-hostedsiemsoarsocthreat-detectionthreat-intelligence
docs: record a real deployment walkthrough, and fix what recording it exposed (#893)
Beenu Arora3d88687e450c
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 4d3457706..6269e1359 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -180,8 +180,81 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0existence only, since a release note naming an older image is describinghistory rather than instructing anybody.+- **`make up` printed an address the operator could not use.** README tells+ anyone deploying to something other than a laptop to set `AISOC_CONSOLE_URL`+ "so the printed address is the one people browse to", and `up` printed a+ hardcoded `http://localhost:3000` regardless. Two lines below it+ `bootstrap` printed the configured address, because it reads the variable —+ so the operator got both, contradicting each other, wrong one first, on the+ one screen where they are being handed a credential and told where to use+ it. On a host reached by its LAN address `localhost` resolves on the+ reader's own machine to something that is not that console. Both `up` and+ `up-full` now derive the line from `.env`, falling back to+ `http://localhost:3000` when it is unset, so a laptop install is unchanged.+ The `API:` line beside it stays on loopback deliberately: that is accurate+ for this host, and a console URL behind a reverse proxy says nothing about+ where the API port ended up, so deriving one from the other would trade a+ wrong address for a guess.++- **`make doctor` reported another deployment's health as yours.** Its port+ section derives each host port from `docker compose port`, so it correctly+ says "aisoc api is published on 18000 (not the default 8000)". Its service+ probes then dialled the canonical port anyway. On a host running a second+ AiSOC project that means probing the other project's containers: observed+ here as `ingest-worker is alive but NOT ready — it cannot reach Kafka`+ while this deployment's own `/readyz` answered 200 with Kafka reachable,+ alongside four services reported healthy that the probe never touched. A+ diagnostic that names the wrong deployment is worse than a vague one,+ because it sends the operator to debug something that is not theirs. The+ probes now default to the port this project actually published, falling+ back to the canonical one when compose cannot answer — so a single-stack+ install is unchanged — and an explicit `AISOC_*_URL` still wins over both.+ `web`, `realtime` and `agents` had no override at all and were purely+ hardcoded; they also read the *host* port where `docker compose port` is+ keyed on the container port, which differs for two of the three.++- **The onboarding hero's screencast card was a dead link wearing a stale+ promise.** It pointed at `/demo.mp4`, a text placeholder, labelled+ "Coming v8.0" — three majors after v8.0 shipped — and described a+ four-case product tour nobody had recorded. It now links the walkthrough+ below, is thumbnailed with a real frame from it rather than a hand-drawn+ SVG that could drift from the content, and describes what the recording+ actually contains. The four-case tour is still unrecorded and its brief+ stays in `apps/web/public/.demo-mp4-placeholder`, now saying so plainly.+### Added+- **A recorded deployment walkthrough, and the written form of it.**+ `apps/web/public/demo/demo.mp4` (2 min 57 s) takes one host from nothing to+ an AI triage verdict: `make up` against the images published on GHCR, the+ console signed into at a LAN address rather than `localhost`, the CISA+ Known Exploited Vulnerabilities feed already populated with no API key, one+ event pushed through the documented ingest path, `make smoke` reporting ten+ stages, and the resulting alert with its measured token counts. README+ embeds `hero.gif`, a 17-second loop cut from the same file — an animated+ image renders inline on GitHub, on mirrors and on package pages, where a+ `<video>` pointing at a repository path does not.++ Everything in it is real: real images, real feed, real alert, real tokens.+ Demo mode was off and nothing was seeded. The event was authored to be+ representative and the recording says so. Terminal waits are shortened,+ disclosed by a badge on screen for the whole of every segment it applies+ to; the browser sections run at real speed. Both triage runs in the+ recording fell back to the deterministic path because the bundled+ 3B model's output failed schema validation, and the closing card states+ that rather than hiding it — the token counts are real because the model+ really was called; what failed was the shape of its reply.++ `apps/docs/docs/deployment/walkthrough.md` is the same path in prose, with+ the detail three minutes has no room for: why `AISOC_CONSOLE_BIND_ADDR` and+ `AISOC_CONSOLE_URL` are separate decisions, that the CISA feed's primary URL+ answers `403` to non-browser clients and the service falls back to a mirror+ (a warning line followed by `CISA KEV IOCs ingested` is the healthy path),+ and how to run a second stack beside an existing one — every service pins a+ `container_name`, so a distinct project name alone is not enough, and+ `make up`'s port pre-flight reads `docker compose port`, which cannot see a+ remap on a host where no container has started yet.+- `scripts/check_published_images.py` — the gate none of the above had. Itresolves every image reference in `docker-compose.yml` and the Helm chartthe way the tooling that reads them does (`${AISOC_VERSION:-latest}` to itsdiff --git a/Makefile b/Makefileindex 1f59ba94e..d094cba01 100644--- a/Makefile+++ b/Makefile@@ -25,6 +25,25 @@ PROFILE ?=# `--profile full` when PROFILE=full, nothing otherwise.PROFILE_ARG := $(if $(PROFILE),--profile $(PROFILE),)+# The address `up` prints for the console. README tells operators deploying+# somewhere that is not a laptop to set AISOC_CONSOLE_URL "so the printed+# address is the one people browse to" — and `up` printed a hardcoded+# http://localhost:3000 regardless, two lines above `bootstrap`, which reads+# the variable and printed the configured address. An operator on a host+# reached by its LAN address got both, the wrong one first, and localhost+# resolves on their machine to something that is not this console.+#+# Recursively expanded on purpose: `up` depends on `env`, which creates .env,+# so this has to be read when the recipe line runs rather than when the+# Makefile is parsed.+#+# Only the console line is derived. `API:` below stays loopback because it is+# accurate as written — the API publishes on 127.0.0.1:8000 of this host — and+# a console URL behind a reverse proxy says nothing about where the API port+# is, so deriving one from the other would trade a wrong address for a guess.+CONSOLE_URL = $(shell sed -n 's/^AISOC_CONSOLE_URL=//p' .env 2>/dev/null | tail -n1 | tr -d '\r')+console_url = $(if $(strip $(CONSOLE_URL)),$(strip $(CONSOLE_URL)),http://localhost:3000)+.PHONY: help install env up up-full down restart status doctor smoke demo logs clean \bootstrap ingest-token test test-unit test-integration test-e2e stats papers \papers-install demo-script@@ -81,7 +100,7 @@ up: env _ports@echo "Waiting for services to become healthy…"@$(MAKE) --no-print-directory _wait@echo ""- @echo " Console: http://localhost:3000"+ @echo " Console: $(console_url)"@echo " API: http://localhost:8000/api/docs"@echo ""@echo "Prove the pipeline works: make smoke"@@ -119,7 +138,7 @@ up-full: env _portsAISOC_LAKE_WRITER_ENABLED=true AISOC_GRAPH_ENABLED=true $(COMPOSE) --profile full up -d@$(MAKE) --no-print-directory _wait PROFILE=full@echo ""- @echo " Console: http://localhost:3000"+ @echo " Console: $(console_url)"@echo " API: http://localhost:8000/api/docs"@echo ""@echo "Prove the pipeline works: make smoke"diff --git a/README.md b/README.mdindex ba33018f6..ecf003a33 100644--- a/README.md+++ b/README.md@@ -27,10 +27,15 @@ recorded, and proposes an action. A human approves before anything executes.## What it looks like running-Real captures from a stack brought up with `make up` and fed through the-ingest API below — no seeded rows, no demo mode, no mockups. The events were-authored to be representative; everything downstream of them is the product-doing its job. ([what is real in each shot](apps/web/public/screenshots/README.md))+<a href="apps/web/public/demo/demo.mp4"><img src="apps/web/public/demo/hero.gif" alt="AiSOC on one host: make up brings the stack up and prints the sign-in address, the console shows real CISA KEV rows, a pushed event becomes an alert, and the cost dashboard reports the tokens triage spent" /></a>++**[Watch the full three minutes](apps/web/public/demo/demo.mp4)** — install to AI+verdict on one server, against the published images. Terminal waits are shortened,+which the recording says on screen. ([step by step](apps/docs/docs/deployment/walkthrough.mdx))++Stills from earlier runs under the same rules — no seeded rows, no demo mode, no+mockups. The events were authored to be representative; everything downstream of+them is the product doing its job. ([what is real](apps/web/public/screenshots/README.md))| | ||---|---|@@ -54,15 +59,13 @@ language model into a named volume; only `make clean` fetches it again.`make up` also creates `.env` and generates the three secrets in it — thecredential-vault key, the session signing key, and the service-to-service-token — then creates an administrator and prints its password. That password-is generated on your machine, shown once, and stored nowhere: copy it before-the terminal scrolls, or mint a new one with-`make bootstrap ARGS=--reset-password`.+token — then creates an administrator and prints its password. That password is+generated on your machine, shown once, and stored nowhere: copy it, or mint a+new one with `make bootstrap ARGS=--reset-password`.-Then **prove it actually works** — this is the part that matters. `make smoke`-posts one real event to the ingest API, follows it through Kafka, detection,-correlation and Postgres, and reads the resulting alert back out of the public-API. Every stage reports PASS or FAIL:+Then **prove it actually works**. `make smoke` posts one real event to the+ingest API, follows it through Kafka, detection, correlation and Postgres, and+reads the alert back out of the public API. Every stage reports PASS or FAIL:```$ make smoke@@ -72,9 +75,9 @@ $ make smoke```Open **http://localhost:3000** and sign in with the credentials `make up`-printed (API docs at **http://localhost:8000/api/docs**). Deploying somewhere-that is not your laptop? Set `AISOC_CONSOLE_URL` in `.env` so the printed-address is the one people browse to. Something wrong? `make doctor`.+printed (API docs at **http://localhost:8000/api/docs**). On a server, set+`AISOC_CONSOLE_URL` in `.env` — `make up` then prints that address rather than+localhost, which is the one people can actually browse to. Stuck? `make doctor`.## Try it without connecting anything@@ -108,8 +111,7 @@ that resolves host, user and source IP from the usual spellings.Ingest normalizes to a common shape and Kafka carries it. Thenfusion runs 833 executable detection rules and decides what becomes an alert,correlation groups related alerts into one incident, an agent investigates and-writes its reasoning to the Investigation Ledger, and a human approves any-response.+writes its reasoning to the Investigation Ledger, and a human approves any response.Both **[docs/architecture/README.md](docs/architecture/README.md)** and the[docs portal](https://beenuar.github.io/AiSOC/docs/architecture) walk that pathdiff --git a/apps/docs/docs/deployment/single-host.md b/apps/docs/docs/deployment/single-host.mdindex 7a9cd45d4..9bee932ad 100644--- a/apps/docs/docs/deployment/single-host.md+++ b/apps/docs/docs/deployment/single-host.md@@ -13,6 +13,11 @@ usual step before moving to Kubernetes.Two things differ from a laptop install, and both are deliberate choices youhave to make rather than defaults you inherit.+If you would rather watch one being done end to end first, the+[deployment walkthrough](./walkthrough.mdx) records exactly this path — console+published on a LAN address, real threat-intel data, an event pushed through to+an AI verdict.+## 1. Publish the consoleEvery host port ships bound to `127.0.0.1`. That is correct for a laptop anddiff --git a/apps/docs/docs/deployment/walkthrough.mdx b/apps/docs/docs/deployment/walkthrough.mdxnew file mode 100644index 000000000..fe51b4671--- /dev/null+++ b/apps/docs/docs/deployment/walkthrough.mdx@@ -0,0 +1,228 @@+---+id: walkthrough+title: Deployment walkthrough+sidebar_label: Walkthrough (video)+---++# From nothing to an AI verdict, on one host++This page is the written form of the walkthrough recorded for the README. It+covers the same ground in the same order, with the detail a three-minute video+has no room for: what each command does, what you should see, and what it means+when you see something else.++import demoVideo from '@site/../web/public/demo/demo.mp4';+import demoPoster from '@site/../web/public/demo/demo-poster.png';++<video controls preload="metadata" poster={demoPoster} style={{width: '100%', borderRadius: '8px'}}>+ <source src={demoVideo} type="video/mp4" />+ Your browser cannot play embedded video —{' '}+ <a href={demoVideo}>download the recording</a> instead.+</video>++Two minutes fifty-seven seconds, no audio. It also ships in the repository at+`apps/web/public/demo/demo.mp4`, so it is there in a clone, offline.++**What is real in the recording.** The stack, the images, the threat feed, the+event, the alert and the token counts are all real. The images came from+`ghcr.io`, not from a local build. Demo mode was off and nothing was seeded. The+event that becomes an alert was *authored* to be representative — everything+downstream of it is the product doing its own work. Terminal waits are+shortened and the recording says so on screen; the browser sections run at real+speed.++## The scenario++A single host that people reach over the network, addressed by something other+than `localhost`. That is the shape most self-hosted deployments take and the+one where the laptop defaults are wrong, so it is worth walking rather than+assuming.++## 1. Configure, in one file++```bash+git clone https://github.com/beenuar/AiSOC && cd AiSOC+cp .env.example .env+```++Copying the template is optional — `make up` creates `.env` if it is missing —+but doing it explicitly lets you set two values before anything starts.++```bash+# .env+AISOC_CONSOLE_BIND_ADDR=0.0.0.0+AISOC_CONSOLE_URL=http://192.0.2.10:3000 # the address people type+```++The first publishes the console beyond loopback. Every host port ships bound to+`127.0.0.1`, which is right for a laptop and useless for a server: the stack+comes up healthy and nothing outside the machine can reach it. The console is+the only port a browser needs — its Next.js server proxies same-origin paths to+the API, the agents service and the realtime gateway over the internal network+— so publishing one port exposes one service and the datastores stay private.++The second decides which address AiSOC *tells* people to use. `make up` and+`make bootstrap` both print it when the administrator is created. Leave it at+the default and a server deployment prints `http://localhost:3000`, which+resolves on the reader's own machine to something that is not your console.++:::caution Put TLS in front before exposing this to a network you do not control+`AISOC_CONSOLE_BIND_ADDR=0.0.0.0` publishes plain HTTP. See+[Single-host deployment](./single-host.md) for the reverse-proxy setup.+:::++## 2. Bring it up++```bash+make up+```++This pulls the published images, starts the fifteen CORE services, waits for+each one that declares a health check, and then creates the first+administrator. On a first run it also downloads the bundled+`llama3.2:3b-instruct-q4_K_M` model — about 2 GB — into a named volume; only+`make clean` makes it fetch again.++`make up` ends with something like:++```+ Console: http://192.0.2.10:3000+ API: http://localhost:8000/api/docs++Prove the pipeline works: make smoke++────────────────────────────────────────────────────────────────+ Administrator created. Sign in at http://192.0.2.10:3000+────────────────────────────────────────────────────────────────+ Email [email protected]+ Password ••••••••••••••••+```++The password is generated on your machine, shown once and stored nowhere. Copy+it, or run `make bootstrap ARGS=--reset-password` to mint another. The `API:`+line stays on loopback deliberately: that is where the API publishes on this+host, and a console URL behind a reverse proxy tells you nothing about where+the API port ended up.++If the stack does not come up, `make doctor` checks host tools, memory and disk+inside the Docker VM, every port, and each datastore by querying it rather than+by asking whether its container is running.++## 3. Sign in, and look at what is honestly empty++Open the console at the address it printed. Most of it has nothing in it,+because nothing has been connected yet, and it says so rather than filling the+space — "No entities are currently being tracked", zeroes that are really+zeroes.++One page is different. **Threat Intel** shows roughly 1,700 rows within a+minute or two of boot, each tagged `cisa-kev`: the+[CISA Known Exploited Vulnerabilities](https://www.cisa.gov/known-exploited-vulnerabilities-catalog)+catalog, which is public, authoritative and needs no API key. It is the one+thing in a fresh install that is neither synthetic nor yours.++:::note The feed has a fallback, and you will see it in the logs+The catalog's primary URL on `cisa.gov` answers `403 Forbidden` to+non-browser clients. The service logs that at `warning` and fetches the same+catalog from the `cisagov/kev-data` mirror, which is what the count comes from.+A warning line followed by `CISA KEV IOCs ingested` is the healthy path, not a+failure.+:::++## 4. Send it one real event++Ingest is authenticated, and the credential carries its own tenant — the+request body never names one, and no header is trusted to.++```bash+export AISOC_INGEST_TOKEN=$(make -s ingest-token ARGS=--quiet | tail -1)++curl -X POST http://localhost:8081/v1/ingest/batch \+ -H 'Content-Type: application/json' \+ -H "Authorization: Bearer $AISOC_INGEST_TOKEN" \+ -d '{"connector_id":"edr-1","connector_type":"crowdstrike","source_format":"json",+ "events":[{"severity":"high","title":"Encoded PowerShell from Office",+ "host":"WIN-FIN-01","process_name":"powershell.exe",+ "user":"j.reyes","src_ip":"203.0.113.44"}]}'+```++A successful push answers `{"accepted":1,"rejected":0,"request_id":"…"}`. The+event is normalized to a common shape, published to Kafka, evaluated against+the executable detection corpus, correlated, and written to Postgres as an+alert — in about a second on an idle stack.++Then run the built-in proof:++```bash+make smoke+```++It pushes its own event and follows it the whole way, reporting **ten** stages+as PASS or FAIL — including that an *unauthenticated* push is refused, that+severity survives normalization, that source attribution is not duplicated, and+that the description is prose rather than a serialized payload. A clean run+ends `PASS: 10/10 stages`.++## 5. The alert, and what answered it++The alert appears in the queue attributed to the connector that fed it. Opening+it gives you the confidence score with its contributing factors named and+weighted, the entities involved, and the verdict triage reached.++Triage runs automatically on every fused alert. It is a real model call: the+**Cost Dashboard** reports measured prompt and completion tokens against the+resolved model name, and the per-run record carries the same figures.++:::warning The bundled model is small, and it shows+`llama3.2:3b-instruct-q4_K_M` is chosen to run on CPU in 8 GB of RAM, not to be+accurate. It returns schema-valid triage JSON a minority of the time — in one+measured run, 7 of 19. When validation fails, triage falls back to a+deterministic path and **labels which one answered**: the run's `model_used`+reads `kafka:auto_triage:deterministic` rather than naming a model. Both runs+in the recorded walkthrough took that fallback. The token counts are still+real, because the model really was called; what failed was the shape of its+reply. Set `OPENAI_API_KEY` with `AISOC_LLM_MODEL_FAST` / `AISOC_LLM_MODEL_DEEP`+to route to a hosted model instead.+:::++Measured spend reads `$0.00` because the model runs beside the stack and costs+nothing per call. That is a real zero, not an unmeasured one — the dashboard+distinguishes the two and never shows an unpriced call as free.++## Running a second stack on the same host++Every service in `docker-compose.yml` pins a `container_name`, so a distinct+`COMPOSE_PROJECT_NAME` alone is not enough to run two stacks side by side. You+need a `docker-compose.override.yml` that overrides both the names and the host+ports:++```yaml+services:+ web:+ container_name: other-web+ ports: !override+ - "0.0.0.0:13000:3000"+```++`ports: !override` matters: a plain override *appends*, leaving the original+binding in place and the conflict unresolved. Note also that `make up`'s port+pre-flight reads `docker compose port`, which only knows about containers that+already exist — on a cold start it cannot see a remap that has not run yet and+will report the default port as taken. Start that stack with+`docker compose up -d` once and `make up` works normally from then on.++## Reproducing the recording++The walkthrough was recorded from a real session, not reconstructed:++- Terminal segments were captured with `asciinema` in a real PTY and rendered+ with `agg`. The commands genuinely ran; the only edit is that idle gaps are+ capped, which the on-screen badge discloses.+- Browser segments are Playwright screen recordings of the live console at the+ host's LAN address, at real speed.+- The generated administrator password was filtered out of the terminal stream+ as it was printed, and the browser only ever shows a masked password field.++Assets live in `apps/web/public/demo/`: `demo.mp4` (the full recording),+`hero.gif` (the README preview loop, cut from the same file) and+`demo-poster.png`.diff --git a/apps/docs/sidebars.ts b/apps/docs/sidebars.tsindex 2d95f6553..019d01430 100644--- a/apps/docs/sidebars.ts+++ b/apps/docs/sidebars.ts@@ -229,6 +229,7 @@ const sidebars: SidebarsConfig = {label: "Deployment",items: ["deployment/docker",+ "deployment/walkthrough","deployment/single-host","deployment/kubernetes","deployment/gcp",diff --git a/apps/web/public/.demo-mp4-placeholder b/apps/web/public/.demo-mp4-placeholderindex 95ce154fb..d7c305881 100644--- a/apps/web/public/.demo-mp4-placeholder+++ b/apps/web/public/.demo-mp4-placeholder@@ -1,20 +1,25 @@-Replace with the 90-second AiSOC screencast (`demo.mp4`) before the v8.0-launch. The landing-page hero (`apps/web/src/components/onboarding/StartHero.tsx`)-links its thumbnail at `/demo.mp4`; until the real file is dropped in here,-the thumbnail is decorative and the screencast section reads as-"Coming with the v8.0 launch".+This slot is for a *second*, different video and is still empty.-Source-of-truth screencast brief:-* 90 seconds, recorded against `pnpm aisoc:demo --quick` (the deterministic- 4-case path — DEMO-001 phishing, DEMO-002 cloud takeover, DEMO-003 insider- exfil, DEMO-004 ransomware). See `services/api/app/scripts/seed_demo.py`.-* Opens on the AiSOC console at `/cases?status=in_progress`, then lands on- DEMO-004 (LockBit ransomware) — the case `pnpm aisoc:demo --quick` deeplinks.-* H.264 / 1280x720 / ≤ 8 MB so the asset stays inside GitHub's 100 MB- per-file ceiling and inside Cloudflare R2's free egress.-* Encode with the same poster as `demo-thumbnail.svg` (1280x720) so the- hero card doesn't reflow when the video lands.+What now EXISTS is the deployment walkthrough at `demo/demo.mp4` — install to+AI verdict on one host, 2 min 57 s. It is what `StartHero.tsx` links and what+the README embeds a preview of. See `demo/README.md` for what is real in it.-Do NOT commit a placeholder binary in place of this file — empty `.mp4`-artefacts get reported as "corrupt" by GitHub and break the OG card-preview. The text placeholder keeps the slot honest.+What does NOT exist is the product tour this file was originally written for:+a short pass over the four seeded demo cases. Its brief, unchanged:++* Recorded against `pnpm aisoc:demo --quick` (the deterministic 4-case path —+ 10| DEMO-001 phishing, DEMO-002 cloud takeover, DEMO-003 insider exfil,+ DEMO-004 ransomware). See `services/api/app/scripts/seed_demo.py`.+* Opens on the console at `/cases?status=in_progress`, then lands on DEMO-004,+ the case `pnpm aisoc:demo --quick` deeplinks to.+* H.264 / 1280x720 / <= 8 MB, so the asset stays inside GitHub's 100 MB+ per-file ceiling and inside the CDN's free egress.+* That tour is of SEEDED SYNTHETIC data and must say so on screen. The+ deployment walkthrough deliberately uses none.++If you record it, land it at `demo/tour.mp4` rather than here, next to the+ 20|walkthrough, and add a row to `demo/README.md`.++Do NOT commit a placeholder binary in place of a real one — empty `.mp4`+artefacts get reported as "corrupt" by GitHub and break the OG card preview.+A text placeholder keeps the slot honest.diff --git a/apps/web/public/demo/README.md b/apps/web/public/demo/README.mdindex 2b8e80811..5f6438cc3 100644--- a/apps/web/public/demo/README.md+++ b/apps/web/public/demo/README.md@@ -1,43 +1,57 @@# `apps/web/public/demo/` — screencast assets-This directory is the **canonical home** for the 90-second AiSOC product-screencast and its accompanying poster/GIF. The marketing landing page,-documentation, and several READMEs link to file paths under this-directory; treat the paths below as a stable contract.+This directory is the **canonical home** for the AiSOC walkthrough recording+and the preview loop cut from it. The README, the documentation portal and the+onboarding hero link to the paths below; treat them as a stable contract.-| Asset | Purpose | Source |+| Asset | What it is | Size ||---|---|---|-| `demo.mp4` | 90 s product walkthrough, 1280×720, H.264 + AAC, ≤ 8 MB | recorded by [`.github/workflows/screencast.yml`](../../../../.github/workflows/screencast.yml) following [`docs/demo/SCREENCAST_SHOTLIST.md`](../../../../docs/demo/SCREENCAST_SHOTLIST.md) |-| `demo-poster.png` | 1280×720 poster frame for the `<video>` tag | captured by [`apps/web/e2e/demo/screencast.spec.ts`](../../e2e/demo/screencast.spec.ts) at the cover frame |-| `hero.gif` | README hero loop (≤ 10 s, ≤ 5 MB) | rendered from `demo.mp4` by `scripts/aisoc-demo.ts --record --gif` (lands in Phase 2 of the GitHub on-ramp fix) |--## Why the files are not committed yet--The screencast workflow runs **manually** (`workflow_dispatch`) and-uploads the rendered `.mp4` + poster as **release assets**, not into-this directory. Until the v8.0 launch cut ships, this directory is-empty (`.gitkeep` only) so:--- The placement contract above is documented and discoverable.-- The marketing-site hero (`apps/web/src/components/onboarding/StartHero.tsx`)- can ship a graceful fallback when the asset is missing.-- Nothing in the repo lies about the asset being available.--The text-only stub at [`apps/web/public/.demo-mp4-placeholder`](../.demo-mp4-placeholder)-captures the recording brief and the do/don't rules for whoever picks-up the recording. Read it before you commit a real `demo.mp4` to this-directory.--## After the screencast ships--When the next maintainer cuts the v8.0 launch screencast:--1. Run the `90s demo screencast (record)` workflow from the Actions- tab with `release_tag=v8.0.0`.-2. Download the workflow's `screencast-<sha>` artefact.-3. Copy `demo.mp4` and `demo-poster.png` into this directory.-4. Run `pnpm aisoc:demo --record --gif` (lands in Phase 2) to render- `hero.gif` from the `.mp4`.-5. Open a PR with all three files; the file-size guard in- [`.github/workflows/ci.yml`](../../../../.github/workflows/ci.yml)- will fail the build if any individual asset exceeds its budget.+| `demo.mp4` | The deployment walkthrough — 2 min 57 s, 1280×720, H.264, no audio | ~1.6 MB |+| `hero.gif` | README preview loop, 17 s, 860×484, cut from `demo.mp4` | ~1.2 MB |+| `demo-poster.png` | 1280×720 still from the recording, used as a thumbnail | ~0.3 MB |++## What the recording shows, and what is real in it++A single host reached by its LAN address rather than `localhost`, taken from+nothing to an AI triage verdict: `make up`, the console signed into, the CISA+Known Exploited Vulnerabilities feed already populated, one event pushed+through the documented ingest path, `make smoke` reporting ten stages, and the+resulting alert with its measured token counts.++The stack, the images (pulled from `ghcr.io`, not built locally), the threat+feed, the alert and the token counts are real. Demo mode was off and nothing+was seeded. The event was **authored to be representative** — everything+downstream of it is the product's own work. Terminal waits are shortened,+disclosed by an on-screen badge for the whole of every segment it applies to;+browser sections run at real speed.++The bundled local model returns schema-valid triage JSON a minority of the+time. In this recording both triage runs fell back to the deterministic path,+which the console labels (`model_used` reads `kafka:auto_triage:deterministic`).+That is the honest common case and the closing card says so.++## How it was produced++- **Terminal** — `asciinema` recording a real PTY, rendered with `agg`. The+ commands genuinely ran; the only edit is capping idle gaps.+- **Browser** — Playwright screen recordings of the live console.+- **Assembly** — `ffmpeg`, concatenating the segments with title cards+ rasterised in a browser (this `ffmpeg` build has no `drawtext` filter).+- **Secrets** — the generated administrator password was filtered out of the+ terminal stream as it was printed (`sed` in the recorded pipeline, visible in+ the recording), the ingest token was only ever held in a shell variable, and+ the browser shows nothing but a masked password field.++## Re-recording++There is no unattended job that regenerates these. `.github/workflows/screencast.yml`+records a different, older product tour of a *deployed* instance+(`apps/web/e2e/demo/screencast.spec.ts`) and uploads it as a workflow artefact;+it does not write into this directory. Re-recording the deployment walkthrough+means driving a real deployment again — the written form of every step is in+[`apps/docs/docs/deployment/walkthrough.md`](../../../docs/docs/deployment/walkthrough.md),+including the recording method, so it can be reproduced rather than guessed at.++Keep the budget in mind if you replace them: these files are committed, so+every byte is cloned by everybody. `demo.mp4` under 8 MB and `hero.gif` under+5 MB are the ceilings; the current files are well inside both.diff --git a/apps/web/public/demo/demo-poster.png b/apps/web/public/demo/demo-poster.pngnew file mode 100644index 000000000..6533bb111Binary files /dev/null and b/apps/web/public/demo/demo-poster.png differdiff --git a/apps/web/public/demo/demo.mp4 b/apps/web/public/demo/demo.mp4new file mode 100644index 000000000..11b3a61dbBinary files /dev/null and b/apps/web/public/demo/demo.mp4 differdiff --git a/apps/web/public/demo/hero.gif b/apps/web/public/demo/hero.gifnew file mode 100644index 000000000..795e24599Binary files /dev/null and b/apps/web/public/demo/hero.gif differdiff --git a/apps/web/src/components/onboarding/StartHero.tsx b/apps/web/src/components/onboarding/StartHero.tsxindex d720a28fe..b61f9b7e0 100644--- a/apps/web/src/components/onboarding/StartHero.tsx+++ b/apps/web/src/components/onboarding/StartHero.tsx@@ -216,41 +216,40 @@ export function StartHero() {* Small screencast preview card linked from the onboarding hero (T6.4).** Rendered immediately below the three CTAs so it doesn't compete with the- * primary "Try the demo" path. The thumbnail comes from- * `apps/web/public/demo-thumbnail.svg` (1280x720, brand-aligned, see SVG- * comments). The link itself points at `/demo.mp4`, which is a placeholder- * until the screencast is actually recorded for the v8.0 launch — the- * surrounding copy is intentionally honest about that so a buyer who clicks- * before launch doesn't feel cheated.+ * primary "Try the demo" path.*- * Why an `<a>` to /demo.mp4 instead of an inline `<video>`?- * - The placeholder file (`apps/web/public/.demo-mp4-placeholder`) is a- * text file, not a playable .mp4. Embedding `<video>` would render a- * broken player. A plain link lets the browser do the right thing- * (download dialog for self-hosters, autoplay for buyers once the real- * file lands).- * - Keeps the bundle clean — no media controls polyfill, no autoplay- * mute-gate, no `<track>` captions plumbing yet. We add that the day- * the screencast actually ships.+ * This card used to link `/demo.mp4`, a text placeholder, under the label+ * "Coming v8.0" — a 404 wearing a promise that went stale three majors+ * before anyone noticed, on a surface the "no dead controls" rule covers.+ * It now points at the recording that exists: the deployment walkthrough at+ * `/demo/demo.mp4`, described in `apps/web/public/demo/README.md`. The copy+ * describes that recording rather than the four-case product tour, which is+ * still unrecorded (brief in `apps/web/public/.demo-mp4-placeholder`).+ *+ * Why an `<a>` rather than an inline `<video>`? It keeps the bundle free of+ * media controls, autoplay mute-gating and caption plumbing on a card that+ * is deliberately secondary to the three CTAs above it. The thumbnail is a+ * real frame from the recording, so it cannot drift from the content the+ * way the hand-drawn SVG it replaced had.*/function DemoScreencast() {return (<aside- aria-label="AiSOC 90-second product demo"+ aria-label="AiSOC deployment walkthrough"className="mt-8 overflow-hidden rounded-2xl border border-white/10 bg-white/[0.03]"><a- href="/demo.mp4"+ href="/demo/demo.mp4"className="group flex flex-col items-stretch gap-4 p-4 transition hover:bg-white/[0.05] sm:flex-row sm:items-center sm:gap-5 sm:p-5"data-testid="demo-screencast">- {/* Thumbnail. <img> rather than next/image so the SVG ships as-is+ {/* Thumbnail. <img> rather than next/image so the frame ships as-iswithout going through the image optimizer. */}<span className="relative block w-full overflow-hidden rounded-lg border border-white/10 sm:w-56 sm:flex-none">{/* eslint-disable-next-line @next/next/no-img-element */}<img- src="/demo-thumbnail.svg"- alt="AiSOC 90-second product demo thumbnail showing the four canonical cases (phishing, cloud takeover, insider exfil, ransomware)"+ src="/demo/demo-poster.png"+ alt="A frame from the walkthrough: make up finishing, reporting every service healthy and printing the address to sign in at"width={1280}height={720}className="block h-auto w-full"@@ -261,18 +260,19 @@ function DemoScreencast() {<span className="flex flex-1 flex-col gap-1"><span className="inline-flex items-center gap-2 text-[11px] font-semibold uppercase tracking-wider text-brand-300">- <span aria-hidden="true">▶</span> Watch the demo- <span className="ml-2 rounded-full border border-amber-400/40 bg-amber-500/10 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wider text-amber-200">- Coming v8.0+ <span aria-hidden="true">▶</span> Watch the walkthrough+ <span className="ml-2 rounded-full border border-white/15 bg-white/5 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wider text-gray-300">+ 2 min 57 s</span></span><span className="text-base font-semibold text-white">- 4 cases in 4 minutes+ One host, install to AI verdict</span><span className="text-xs leading-relaxed text-gray-400">- 90-second walkthrough of <span className="font-mono">pnpm aisoc:demo --quick</span>:- phishing, cloud takeover, insider exfil, and a LockBit ransomware- response — every alert deterministic, every action audited.+ <span className="font-mono">make up</span> against the published images,+ real CISA KEV data, one event pushed through to an alert and a triage+ verdict with its token count. Nothing seeded; terminal waits shortened+ and labelled.</span></span></a>diff --git a/scripts/doctor.sh b/scripts/doctor.shindex 4caa713c7..5e20456a6 100755--- a/scripts/doctor.sh+++ b/scripts/doctor.sh@@ -183,6 +183,25 @@ svc_published_port() {printf '%s' "${_sp_mapped##*:}"}+# Base URL for one of this deployment's own services, on whatever host port it+# actually published.+#+# The port section below already derives that from `docker compose port`. The+# service probes did not: they dialled the canonical port, so on a host running+# a second AiSOC project they reported the *other* deployment's health as this+# one's. Observed here — a remapped stack was told "ingest-worker is alive but+# NOT ready, it cannot reach Kafka" while its own /readyz answered 200 with+# kafka reachable, and four services were reported healthy that the probe never+# touched. A diagnostic that names the wrong deployment is worse than a vague+# one: it sends the operator to debug something that is not theirs.+#+# Falls back to the canonical port when compose cannot answer (nothing started+# yet), and an explicit AISOC_*_URL still wins over both.+svc_base_url() { # <service> <container-port> <fallback-url>+ _bu_port="$(svc_published_port "$1" "$2" || true)"+ if [ -n "${_bu_port:-}" ]; then printf 'http://localhost:%s' "$_bu_port"; else printf '%s' "$3"; fi+}+# host-port service container-portfor spec in "5432 postgres 5432" "6379 redis 6379" "9092 kafka 9092" \"8000 api 8000" "8081 ingest-worker 8080" "3000 web 3000"; do@@ -361,17 +380,20 @@ check_http_service() {esac}-check_http_service api "${AISOC_API_URL:-http://localhost:8000}/health" "docker compose logs api | tail -40"-check_http_service ingest-worker "${AISOC_INGEST_URL:-http://localhost:8081}/health" "docker compose logs ingest-worker | tail -40"+API_BASE="${AISOC_API_URL:-$(svc_base_url api 8000 http://localhost:8000)}"+INGEST_BASE="${AISOC_INGEST_URL:-$(svc_base_url ingest-worker 8080 http://localhost:8081)}"++check_http_service api "${API_BASE}/health" "docker compose logs api | tail -40"+check_http_service ingest-worker "${INGEST_BASE}/health" "docker compose logs ingest-worker | tail -40"# Liveness says the process is up. Readiness says it can do its job. For# ingest the difference is Kafka: without it every accepted event is dropped# while /health keeps answering 200.if svc_running ingest-worker; then- ready_code="$(http_ok "${AISOC_INGEST_URL:-http://localhost:8081}/readyz" 8)"+ ready_code="$(http_ok "${INGEST_BASE}/readyz" 8)"case "$ready_code" in200) pass "ingest-worker ready (kafka reachable)" ;;- 503) fail "ingest-worker is alive but NOT ready — it cannot reach Kafka, so ingested events are dropped" "curl -s ${AISOC_INGEST_URL:-http://localhost:8081}/readyz # prints the reason" ;;+ 503) fail "ingest-worker is alive but NOT ready — it cannot reach Kafka, so ingested events are dropped" "curl -s ${INGEST_BASE}/readyz # prints the reason" ;;404) warn "ingest-worker has no /readyz — running an image older than v8.2" "docker compose build ingest-worker && docker compose up -d ingest-worker" ;;*) warn "ingest-worker /readyz returned $ready_code" "docker compose logs ingest-worker | tail -30" ;;esac@@ -383,7 +405,7 @@ if svc_running fusion; then# Probe the service rather than grepping its log. A log line scrolls out of# retention and a restart loses it, so log-grep reported a working fusion as# broken. The HTTP probe answers the same question durably.- fusion_code="$(http_ok "${AISOC_FUSION_URL:-http://localhost:8003}/health" 6)"+ fusion_code="$(http_ok "${AISOC_FUSION_URL:-$(svc_base_url fusion 8003 http://localhost:8003)}/health" 6)"if [ "$fusion_code" = "200" ]; thenpass "fusion healthy"elif $COMPOSE logs fusion 2>/dev/null | grep -q 'Fusion worker started'; then@@ -398,12 +420,18 @@ elsefail "fusion is not running — events will never become alerts" "docker compose up -d fusion"fi-for spec in "web 3000 /" "realtime 8086 /health" "agents 8001 /health"; do- set -- $spec; name="$1"; port="$2"; path="$3"+# host-port service container-port path. The container port is what+# `docker compose port` is keyed on, and it differs from the host port for+# realtime (4000) and agents (8084) — reading the host port for both is how+# these three ended up probing another project's containers.+for spec in "3000 web 3000 /" "8086 realtime 4000 /health" "8001 agents 8084 /health"; do+ # shellcheck disable=SC2086 # deliberate word splitting of a fixed 4-field spec+ set -- $spec; port="$1"; name="$2"; cport="$3"; path="$4"if svc_running "$name"; then- code="$(http_ok "http://localhost:${port}${path}" 6)"+ base="$(svc_base_url "$name" "$cport" "http://localhost:${port}")"+ code="$(http_ok "${base}${path}" 6)"if [ "$code" = "200" ] || [ "$code" = "204" ]; then pass "$name healthy"- else warn "$name is running but http://localhost:${port}${path} returned $code" "docker compose logs $name | tail -30"; fi+ else warn "$name is running but ${base}${path} returned $code" "docker compose logs $name | tail -30"; fielsewarn "$name is not running" "docker compose up -d $name"fi