export type Severity = 'critical' | 'high' | 'medium' | 'info'; /** * Scan context controls how findings are severity-adjusted: * - app: default — standard scanning * - framework: framework-aware downgrades for expected patterns * - skill: strict — no downgrades (third-party skill/plugin scanning) */ export type ScanContext = 'app' | 'framework' | 'skill'; export type Confidence = 'definite' | 'likely' | 'possible'; export interface Finding { id?: string; scanner: string; severity: Severity; title?: string; description?: string; rule?: string; message?: string; evidence?: string; file?: string; line?: number; recommendation?: string; confidence?: Confidence; /** Tagged as [TEST] — from test files, excluded from scoring */ isTestFile?: boolean; /** Tagged as third-party code (node_modules, venv, vendor) vs own source code */ isThirdParty?: boolean; } export interface ScanResult { scanner: string; findings: Finding[]; scannedFiles?: number; filesScanned?: number; duration: number; } export interface ScanReport { version?: string; timestamp: string; target: string; results: ScanResult[]; summary?: ReportSummary; totalFindings?: number; criticalCount?: number; highCount?: number; mediumCount?: number; lowCount?: number; } export interface DimensionScore { score: number; grade: string; findings: number; } export interface ReportSummary { totalFindings: number; critical: number; high: number; medium: number; info: number; grade: string; score: number; scannedFiles: number; ignoredFiles?: number; duration: number; dimensions?: { codeSafety: DimensionScore; configSafety: DimensionScore; defenseScore: DimensionScore; environmentSafety: DimensionScore; }; scannerBreakdown?: Record>; } export interface ScannerOptions { exclude?: string[]; context?: ScanContext; includeVendored?: boolean; /** Additional glob patterns from .sentoriignore */ sentoriIgnorePatterns?: string[]; /** When true, scan sub-projects inside workspace/ directories. Default: false. */ includeWorkspaceProjects?: boolean; } export interface ScannerModule { name: string; description: string; scan(targetPath: string, options?: ScannerOptions): Promise; } /** Legacy scanner interface (class-based, single-arg scan) */ export interface Scanner { name: string; description: string; scan(targetDir: string): Promise; } export interface McpServerConfig { mcpServers?: Record; [key: string]: unknown; } export interface McpServerEntry { command?: string; args?: string[]; env?: Record; tools?: McpToolConfig[]; permissions?: Record; allowlist?: string[]; denylist?: string[]; [key: string]: unknown; } export interface McpToolConfig { name: string; description?: string; permissions?: string[]; allowedPaths?: string[]; blockedPaths?: string[]; [key: string]: unknown; } //# sourceMappingURL=types.d.ts.map