-
Notifications
You must be signed in to change notification settings - Fork 0
Audit log query API -- GET /security/audit #1121
Copy link
Copy link
Closed
Labels
prio:mediumShould do, but not blockingShould do, but not blockingscope:smallLess than 1 day of workLess than 1 day of workspec:apispec:securityDESIGN_SPEC Section 12 - Security & Approval SystemDESIGN_SPEC Section 12 - Security & Approval Systemtype:featureNew feature implementationNew feature implementation
Metadata
Metadata
Assignees
Labels
prio:mediumShould do, but not blockingShould do, but not blockingscope:smallLess than 1 day of workLess than 1 day of workspec:apispec:securityDESIGN_SPEC Section 12 - Security & Approval SystemDESIGN_SPEC Section 12 - Security & Approval Systemtype:featureNew feature implementationNew feature implementation
Problem
AuditLoginsrc/synthorg/security/audit.pyrecords every security evaluation with agent, tool, verdict, and evidence. But there is noGET /security/auditquery endpoint. The audit trail is write-only from an API perspective -- it can only be accessed via log sinks (file/syslog/HTTP) or by directly reading the persistence layer.External control-plane consumers (SIEM integrations, compliance tooling) need queryable access to the audit trail.
Source:
docs/research/control-plane-audit.md(G5), closes research #688.Solution
Add
GET /security/auditwith filters:agent_id-- filter by agentverdict-- filter byALLOW,DENY,ESCALATEaction_type-- filter by tool/action categorysince/until-- time rangeResponse: paginated list of audit records. Consistent with the existing paginated response convention.
Files
src/synthorg/security/audit.py-- verify persistence layer supports querysrc/synthorg/api/controllers/security.py(or newaudit.py) -- add route