UNPKG

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.

93 lines 2.51 kB
import type { RuleCategory, RuleSeverity } from '../rules/types'; export type { RuleCategory, RuleSeverity } from '../rules/types'; export interface ScanResult { type: 'error' | 'warning' | 'info'; category: RuleCategory; message: string; file?: string; line?: number; range?: { startLine: number; startColumn: number; endLine: number; endColumn: number; }; severity: RuleSeverity; ruleId: string; confidence: number; confidenceReason?: string; match?: string; fingerprint?: string; fix?: string; fixEdits?: FixEdit[]; helpUri?: string; suppressed?: boolean; suppressionReason?: string; context?: { before: string[]; line: string; after: string[]; }; } export interface ScanOptions { directory: string; port?: number; skipBuild?: boolean; include?: string[]; exclude?: string[]; verbose?: boolean; minConfidence?: number; enabledRules?: string[]; disabledRules?: string[]; failOn?: 'none' | 'warning' | 'error'; baselinePath?: string; updateBaseline?: boolean; useBaseline?: boolean; changedFiles?: string[]; gitChangedSince?: string; profile?: 'auto' | 'react' | 'next' | 'lovable' | 'sveltekit' | 'astro' | 'remix' | 'hono'; gitHistoryDepth?: number; crawlInternal?: boolean; crawlStartUrl?: string; crawlDepth?: number; crawlTimeoutMs?: number; fast?: boolean; skipPatterns?: string[]; maxFileSize?: number; focusCritical?: boolean; focusSecurity?: boolean; focusNew?: boolean; detailed?: boolean; quickTopN?: number; json?: boolean; color?: 'auto' | 'always' | 'never'; groupBy?: 'category' | 'file' | 'rule' | 'severity'; format?: 'human' | 'table'; minSeverity?: 'low' | 'medium' | 'high'; maxIssues?: number; showContext?: boolean; explain?: boolean; showConfidence?: boolean; showSuppressed?: boolean; ignoreSuppressed?: boolean; clearCache?: boolean; noCache?: boolean; noResultCache?: boolean; interactive?: boolean; quiet?: boolean; ndjson?: boolean; allowConfigJs?: boolean; } export interface FixEdit { file: string; startLine: number; startColumn: number; endLine: number; endColumn: number; replacement: string; } export interface Scanner { name: string; scan(options: ScanOptions): Promise<ScanResult[]>; } //# sourceMappingURL=index.d.ts.map