mirror of
https://github.com/beenuar/AiSOC.git
synced 2026-12-03 19:32:34 +08:00
f4cea19023c331c052d1585e45ec76cc4f7fcab7
10
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
8a5f68a0e1 |
feat(ai-security): session sequences, runaway sessions, refused assets, MCP drift, shadow AI and prompt classes (WS5) (#2009)
## What
WS5 of the gap-closure program: AI security at runtime. Six items; every
detection goes through the real loader + engine, every store truth
through live Postgres, and the SDK's standing privacy claim stays
exactly true.
## WS5.1 — Session-scoped sequences
`wd-ai-session-untrusted-then-secret-then-egress`: inside ONE session,
an injection/guardrail finding → a prompt the SDK's local scanner
flagged as secret-bearing → an egress-capable tool call = one HIGH
finding, grouped by `session_id`, ordered, 1h window. **The negative
fixture the brief names is pinned**: the same three events across two
sessions do NOT fire — the session is the claim. `TestTemplateCoupling`
reads the committed ai ingest templates and fails **by name** on any
rule field they stop mapping — the drift gate against the recorded
aspirational-rule defect.
## WS5.2 — Runaway sessions
`wd-ai-session-tool-call-flood` (per-session rate; two calm sessions do
not sum) and `wd-ai-identical-prompt-repetition` — **`redaction.py`
hashes every prompt "precisely so detection can ask: the same prompt
fifty times?" and nothing consumed the hash until now**. Grouped by the
hash itself; the rule's name states the cross-session scoping out loud.
Duration/token-burn deliberately stays with the existing spend-anomaly
baselines (a second rule would be a second answer to the same question).
## WS5.3 — Refused assets: the defect fix and the doorbell
**The defect, exactly as Phase 0 recorded it**: the recorder's upsert
set `risk_score = EXCLUDED.risk_score` unconditionally while `_score()`
treats `sanctioned` as always-None by design — so re-observing a REFUSED
asset silently downgraded `ai_inventory`'s +30 "Reviewed and refused,
and still running" to "Not declared". The scorer-parity suite only
exercised `sanctioned=None`, which is why the failing test had to be
**live**: the overwrite was the SQL's behaviour. The fix is the upsert's
own CASE — a judged asset's score is owned by the sanction route
(refused AND approved alike; a judgement is a judgement), an unjudged
one keeps the recorder's fresher score. Proven both ways on real
Postgres.
And the alert half: a refused asset observed again now **raises a HIGH
triage alert citing the sanction decision** — `drain_refused()` on the
recorder, one notice per flush, raised through the ordinary fusion path
(`_fuse_and_persist`), with fusion's own dedup bounding a chatty agent.
Containment stays a governed playbook step; this is the doorbell.
## WS5.4 — MCP manifest drift and tool poisoning
The SDK gains `mcp_manifest(server, tools)`: tool **names + description
SHA-256s + annotations, hashed in the customer's process** — description
text never ships; at most one ≤80-char snippet travels, and only for a
description that already tripped an instruction pattern (the pattern
list mirrors the concerns of the platform guard
`services/agents/app/mcp/untrusted.py`, which stays the canonical
defence). The recorder versions manifests per (tenant, server) —
migration 176, same-content touches, changed-content versions — and
drift becomes a triage alert naming what moved: `description_drift`,
`new_state_changing_tool` (a read-only server growing `delete_repo` is
the poisoning shape), `instruction_shaped_description` (HIGH — that one
is the answer, not the question).
## WS5.5 — Shadow AI from network telemetry
A shipped catalog (`ai_app_catalog.json`) whose **every row is a
vendor's own documented product domain, with per-row provenance** and a
stated limitation up top. SWG/DNS events (zscaler, netskope,
cisco_umbrella, cloudflare_zt) matching it become AI-estate sightings
from a `network` source whose attributes state `cannot_see_prompts:
true` outright. A refused catalog app re-observed now composes with
WS5.3's alert automatically. **Refused with a recorded reason**: the
upload-volume-to-unsanctioned-apps detection — no SWG connector
currently maps a bytes field into the engine's namespace, so the rule
would have been aspirational; it lands when a connector carries bytes.
## WS5.6 — Sensitive classes in prompts
`classes.py`: opt-in (`classify_prompt_classes=False` by default), local
regex, **counts only** ({"personal": 2} — no text, no offsets). Off by
default means the field is **absent**, not an empty dict — and the test
pins that the standing claim holds: with the opt-in on, `prompt` still
never leaves the process.
## Testing
- Fusion suite **1,266 passed** (8 new session-rule cases incl. both
negative fixtures; 2 consumer refused-alert cases; template-coupling
pin).
- SDK suite **27 passed** (hashes-never-text, bounded snippet
only-when-tripped, counts-only, absent-unless-opted-in).
- **5 live-Postgres cases** (new `integration.yml` step): judged-score
survival both ways + unjudged refresh + refused-notice once-per-flush +
manifest versioning/touch/drift with findings named.
**Negative controls (applied, observed failing, restored):**
1. Reverting the upsert CASE to the pre-fix overwrite → the
judgement-survival live cases fail.
2. Disabling the manifest hash comparison → the live drift case fails.
## Gates
check_windowed_translation OK · migration_numbering OK (176, allocated)
· mypy baseline OK · ruff clean · claim matrix **+3 GATED rows**
(tallies recomputed) · readme_gates OK · ai-runtime template extended
(`mcp_tools`, `prompt_class_counts`) with the coupling pin covering
both.
## Could not verify
- The windowed rules against the Go normalizer end-to-end (ingest →
fusion over Kafka): the coupling pin holds the field names to the
committed templates, and the engine legs run in-process; the full-spine
replay is the integration suite's existing surface.
- The SDK against a live MCP server: `mcp_manifest` is driven by the
host application; the event shape and hashing are pinned by the SDK
suite.
|
||
|
|
d559f4f1a5 |
depth2(2.1-2.5): detection depth — scenario families, long-horizon identity, weak signals, API behaviour, coverage-gap ranking (#1602)
* chore(depth2): Lane C claims migrations 159-161 and ADR 0023
* fix(connectors): lift nested vendor fields into the engine namespace
The engine flattens raw_event exactly one level. Slack's signing-in
address is context.ip_address, an OAuth app's scopes are
entity.app.scopes, a Cloud Audit method is protoPayload.methodName --
all two or three levels down, so a rule clausing on any of them read
None and could never fire. Same shape as the Okta outcome.result
defect; fixed at the connector, not the matcher.
Six connectors lift 36 fields: slack_audit, salesforce, snowflake,
onepassword, gcp_cloud_audit, box. Snowflake additionally infers its
row shape from its own columns, because _kind is stamped only by this
connector's poller and a row arriving by replay fell to a branch that
emitted no event_type, no actor and no src_ip.
scripts/check_connector_field_lift.py runs the real connector over a
real-shaped vendor payload and asserts each name reaches the namespace.
Against a detached worktree at the pre-fix commit it exits 1 naming 35
of the 36 fields.
* feat(detections): named scenario families for Workspace, Apps Script, SaaS (depth2 2.1)
83 new executable rules in five declared families: workspace-takeover,
apps-script-impersonation, third-party-access, saas-data-movement and
saas-authentication-abuse. The family travels on the spec, through
export_detection_ruleset.py, into the artefact the engine loads, so the
console and make stats read one declared string rather than guessing a
family from a slug.
Two more connector lifts were needed first. google_workspace puts
everything that distinguishes one activity from another inside
events[].parameters -- the OAuth scopes a consent granted, the
visibility a share opened -- and events is a list, so the one-level
raw_event flatten could not reach any of it; each parameter is now
lifted as param_<name>. gcp_cloud_audit states whether a service or a
person acted, which is the discriminating clause of the Apps Script
family.
Refused rather than shipped: the plan's 'recovery changed, then the
password, within minutes' sequence. The windowed engine counts and
does not order, and 24 rules were already refused on that ground.
Ordered pairs go to the weak-signal aggregator in item 2.3.
Native executable 760 -> 843; unreachable rules unchanged at the
floor of 2.
* feat(stats): count cloud/identity/SaaS/code conditions, and delete 44 orphan rule files
make stats gains the depth plan 3.6 line: 565 conditions (cloud 301,
identity 134, saas 119, code 11), with the grouping pinned in code so
the figure stops being re-derivable two ways -- the first depth plan
measured it as both 461 and 395. --check ratchets the figure and prints
the 235-rule shortfall against the 800 target every run rather than
leaving the gap unstated.
Allocating ids for the new rules exposed a pre-existing defect.
generate_detections.py writes a YAML per spec and has never deleted one
whose spec went away, so 40 files from an earlier run carried ids no
spec owns. That is quiet until the lock reissues the number: the truth
table classifies a file as executable by asking whether its id is in
the engine's set, so two files sharing an id are counted twice. Four
collided immediately and the truth table published 2,617 against an
engine loading 2,613. 44 stale files deleted;
scripts/check_detection_yaml_orphans.py refuses both an unowned id and
a duplicated one, and exits 1 against the tree before the deletion.
Pinned counts moved together: README, REPOSITORY_REALITY, the claim
matrix, llms.txt, llms-full.txt, the truth table, corpus stats and the
marketplace index. Executable 2530 -> 2613; on disk 7015 -> 7054.
* feat(fusion): long-horizon identity accumulation over weeks (depth2 2.2)
The windowed engine's longest window is one day and it answers one
question: is a count high inside this window. An attack spread
deliberately thin against one account crosses no hourly threshold and
is forgotten by the next day. What separates it from a travelling
employee is not the count but the shape -- an attack widens the set of
networks that FAIL against one account while the succeeding set stays
small; a traveller widens both together.
services/fusion/app/services/long_horizon_identity.py accumulates
distinct source ASNs, countries and IPs per account per day over a
30-day horizon on the same Redis the baseline store uses, and publishes
breadth per side plus the ratio. Folded into the namespace by
DetectionEngine.evaluate_async beside the baseline store. Four rules
read it as the long-horizon-identity family.
Absent, not zero, throughout: an account with fewer than three active
days publishes no key, an unreachable store publishes no key, and the
ratio is undefined rather than enormous when no success was observed --
so a dormant account cannot fire the ratio rule. A saturated day is
reported as saturated rather than truncated, because being reached from
more networks than are worth enumerating is itself the finding.
Thresholds are a recorded rationale, NOT a measurement, and say so.
scripts/derive_long_horizon_thresholds.py surveyed 502 events across
the two telemetry corpora and found 0 carrying an account, a source
network and an outcome together, so it refuses to publish a derived
number and writes measured: false with the return-to-measured
condition.
* feat(fusion): weak-signal aggregation into one finding (depth2 2.3)
Several individually unalarming signals -- a new ASN, a new client
family, an anonymizing egress, a sub-principal deviation, a vendor risk
verdict, a credential change -- accumulate per session and per principal
inside an hour, and past a strength threshold become ONE finding listing
every contributor and its weight.
The plan's invariant that one geography or ASN change alone is never a
finding is held as a property of the weight table rather than left to
the next editor: a test asserts every weight is below the threshold, and
MIN_DISTINCT_KINDS stops one noisy integration repeating its way past
it. Strength counts each kind once at its weight plus a small increment
for repeats, so forty copies of one risk event cannot outscore a genuine
four-kind sequence.
This is where item 2.1's refused ordered pair lands. 'Recovery email
changed, then the password' is a sequence, the windowed engine counts
and does not order, and 24 rules were already refused on that ground --
so the pair accumulates here and the finding lists both halves in
arrival order.
Severity is the strongest contributor on the five-tier ladder;
confidence is a separate 0-100 derived from how far past the threshold
the strength sits and how many distinct kinds contributed.
The threshold is a RATIONALE, not a measurement, and says so.
scripts/calibrate_weak_signals.py loads all 72 balanced corpus items and
refuses to publish a sweep: the corpus carries vendor alert evidence
while every signal here is produced by fusion's enrichment, so all 72
score zero. Publishing recall 0.0000 would have stated 'the aggregator
detects nothing' having measured 'the corpus carries none of its
inputs'.
* feat(fusion): API behaviour from access logs (depth2 2.4)
Access logs AiSOC already ingests carried a path, a query, a method and
a status, and nothing read them as a shape -- /api/users/4821 and
/api/users/4822 were two unrelated strings, so neither an unknown
parameter on a known endpoint nor a walk across identifiers was visible.
services/fusion/app/services/api_behaviour.py templates the path,
learns per template which parameter names appear, what coarse type each
carries and which statuses it returns, and raises three signals:
unknown parameter, parameter type change, and one client walking many
identifiers. Three rules read them as the api-behaviour family.
Templating is deliberately conservative -- a segment is replaced only
when it is unambiguously an identifier, never because it looks unusual.
Over-templating merges genuinely different endpoints into one mixed
profile; under-templating leaves identifiers in the key and learns
nothing. A test pins both directions.
Off by default per tenant, checked before any Redis call, so a
deployment that ingests no access logs does no work. A template with
fewer than 50 requests reports nothing: on a new endpoint every
parameter is new, which is a property of the history rather than of the
request, and one client's walk is keyed by client so two clients cannot
pool into one enumeration.
* feat(api): rank detection coverage gaps against connected sources (depth2 2.5)
The governed proposal flow already ran end to end -- propose, evaluate,
backtest, decide with a separate approver, promote. What it never had
was a reason to start, so coverage grew wherever attention fell.
services/api/app/services/detection_coverage_gaps.py joins two things
the tree already knew and nothing had joined: which connectors this
tenant has enabled, and which executable rules and scenario families
exist for each connector's product. Exposed read-only at
GET /api/v1/detection-proposals/coverage-gaps, scoped to the caller's
own tenant.
It writes no proposal. Ranking a gap and drafting a rule are different
authorities, and the drafting path's separate-approver requirement
would be meaningless if the ranker could reach past it. An unmapped
connector is skipped rather than reported as a gap, because 'AiSOC has
no rules for this' and 'this ranker does not know what this connector
emits' are different statements and the second is a defect here.
A test proves the compiled corpus is readable from the API service: its
build context cannot see services/fusion, so a silent empty read would
report every connected source as uncovered -- the most alarming
possible way to be broken.
Eight claim-matrix rows added for Phase 2, two of them PARTIAL by the
author: the cloud/identity/SaaS/code count at 569 against the 800
target, and the weak-signal threshold whose calibration refuses. All
three tallies moved together.
* ci: wire the Phase 2 detection gates into validate-detections
check_scenario_family_alignment, check_connector_field_lift,
check_detection_yaml_orphans, project_stats --check and both threshold
derivations ran in no workflow, while the claim-matrix rows named
ci.yml :: python-lint as their gate. A gate nothing invokes is
indistinguishable from no gate and its presence implies coverage, which
is the defect check_gate_coverage.py exists to find -- and it found
these two directions apart: four by my own reading, two more
(calibrate_weak_signals, derive_long_horizon_thresholds) only because
their --check modes make them gates too.
Matrix rows corrected to name the workflow that actually runs them.
* fix(connectors): lift Entra audit targets, M365 parameters, GitLab and Confluence
Four more instances of the one-level flatten. Entra puts the account a
role was granted to inside targetResources -- a list -- with the role
itself nested again under modifiedProperties, so a role-grant rule could
name the category and nothing about what was granted. M365 puts the
address an inbox rule forwards to inside Parameters, which is the entire
content of the business-email-compromise detections. GitLab builds
event_type from a free-text custom_message so it carries spaces
('gitlab.added deploy key'), and its details dict held the object acted
on. Confluence's event_type carries the audit category, grouping every
permission change in the site under one value, with the granted account
and the new permission in two more lists.
Each gets a stable underscored key beside the original so a rule has
something to clause on and an analyst still reads the vendor's wording.
Only the first target of a list is lifted: almost every record has
exactly one, and a target_2 field a rule could not rely on would pass
its fixture and miss the real shape.
check_connector_field_lift now pins 61 fields across 10 connectors.
Against a detached worktree at origin/main it exits 1 naming 59 of
the 61.
* feat(detections): close depth plan 3.6 at 899 cloud/identity/SaaS/code conditions
330 new executable rules across GCP, Entra, Kubernetes, GitHub, GitLab,
M365, Okta, Atlassian, Box, Dropbox, 1Password, Salesforce and
Snowflake. 569 -> 899, so the 800 target is met and project_stats
--check now ASSERTS it rather than only ratcheting; the shortfall line
still prints either way, because that property is what made the earlier
PARTIAL honest.
Every rule is replayed through its real connector and the real engine
and watched to fire: the alignment gate covers 413 rules across 15
products, up from 83 across 8. Each spec carries the vendor envelope
that proves it, written in the vendor's own nesting -- a rule clausing
on new_value is proven by a payload carrying it three levels down in
targetResources[0].modifiedProperties[0].newValue, which a
clause-derived sample would never have. Keeping proof and rule adjacent
means a rule edited without its proof fails immediately.
A second id defect surfaced: a slug used twice in one category writes
ONE YAML and exports TWO engine rules, so the published total exceeds
the file count by the number of collisions -- the truth table read
2,949 against an engine loading 2,950. check_detection_yaml_orphans
now refuses a duplicate slug alongside a duplicate and an unowned id.
Unreachable rules unchanged at the floor of 2. Executable 2,620 ->
2,950; on disk 7,061 -> 7,391.
* feat(detections): depth plan 3.6 met — 907 cloud/identity/SaaS/code conditions
338 new executable rules, every one replayed through its real connector
and the real engine and watched to fire. 569 -> 907, so make stats
--check now ASSERTS the 800 target as well as ratcheting the measured
floor; the shortfall line still prints, because that property is what
made the PARTIAL honest and a reader needs to see the headroom.
Per-source minimums all met: aws 120/120, gcp 121/120, azure 151/150,
kubernetes 63/60, okta 63/60, github+gitlab 51/40, and every SaaS source
with a connector at or above 20.
The alignment gate covers 421 rules across 16 products, up from 83
across 8. Each spec carries the vendor envelope that proves it, written
in the vendor's own nesting; a rule edited without its proof fails
immediately. Four more connectors were lifted first (Entra audit
targets, M365 parameters, GitLab details, Confluence affected objects).
Two id defects found and gated, both in the class where the published
total exceeds the files: 44 orphans with ids no spec owns, and a slug
used twice in one category, which writes ONE YAML while exporting TWO
rules. check_detection_yaml_orphans refuses all three shapes and found
the second one itself -- the AWS batch collided with two existing
slugs, which were dropped rather than renamed because a second rule for
the same condition is noise.
The CloudTrail proof is worth recording: the connector reads the
LookupEvents envelope, so a sample shaped like a raw CloudTrail record
normalises with event_name empty and every identity field None. That
was the first attempt, and the replay is what caught it.
Matrix row flipped PARTIAL -> GATED by reaching the target, not by
relabelling. Executable 2,620 -> 2,958; on disk 7,061 -> 7,399;
unreachable unchanged at the floor of 2.
* fix(api): resync the packaged ruleset and move the catalogue pins
The API image carries a byte-identical copy of the compiled rulesets
because its build context cannot see services/fusion, and the merge
regeneration left it a step behind. Resynced, and the two pins the
catalogue test holds moved with it: the native artefact 764 -> 1192 and
the loaded catalogue total 2,613 -> 3,041.
Both are pins on what the engine actually loads, re-derived by running
fusion's own loaders rather than asserted, so moving them without the
artefact would have been the failure they exist to catch.
* fix(security): re-pin the rule-id lock's gitleaks fingerprints after 338 new rules
The allow-list pins by `path:rule:line`, so taking the lock from 865 slugs
to 1293 invalidated every entry below the first insertion. Re-derived with
the allow-list moved aside -- 28 fingerprints, up from 16 -- because the
findings a run reports *with* it in place are only the rotted ones, and
pinning that set silently drops every pin that was still landing.
Each addition was read first: all are the generic-api-key heuristic firing
on a detection slug that names what the rule hunts for, with a `det-*` rule
id as the value. Verified against the version CI pins, 8.21.2.
* chore: regenerate docs/openapi.yaml for the coverage-gap ranker
Item 2.5 added `GET /api/v1/detection-proposals/coverage-gaps` and the
committed spec had not been re-exported. A pure addition -- 56 lines, no
removals -- so the breaking-change policy is unaffected.
Exported under the version services/api/poetry.lock pins (pydantic 2.14.1);
the exporter refuses a drifted one precisely because a spec generated from
a venv that moved reads as a change nobody made.
* fix(detections): prove wave-2 2.1's thirty GitHub rules against the real connector
The scenario-family work added 30 GitHub-product specs and registered none
of them with `check_github_rule_alignment.py`, which requires a real-shaped
audit entry per rule. A genuine gap, not a stale artefact: `main` carries no
`gh-*` spec at all, so the gate was passing there for want of subjects.
Each entry carries the unprefixed action GitHub documents, cross-checked
against the independently transcribed vocabulary in
`vendor_event_vocabulary.py` rather than copied off the rule it proves --
the prefixing to `github.{action}` is the connector's work, and the point of
the gate is that the two agree. Issue #1545 found 11 of 12 rules clausing on
names nothing emits and one on an action GitHub does not have.
Not vacuous: substituting a plausible-but-wrong `org.member_added` for
`org.add_member` exits 1 naming the rule and both clause keys.
* docs(roadmap): collapse the Phase A line eight merges had duplicated
Every lane merge keeps both sides of ROADMAP.md, and the resolver only
dedupes table rows -- so the one Phase A line carrying a drifting rule
count forked instead of collapsing: four copies reached `main` saying
2538 and this branch added four saying 2966. The count gate caught it,
because a figure that disagrees with the tree is what it is for.
One line, the current number.
* fix(fusion): wire wave-2 items 2.2, 2.3 and 2.4 into the production path
All three modules were built, unit-tested and imported by nothing that
runs -- the defect `check_module_reachability.py` exists to name, and the
reason it is not cosmetic: a passing test on an uncalled module is
indistinguishable from a working feature. The engine had even grown a
`long_horizon` parameter for 2.2 that no caller ever supplied.
2.2 and 2.4 publish derived fields, so they join first-seen and baselines
in the enrichment pass before the corpus runs. That pass had a latent bug
of its own: the guard required first-seen or baselines to be present, so a
deployment configuring only the later stores skipped enrichment entirely.
Each store is now independent.
2.3 returns findings rather than fields, so the worker promotes each into
one alert naming every contributing signal in arrival order -- the whole
claim being that no single signal could have fired. It is fed the *same*
namespace the corpus just saw, through `DetectionEngine.namespace()`,
because it reads the first-seen novelty booleans and baseline deviation
scores computed directly above and a second caller deriving them its own
way is how two readers of one event come to disagree. Advisory like the
AI-estate recorder: an aggregator that cannot reach Redis logs and lets
the event keep its detections.
2.4 stays off per tenant, as the plan requires and the cost justifies.
`RawAlert` has no confidence field, so the aggregator's figure goes in the
description rather than being silently dropped by pydantic.
* chore: recompute after the third main merge (tally 360/354/6/0, 91 connectors)
* fix(detections): record the Okta proof envelope with the session-projection gate
`okta_entry()` builds a System Log event in Okta's own envelope for the
scenario-family proofs, and the gate flags any file naming
`externalSessionId` because the session key must have exactly one producer.
The field here is written and never read -- one occurrence, inside the dict
literal -- so there is no second derivation to disagree with session.go.
That is byte-for-byte the case the gate already allows for
`test_okta_identity_rules_are_reachable.py` beside it, and it is recorded
the same way rather than by dropping the field: a proof payload missing a
key every real Okta event carries is a less faithful stand-in for the event
it proves, which is the worse trade.
The gate's own self-test still detects a second deriver, a drifted closed
set, an invented fallback key and a missing declaration.
* chore: recompute after the fourth main merge
Tally 361/355/6/0 in all three published places, and the sandbox corpus
figures re-synced: main landed `sync_sandbox_corpus_figures.py` while this
branch was moving the corpus, so the generated `_corpus.py` was describing
a tree that no longer existed.
* docs(evidence-pack): drop the stale PARTIAL count a merge left beside the current one
The add/add resolution kept both sides of the sentence that indexes the
claim-to-gate matrix, so the paragraph stated 6 PARTIAL and 5 PARTIAL one
line apart. The matrix is the authority at 363 rows / 357 GATED / 6
PARTIAL, so the 5 is the stale half and is removed.
readme_gates.py cross-checks this sentence but matched the first copy and
passed over the second, which is why it reported OK against both figures.
* test(detections): derive the packaged-corpus total instead of typing it
`Python — Tests` failed on
assert '2617 rules' in result.stdout
E assert ... 'OK — 4 identical artefact(s), 3045 rules'
The corpus is correct and the assertion was stale: this lane adds rules, so
the packaged total moved 2617 -> 3045. The figure was a literal inside a
*positive control* — the case whose whole job is to show the gate's clean
verdict means something — so it failed for a reason that says nothing about
whether the gate works, and the obvious repair is to retype 3045 and wait
for the next lane to hit it.
Summed from the four artefacts the control already copies, counted the way
`sync_packaged_detection_rulesets` counts them, so it cannot go stale. Still
an assertion rather than a tautology: it also refuses a zero total, and
dropping one artefact from the sum fails the control, which is the shape it
exists to catch — a clean run that reported a subset of the corpus.
* style: apply the pinned ruff formatter to the derived-total helper
|
||
|
|
f61942f309 |
Lane D: response that finishes — verb breadth 89 → 165, a bounded model step, time gates, and a ticket-sync defect (#1587)
* depth2 Phase 0: kickoff, re-derived baseline and the SIEM-scope decision Phase 0.1-0.4 of the wave-2 depth plan, which lands here locked beside the other four plans. 0.2 re-derives every figure the plan captured. All twenty reproduce exactly except the cloud/identity/SaaS/code condition count, which the plan itself flagged as approximate: measured 344 against 'about 358'. D1 records why, and the finding underneath it — no script in the tree implements that sentence, so every published value of it was hand-counted with a slightly different product set, and windowed rules contribute zero because they carry no product field at all. Phase 2.1's gate has to decide that explicitly. 0.3 captures the baselines, including 'make up-full' — the one the first depth plan recorded as never captured (its D2). 22 containers on the full profile; CORE passed 'make smoke' 10 of 10. The baseline host had nine unrelated containers on it including a foreign Postgres on 5432, and 'make up-full' failed its first bind before the port resolver's overlay landed. D2 records the sequence and, deliberately, does not claim a defect from it: the preceding state is not replayable, so it carries a clean-host reproduction as a follow-up instead. 0.4 is ADR-0015: AiSOC federates to the SIEM rather than replacing it. The README's 'Not a drop-in SIEM replacement' is now a decided position with its cost argument — compliance search needs raw-payload retention outside the 8 GB CORE budget and an availability promise this project has no measured evidence it can keep. Proposed, and nothing in this plan builds from it. * chore(depth2): Lane D claims migrations 142-145 and ADR 0020 * test(actions): arm-count gate reproduces depth 5.5 at 89 of a 150 floor The figure had been quoted three ways. A loose grep over live_actions/ also matches reverse_capability= arguments and reports 111; the plan's declared rule is class-level capability = "..." declarations, which reports 89. This counts by the declared rule and cross-checks it against builtins._BUILTIN_ADAPTERS, so a class that declares a capability and is never registered cannot pad the headline while answering executor_not_found at dispatch. Fails on this tree for the stated reason: 89 arms over 39 verbs against a floor of 150. * feat(actions): AWS, GCP, GitHub and Slack containment clients AWS IAM/EC2 over httpx with a hand-written SigV4 rather than boto3, which is not in this service's dependency set: every method in aws_security_groups.py degrades to a note saying boto3 is absent, so the only behaviour that path has ever been observed to have is its own fallback. Role-session revocation is the documented aws:TokenIssueTime inline policy the IAM console itself writes, which makes the rollback a policy delete and the probe a policy read. GitHub's credential-revocation endpoint is unauthenticated by design and returns 403 to an authenticated caller, so that one call strips the Authorization header every other call sends. Slack answers HTTP 200 with ok:false on a refusal; the client raises on it, so an executor cannot report 'we asked' as 'it happened'. admin.users.setInactive does not exist (404) — removal plus admin.users.assign is the pair that does. * feat(actions): SaaS and secure-web-gateway containment clients Salesforce freeze rather than deactivate, because deactivating releases the licence and breaks record ownership: IsFrozen lives on UserLogin, not User, so every call resolves through a SOQL lookup first. Snowflake containment is SQL, and SQL identifiers cannot be bound. The value is made unrepresentable rather than escaped — this tree already shipped a denylist that blocked --, /* and ; and never ', so an escaped name that matches no user would report a clean containment that did nothing. Both gateway clients send the vendor's incremental list edit rather than a read-modify-write, because two concurrent containments against a shared list lose one entry and the losing action still reports success. * feat(actions): 62 cloud, SaaS and gateway arms take the count 89 -> 151 Depth 5.5's floor is 150 by the declared rule. Measured by the gate in the previous commit the tree stood at 89 over 39 verbs; it now reads 151 over 60 verbs across 34 vendors. Each new verb has a contract declaring what it does when the finding is wrong, and the conservative answer wins at verb level rather than the most capable vendor's: revoke_token declares MANUAL_ONLY because GitHub states a revoked credential cannot be reactivated and a Workspace application password is gone, even though GCP can re-enable a key -- which has its own verb an operator dispatches deliberately. Declaring PLATFORM because one vendor can would have given the rollback path a route back it does not have on the other four. Verification is a recorded gap, not a claim: every client here has a real read-back and PostActionVerifier is keyed on ActionType, which these live-action verbs do not have. That is why none of them is AUTOMATIC at any confidence -- unverifiable means not autonomous -- and why the read-backs ship as dispatchable read verbs instead. dry_run returns before the client factory is reached, so a preview cannot construct a client at all. The declared _credential_keys stay as the second layer. * test(actions): grade all 62 arms, wire the gate, record the verification gap Three properties per arm, each a defect this tree has already shipped. Signatures: every arm runs against a create_autospec of its real client, so a wrong keyword fails in CI rather than raising TypeError on the first live call. That is how SearchSIEMExecutor (max_results= against a client taking max_count) and CreateNotableEventExecutor reached production -- simulation mode never constructs the client, so the only path the tests exercised was the one that does not call the vendor. Dry run, graded in both directions: SIMULATED, so no arm reports a change it did not make, and the factory asserted never to be called, so no credential a strip list happened to miss can let a preview reach a production system. Vendor shapes: recorded payloads replayed through the real clients with respx, which is what shows an AWS error body surfacing NoSuchEntity, a Slack ok:false being a refusal rather than a success, and DESCRIBE USER being read by column name rather than offset. Five negative controls run and recorded in DEPTH2_PROGRESS.md. * feat(playbooks): a bounded ask_model step that branches and cannot act Wave-2 Phase 6.2 adds one step type that asks the model a multiple-choice question about the evidence and branches on the answer. Every part of it is a narrowing, because a playbook step the model can steer in a product that dispatches containment is the shortest path from a prompt injection to an outage. The answer set is closed and written by the playbook author; an answer outside it is invalid. on_invalid is required, so the case that matters -- the model not deciding -- has a destination the author chose rather than a fall-through. The answer selects a key in the author's own branches map, so the model's text never becomes a step id and the worst an injected instruction achieves is picking a branch the playbook already contains. It cannot call a verb, pinned three ways: it is routed through the control-flow table rather than _HANDLERS (which is where the action bridge lives), an AST test asserts the module imports nothing that can dispatch, and a tripwire test makes the model answer with the name of a containment verb, replaces the bridge with something that fails the test if called, and watches the step decide nothing. Five surfaces in sync, held by check_playbook_schema_parity.py: the engine enum, schemas/playbook.schema.json, packages/types, and the web editor's step schema registry and its vocabulary test. * feat(response): time gates on approval, and deadlines that do something 6.3, both halves. A tenant may declare when automatic response is acceptable: outside business hours, with nobody on call, or during a change freeze, each opt-in and each applying from a declared impact floor. The direction is fixed and asserted over every impact and requirement the matrix emits -- a schedule may only raise AUTOMATIC to ANALYST and returns a decision that already needs a human untouched. An unreadable on-call state counts as nobody on call, because the alternative is a failed rota lookup silently re-enabling containment at three in the morning. Approval deadlines gain a declared outcome. Until now every approval in the product behaved identically at its deadline: the action did not happen and nothing else happened either, which for the step that isolates a host believed to be exfiltrating is a decision nobody made on purpose. A step may now declare stay_paused (the existing behaviour, chosen rather than implied), rollback, or one named limited containment. The named verb is graded by its own contract through the ordinary governed path, so a timeout is not a tier promotion: a verb the tenant's tier would not auto-execute queues here exactly as it would anywhere else, and the record says executed=false rather than reporting a containment that did not happen. The expiry and the declaration are one UPDATE ... RETURNING rather than two statements. Not tidiness: the declaration lives on a row the expiry stops being 'waiting', so a separate read afterwards finds nothing and a read beforehand is a second cross-tenant sweep racing the first. The tenant-predicate ratchet therefore moves rather than growing. * fix(itsm): a vendor retry no longer reopens a closed case 6.4 asks for the two-way sync to be verified before anything is built, and the verification is the finding. Outbound already works. Driven end to end for the first time -- the production push_case and push_status_change routes, the production Jira and ServiceNow connectors, and a mock HTTP server returning recorded vendor shapes -- a case mints an issue carrying the aisoc-case label the return leg resolves by, a ServiceNow incident carries its correlation id, and a status change patches the existing ticket rather than minting a second one. Five tests, all green on the first run, no change needed. Inbound had a defect that four correct unit tests could not see, because each mocks the next layer: the idempotency check was an exact equality, so a case a human had closed in AiSOC, receiving an ordinary Jira redelivery of Done -- which maps to the *intermediate* resolved -- was moved backwards out of its terminal state. No unusual sequence was needed, only a close followed by a retry, and Jira retries up to five times while ServiceNow retries until it gets a 2xx. The guard is scoped to terminal states only. An ITSM moving a ticket from Resolved back to In Progress is a real transition this product should mirror; only at closed is a retry indistinguishable from a reopen, and there a case that stays closed is visible and correctable while one silently reopened by a retry is neither. * feat(ai): AI-estate containment arms and an approved kill-switch playbook 7.5. The inventory could score a provider key's exposure and nothing could act on it, so a key found in a public repository was a finding with a recommendation and no verb. 165 arms over 64 verbs now, up from 151. The three providers give three different answers to 'can this be undone', and the arms carry each honestly: OpenAI deletes a project key so that arm declares no rollback, Anthropic deactivates one so it has a real reverse and is the reason restore_token exists as a verb, and a gateway block is a documented pair. One revoke_token contract claiming a platform rollback because Anthropic can would have given the rollback path a route back it does not have on the other two. Two things this deliberately did not add, recorded rather than duplicated. AI OAuth grant revocation reuses the Workspace, Entra and Okta arms from 6.1, because an AI application's grant is an ordinary consent and a fourth arm would be a second code path to the same vendor endpoint. Agent process kill reuses the EDR arms, because the agent is a process on a host. And neither OpenAI's nor Anthropic's public admin API exposes a budget this platform can set, so set_spend_cap has exactly one vendor arm and a test says so. The kill-switch playbook ships disabled, asks the bounded model question before the approval rather than after it, and the approval declares its timeout outcome: if nobody answers in two hours the gateway key's spend cap goes to zero, which is the narrow containment rather than the wide one. * docs(depth2): record 6.1-6.4 and 7.5, with the two gaps that stay open Matrix moves 335 -> 340 rows, 330 -> 335 GATED, in lockstep across the matrix Summary, ROADMAP.md and the evidence pack. Two deviations recorded rather than papered over. Depth 5.6's 'preview against a chosen past alert' is still open: the drafter exists and lands a disabled draft, but nothing resolves a historical alert into a trigger context, which is the console's alert reader rather than the playbook engine. And the 24 new verbs carry a recorded verification gap rather than a probe, because PostActionVerifier is keyed on ActionType and these are live-action capabilities -- the same gap unisolate_host has carried since it was built. The consequence is enforced: a test asserts no new verb above read_only is AUTOMATIC. * test(playbooks): record the kill switch as outside the benchmark corpus The completion-rate gate requires every shipped playbook to match an incident in the 200-case corpus, and the AI-agent kill switch matches nothing because the corpus contains no AI-estate template at all. Two wrong fixes were available and both were refused. Tagging it supply-chain so it matched github-pat-leak is the 'matches by tag only' case the gate's own docstring says it exists to prevent -- blocking a gateway key does nothing about a leaked GitHub PAT. Adding a template to the corpus moves a published measurement. So: one entry in the existing not-in-benchmark list with its reason, the category gate's exemption derived from that list rather than kept as a second hand-written one, and a ratchet that re-runs the evaluation with the exemption emptied and fails if an entry would no longer be an orphan. The ratchet uses the evaluator's own definition of orphan rather than a second predicate, because a ratchet with its own idea of 'covered' is one that drifts. * chore(marketplace): regenerate the index for the kill-switch playbook Generated, not hand-edited: the gate compares the three on-disk copies against the generator's output and the new pack entry moved the playbook count from 88 to 89. * fix(gates): RLS shape on migration 142, and guard the AWS XML parse at source Two CI findings, both real. The RLS policy-shape gate requires FORCE (an owner walks past a policy that is only ENABLEd) and an 'OR current_tenant_id() IS NULL' arm. The arm matters here specifically: the sweep that fires an approval deadline runs on a connection that binds no tenant, by design, and without it that sweep reads zero rows and reports success -- the silent failure the table exists to prevent. Semgrep's use-defused-xml fired on the AWS client's ElementTree import, taking the error ratchet from 44 to 45. The ceiling was not raised. AWS query APIs answer in XML and IAM has no JSON alternative, so the parse has to happen; what makes it safe is refusing a document-type or entity declaration on the raw text before a parser sees it, plus a size bound, rather than trusting a parser's defaults to be what a reader assumes. Checked on the raw text because a parser that has already expanded an entity cannot tell you it did. Re-measured locally at 112 total / 44 error, which is the ceiling unchanged. * depth2 Lane E: AI provider coverage, chat-compliance minimisation, hosted agents, repository AI config and four replayed AI rules (#1585) * depth2 Lane E: claim migrations 146-150 and ADR 0021 * test(connectors): reproduce the AI provider-coverage gap in llm_usage Depth 6.3 / wave-2 7.1. `LlmUsageConnector` accepted `openai` and `anthropic` and nothing else, so Gemini in Workspace, Copilot in M365, Copilot in GitHub and Entra consent grants to AI applications had no reader at all and the AI estate's provider-audit discovery source could only ever see two vendors. Six of the seven tests fail on this tree: four drive the real HTTP path against a mock server returning vendor-shaped payloads and get a ValueError from the constructor, one asserts the org-scoping refusal and one asserts the schema's select options match the accepted providers (`PROVIDERS` does not exist yet). Endpoints, query parameters and event names come from the vendors' current public references, each fetched and 200 before being written: the Admin SDK Reports API `gemini_in_workspace_apps` application, the GitHub organization audit log, the Office 365 Management Activity API schema (RecordType 261 CopilotInteraction, 284 AIAppInteraction) and Microsoft Graph directoryAudits. * feat(connectors): four more AI provider audit feeds in llm_usage Depth 6.3 / wave-2 7.1. Closes the gap the previous commit reproduced: the connector now reads Gemini in Workspace, GitHub Copilot, Microsoft 365 Copilot and Entra consent grants alongside OpenAI and Anthropic. Each client was written against the vendor's current public reference, every one of which was fetched and returned 200 before being committed; the module docstring names them per provider. The Workspace `gemini_in_workspace_apps` applicationName and the `ai_usage_event` / `feature_utilization` event names, the 23 published `copilot.*` audit actions, RecordType 261 CopilotInteraction and 284 AIAppInteraction, and the directoryAudits consent activities are all read values, not inferred ones. Three things the tests pin beyond "it parses": - Filtering happens server-side where the vendor supports it. Asking GitHub for an organisation's whole audit stream and discarding client-side is a rate-budget problem on a busy org, not a style one. - Where it cannot, the reader discards non-AI records by RecordType and by consent activity name. `Audit.General` is the entire Microsoft 365 general audit and `directoryAudits` is every directory change; a reader that forwarded both would replace the AI feed with a second copy of the general audit. - A consent grant's scopes are lifted out of the free-text `ConsentAction.Permissions` property into a sorted `scopes` list on the envelope. A grant whose scopes stay buried scores in the AI estate as a grant with no scope at all, which is the opposite of the truth for `Mail.Read`. M365 needs a second request because the subscription endpoint returns blob references rather than content; a reader that stopped at the first response would poll successfully forever and emit nothing. Workspace OAuth token grants are deliberately not read here — `google_workspace` already polls the `token` application, and a second reader would double-count every grant. What is missing there is classification, which is the next commit. Docs and the conformance matrix regenerated, not hand-edited. * test(fusion): reproduce the recorder reading a path no connector emits Wave-2 7.1 wiring. `test_ai_asset_recorder.py` writes `finding.evidence.scopes` into a hand-built OCSF event and asserts the recorder reads `finding.evidence.scopes`. Both halves are the test's own invention: no connector in the tree produces that path and ingest does not synthesise it, so the assertion holds whether or not the production path works. What ingest really hands fusion is the connector's normalized dict as a JSON string under `ocsf["raw_data"]`, which is why `_connector_fields` exists for the endpoint path and is not used by the provider-audit path. Driven through that real shape, both new tests fail: an Entra consent grant reaches the inventory with no scopes at all, so an AI notetaker consented into every mailbox in the organisation scores identically to one granted nothing, and the console's reason list is silent about the single fact that decides whether the grant matters. The fixtures are the real output of `LlmUsageConnector.normalize()`. The two services cannot import each other — both package their application as `app` — so they are held together by a committed artefact plus a check in each direction, the way the vendored narrative and the detection ruleset already are. * fix(fusion): read provider-audit fields where the connector puts them Wave-2 7.1 wiring. `_from_provider_audit` now reads through `_connector_fields`, the same reconstruction the endpoint path already performs, instead of off the canonical OCSF map. An Entra consent grant's scope list reaches `score_risk`, so a grant holding `Mail.Read` scores as broad and says so in its reason list. Two further corrections the real shape forced: - An OAuth grant is keyed on the **application**, not the audit record. Keying on the record id would make every re-consent a new asset and reset `first_seen_at` on each, so the inventory would grow a row per event and never show that this application has been there since May. - The OCSF-native `finding.evidence.scopes` read is kept as a fallback rather than replaced, so a producer that does emit it is still read. Trading one blind spot for another is not a fix. Negative control, recorded: with the `fields.get("scopes")` read reverted to the pre-fix path and nothing else changed, both new tests fail again (`KeyError: 'scopes'`). Restored, the fusion suite is 1063 passed / 28 skipped. The `normalize` contract is unchanged across all 87 connectors: the "is this record AI activity at all" decision is a separate `is_ai_record` predicate rather than a `None` return, which keeps the base signature intact and makes the filter — the thing that stops the Microsoft 365 AI feed becoming a second copy of the general audit — callable and testable on its own. * feat(api): enterprise AI-chat compliance logs, minimised by the schema Wave-2 7.1, second half. Reads an AI provider's compliance API for the directory, projects and activity feed, and — behind a second, narrower opt-in — classifies message content without keeping any of it. Written against Anthropic's Compliance API, the one enterprise AI-chat compliance surface with a complete public reference. Every path, scope, key prefix and response field was read from pages that each returned 200 before being committed; the client's module docstring names them. The Activity Feed record and the chat record in the tests are the vendor's published examples field for field. The minimisation is in the schema, which is the point of ADR-0021. A plan sentence saying "never full conversations" that a TEXT column permits is not a control; it holds until the first caller who binds "\n".join(messages) and succeeds silently. - No table has a column able to hold a message. Asserted against the ORM, since that is what application code binds through. - The snippet is VARCHAR(280). The collector truncates; the column is the backstop for the caller that forgets. - The snippet is masked BEFORE it is cut, so a row saying "this chat contained an AWS key" does not contain the key. A verbatim window would create a new copy of the secret in a table an operator believes is safe to keep, and label it so an attacker can find it. A per-pattern sweep asserts the value is absent for every shape in the shared list. - The label vocabulary is a CHECK constraint, and a test asserts the three copies of it (constraint, ORM, classifier) agree. - The client has no method returning message text, asserted on its public surface. - Two opt-ins, stricter one default-off: collection does not imply reading message bodies. - Off by default per tenant, through the console, vault-held key. No environment variable. A vault failure is a 503, never a plaintext row. The secret-shape patterns are the AI SDK's own, vendored by scripts/sync_vendored_ai_redaction.py and held byte-identical by its --check. A prompt and a chat message containing the same AWS key must produce the same shape name on both surfaces; a second hand-written copy is how two surfaces come to disagree about the same rows. The SDK groups e-mail and card shapes with credentials because it is answering a transmission question; _SDK_LABEL maps each shape to one of the plan's four classes rather than relabelling the shared list. Luhn is applied to the shared card shape. Without it the digits-only pattern labels order ids as payment data, and a classifier that labels everything is one nobody believes. Retention, legal hold and erasure come free and are tested: every table carries a column named exactly `tenant_id`, which is how `discover_tenant_tables` finds it. Discovery rather than a declared list is deliberate — a list is the thing that goes stale. Tests use httpx.MockTransport rather than respx, because respx is not in this service's locked dependency set and a test needing a package CI does not install is a test CI cannot run. MockTransport replaces only the network leg. Negative control, recorded: adding a `transcript: Mapped[str | None] = mapped_column(Text)` to AiChatContentLabel and changing nothing else fails two tests (the forbidden-column sweep and the unbounded-TEXT sweep). Removed, the API suite is 5074 passed / 174 skipped. Migration 146 and ADR-0021 were claimed in DEPTH2_PROGRESS.md before either file was written. * docs(depth2): record 7.1 in the progress tracker * feat(ai-estate): hosted agents and repository AI config as asset kinds Wave-2 7.2. Two new kinds on `aisoc_ai_assets` (migration 147), both scored by the one existing `score_risk` and rendered with their reasons on the AI estate page. No second scorer: the plan forbids it by name and it is the drift this repository keeps finding. **Hosted agents** come from `GET /v1/agents` with the `managed-agents-2026-04-01` beta header, read against the vendor's published reference (fetched, 200). An agent configured in a provider's control plane is invisible to every other discovery path here: endpoint telemetry never sees it, and gateway telemetry sees its traffic without knowing what it was configured to do. The client is read-only — the vendor offers create, update and archive and none of them is here, because an inventory that can reconfigure a customer's agents is a different risk conversation and 7.2 is read-only by the plan's rule. **Repository AI config** is the scan of agent-instruction files, skill directories and MCP configuration through the code-platform connectors, recording the tools and servers each references. "Which repositories point an agent at this MCP server" is a question the estate could not answer. Every byte of that scan is attacker-controlled and is treated as such. These files are checked in, editable by anyone who can land a pull request, and read by an agent verbatim as instructions — the same trust class as a retrieved runbook, which this platform already scans. So: - Nothing is stored raw. Excerpts are flattened and capped at 400 characters, with zero-width and bidirectional characters stripped, because an instruction file is exactly where a payload invisible in a diff gets hidden. - The content is scanned at capture and only the matched *pattern names* are kept — never the matching text, which would put the attacker's payload in a table the console renders, labelled so a security team looks at it. - Those names reach `score_risk`, so a flagged file raises the asset's exposure and the reason names the channel. - A hosted agent's `system` prompt goes through the identical path, for the identical reason. The patterns are **generated** from the agents guard's own `_RULES` table rather than hand-picked, by scripts/sync_vendored_ai_instruction_rules.py with a --check wired into ci.yml. A hand-copied subset drifts: a pattern added to the guard after the next incident would never reach the scanner and nothing would say so. One rule is excluded with its reason recorded — `fabricated_tool_result` matches a model-output envelope rather than a repository file, and its pattern is assembled from a set, so it renders in a different order in every process and no generated file could match itself. The generator fails if an excluded name leaves the guard, so the exclusion cannot outlive the rule and become a silent gap. Two things found while building it: - `path.lstrip("./")` eats the leading dot of a dotfolder, so `.cursor/rules/x.mdc` became `cursor/rules/x.mdc` and stopped matching — silently, as a path that simply is not an AI artefact. Every convention here lives in a dotfolder, so that one call would have turned most of the scan off. Caught by the classification table, which is why it enumerates real paths rather than a couple of examples. - `DEVICELESS_KINDS` is shared between the model and `score_risk`, so the four kinds that cannot have a device are not charged for lacking one. A hosted agent has no laptop to isolate; the reason string "containment has nowhere to act" would simply be false. The tool reader matches grants, not prose: "do not use `write_file`" in a paragraph is not a grant, and counting it would make a careful instruction file score worse than a careless one. Also: a committed JWT-shaped literal in the 7.1 classifier test is now assembled from parts. The repository's secret scan was right to refuse it, and a test fixture has no business looking like a credential. * docs(depth2): record 7.2 in the progress tracker * feat(detections): four AI rules on the provider feeds 7.1 added Wave-2 7.4, partial — four of the rule pack's targets, each earned rather than declared. Executable corpus 2,530 -> 2,534, regenerated from `scripts/project_stats.py` and propagated to the README, ROADMAP, truth table, corpus stats, marketplace index and the packaged API copy by their own generators. Nothing was hand-typed. - `llm-copilot-content-exclusion-changed` (critical) — content exclusion is the control that stops a coding assistant reading the paths an organisation declared off limits. It is changed in a settings page rather than in a pull request, so nothing else reviews it. - `llm-copilot-agent-mcp-config-changed` (high) — adding an MCP server adds a party that can instruct a hosted agent. A scope change, not a settings change, and the agent runs on the provider's infrastructure so no endpoint control sees the result. - `llm-ai-app-granted-write-scope` (high) — a consent grant letting an AI application change a mailbox, drive, site or the directory. The read equivalent is an exposure; this one can act. - `llm-copilot-bulk-resource-access` (medium) — one assistant turn that read 25 or more distinct resources. An assistant with a user's grant is an exfiltration path that authenticates as that user and looks like ordinary application traffic. Every rule is replayed through the REAL connector and the REAL engine in `services/fusion/tests/test_ai_rule_pack_replay.py`. The fixtures are the committed output of `LlmUsageConnector.normalize()` on vendor-shaped records, regenerated and drift-checked from the connectors side, because the two services cannot import each other. Nothing here is synthesized from the rule it tests. That is the whole point: 1 of 12 GitHub rules fired on real connector output while all twelve passed their own fixture replay, because a fixture generated from a rule carries the rule's own clause key and the replay is tautological. Each negative twin differs in exactly ONE decisive field — a different Copilot action, `Mail.Read` where the twin is `Mail.ReadWrite`, 24 resources where the twin is 40 — and a test asserts that property on the fixtures rather than trusting it, since a negative that also moved the actor would pass for a reason unrelated to the clause. Negative control, recorded: rewriting one rule's clause to the unprefixed vendor action (`event_type: content_exclusion_changed`), which is the exact shape of the measured GitHub failure, and re-exporting, fails that rule's positive replay while the other three stay green. Restored, all ten pass. `test_builtin_rule_catalogue.py`'s hand-typed counts moved 760 -> 764 and 2609 -> 2613 with the reason recorded beside the existing history, in the style that file already keeps. * docs(depth2): record 7.4 partial and 7.3 not delivered, with evidence * chore(detections): regenerate the curated index for the four new rules `curate_detections.py --check` is a drift gate I had not run: adding four rules moves the curated selection and the coverage page, and neither is produced by any of the seven generators I did regenerate. Caught by CI, reproduced locally with the same command, and regenerated rather than hand-edited. Worth recording because it is the shape this repository keeps finding: a published artefact with its own generator and its own `--check`, sitting outside the chain everything else in the family runs through. All eight detection drift gates now pass together. * fix(ci): correct the gitleaks fingerprints the four new rules shifted `.gitleaksignore` pins a finding by `file:rule:line`, so inserting four entries into `detections/rule-ids.lock.json` moved every line below them and five fingerprints stopped matching the findings they were triaged for. The file's own header describes this rot and says the fix is to correct the line number, never to drop the entry or relax the job, so that is what this does: the set is re-derived by running CI's exact gitleaks 8.21.2 with the allow-list removed, and all fourteen are written back. Thirteen are the same pre-existing, benign findings — the heuristic fires on rule *slugs* such as `llm-api-key-created` and `slack-token-exposed`, never on a value. One is genuinely new: `llm-copilot-bulk-resource-access` trips it on the word "access". Verified under 8.21.2 rather than the 8.30.1 on this machine, because the two disagree about this tree and only the pinned one decides. Also regenerates `apps/web/public/marketplace/{index,curated}.json` through `pnpm marketplace:sync`. `curate_detections.py --check` passing is not the whole gate: the web mirror is copied by a separate step, and a curated index that is current in one place and stale in the other is the drift that check exists to catch. * fix(depth2): three real defects behind lane D's red checks **Playbook editor types.** `ask_model` claimed an integration bucket `Decision` that `INTEGRATION_TYPES` does not declare, and three of its field descriptors used `list` and `text` where the vocabulary is `string_list` and `string`. Not cosmetic: `SchemaForm` renders by `FieldKind`, so the two list fields and the fallback-branch field would not have rendered. `ask_model` now sits in `AI Analysis` beside `investigate` and `enrich`, which is the integration it actually reaches. **A retired rule credited to the wrong vendor.** check_enrichment_decisions reported `ident-github-pat-classic-created-with-broad-scopes` as working again. It is not: the rule reads `scopes`, which reaches the namespace from `llm_usage.py`, and GitHub's connector emits no such field -- as its refusal says, no GitHub audit entry carries a created token's scopes. The gate's namespace was a flat union of every connector's field names, so one vendor introducing a field name silently un-retires another vendor's rule. It now resolves a retired rule's fields against the connector its own `log_source.product` names, falling back to the union where the product names no module (`windows`, `waf`) so nothing that was checked stops being checked. Scoping makes the check fire *less* often, so the self-test gains the control for it -- a retired rule whose own product's connector supplies every field is still caught -- alongside the existing `application/user-agent-known-tool` case, which still fires. **Two CodeQL error-severity alerts and nine notes.** The `py/non-iterable-in-for-loop` pair is a false positive: CodeQL does not resolve `EnumMeta.__iter__` through the `(str, Enum)` form, and both enums iterate at runtime (6 and 4 members, measured). Materialised with `list()` so the analysis sees what the interpreter does, rather than suppressed. The nine `py/unnecessary-lambda` notes were real -- `lambda: object()` is `object` -- and are now the callable itself. Verified: agents test_ask_model_step 33 passed, actions test_response_schedule 21 passed, apps/web type-check clean, enrichment-decision gate and self-test both OK. * chore(depth2): regenerate corpus-stats after the main merge Generated artefact, stale against the merged corpus. Regenerated, not hand-edited; its self-test passes again. * fix(agents): vendor the AI kill-switch playbook into the image build context The agents image cannot COPY outside its build context, so a playbook that is only in `playbooks/packs/v1` is a playbook no deployment has. 7.5's `ai-agent-kill-switch` was authored there and never copied across, which would have shipped an AI-containment response the runtime could not load. Copied by the sync script; 64 playbooks, byte-identical. * fix(agents): put ask_model's system prompt through the registry 5.4's bounded model step sent a 604-character system prompt written inline, so it shipped with no version, no lock entry and no eval re-grade on the next edit -- and this is the prompt that decides which branch a playbook run takes next, which is exactly what the lock exists to make visible. Registered as `playbook.ask_model.system` v1 with the text unchanged, read back with `prompt_text()` at the call site. The name is a literal rather than a constant because the gate reads it there: a pin nothing can be seen to ask for is the appearance of coverage. Lock regenerated; 23 prompts pinned, each with a reader. 33 ask_model tests still pass. * style: ruff format * fix(agents): defer the prompt-registry import in ask_model Registering the prompt put `from app.llm.prompt_registry import prompt_text` at module scope, which drags langchain_core into the playbook engine's import chain. The schema-parity gate installs only httpx and pydantic and refused to grade -- "could not import the playbook engine ... or the gate is grading nothing" -- which is the gate being right: a heavy import at module scope is how one service's dependency takes an unrelated job down. Moved beside the `safe_ainvoke` import already deferred in the same block for the same reason, with the same documented noqa. ask_model's module-scope imports are stdlib and `.bounds` again. * ci: wire the executor arm-count gate into the build check_gate_coverage caught it: a check with a findings-exit and a verdict flag that no workflow reaches. It is the gate behind wave-2 6.1's headline — 165 arms over 64 verbs against a floor of 150 — so unwired, the figure had nothing holding it. Runs beside the action-contract gate it belongs with. 185 of 185 gates reachable. * test: join the stub vendor's request threads before the suite exits `One approval, one vendor call, or an honest unknown` went red with 27 of 27 tests passing above it: `ThreadingHTTPServer` defaults to `daemon_threads = True`, so `server_close()` returned while a handler was still inside `handle()`, and the process aborted at interpreter shutdown — "could not acquire lock for <stderr> ... possibly due to daemon threads", exit 134. Intermittent, and red for nothing when it fires. Non-daemon request threads make `server_close()` join them; `shutdown()` has already stopped the accept loop, so the only wait is for requests in flight against a local stub. |
||
|
|
263cb7889c |
depth 3.5: threat conditions paired with behavioural baselines, with hand-authored benign twins (#1320)
* feat(detections): depth 3.5 — 24 threat-and-anomaly conditions Each pairs a threat condition with a depth plan 3.4 baseline score, so the rule answers 'did this happen, and is it unusual for this principal'. Counted as its own family in project_stats.py because the claim differs: one of these also needs a warmed baseline, so a day-one install has the rule before it has the signal. Fixtures are hand-authored and every negative is the benign twin of its positive -- the same threat action by a principal for whom it is routine, differing only in the baseline score. The family's own replay gate drives the real DetectionEngine and asserts the twin property, that no negative uses the not- sentinel inversion, and that stripping the baseline from a positive silences the rule. That last control caught a rule of mine that carried a volume clause and no threat condition at all. * docs(depth): record 3.5 and the bare-anomaly deviation |
||
|
|
8cfd99bc81 |
docs: refresh the README and architecture page for the current product (#1103)
Two stale-figure defects found while doing it, both in the tooling whose job is keeping figures honest. project_stats.py read the claim-to-gate matrix status from a hardcoded column index. A Profile column was inserted ahead of it, so every row's status read 'core' and the figure printed 0 rows, 0 gated against a real 278. Nothing caught it because the README does not publish that number, so no comparison existed to fail. It locates the column by header now. The same script counted ollama-pull as a core service and printed 17 against the 16 that check_profile_service_counts.py enforces and every document states. Two scripts disagreeing about one number is how a reader learns not to trust either; one-shots are excluded, matching the gate. docs/architecture/README.md published core as 14 — correct before connectors and actions moved into CORE, and stale ever since, because it was the one place publishing a service count the gate did not know about. Corrected and registered, so the next compose change fails here too. Verified by reverting it and watching the gate name all 16. Content changes. The architecture walk is eleven steps rather than nine: fusion applies the tenant tuning overlay after a match, a playbook may start from the alert behind three switches, and an approval step is a durable pause. The 'where it stops' note is rewritten rather than left — a playbook can now be triggered automatically, which changed, and what did not change is that every response step is still graded against its own capability contract, so approving a playbook never authorises whatever its steps contain. A new section covers what a first run does differently: host-decided ports, wizard state derived from data, and why sample data takes the real ingest path. The README gains the port behaviour, the setup wizard, the tuning overlay, the playbook trigger, a Sample row in the real-vs-synthetic table, and two maturity rows. It stays at exactly its 250-line cap, paid for by folding detail into the pages that already carry it. One thing was reverted mid-edit: a condensed make smoke block invented a single-line output format the command never prints. Saving two lines is not worth a fabricated terminal transcript. Signed-off-by: Beenu Arora <beenu.a.arora@gmail.com> |
||
|
|
e16110b3d2 |
docs(matrix): record the six PARTIAL rows that closed, and why two stay (#988)
Six gates landed over the last several changes, each proven to fail before it was trusted. This is the matrix catching up with them: the ledger's replay contract, the per-language SDK surface, the platform-wide egress default, the raw-SQL column contract, the live tenant-scoped lake fetch and the scanner ratchet all move PARTIAL to GATED, naming the gate rather than asserting the status. 236 rows, 234 GATED, 2 PARTIAL, 0 NO GATE, recounted with the script rather than typed — the summary block, ROADMAP and the compliance evidence pack are updated from the same count, and readme_gates.py caught two of those three when they were not. Three of the six rows had a gap statement that was wrong in this repository's favour: they credited an "api integration" job and an "integration gate" that do not run those paths. Each row's caveat is re-derived rather than deleted, and each records what the new gate still does not prove. The two that remain are one deferral seen twice, and neither is blocked on code or on a funded provider key. live-agent-eval.yml serves a local model and needs no secret; it has never run, so there is no distribution to derive a groundedness floor from, and inventing one would publish a number nobody took. Separately, project_stats.py printed every YAML under detections/ as "Detection files on disk" — 7,016 against the 6,991 the README and the generated truth table publish under the same words. Both were right and counted different things; the extra 25 are response playbooks. The rule count now matches the truth table, the file count is printed beside it saying what it includes, and a test pins the first to the truth table's own row. Signed-off-by: Beenu Arora <beenu.a.arora@gmail.com> |
||
|
|
9891c46e1e |
feat(detections): raise the executable corpus from 833 to 2,603 rules (#898)
* feat(detections): raise the executable corpus from 833 to 2,603 rules The library has held ~7,000 ATT&CK-mapped rules while 833 executed. The blocker was concrete: a Windows event nests its payload one level below anything the engine flattens, so CommandLine and Image - the two most-used fields in the Sigma corpus - read None and no Windows rule could fire. - windows_event.normalize() lifts System and EventData, where envelope knowledge belongs. The engine and matcher are untouched, so the existing 833 rules are provably unaffected: all 1,756 fixtures replay to identical native verdicts, now a standing test. - sigma_compiler translates imported Sigma to match_when or refuses with a reason. Case sensitivity and missing-field semantics drive most refusals; 1,770 ship, 1,362 are refused and counted. - Every shipped rule is replayed, as a vendor-shaped event, through the real connector and the real engine. --prove-gate reverts the connector and requires all 1,687 Windows rules to stop firing, so the proof can fail. - 76 enabled-but-never-loaded rules are marked disabled with a reason, and the truth table now fails on any new one. * fix(ci): resync the marketplace index, and make a comment's promised test real Four CI failures from the parent commit: - The compiled-ruleset gate imports the connector package, which reaches cryptography through gcp_cloud_audit. Added to the workflow's install. - marketplace/index.json carried enabled: true for the 76 rules this branch marks disabled, so the generated index disagreed with the corpus. - A docstring still named check_rule_fireability.py, which was renamed to compile_sigma_ruleset.py before it landed. - scripts/measure_triage_reliability.py says its production constants 'are asserted against it in tests/test_triage_reliability_harness.py'. That file did not exist - the comment-paths gate has been failing on main since #896 - so the constants could drift from the call site and the published 44/50 to 50/50 figure would quietly describe a configuration nobody runs. Writing the test makes the claim true rather than deleting the claim. * fix(ci): bound cryptography in the detections workflow, and raise instead of falling through - The dependency-pin gate refuses an unbounded cryptography: the Fernet token format and the Ed25519 plugin signatures are behaviour shared across services, so an unbounded install means a build running software nobody tested. Bounded to >=46,<51 to match the other fifteen paths. - The harness test reached pytest.fail() as its last statement, which mypy and CodeQL both read as a path returning None beside paths returning a value (py/mixed-returns, union-attr). Raising AssertionError says the same thing in a form both understand, and pulling the regex match into one helper removes the second unguarded .group() call. * fix(detections): count quarantine by what the engine loads, not by directory Two published figures still read a file path where the engine is the source of truth, and the Sigma compiler made both of them wrong in the same way - 1,724 rules now execute while their files remain under _quarantine/. - generate_corpus_stats.py read only the native ruleset, so it reported 833 against a truth table correctly saying 2603 and failed. That is the gate it exists to be, aimed at the stale side of the comparison. - build_marketplace.py derived 'quarantined' from _quarantine/ membership, publishing 5937 quarantined when 4213 is the number that cannot fire. Both now ask the engine. The marketplace figure matches the truth table's quarantine count exactly, which is the cross-check that would have caught this had either one been derived the same way. * fix(detections): the last two published figures that read one ruleset project_stats.py counted only the native ruleset, so it reported 833 against a README correctly saying 2603 and failed the golden-pipeline gate. llms.txt regenerated for the same reason. The two scripts still reading detection_ruleset.json alone are deliberate: export_detection_ruleset.py writes it, and check_detection_fields.py is scoped to native rules because imported ones are held to the stronger replay proof instead - both say so where a reader will find it. --------- Co-authored-by: Beenu Arora <beenu@MacBook-Pro-3.local> |
||
|
|
e78f31768c |
Move all fourteen ruff declarations to 0.16, and stop the lint gate at services/ (#861)
* Reformat the tree under ruff 0.16, excluding the subtree nobody may edit Mechanical. `ruff format` with no other change, so the diff can be read as "the formatter moved" rather than reviewed line by line: 218 files, 862 insertions against 1075 deletions, almost all of it collapsing calls that 0.4.10 wrapped and 0.16 fits inside the 140-column limit. `plans/` is excluded in `ruff.toml` rather than reformatted. It is the archived prototype subtree that `.github/workflows/codeql.yml` already excludes and `scripts/check_mypy_baseline.py` excludes from every coverage direction, and the project rules forbid editing anything under it -- so formatting it would be a diff nobody may take. 844 lint findings and ~280 unformatted files live there. They are excluded because they cannot be fixed, which is a different statement from saying the code is clean. * Move all fourteen ruff declarations to 0.16, and stop the lint gate at services/ The bump alone reds every open pull request: `ruff format --check` is a hard gate on the required `Python - Lint & Type-check` job and 0.16 formats differently from 0.4.10. The reformat is the previous commit; this one moves the pin, fixes the findings, and answers the scope question. Fourteen declarations now read `>=0.16.8,<0.17` -- seven manifests, three workflows, `.devcontainer/Dockerfile`, and the three `poetry.lock` files that resolve it (now 0.16.9, which is byte-identical to 0.16.8 on both format and lint across this tree). The three findings 0.16 reports on `services/` are fixed, not suppressed: two `C420` comprehensions become `dict.fromkeys` (both values are string literals, so the shared-value hazard does not apply) and one `UP031` percent-format becomes an f-string in a test that counts characters. All three rewrites were asserted equal to the originals before being kept. Scope. `ruff check services/` left `scripts/` -- every CI gate in this repository, the code the rest of its claims are verified by -- linted by nothing. Lint now covers `services/ scripts/ tests/ tools/`, the trees the root `ruff.toml` governs that nothing else lints, and `ruff format --check .` covers everything, because formatting has no semantic content and `.` needs no edit when a tree is added. That surfaced 17 findings outside `services/`, each fixed at the source: two `B007` loops switched to `.values()`, a `B904` re-raise in `security_audit.py` now chains `from exc`, two `E402` imports that genuinely follow a `sys.path` mutation carry a reason next to the marker, and two over-length lines were wrapped. `E501` is ignored for the two detection-spec data modules. Both open their rule table with `# fmt: off`, so the formatter is already opted out of that layout deliberately, and all 199 long lines are single dict or string literals -- 72 positive fixtures, 66 negative, 50 `match_when` clauses, 11 descriptions. Two named files, not `scripts/`. `packages/` and `plugins/` stay outside the lint gate, and the gap is a number rather than a shrug: 91 findings and 2. Two of the five packages are linted by their own workflows under their own configs, and bringing the three published SDKs under this gate means behaviour-touching fixes that belong in a change reviewed as such. * Make packages/aisoc-detections clean under the ruff its own workflow now installs `python-detections.yml` lints `aisoc_detections detections tests` under the pin this PR moved, so the package has to be clean under 0.16 too. Two findings, both fixed at the source rather than silenced: `Callable` moves to `collections.abc`, and a `# noqa: BLE001` that 0.16 correctly reports as unused becomes the sentence it was standing in for -- a detection module is third-party content, so any exception at import is the author's and becomes a DetectionError naming the file. --------- Co-authored-by: Beenu Arora <beenu@MacBook-Pro-3.local> |
||
|
|
f3348223a8 |
Five gates said OK over nothing; the probe that found them is now a gate (#823)
* Five gates said OK over nothing; the probe that found them is now a gate Copying scripts/ into an empty git repository and running every wired check found five reporting OK over a tree containing nothing: the detection validator behind the rule count on the front page certifying zero rules as valid, a dashboard check that failed on an empty directory and passed on a missing one, "OK: 0 published Go module path(s)", every self-link healthy over zero files, and a health-probe audit printing a table header and exiting 0. Those five were fixed. The probe was a one-off, so the next gate written could reintroduce the defect freely. scripts/check_gate_contract.py is that probe made permanent. It runs all 69 inventoried checks the way a workflow runs each one, inside a git repository holding only scripts/, and requires each to exit non-zero. The inventory comes from check_gate_coverage.py rather than a second scanner here, because two scanners drift the first time either learns something the other has not. A run that failed for a reason the empty tree did not cause is INCONCLUSIVE and fails rather than counting as a refusal. Every way CI runs a script is probed and the worst result decides, because four subcommands under one name are four gates. Two properties come with it, both enforced with empty exception lists: a root resolved through git rather than from __file__, and a declared --self-test. Sixty of sixty-nine did the former; fifty-four lacked the latter. scripts/gate_toolkit.py holds the single implementation of both. Found while building it: - check_gate_coverage.py decided "inspects the repository" partly by looking for Path(__file__) -- the idiom being migrated away from -- so moving six gates onto the shared resolver dropped them out of the inventory. - The first spelling of the root property matched repo_root anywhere in the text, and check_gate_coverage.py emits it as a JSON key, so a gate rooted at __file__ read as compliant on a key in its own output. - check_route_tenant_scope.py printed "scanned 0 routes across 0 files" and then "OK: every route taking a tenant identifier authenticates" against a services/ tree with no routes in it. - security_audit.py's pnpm, python and go arms each printed "0 findings" over a tree with no manifests, and get_repo_root() fell back to cwd. * Make every gate find gate_toolkit however it is loaded Five CI jobs failed with ModuleNotFoundError: No module named 'gate_toolkit'. Sixteen test modules load a gate with importlib.util.spec_from_file_location, which executes the file without putting its directory on sys.path — so the scripts were importable as programs and not as modules, and the scripts that already import a sibling carry the same tweak for the same reason. Each gate now inserts its own directory before the import. Also corrects the claim-to-gate tally in the compliance evidence pack, which quotes it in prose and was the second place the figure lives. --------- Co-authored-by: Beenu Arora <beenu@MacBook-Pro-3.local> |
||
|
|
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>
|