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.

66 lines 3.29 kB
import { ScanOptions, ScanResult } from './types'; /** * `UbonScan` is the orchestration layer: it picks scanners based on the * profile, runs them concurrently, applies fingerprinting / suppressions / * baseline, and hands the final list of `ScanResult`s to a reporter. * * It deliberately knows nothing about *how* results are rendered — that's * the job of `HumanReporter` / `InteractiveReporter` / the JSON writers in * `cli/shared.ts` / the upcoming MCP tools. */ export declare class UbonScan { private scanners; private linkScanner; private logger; private colorMode; private humanReporter; private interactiveReporter; constructor(verbose?: boolean, silent?: boolean, colorMode?: 'auto' | 'always' | 'never', quiet?: boolean); /** * Toggle quiet mode after construction. Used by `cli/shared.ts` when the * CLI flag `--quiet` is observed but the orchestrator was constructed * earlier (e.g. by the MCP server). Keeps the public ctor signature stable. */ setQuiet(quiet: boolean): void; diagnose(options: ScanOptions): Promise<ScanResult[]>; private detectProfile; private resolveScanners; printResults(results: ScanResult[], options?: ScanOptions): Promise<void>; /** @deprecated Use the InteractiveReporter directly. Kept for back-compat. */ runInteractive(results: ScanResult[], options: ScanOptions): Promise<void>; private filterResults; private applyFocusFilters; /** * Collapse findings that target the same `(ruleId, file, line)` tuple. * Multiple scanners (e.g. `security-scanner` + `react-security-scanner`) * sometimes match the same AST node and emit the same rule at the same * location; users see the redundancy as noise. Keep the highest-confidence * finding; tie-break on richer `match` context. */ private dedupeResults; private computeFingerprint; private sortResults; private applyBaseline; } export * from './types'; export { SecurityScanner } from './scanners/security-scanner'; export { AstSecurityScanner } from './scanners/ast-security-scanner'; export { LinkScanner } from './scanners/link-scanner'; export { AccessibilityScanner } from './scanners/accessibility-scanner'; export { DevelopmentScanner } from './scanners/development-scanner'; export { EnvScanner } from './scanners/env-scanner'; export { IacScanner } from './scanners/iac-scanner'; export { OSVScanner } from './scanners/osv-scanner'; export { ViteScanner } from './scanners/vite-scanner'; export { ReactSecurityScanner } from './scanners/react-security-scanner'; export { ReactPatternsScanner } from './scanners/react-patterns-scanner'; export { AgentSettingsScanner } from './scanners/agent-settings-scanner'; export { LovableSupabaseScanner } from './scanners/lovable-supabase-scanner'; export { VibeScanner } from './scanners/vibe-scanner'; export { AIScanner } from './scanners/ai-scanner'; export { FrameworkScanner } from './scanners/framework-scanner'; export { BaseScanner } from './scanners/base-scanner'; export { HumanReporter } from './reporters/HumanReporter'; export { InteractiveReporter } from './reporters/InteractiveReporter'; export { calculateSecurityPosture } from './core/Posture'; //# sourceMappingURL=index.d.ts.map