diff --git a/forge/comms/platformAutomation.js b/forge/comms/platformAutomation.js index a2e32e6e5d..d5ae7c91f6 100644 --- a/forge/comms/platformAutomation.js +++ b/forge/comms/platformAutomation.js @@ -99,14 +99,20 @@ class PlatformAutomationHandler { const user = await this.app.db.models.User.byId(userId) if (user) { const { token } = await this.app.expert.mcp.getOrCreatePlatformToken(user) - const inject = (opts) => this.app.inject({ - ...opts, - headers: { - ...opts.headers, - authorization: `Bearer ${token}`, - 'x-ff-automation-source': 'expert' - } - }) + const inject = (opts) => { + const nonce = this.app.nonceStore.createSourceNonce({ + source: 'mcp:expert', + toolName + }) + return this.app.inject({ + ...opts, + headers: { + ...opts.headers, + authorization: `Bearer ${token}`, + 'x-ff-source-nonce': nonce + } + }) + } const { formatResponse } = require('../ee/lib/mcp/toolLoader') const response = await tool.handler(args, { inject }) diff --git a/frontend/src/components/audit-log/AuditEntry.vue b/frontend/src/components/audit-log/AuditEntry.vue index f4a7583f69..0cfeb2567d 100644 --- a/frontend/src/components/audit-log/AuditEntry.vue +++ b/frontend/src/components/audit-log/AuditEntry.vue @@ -29,8 +29,9 @@ -