Skip to content

armgit / AiSOC

Public Imported from GitHub
0

Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.

7.3 KB
Raw Blame
[tool.poetry]
name = "aisoc-agents"
version = "0.1.0"
description = "AiSOC AI Agent Orchestrator - LangGraph-based autonomous investigation and response"
authors = ["Beenu Arora <[email protected]>"]
license = "MIT"

[tool.poetry.dependencies]
python = "^3.11"
# Floor 0.117: below it a `-> None` handler under PEP 563 trips FastAPI's
# "204 must not have a response body" assert at import. One range for
# every service — see services/api/pyproject.toml for the measurement.
fastapi = ">=0.117,<0.162"
uvicorn = {extras = ["standard"], version = ">=0.27,<0.55"}
pydantic = "^2.5.0"
pydantic-settings = "^2.1.0"
langchain = ">=1.3.9,<2.0.0"
langchain-core = ">=1.2.22,<2.0.0"
langchain-openai = ">=0.2.0,<2.0.0"
# langchain-core is floored at 1.2.22, which patches the high-severity
# advisory that kept the 0.3.x line unpatchable. The 0.3 cap was the
# reason this could not be fixed: the patch only exists on the 1.x line,
# so the pin had to move before the advisory could close.
#
# langgraph >=0.2 exposes the public ``START`` sentinel that
# ``app.investigator.orchestrator`` imports. The previous ``^0.0.30`` pin
# resolved to <0.1.0 which silently broke the import at runtime.
langgraph = ">=1.0.10,<2.0.0"
langchain-community = ">=0.3.0,<2.0.0"
# Transitive through langchain-community, floored explicitly: the
# resolver picked 3.14.1, which is inside the advisory range
# (<= 3.14.2). A transitive dependency with a known fix is still a
# known fix nobody applied.
aiohttp = ">=3.14.3"
# Transitive through langgraph, floored explicitly for the same reason as
# aiohttp: widening the top-level cap let the resolver reach a patched
# version, and it chose one inside the advisory range anyway. A range that
# permits the fix is not the same as a lock that takes it.
langgraph-checkpoint = ">=4.1.1"
langgraph-sdk = ">=0.3.15"
openai = ">=1.12,<4.0"
redis = {extras = ["hiredis"], version = ">=5.0.1,<9.0.0"}
httpx = ">=0.26,<0.29"
# The official MCP Python SDK, exact-pinned. Gap-closure Phase 5.
#
# Exact because the version is the behaviour: this library parses replies from
# third-party servers straight into the prompt that decides what the agent
# does next, so "whatever the resolver picked" is not a thing to be relaxed
# about, and a protocol or annotation change between two patch releases would
# move what `readOnlyHint` and `destructiveHint` mean to `app/mcp/policy.py`.
#
# The 1.x line rather than 2.x: mcp 2.x depends on `httpx2`, a second HTTP
# client alongside the `httpx` this service already pins. Two TLS and HTTP
# stacks inside the one service that reaches third-party servers is a cost
# with no return here. 1.30.0 requires httpx >=0.27.1,<1.0.0, which is inside
# the range above, so the MCP client and everything else share one stack.
mcp = "1.30.0"
structlog = ">=24.1,<27.0"
prometheus-client = ">=0.19,<0.27"
python-dateutil = "^2.8.2"
aiokafka = ">=0.10,<0.15"
# No `fastembed` extra. This service computes its embeddings through the
# OpenAI client and talks to Qdrant with explicit PointStruct upserts and
# vector search (app/tools/mitre_full.py) — nothing here calls the
# fastembed-backed convenience API (client.add / models.Document), so the
# extra only shipped an unused ONNX stack. It also pinned the whole service
# to a vulnerable Pillow: every fastembed release through 0.9.0 caps
# `pillow <13.0`, and the 2026-10 Pillow advisory set (28 CVEs at last count,
# published in waves across 2026-10-21, one critical) is fixed only in
# 13.0.0. Dropping the unused extra is what lets this lock carry the patched
# Pillow.
qdrant-client = "^1.9.0"
markdown = "^3.5"
# `<70` held this at 69.0, which carries PYSEC-2026-3940 (fixed in 70.0).
weasyprint = {version = ">=62,<71", optional = true}
# Floored at 0.58b0, and the floor is a measurement. FastAPI 0.141 keeps an
# opaque `_IncludedRouter` in `app.routes` rather than the flattened APIRoutes
# older releases left there, and `_get_route_details` in
# opentelemetry-instrumentation-fastapi reads `.path` off whatever matches.
# Below 0.58b0 that raises AttributeError *inside the ASGI tracing middleware*,
# before the request reaches a handler — so every request into an included
# router, which is the whole of `/api/v1`, returns 500. `instrument_app(app)`
# is unconditional in `create_application()`, so there is no configuration
# that avoids it.
#
# This shipped. The lock resolved 0.45b0 because the range read `^0.45b0`, and
# CI installed the package with no version bound at all, so CI resolved 0.66b0
# and the app worked there while the image could not serve a route. Measured
# against the exact locked set (fastapi 0.141.1 / starlette 1.7.0 / sdk 1.24.0):
# 0.45b0, 0.46b0, 0.50b0, 0.52b0, 0.54b0, 0.56b0 and 0.57b0 all return 500;
# 0.58b0 and every release after it return 200. The three services declaring
# this package with an open-ended `>=0.45b0` locked 0.65b0 and were unaffected,
# which is why only the two carrying a caret were broken.
# The sdk moves with it: instrumentation 0.58b0 pairs with sdk 1.37.
opentelemetry-sdk = ">=1.37,<2"
opentelemetry-instrumentation-fastapi = ">=0.58b0,<0.70"
opentelemetry-instrumentation-httpx = ">=0.58b0,<0.70"
asyncpg = ">=0.29,<0.33"
sqlalchemy = {extras = ["asyncio"], version = "^2.0.25"}
apscheduler = "^3.10.4"
pyyaml = "^6.0.1"
# Imported by app.security.credential_vault. This must be a direct runtime
# dependency rather than an accidental dependency of Poetry itself.
cryptography = ">=46,<51"
# jsonschema is consumed by the NL → playbook drafter (T3.7) to validate
# every drafted playbook against schemas/playbook.schema.json before the
# editor loads it, and by scripts/lint_playbooks.py. Pinned to the
# 4.x line that ships Draft 2020-12 support.
jsonschema = ">=4.21,<5.0"

