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.
46 lines • 1.59 kB
TypeScript
/**
* Ubon MCP server.
*
* Exposes the Ubon scanner over the Model Context Protocol so AI assistants
* (Cursor, Claude Desktop, Windsurf, Cline, OpenAI Apps) can call:
*
* ubon.scan — run a full scan and return the v2.0.0 JSON report
* ubon.check — alias for scan with skipBuild=true (cheap loop)
* ubon.explain — return rule metadata + remediation hints
* ubon.preview-fixes — return file-level diffs for auto-fixable findings
* ubon.apply-fixes — write the auto-fixes to disk (gated by `--apply`)
*
* The `@modelcontextprotocol/sdk` is an *optional* dependency. We import it
* dynamically and degrade gracefully if it isn't installed, so users who
* never touch MCP don't carry the extra weight.
*/
interface ToolHandlerArgs {
directory?: string;
profile?: string;
fast?: boolean;
ruleId?: string;
apply?: boolean;
minConfidence?: number;
changedFiles?: string[];
gitChangedSince?: string;
baseSha?: string;
enabledRules?: string[];
disabledRules?: string[];
baseline?: string;
focusNew?: boolean;
focusSecurity?: boolean;
focusCritical?: boolean;
failOn?: 'none' | 'warning' | 'error';
showContext?: boolean;
explain?: boolean;
}
interface ToolHandlerResult {
content: Array<{
type: 'text';
text: string;
}>;
}
export declare const MCP_TEST_HANDLERS: Record<string, (args: ToolHandlerArgs) => Promise<ToolHandlerResult>>;
export declare function startMcpServer(): Promise<void>;
export {};
//# sourceMappingURL=server.d.ts.map