Repository navigation
feat(audit): record integration tool calls made through the v2 API and Sim MCP - #10680
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
Confidence Score: 5/5
[Medium impact] The PR appears safe to merge; no new actionable issues were found. SummaryAdds
Reviews (3) · Last reviewed commit: "fix(audit): keep error text out of tool...." · Reviewed by Greptile |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
tool.executed(resource typetool). It records every integration tool run directly throughPOST /api/v2/tools/{toolId}/execute, which also covers Sim's MCP server (executeTool) as used from Claude Code or Cursor. Before this, a Gmail send or Slack post made that way left no audit entry; only a mergedcredential.accessedrow for the token, with no tool name.projectAudit. Tools witheffect: 'write'are audited, and so are tools with an unknown effect, so anything that may change something outside Sim is covered.metadata.status: failed. That covers a write the provider rejected, which may have partly applied, and one Sim refused inside the run, such as a denied tool. Error text is not stored, because provider and parser errors can echo the input.credential.accessedtrail covers them. This keeps the audit log readable when a coding agent lists or searches in a loop.credentialId. MCP calls getsurface: mcpfrom the client-info header the MCP dispatcher already sets. Tool inputs, outputs and error messages are never copied into the entry.Type of Change
Testing
execute-tool.test.ts(38): write audited without copying input; failed write (provider rejection, in-run refusal, input-echoing error) audited as failed without error text; read not audited; pre-dispatch refusal not audited. Each guard was reverted to confirm its test goes red.packages/audittests, lint, explicit-any, comment-hygiene, boundaries, test-patterns, source-conventionsChecklist
test-auditauthoring gate)