# The hunting agent reads the ClickHouse lake. The image shipped without a
# driver, so `lake-live.yml` installed one by hand before its tests -- which
# means the workflow proved something about a package set the published
# image does not have. Same range as services/api, kept equal by
# scripts/check_dependency_pins.py.
clickhouse-driver = "^0.2.8"

[tool.poetry.group.dev.dependencies]
# Floored at 9.0.3 for GHSA advisory coverage; the caret pins excluded it.
# pytest-asyncio is widened to match — 0.23 predates pytest 9 and the two
# resolve together or not at all.
pytest = ">=9.0.3,<10.0"
pytest-asyncio = ">=1.0,<2.0"
respx = ">=0.22,<0.24"

[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
# Custom marker registry — keep ``pytest --strict-markers`` clean.
# ``integration`` gates tests that require external infra (Kafka, Neo4j,
# Postgres). Unit-only CI runs ``pytest -m "not integration"``.
markers = [
    "integration: mark a test as requiring external infrastructure (Kafka, Neo4j, Postgres). Run with `pytest -m integration`.",
    "touches_database: the test drives a real database client against a DSN it sets itself (typically an unreachable one, to prove a fail-soft path). Exempt from the no-ambient-database guard in tests/conftest.py; it needs no infrastructure, so it is not `integration`.",
]

# Same shape as services/api and services/osquery-tls rather than a third
# strictness level. `python_version` is pinned so the finding set does not
# move with whatever interpreter mypy happens to run on.
[tool.mypy]
python_version = "3.11"
strict = false
ignore_missing_imports = true

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"