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.

fix(api): set response_model=None on 204 DELETE endpoints

Beenu Aroraa5a05d177e36
diff --git a/services/api/app/api/v1/endpoints/assets.py b/services/api/app/api/v1/endpoints/assets.py
index 800ae05a0..3f12254b1 100644
--- a/services/api/app/api/v1/endpoints/assets.py
+++ b/services/api/app/api/v1/endpoints/assets.py
@@ -168,7 +168,7 @@ async def update_asset(
return asset
[email protected]("/{asset_id}", status_code=status.HTTP_204_NO_CONTENT)
[email protected]("/{asset_id}", status_code=status.HTTP_204_NO_CONTENT, response_model=None)
async def delete_asset(
asset_id: uuid.UUID,
db: AsyncSession = Depends(get_db),
diff --git a/services/api/app/api/v1/endpoints/autonomy_policy.py b/services/api/app/api/v1/endpoints/autonomy_policy.py
index bdc401d8f..b622a3f94 100644
--- a/services/api/app/api/v1/endpoints/autonomy_policy.py
+++ b/services/api/app/api/v1/endpoints/autonomy_policy.py
@@ -438,7 +438,7 @@ async def upsert_action_threshold(
)
[email protected]("/{action}", status_code=status.HTTP_204_NO_CONTENT)
[email protected]("/{action}", status_code=status.HTTP_204_NO_CONTENT, response_model=None)
async def reset_action_threshold(
action: str,
user: AuthUser,
diff --git a/services/api/app/api/v1/endpoints/knowledge_base.py b/services/api/app/api/v1/endpoints/knowledge_base.py
index eddff5fe0..6d3aac61b 100644
--- a/services/api/app/api/v1/endpoints/knowledge_base.py
+++ b/services/api/app/api/v1/endpoints/knowledge_base.py
@@ -196,7 +196,7 @@ async def get_document(doc_id: uuid.UUID, db: DBSession, user: AuthUser) -> KBDo
return _row_to_doc(row)
[email protected]("/documents/{doc_id}", status_code=status.HTTP_204_NO_CONTENT, summary="Remove KB document")
[email protected]("/documents/{doc_id}", status_code=status.HTTP_204_NO_CONTENT, response_model=None, summary="Remove KB document")
async def delete_document(doc_id: uuid.UUID, db: DBSession, user: AuthUser) -> None:
existing = (await db.execute(text("SELECT title FROM aisoc_kb_documents WHERE id = :id").bindparams(id=doc_id))).fetchone()
if not existing:
diff --git a/services/api/app/api/v1/endpoints/mssp.py b/services/api/app/api/v1/endpoints/mssp.py
index 63fd97a1f..edaa8882f 100644
--- a/services/api/app/api/v1/endpoints/mssp.py
+++ b/services/api/app/api/v1/endpoints/mssp.py
@@ -193,7 +193,7 @@ async def create_delegation(
return delegation
[email protected]("/delegations/{delegation_id}", status_code=status.HTTP_204_NO_CONTENT)
[email protected]("/delegations/{delegation_id}", status_code=status.HTTP_204_NO_CONTENT, response_model=None)
async def revoke_delegation(
delegation_id: uuid.UUID,
db: AsyncSession = Depends(get_db),
@@ -435,7 +435,7 @@ async def update_rule_pack(
return pack
[email protected]("/rule-packs/{pack_id}", status_code=status.HTTP_204_NO_CONTENT)
[email protected]("/rule-packs/{pack_id}", status_code=status.HTTP_204_NO_CONTENT, response_model=None)
async def delete_rule_pack(
pack_id: uuid.UUID,
db: AsyncSession = Depends(get_db),
@@ -469,7 +469,7 @@ async def add_rule_to_pack(
return {"status": "ok", "pack_id": str(pack_id), "rule_id": str(body.rule_id)}
[email protected]("/rule-packs/{pack_id}/rules/{rule_id}", status_code=status.HTTP_204_NO_CONTENT)
[email protected]("/rule-packs/{pack_id}/rules/{rule_id}", status_code=status.HTTP_204_NO_CONTENT, response_model=None)
async def remove_rule_from_pack(
pack_id: uuid.UUID,
rule_id: uuid.UUID,
@@ -548,7 +548,7 @@ async def list_overrides(
return list(result.scalars().all())
[email protected]("/overrides/{override_id}", status_code=status.HTTP_204_NO_CONTENT)
[email protected]("/overrides/{override_id}", status_code=status.HTTP_204_NO_CONTENT, response_model=None)
async def delete_override(
override_id: uuid.UUID,
db: AsyncSession = Depends(get_db),
diff --git a/services/api/app/api/v1/endpoints/remediation.py b/services/api/app/api/v1/endpoints/remediation.py
index af428bcbc..d2885610e 100644
--- a/services/api/app/api/v1/endpoints/remediation.py
+++ b/services/api/app/api/v1/endpoints/remediation.py
@@ -170,7 +170,7 @@ async def add_to_whitelist(
return entry
[email protected]("/whitelist/{entry_id}", status_code=status.HTTP_204_NO_CONTENT)
[email protected]("/whitelist/{entry_id}", status_code=status.HTTP_204_NO_CONTENT, response_model=None)
async def remove_from_whitelist(
entry_id: uuid.UUID,
db: AsyncSession = Depends(get_db),
diff --git a/services/api/app/api/v1/endpoints/reports.py b/services/api/app/api/v1/endpoints/reports.py
index 4fd8fb33d..cb97a4371 100644
--- a/services/api/app/api/v1/endpoints/reports.py
+++ b/services/api/app/api/v1/endpoints/reports.py
@@ -121,7 +121,7 @@ async def get_template(
return tmpl
[email protected]("/templates/{template_id}", status_code=status.HTTP_204_NO_CONTENT)
[email protected]("/templates/{template_id}", status_code=status.HTTP_204_NO_CONTENT, response_model=None)
async def delete_template(
template_id: uuid.UUID,
db: AsyncSession = Depends(get_db),
diff --git a/services/api/app/api/v1/endpoints/threat_intel.py b/services/api/app/api/v1/endpoints/threat_intel.py
index 6943c072b..18503765d 100644
--- a/services/api/app/api/v1/endpoints/threat_intel.py
+++ b/services/api/app/api/v1/endpoints/threat_intel.py
@@ -150,7 +150,7 @@ async def get_ioc(
return ioc
[email protected]("/iocs/{ioc_id}", status_code=status.HTTP_204_NO_CONTENT)
[email protected]("/iocs/{ioc_id}", status_code=status.HTTP_204_NO_CONTENT, response_model=None)
async def delete_ioc(
ioc_id: uuid.UUID,
db: AsyncSession = Depends(get_db),
@@ -226,7 +226,7 @@ async def create_feed(
return feed
[email protected]("/feeds/{feed_id}", status_code=status.HTTP_204_NO_CONTENT)
[email protected]("/feeds/{feed_id}", status_code=status.HTTP_204_NO_CONTENT, response_model=None)
async def delete_feed(
feed_id: uuid.UUID,
db: AsyncSession = Depends(get_db),