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.05 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const rule = {
meta: {
id: 'SEC001',
category: 'security',
severity: 'high',
message: 'Potential API key or secret token exposed',
fix: 'Move sensitive keys to environment variables',
impact: 'Exposed credentials can be stolen from source code and used to access your services',
helpUri: 'https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html'
},
impl: {
patterns: [
{
ruleId: 'SEC001',
confidence: 0.9,
pattern: /(['"`])(?:sk-|pk_test_|pk_live_|rk_live_|rk_test_).+?\1/gi,
message: 'Potential API key or secret token exposed',
severity: 'high',
fix: 'Move sensitive keys to environment variables'
}
],
fileTypes: ['js', 'jsx', 'ts', 'tsx', 'svelte', 'astro', 'env']
}
};
exports.default = rule;
//# sourceMappingURL=SEC001.js.map