/**
 * Dependency Scanner
 *
 * Scans node_modules for:
 *   1. Known malicious packages (CRITICAL)
 *   2. Typosquat packages — Levenshtein distance 1-2 from popular packages (HIGH)
 *   3. Suspicious postinstall scripts — network, exec, credential access patterns (HIGH/MEDIUM)
 *   4. New packages with postinstall scripts published < 7 days ago (MEDIUM)
 *
 * Inspired by the axios 1.14.1 supply chain attack and the Claude Code
 * typosquatting attacks discovered 31 Mar 2026.
 *
 * Usage:
 *   shieldcortex audit --deps                      # scan ./node_modules
 *   shieldcortex audit --deps-global               # scan global npm prefix
 *   shieldcortex audit --deps-path /some/path      # scan specific path
 *   shieldcortex audit --deps --quarantine         # scan + quarantine CRITICAL/HIGH
 *   shieldcortex audit --deps --clean --force      # scan + permanently delete CRITICAL
 *   shieldcortex audit --deps --auto-protect       # scan + auto-quarantine CRITICAL
 */
import type { AuditFinding, ScannerResult } from './types.js';
/**
 * Compute Levenshtein distance between two strings.
 * Standard dynamic-programming implementation, no external deps.
 */
export declare function levenshtein(a: string, b: string): number;
export interface QuarantineManifest {
    packageName: string;
    version: string;
    reason: string;
    originalPath: string;
    quarantinedAt: string;
    severity: string;
}
/**
 * Quarantine a package by moving it from node_modules to
 * ~/.shieldcortex/quarantine/deps/<pkg>-<timestamp>/.
 *
 * Creates a manifest.json alongside the quarantined files.
 * Only acts on CRITICAL and HIGH findings.
 *
 * @returns The quarantine destination path, or null if not quarantined.
 */
export declare function quarantinePackage(finding: AuditFinding, nodeModulesPath: string): string | null;
/**
 * Permanently delete a malicious package from node_modules.
 *
 * Only acts on CRITICAL findings (known malicious packages from blocklist).
 *
 * @returns The package name that was deleted, or null if not deleted.
 */
export declare function cleanPackage(finding: AuditFinding, nodeModulesPath: string): string | null;
export interface DependencyScanOptions {
    /** Absolute path to node_modules directory */
    nodeModulesPath: string;
}
export declare function scanDependencies(opts: DependencyScanOptions): ScannerResult;
/**
 * Resolve the node_modules path for a given mode.
 */
export declare function resolveNodeModulesPath(mode: 'local' | 'global' | 'path', customPath?: string): string;
