Commit Graph
3 Commits
Author SHA1 Message Date
Beenu Arora c95d05fab2 fix(trust): publish the CORE service count the compose file actually starts (#927)
ADR-0007 moved connectors and actions into CORE, taking it from 14
long-running services to 16. Five surfaces kept saying 14, including
the landing page and the FAQ, so the wrong number was the one a reader
met first.

check_profile_service_counts.py exists for this and could not see
them: it validated ten hardcoded sites against docker-compose.yml and
never asked the tree whether anything else published the figure. It
reported ten figures agreeing while five disagreed.

The exact list stays, since guessing which integers are claims would
flag prose forever. The missing half was the other direction, so the
gate now fails on any service count it is not already validating
unless it is exempted on purpose. Proven against the pre-fix tree,
where it names all five.

Signed-off-by: Beenu Arora <beenu.a.arora@gmail.com>
2026-09-27 07:10:29 -07:00
Beenu AroraandBeenu Arora b2b6c87cbb Real screenshots, an architecture doc that follows one event, and the first run that said it was broken (#882)
`make up` could not succeed on any machine. Its wait loop scored any container
in state `exited` as broken, and `ollama-pull` is a one-shot that fetches the
model and exits 0 — `litellm` waits on `service_completed_successfully`, so by
the time `docker compose up -d` returns the puller has always exited. The
documented command ended in "These services are not running: ollama-pull"
against a completely healthy stack.

Bringing the stack up from the documented path to photograph it surfaced four
more defects, each visible within minutes of a first run and invisible to the
test suite:

* Four of the ten shipped ingest profiles rendered their vendor twice — "Okta
  Okta System Log", "Splunk Splunk Enterprise" — because the vendor/product
  join deduplicated on exact equality only.
* The Threat Intelligence page published its page length as the size of the
  catalogue: 1,725 collected, API answering 400, console showing 100.
* "Added Today" on that page was the literal 3, hard-coded, on every
  deployment including ones that had never ingested an indicator.
* Nothing in the console rendered the AI verdict at all. The triage agent
  writes ai_score, ai_summary and triage_groundedness back onto the row and
  normalizeAlert dropped all three.

The 24MB screenshots/ tree was a marketing redesign of an older product and the
four console tiles were SVG placeholders. Both are replaced by 16 captures
(844KB) of a CORE stack brought up with `make up`, fed through the documented
ingest API, holding 1,725 real CISA KEV entries and a real local-model verdict.
None was taken in demo mode, and the manifest beside them says what is real in
each and what was authored.

apps/docs/docs/architecture.md is now organised around what happens when AiSOC
receives one security event, in eleven numbered steps, instead of the component
inventory it was. All 31 source links were checked to resolve.

Figures re-read from the tree rather than carried forward: CORE is 14
long-running services plus a one-shot model pull, full is 22, the playbook
palette offers 21 of the engine's 22 step types, and row-level security is live
on 83 tables under 84 policies with the runtime role holding no DDL. The
bundled 3B model returned schema-valid triage output 7 times in a measured run
of 19; the other 12 fell back and said so, and both numbers are published.

Co-authored-by: Beenu Arora <beenu@MacBook-Pro-3.local>
2026-09-25 13:04:51 -07:00
60117ec0d5 Make the quick start run the real pipeline, and prove it (#726)
* Make the quick start run the real pipeline, and prove it

The recurring feedback - hard to install, fabricated data, unverifiable
architecture - has one root cause. The documented quick start never ran the
product.

./install.sh handed off to a nine-service compose file with no ingest
service, no fusion service, and AISOC_DISABLE_KAFKA: true. Its only content
came from seed_demo.py writing 15 fabricated incidents straight into
Postgres. A user followed the README, saw a populated console, and concluded
the platform worked - having never run the platform. The installer then
printed "AiSOC is up and running" purely because the compose command exited
0.

VERIFIED, NOT ASSERTED

Everything below was exercised against a live stack on arm64, not inferred.
The core pipeline does work: a real event posted to the ingest API traverses
Kafka, fusion, detection and promotion, lands in Postgres, and comes back out
of the public API. Running it surfaced four defects that reading the code did
not:

- alerts were labelled "crowdstrike crowdstrike" - vendor and product joined
  without dedup, in two copies of the same helper, so fixing one left the
  other. Now one shared implementation.
- the alert description was str(raw_data): the console showed
  {"command_line": "powershell.exe -nop ... where a sentence belongs, and the
  vendor's own description was discarded.
- Kafka reported healthy while refusing every request. The Docker VM had run
  out of disk, Kafka could not write meta.properties, and the compose
  healthcheck passed throughout. Three symptoms, none naming the cause.
- CrowdStrike has no normalizer profile and falls through to the generic one.

ONE ARCHITECTURE, THREE PROFILES

CORE is now the default: 10 services, ~6GB, and it is the smallest
deployment that takes a real event and produces a real alert. ClickHouse,
Neo4j, Qdrant, OpenSearch, enrichment and connectors move to `full`. Both
heavy dependencies were already env-gated; nothing needed to be weakened.
Fixed on the way: fusion defaulted its enrichment URL to localhost:8082 -
itself - and swallowed the failure at DEBUG, and fusion had no depends_on for
postgres.

OpenSearch is started by `full` and read by nothing. It is recorded as unused
rather than drawn into a diagram as though it were part of the design.

THE CLAIM IS NOW ONE COMMAND

make smoke posts one event and follows it through the real spine, reaching
past nothing. Eight stages, each PASS/FAIL separately so a break names the
boundary. CI runs it on every PR - and then stops fusion and asserts it
FAILS, because a gate nobody has seen fail is a gate nobody knows works.

FABRICATED DATA

Five sites returned invented security data to authenticated users with no
demo gate: three MSSP endpoints ("Acme Corp, health 92.4"), the copilot catch
block (an invented investigation with fake citations), airgap readiness
reporting passed: True for checks that measured nothing, and a settings page
showing "Sasha Lin" as the signed-in user. All gated or corrected.

Provenance is a column now, not a convention: migration 054 adds
is_synthetic / synthetic_source / synthetic_scenario, defaulting to not-
synthetic so the real pipeline can never be mislabelled. seed_demo.py also
had no guard at all - it now refuses outside development unless
AISOC_ALLOW_SEED=1.

Figures come from scripts/project_stats.py and are checked against the README
in CI, so 84 connectors and 833 executable rules cannot drift. It reports the
833 the engine loads alongside the 7016 files on disk, because those two
numbers have been published interchangeably before.

Docs: README rewritten for adoption; docs/architecture/README.md walks one
event through the system with every box linked to code;
docs/audit/REPOSITORY_REALITY.md states what works, what is broken (UEBA
consumes a topic nothing produces) and what could not be verified;
docs/testing/CLEAN_INSTALL.md records the real run including what went wrong.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: four CI failures from the audit change

- shellcheck SC2034: SMOKE_PASSED was assigned and never read. The function
  already exits non-zero on failure, so the flag added nothing. Removed
  rather than exported.

- The connector-count gate requires the literal phrase "**84 click-and-connect
  data connectors**" in README.md, and the rewrite dropped it. Restored, and
  the figure is the one scripts/project_stats.py reports.

- Two README links 404'd against the published docs site: there is no
  detections/authoring or playbooks/overview page. Pointed at the pages that
  exist (detections/hello-hunt, plugins/hello-plugin, plugins/lifecycle).
  Checked against apps/docs/docs/ rather than guessed a second time.

- docs/openapi.yaml did not carry the corrected MSSP endpoint descriptions,
  which now state that those rollups are unimplemented and return zeros
  outside demo mode. Regenerated.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(ci): the full-profile flags have to travel with the profile

Moving ClickHouse behind the `full` profile broke the event-spine
integration job, which boots the stack and then asserts the ClickHouse lake
was populated. With the lake writer defaulting off in CORE, it never was:

  ##[error]ClickHouse lake was never populated from the raw-events stream

That job verifies the full architecture, so it now boots `--profile full`
and sets the two flags whose target stores only exist there. `make up-full`
sets the same pair, and the architecture doc shows the same command — so the
documented, tested and scripted spellings cannot drift apart.

The alternative, defaulting the lake writer on in CORE, would have meant
every minimal deployment retrying forever against a ClickHouse host that is
deliberately not running.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Beenu Arora <beenu@MacBook-Pro-3.local>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 11:02:50 -07:00