mirror of
https://github.com/beenuar/AiSOC.git
synced 2026-11-24 08:35:46 +08:00
Adds two first-class EDR connectors for the open-source osquery ecosystem,
filling the long-standing endpoint coverage gap. Both connectors poll on the
standard 5-minute cadence, normalize to AiSOC's 4-tier severity ladder, and
declare PULL_LOGS / QUERY_LOGS / QUERY_PROCESSES / PIVOT_HOST capabilities so
later PRs can wire kinetic actions on top.
osctrl
- services/connectors/app/connectors/osctrl.py
- Polls /admin/json/queries for completed distributed queries, then
/admin/json/data/{query_name} for result rows.
- Severity is synthesised from the osquery table queried (processes,
kernel_modules, launchd, etc.) so detection rules can promote interesting
rows without per-environment tuning.
- Token auth via the long-lived admin token from the osctrl UI.
FleetDM
- services/connectors/app/connectors/fleetdm.py
- Two ingestion paths: host posture transitions (/api/latest/fleet/hosts) and
saved-query report rows (/api/latest/fleet/queries + reports).
- Posture transitions get their own severity ladder (offline > missing >
online); query rows reuse the table-name severity map.
- Optional team_id scoping; default spans all teams.
Plumbing
- Both connectors registered in services/connectors/app/connectors/__init__.py.
- Marketplace manifests at plugins/{osctrl,fleetdm}/plugin.yaml.
- Per-connector setup walkthroughs at apps/docs/docs/connectors/{osctrl,fleetdm}.md
with prerequisites, polling details, severity tables, and troubleshooting.
- Sidebar updated; marketplace synced (plugins 40 -> 42, detections 6948 -> 6973
via re-curation pass).
- 17 new respx-backed unit tests in test_osquery_connectors.py covering schema,
capabilities, normalization, severity mapping, test_connection, and
fetch_alerts for both connectors. Full connector suite still green (64/64).
Part of issue #44. PR2 migrates ~16 quarantined osquery detection rules; PR3
adds the osquery_live_query playbook step backed by these connectors.