feat(audit): audit human approval decisions - #3162
Draft
topher-lo wants to merge 1 commit into
Draft
Conversation
topher-lo
added a commit
that referenced
this pull request
Jul 31, 2026
Add detail pages for platform, organization agent, and workspace MCP access logs, and expand the organization audit page for detection engineers with attribution, scope, approval, and privacy detail. Rewrite the security architecture page to lead each control with the concrete threat it answers, and correct the Mermaid diagram: MCP access activity records inbound external MCP client calls, not outbound proxy calls. Section order is unchanged. Agent OTel and agent_approval content follows the contracts in #2638, #2649, #2650, and #3162, which are not yet merged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
agent_approvalaudit webhook event per accepted or rejected tool decisionSecurity and performance boundaries
Testing
uv run ruff check ...uv run ruff format --check ...uv run basedpyright --warnings --threads 4uv run pytest tests/unit/test_agent_approval_audit.py -q --confcutdir=tests/unit(9 passed)tests/unit/test_audit_service.py(3 passed)The normal database-backed suite could not run locally because Docker/PostgreSQL was unavailable; the DB-independent regression tests above passed.
Summary by cubic
Adds audit logging for human approval decisions in the agent and introduces batched webhook delivery to keep the approval path fast and reliable.
New Features
agent_approvalwebhook event per accepted or rejected tool call from the UI/API; Slack/service-originated decisions are excluded for now.dedupe_idand Redis (24h TTL); fall back to best-effort if Redis is unavailable.httpxclient, up to 4 concurrent posts, and a 10s batch deadline.Refactors
AuditServicenow supports batched enrichment viaAuditEventInputandcreate_events, resolving webhook/actor/headers once and streaming throughspawn_audit_batch.tracecat/audit/batch.pyfor grouped delivery (AuditBatchDelivery,deliver_audit_batch) with pending limits.arguments_overridden,decision) while stripping secrets fromdenial_reason.Written for commit 23f9281. Summary will update on new commits.