T05 · Unauthorized Access and Privilege Escalation
- Location
project/platforms/linux/src/session.ts:23- Finding
Application and Sensitive Capability Requests Are Silently Auto-Approved
- Content
View full analysis
app.resolved && !app.alreadyGranted) .map(app => ({ bundleId: app.resolved!.bundleId, displayName: app.resolved!.displayName, grantedAt: Date.now(), tier: app.proposedTier, })) const denied = req.apps .filter(app => !app.resolved) .map(app => ({ bundleId: app.requestedName, reason: 'not_installed' as const, })) return { granted, denied, flags: { ...DEFAULT_GRANT_FLAGS, ...req.requestedFlags, }, } } ``` The automatic approval function is installed as the permission handler: ```ts onPermissionRequest: async req => autoApprovePermission(req), ``` Sensitive permission requests reach that handler through the MCP access-request flow: ```ts if (typeof args.clipboardRead === "boolean") { requestedFlags.clipboardRead = args.clipboardRead; } if (typeof args.clipboardWrite === "boolean") { requestedFlags.clipboardWrite = args.clipboardWrite; } if (typeof args.systemKeyCombos === "boolean") { requestedFlags.systemKeyCombos = args.systemKeyCombos; } if (needDialog.length > 0 || Object.keys(requestedFlags).length > 0) { const req: CuPermissionRequest = { requestId: randomUUID(), reason, apps: needDialog, requestedFlags, screen ...[truncated 3182 chars]- Remediation
View remediation
