T05 · Unauthorized Access and Privilege Escalation
Warning
- Location
- scripts/assess.js:116
- Finding
- Excessive Inspection of Credentials, Agent Memory, and Global Configuration<![CDATA[ ## Vulnerability Details **File Location**: `scripts/assess.js:116-148`, `scripts/assess.js:186-208`, `scripts/assess.js:246-253`, `scripts/assess.js:272-297`, `scripts/assess.js:386-400` **Vulnerability Type**: Excessive access to sensitive local data **Risk Level**: Medium ### Vulnerable Code ```javascript // Check wallet credentials const walletFiles = this.findFiles(this.config.workspace, /wallet|credentials/i); if (walletFiles.length > 0) { evidence.proof.walletFiles = walletFiles.map(f => path.basename(f)); points += 10; } // Check for Bankr credentials const bankrCreds = this.safeReadJson(path.join(this.config.workspace, 'bankr-credentials.json')); if (bankrCreds?.api_key) { evidence.proof.bankrConfigured = true; points += 15; } // Check for x402 wallet const x402Wallet = this.safeReadJson(path.join(this.config.workspace, 'x402-wallet.json')); if (x402Wallet?.address) { evidence.proof.x402Wallet = x402Wallet.address; points += 10; } // Check for on-chain identity const memoryPath = path.join(this.config.workspace, 'MEMORY.md'); if (memoryPath && fs.existsSync(memoryPath)) { const memory = fs.readFileSync(memoryPath, 'utf8'); if (memory.includes('ERC-8004') && memory.includes('0x')) { evidence.proof.onChainIdentity = 'ERC-8004 registered'; points += 20; } const txMatches = memory.match(/transaction|transfer|swap|bridge/gi); if (txMatches && txMatches.length > 5) { evidence.proof.transactionHistory = `${txMatches.length} TX references`; points += 15; } } ``` ```javascript // Check gateway config for channels const gatewayConfig = this.safeReadJson(this.config.openclawConfig); const channels = gatewayConfig?.channels || {}; const activeChannels = Object.keys(channels).filter(k => channels[k]?.enabled !== false); evidence.proof.channels = activeChannels; points += Math.min(25, activeChannels.length * 8); // Check for email capability const protonCreds = this.safeReadJson(path.join(this.config.workspa ...[truncated 3591 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Make all credential, memory, and global-configuration probes explicitly opt-in. 2. Require informed consent before assessing a workspace owned by another Agent. 3. Enforce an allowlist or trusted-root boundary for workspace paths. 4. Do not parse API-key or password values. Use a credential manager that exposes only a boolean configuration status. 5. If ordinary files must be checked, inspect only file existence and permissions rather than file contents. 6. Replace full `MEMORY.md` parsing with a dedicated, minimal assessment manifest containing non-sensitive capability declarations. 7. Redact wallet addresses, email addresses, credential filenames, and communication channels from reports by default. 8. Document every file and configuration location that the assessment may access before execution. 9. Isolate cross-Agent assessments in a process that has read access only to an approved assessment manifest. 10. Clear references to parsed sensitive data promptly and avoid verbose output that could expose derived identity information. ]]>
