ubon
Version:
Security scanner for AI-generated apps (Cursor, Lovable, Windsurf, v0). Catches hardcoded secrets, prompt injection, hallucinated imports, Server Actions / Edge runtime mistakes, and the vibe-coded vulnerabilities traditional linters miss.
28 lines • 1.2 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
/**
* AI005: Secrets inside MCP server configuration.
*
* Cursor, Claude Desktop, Windsurf and other MCP clients load their server
* list from JSON files (`.cursor/mcp.json`, `mcp.json`, `claude_desktop_config.json`,
* etc.). It is common for vibe-coders to commit these files with API keys,
* PATs or DB URLs baked into the `env` block.
*
* Detection lives in AIScanner because we need to parse the JSON shape.
*/
const rule = {
meta: {
id: 'AI005',
category: 'security',
severity: 'high',
message: 'MCP server configuration contains hardcoded secret',
fix: 'Reference an env var (e.g. `${env:GITHUB_TOKEN}` or `process.env.X`) instead of committing the literal value, and add the config file to .gitignore.',
impact: 'MCP server configs are routinely shared in repos and Linear tickets; embedded tokens grant broad scopes (GitHub PATs, DB URLs, Slack bot tokens).',
helpUri: 'https://modelcontextprotocol.io/docs/concepts/configuration'
},
impl: {
fileTypes: ['json']
}
};
exports.default = rule;
//# sourceMappingURL=AI005.js.map