"use strict";
/**
 * Layer 2: Structural Scan
 * Contextual analysis using variable heuristics, logic gate detection,
 * dangerous functions, risky imports, auth anti-patterns, framework checks,
 * and AI code fingerprinting
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.detectXXEPatterns = exports.detectLogInjection = exports.detectSSRFPatterns = exports.detectSecurityHeaders = exports.detectModelSupplyChain = exports.detectMCPSecurity = exports.detectAIPackageHallucination = exports.detectAISchemaValidation = exports.detectAIEndpointProtection = exports.detectRAGSafetyIssues = exports.detectAIAgentTools = exports.detectAIExecutionSinks = exports.detectAIPromptHygiene = exports.detectBYOKPatterns = exports.detectDataExposure = exports.detectAIFingerprints = exports.detectFrameworkIssues = exports.detectAuthAntipatterns = exports.detectRiskyImports = exports.detectDangerousFunctions = exports.detectLogicGates = exports.detectSensitiveVariables = void 0;
exports.runLayer2Scan = runLayer2Scan;
const auth_helper_detector_1 = require("../utils/auth-helper-detector");
const path_exclusions_1 = require("../utils/path-exclusions");
const context_helpers_1 = require("../utils/context-helpers");
const variables_1 = require("./variables");
const logic_gates_1 = require("./logic-gates");
const dangerous_functions_1 = require("./dangerous-functions");
const risky_imports_1 = require("./risky-imports");
const auth_antipatterns_1 = require("./auth-antipatterns");
const framework_checks_1 = require("./framework-checks");
const ai_fingerprinting_1 = require("./ai-fingerprinting");
const data_exposure_1 = require("./data-exposure");
const byok_patterns_1 = require("./byok-patterns");
// Story B: AI-specific detection modules
const ai_prompt_hygiene_1 = require("./ai-prompt-hygiene");
const ai_execution_sinks_1 = require("./ai-execution-sinks");
const ai_agent_tools_1 = require("./ai-agent-tools");
// M5: New AI-era detectors
const ai_rag_safety_1 = require("./ai-rag-safety");
const ai_endpoint_protection_1 = require("./ai-endpoint-protection");
const ai_schema_validation_1 = require("./ai-schema-validation");
// AI Detection Roadmap Phase 1
const ai_package_hallucination_1 = require("./ai-package-hallucination");
const ai_mcp_security_1 = require("./ai-mcp-security");
// AI Detection Roadmap Phase 2
const model_supply_chain_1 = require("./model-supply-chain");
// OWASP Workstream 1
const security_headers_1 = require("./security-headers");
const ssrf_detection_1 = require("./ssrf-detection");
const log_injection_1 = require("./log-injection");
const xxe_detection_1 = require("./xxe-detection");
// Tier system imports
const tiers_1 = require("../tiers");
const parsed_file_1 = require("../utils/parsed-file");
const parsed_file_2 = require("../utils/parsed-file");
const context_adjustments_1 = require("../filtering/context-adjustments");
// Process a single file through all Layer 2 detectors
function processFileLayer2(file, options, authHelperContext) {
    const stats = {
        variables: 0,
        logicGates: 0,
        dangerousFunctions: 0,
        riskyImports: 0,
        authAntipatterns: 0,
        frameworkIssues: 0,
        aiFingerprints: 0,
        dataExposure: 0,
        byokPatterns: 0,
        promptHygiene: 0,
        executionSinks: 0,
        agentTools: 0,
        ragSafety: 0,
        endpointProtection: 0,
        schemaValidation: 0,
        // AI Detection Roadmap Phase 1
        packageHallucination: 0,
        mcpSecurity: 0,
        // AI Detection Roadmap Phase 2
        modelSupplyChain: 0,
        // OWASP Workstream 1
        securityHeaders: 0,
        ssrfDetection: 0,
        logInjection: 0,
        xxeDetection: 0,
    };
    // Build file-specific context for context-aware detection (Phase 2b)
    const fileContext = (0, context_helpers_1.buildFileContext)(file.path);
    // Create ParsedFile once for all detectors to share (avoids redundant content.split('\n'))
    const parsed = parsed_file_2.ParsedFile.from(file);
    // Check if this is a manifest file (package.json, requirements.txt, etc.)
    const isManifestFile = (filePath) => {
        const manifestFiles = ['package.json', 'requirements.txt', 'Pipfile', 'pyproject.toml', 'setup.py'];
        return manifestFiles.some(f => filePath.endsWith(f));
    };
    // For non-code files, only run package hallucination detector on manifest files
    if (!isCodeFile(file.path)) {
        if (isManifestFile(file.path)) {
            // Run package hallucination detector on manifest files
            const packageHallucinationFindings = (0, ai_package_hallucination_1.detectAIPackageHallucination)(file.content, file.path);
            stats.packageHallucination = packageHallucinationFindings.length;
            return { findings: packageHallucinationFindings, stats };
        }
        return { findings: [], stats };
    }
    // Run all detectors — parsed is passed via options for detectors that support it
    const variableFindings = (0, variables_1.detectSensitiveVariables)(file.content, file.path, { parsed });
    const logicFindings = (0, logic_gates_1.detectLogicGates)(file.content, file.path, { parsed });
    const dangerousFuncFindings = (0, dangerous_functions_1.detectDangerousFunctions)(file.content, file.path, { parsed });
    const riskyImportFindings = (0, risky_imports_1.detectRiskyImports)(file.content, file.path, { parsed });
    const authFindings = (0, auth_antipatterns_1.detectAuthAntipatterns)(file.content, file.path, {
        middlewareConfig: options.middlewareConfig,
        authHelpers: authHelperContext,
        fileAuthImports: options.fileAuthImports,
        parsed,
    });
    const frameworkFindings = (0, framework_checks_1.detectFrameworkIssues)(file.content, file.path, { parsed });
    const aiFindings = (0, ai_fingerprinting_1.detectAIFingerprints)(file.content, file.path, { parsed });
    const dataExposureFindings = (0, data_exposure_1.detectDataExposure)(file.content, file.path, { parsed });
    const byokFindings = (0, byok_patterns_1.detectBYOKPatterns)(file.content, file.path, options.middlewareConfig, { parsed });
    const promptHygieneFindings = (0, ai_prompt_hygiene_1.detectAIPromptHygiene)(file.content, file.path, { parsed });
    const executionSinkFindings = (0, ai_execution_sinks_1.detectAIExecutionSinks)(file.content, file.path, { parsed });
    const agentToolFindings = (0, ai_agent_tools_1.detectAIAgentTools)(file.content, file.path, { parsed });
    const ragSafetyFindings = (0, ai_rag_safety_1.detectRAGSafetyIssues)(file.content, file.path, { parsed });
    const endpointProtectionFindings = (0, ai_endpoint_protection_1.detectAIEndpointProtection)(file.content, file.path, {
        middlewareConfig: options.middlewareConfig,
        parsed,
    });
    const schemaValidationFindings = (0, ai_schema_validation_1.detectAISchemaValidation)(file.content, file.path, { parsed });
    // AI Detection Roadmap Phase 1
    const packageHallucinationFindings = (0, ai_package_hallucination_1.detectAIPackageHallucination)(file.content, file.path, { parsed });
    const mcpSecurityFindings = (0, ai_mcp_security_1.detectMCPSecurity)(file.content, file.path, { parsed });
    // AI Detection Roadmap Phase 2
    const modelSupplyChainFindings = (0, model_supply_chain_1.detectModelSupplyChain)(file.content, file.path, { parsed });
    // OWASP Workstream 1
    const securityHeaderFindings = (0, security_headers_1.detectSecurityHeaders)(file.content, file.path, { parsed });
    const ssrfFindings = (0, ssrf_detection_1.detectSSRFPatterns)(file.content, file.path, { parsed });
    const logInjectionFindings = (0, log_injection_1.detectLogInjection)(file.content, file.path, { parsed });
    const xxeFindings = (0, xxe_detection_1.detectXXEPatterns)(file.content, file.path, { parsed });
    // Update stats
    stats.variables = variableFindings.length;
    stats.logicGates = logicFindings.length;
    stats.dangerousFunctions = dangerousFuncFindings.length;
    stats.riskyImports = riskyImportFindings.length;
    stats.authAntipatterns = authFindings.length;
    stats.frameworkIssues = frameworkFindings.length;
    stats.aiFingerprints = aiFindings.length;
    stats.dataExposure = dataExposureFindings.length;
    stats.byokPatterns = byokFindings.length;
    stats.promptHygiene = promptHygieneFindings.length;
    stats.executionSinks = executionSinkFindings.length;
    stats.agentTools = agentToolFindings.length;
    stats.ragSafety = ragSafetyFindings.length;
    stats.endpointProtection = endpointProtectionFindings.length;
    stats.schemaValidation = schemaValidationFindings.length;
    // AI Detection Roadmap Phase 1
    stats.packageHallucination = packageHallucinationFindings.length;
    stats.mcpSecurity = mcpSecurityFindings.length;
    // AI Detection Roadmap Phase 2
    stats.modelSupplyChain = modelSupplyChainFindings.length;
    // OWASP Workstream 1
    stats.securityHeaders = securityHeaderFindings.length;
    stats.ssrfDetection = ssrfFindings.length;
    stats.logInjection = logInjectionFindings.length;
    stats.xxeDetection = xxeFindings.length;
    // Combine all findings
    const allFindings = [
        ...variableFindings,
        ...logicFindings,
        ...dangerousFuncFindings,
        ...riskyImportFindings,
        ...authFindings,
        ...frameworkFindings,
        ...aiFindings,
        ...dataExposureFindings,
        ...byokFindings,
        ...promptHygieneFindings,
        ...executionSinkFindings,
        ...agentToolFindings,
        ...ragSafetyFindings,
        ...endpointProtectionFindings,
        ...schemaValidationFindings,
        // AI Detection Roadmap Phase 1
        ...packageHallucinationFindings,
        ...mcpSecurityFindings,
        // AI Detection Roadmap Phase 2
        ...modelSupplyChainFindings,
        // OWASP Workstream 1
        ...securityHeaderFindings,
        ...ssrfFindings,
        ...logInjectionFindings,
        ...xxeFindings,
    ];
    // Apply context-based severity adjustments (Phase 2b)
    const adjustedFindings = (0, context_adjustments_1.applyContextAdjustments)(allFindings, fileContext);
    return {
        findings: adjustedFindings,
        stats,
    };
}
// applyFileContextAdjustments consolidated into filtering/context-adjustments.ts
// Parallel batch size for Layer 2 processing (larger batches for performance)
const LAYER2_PARALLEL_BATCH_SIZE = 50;
// Progress update interval (report every N files for better UX)
const PROGRESS_UPDATE_INTERVAL = 10;
async function runLayer2Scan(files, options = {}, onProgress, cancellationToken) {
    const startTime = Date.now();
    const vulnerabilities = [];
    const stats = {
        variables: 0,
        logicGates: 0,
        dangerousFunctions: 0,
        riskyImports: 0,
        authAntipatterns: 0,
        frameworkIssues: 0,
        aiFingerprints: 0,
        dataExposure: 0,
        byokPatterns: 0,
        promptHygiene: 0,
        executionSinks: 0,
        agentTools: 0,
        ragSafety: 0,
        endpointProtection: 0,
        schemaValidation: 0,
        // AI Detection Roadmap Phase 1
        packageHallucination: 0,
        mcpSecurity: 0,
        // AI Detection Roadmap Phase 2
        modelSupplyChain: 0,
        // OWASP Workstream 1
        securityHeaders: 0,
        ssrfDetection: 0,
        logInjection: 0,
        xxeDetection: 0,
    };
    // Detect auth helpers once for all files (if not already provided)
    const authHelperContext = options.authHelperContext || (0, auth_helper_detector_1.detectAuthHelpers)(files);
    // Track progress for frequent updates
    let filesProcessed = 0;
    let lastProgressUpdate = 0;
    // Process files in parallel batches for better performance on large codebases
    for (let i = 0; i < files.length; i += LAYER2_PARALLEL_BATCH_SIZE) {
        // Check for cancellation before processing batch
        if (cancellationToken?.cancelled)
            break;
        const batch = files.slice(i, i + LAYER2_PARALLEL_BATCH_SIZE);
        const results = await Promise.all(batch.map(file => Promise.resolve(processFileLayer2(file, options, authHelperContext))));
        for (const result of results) {
            vulnerabilities.push(...result.findings);
            // Accumulate stats
            for (const [key, value] of Object.entries(result.stats)) {
                stats[key] += value;
            }
        }
        filesProcessed = Math.min(i + LAYER2_PARALLEL_BATCH_SIZE, files.length);
        // Report progress every PROGRESS_UPDATE_INTERVAL files for better UX
        if (onProgress && (filesProcessed - lastProgressUpdate >= PROGRESS_UPDATE_INTERVAL || filesProcessed === files.length)) {
            onProgress({
                status: 'layer2',
                message: 'Running structural scan (variables, logic gates)...',
                filesProcessed,
                totalFiles: files.length,
                vulnerabilitiesFound: vulnerabilities.length,
            });
            lastProgressUpdate = filesProcessed;
        }
    }
    // Deduplicate findings
    const dedupedVulnerabilities = deduplicateFindings(vulnerabilities);
    // Apply path exclusions (test files, seed files, etc.)
    // By default, exclude test and seed files unless explicitly disabled
    const excludeTestFiles = options.excludeTestFiles !== false;
    const excludeSeedFiles = options.excludeSeedFiles !== false;
    // Build exclusion config based on options
    const exclusionConfig = {};
    if (!excludeTestFiles) {
        exclusionConfig.testPatterns = [];
    }
    if (!excludeSeedFiles) {
        exclusionConfig.seedPatterns = [];
    }
    if (options.customExclusions) {
        // Add custom exclusions to all pattern types
        exclusionConfig.testPatterns = [
            ...(exclusionConfig.testPatterns || []),
            ...options.customExclusions,
        ];
    }
    const { kept: uniqueVulnerabilities, suppressed } = (0, path_exclusions_1.filterFindingsByPath)(dedupedVulnerabilities, Object.keys(exclusionConfig).length > 0 ? exclusionConfig : undefined);
    // Track suppressed findings (debug info available in stats)
    // Build raw stats map for logging
    const rawStats = {
        sensitive_variables: stats.variables,
        logic_gates: stats.logicGates,
        dangerous_functions: stats.dangerousFunctions,
        risky_imports: stats.riskyImports,
        auth_antipatterns: stats.authAntipatterns,
        framework_issues: stats.frameworkIssues,
        ai_fingerprints: stats.aiFingerprints,
        data_exposure: stats.dataExposure,
        byok_patterns: stats.byokPatterns,
        ai_prompt_hygiene: stats.promptHygiene,
        ai_execution_sinks: stats.executionSinks,
        ai_agent_tools: stats.agentTools,
        // M5: New AI-era detectors
        ai_rag_safety: stats.ragSafety,
        ai_endpoint_protection: stats.endpointProtection,
        ai_schema_validation: stats.schemaValidation,
        // AI Detection Roadmap Phase 1
        ai_package_hallucination: stats.packageHallucination,
        ai_mcp_security: stats.mcpSecurity,
        // AI Detection Roadmap Phase 2
        model_supply_chain: stats.modelSupplyChain,
        // OWASP Workstream 1
        security_headers: stats.securityHeaders,
        ssrf_detection: stats.ssrfDetection,
        log_injection: stats.logInjection,
        xxe_detection: stats.xxeDetection,
    };
    // Compute deduped counts per category
    const dedupedStats = {};
    for (const vuln of uniqueVulnerabilities) {
        const cat = vuln.category;
        dedupedStats[cat] = (dedupedStats[cat] || 0) + 1;
    }
    // Compute severity distribution
    const severityStats = { critical: 0, high: 0, medium: 0, low: 0, info: 0 };
    for (const vuln of uniqueVulnerabilities) {
        severityStats[vuln.severity] = (severityStats[vuln.severity] || 0) + 1;
    }
    // Compute tier breakdown (all Layer 2 findings have layer: 2)
    const tierStats = (0, tiers_1.computeTierStats)(uniqueVulnerabilities.map(v => ({ category: v.category, layer: 2 })));
    // Map raw stats keys to detector names for tier lookup
    const detectorNameMap = {
        sensitive_variables: 'variables',
        logic_gates: 'logic_gates',
        dangerous_functions: 'dangerous_functions',
        risky_imports: 'risky_imports',
        auth_antipatterns: 'auth_antipatterns',
        framework_issues: 'framework_checks',
        ai_fingerprints: 'ai_fingerprinting',
        data_exposure: 'data_exposure',
        byok_patterns: 'byok_patterns',
        ai_prompt_hygiene: 'ai_prompt_hygiene',
        ai_execution_sinks: 'ai_execution_sinks',
        ai_agent_tools: 'ai_agent_tools',
        // M5: New AI-era detectors
        ai_rag_safety: 'ai_rag_safety',
        ai_endpoint_protection: 'ai_endpoint_protection',
        ai_schema_validation: 'ai_schema_validation',
        // AI Detection Roadmap Phase 1
        ai_package_hallucination: 'ai_package_hallucination',
        ai_mcp_security: 'ai_mcp_security',
        // AI Detection Roadmap Phase 2
        model_supply_chain: 'model_supply_chain',
        // OWASP Workstream 1
        security_headers: 'security_headers',
        ssrf_detection: 'ssrf_detection',
        log_injection: 'log_injection',
        xxe_detection: 'xxe_detection',
    };
    // Heuristic breakdown available in stats.raw and stats.tiers for debugging
    return {
        vulnerabilities: uniqueVulnerabilities,
        filesScanned: files.filter(f => isCodeFile(f.path)).length,
        duration: Date.now() - startTime,
        stats: {
            raw: rawStats,
            deduped: dedupedStats,
            bySeverity: severityStats,
            tiers: tierStats,
            suppressedByPath: suppressed.length,
        },
    };
}
// Check if file is a code file (not config/data)
function isCodeFile(filePath) {
    const codeExtensions = [
        '.js', '.jsx', '.ts', '.tsx', '.mjs', '.cjs',
        '.py', '.rb', '.php', '.go', '.java', '.cs',
        '.rs', '.swift', '.kt', '.scala',
    ];
    return codeExtensions.some(ext => filePath.endsWith(ext));
}
// Remove duplicate findings on the same line and merge related findings
function deduplicateFindings(vulnerabilities) {
    // First pass: exact deduplication by file:line:category
    const seen = new Map();
    for (const vuln of vulnerabilities) {
        const key = `${vuln.filePath}:${vuln.lineNumber}:${vuln.category}`;
        const existing = seen.get(key);
        // Keep the higher severity finding
        if (!existing || (0, parsed_file_1.severityRank)(vuln.severity) > (0, parsed_file_1.severityRank)(existing.severity)) {
            seen.set(key, vuln);
        }
    }
    // Second pass: merge findings on adjacent lines (within 3 lines) with same category
    const dedupedList = Array.from(seen.values());
    const merged = mergeAdjacentFindings(dedupedList);
    // Third pass: subsume related categories (e.g., specific finding subsumes generic)
    return subsumeRelatedFindings(merged);
}
// Merge findings on adjacent lines with the same category
function mergeAdjacentFindings(vulnerabilities) {
    if (vulnerabilities.length <= 1)
        return vulnerabilities;
    // Group by file and category
    const groups = new Map();
    for (const vuln of vulnerabilities) {
        const key = `${vuln.filePath}:${vuln.category}`;
        const group = groups.get(key) || [];
        group.push(vuln);
        groups.set(key, group);
    }
    const result = [];
    for (const [, group] of groups) {
        if (group.length === 1) {
            result.push(group[0]);
            continue;
        }
        // Sort by line number
        group.sort((a, b) => a.lineNumber - b.lineNumber);
        // Merge adjacent findings (within 3 lines)
        let current = group[0];
        let mergedCount = 1;
        for (let i = 1; i < group.length; i++) {
            const next = group[i];
            if (next.lineNumber - current.lineNumber <= 3) {
                // Merge: keep higher severity, note the merge
                mergedCount++;
                if ((0, parsed_file_1.severityRank)(next.severity) > (0, parsed_file_1.severityRank)(current.severity)) {
                    current = {
                        ...next,
                        title: current.title,
                        description: current.description,
                    };
                }
            }
            else {
                // Not adjacent - emit current and start new
                if (mergedCount > 1) {
                    current = {
                        ...current,
                        title: `${current.title} (${mergedCount} occurrences)`,
                    };
                }
                result.push(current);
                current = next;
                mergedCount = 1;
            }
        }
        // Emit last
        if (mergedCount > 1) {
            current = {
                ...current,
                title: `${current.title} (${mergedCount} occurrences)`,
            };
        }
        result.push(current);
    }
    return result;
}
// Subsume related findings where a more specific finding covers a generic one
function subsumeRelatedFindings(vulnerabilities) {
    // Define subsumption rules: specific category subsumes generic
    const subsumptionRules = {
        // SQL injection subsumes generic dangerous function
        sql_injection: ['dangerous_function'],
        // Command injection subsumes generic dangerous function
        command_injection: ['dangerous_function'],
        // XSS subsumes generic dangerous function
        xss: ['dangerous_function'],
        // Specific auth issues subsume generic missing auth
        missing_auth: ['auth_antipattern'],
    };
    // Group by file and line
    const byLocation = new Map();
    for (const vuln of vulnerabilities) {
        const key = `${vuln.filePath}:${vuln.lineNumber}`;
        const group = byLocation.get(key) || [];
        group.push(vuln);
        byLocation.set(key, group);
    }
    const result = [];
    for (const [, group] of byLocation) {
        if (group.length === 1) {
            result.push(group[0]);
            continue;
        }
        // Check for subsumption
        const toKeep = new Set(group);
        for (const vuln of group) {
            const subsumes = subsumptionRules[vuln.category];
            if (subsumes) {
                for (const other of group) {
                    if (subsumes.includes(other.category) && other !== vuln) {
                        toKeep.delete(other);
                    }
                }
            }
        }
        result.push(...toKeep);
    }
    return result;
}
// severityRank imported from utils/parsed-file
var variables_2 = require("./variables");
Object.defineProperty(exports, "detectSensitiveVariables", { enumerable: true, get: function () { return variables_2.detectSensitiveVariables; } });
var logic_gates_2 = require("./logic-gates");
Object.defineProperty(exports, "detectLogicGates", { enumerable: true, get: function () { return logic_gates_2.detectLogicGates; } });
var dangerous_functions_2 = require("./dangerous-functions");
Object.defineProperty(exports, "detectDangerousFunctions", { enumerable: true, get: function () { return dangerous_functions_2.detectDangerousFunctions; } });
var risky_imports_2 = require("./risky-imports");
Object.defineProperty(exports, "detectRiskyImports", { enumerable: true, get: function () { return risky_imports_2.detectRiskyImports; } });
var auth_antipatterns_2 = require("./auth-antipatterns");
Object.defineProperty(exports, "detectAuthAntipatterns", { enumerable: true, get: function () { return auth_antipatterns_2.detectAuthAntipatterns; } });
var framework_checks_2 = require("./framework-checks");
Object.defineProperty(exports, "detectFrameworkIssues", { enumerable: true, get: function () { return framework_checks_2.detectFrameworkIssues; } });
var ai_fingerprinting_2 = require("./ai-fingerprinting");
Object.defineProperty(exports, "detectAIFingerprints", { enumerable: true, get: function () { return ai_fingerprinting_2.detectAIFingerprints; } });
var data_exposure_2 = require("./data-exposure");
Object.defineProperty(exports, "detectDataExposure", { enumerable: true, get: function () { return data_exposure_2.detectDataExposure; } });
var byok_patterns_2 = require("./byok-patterns");
Object.defineProperty(exports, "detectBYOKPatterns", { enumerable: true, get: function () { return byok_patterns_2.detectBYOKPatterns; } });
// Story B: AI-specific detectors
var ai_prompt_hygiene_2 = require("./ai-prompt-hygiene");
Object.defineProperty(exports, "detectAIPromptHygiene", { enumerable: true, get: function () { return ai_prompt_hygiene_2.detectAIPromptHygiene; } });
var ai_execution_sinks_2 = require("./ai-execution-sinks");
Object.defineProperty(exports, "detectAIExecutionSinks", { enumerable: true, get: function () { return ai_execution_sinks_2.detectAIExecutionSinks; } });
var ai_agent_tools_2 = require("./ai-agent-tools");
Object.defineProperty(exports, "detectAIAgentTools", { enumerable: true, get: function () { return ai_agent_tools_2.detectAIAgentTools; } });
// M5: New AI-era detectors
var ai_rag_safety_2 = require("./ai-rag-safety");
Object.defineProperty(exports, "detectRAGSafetyIssues", { enumerable: true, get: function () { return ai_rag_safety_2.detectRAGSafetyIssues; } });
var ai_endpoint_protection_2 = require("./ai-endpoint-protection");
Object.defineProperty(exports, "detectAIEndpointProtection", { enumerable: true, get: function () { return ai_endpoint_protection_2.detectAIEndpointProtection; } });
var ai_schema_validation_2 = require("./ai-schema-validation");
Object.defineProperty(exports, "detectAISchemaValidation", { enumerable: true, get: function () { return ai_schema_validation_2.detectAISchemaValidation; } });
// AI Detection Roadmap Phase 1
var ai_package_hallucination_2 = require("./ai-package-hallucination");
Object.defineProperty(exports, "detectAIPackageHallucination", { enumerable: true, get: function () { return ai_package_hallucination_2.detectAIPackageHallucination; } });
var ai_mcp_security_2 = require("./ai-mcp-security");
Object.defineProperty(exports, "detectMCPSecurity", { enumerable: true, get: function () { return ai_mcp_security_2.detectMCPSecurity; } });
// AI Detection Roadmap Phase 2
var model_supply_chain_2 = require("./model-supply-chain");
Object.defineProperty(exports, "detectModelSupplyChain", { enumerable: true, get: function () { return model_supply_chain_2.detectModelSupplyChain; } });
// OWASP Workstream 1
var security_headers_2 = require("./security-headers");
Object.defineProperty(exports, "detectSecurityHeaders", { enumerable: true, get: function () { return security_headers_2.detectSecurityHeaders; } });
var ssrf_detection_2 = require("./ssrf-detection");
Object.defineProperty(exports, "detectSSRFPatterns", { enumerable: true, get: function () { return ssrf_detection_2.detectSSRFPatterns; } });
var log_injection_2 = require("./log-injection");
Object.defineProperty(exports, "detectLogInjection", { enumerable: true, get: function () { return log_injection_2.detectLogInjection; } });
var xxe_detection_2 = require("./xxe-detection");
Object.defineProperty(exports, "detectXXEPatterns", { enumerable: true, get: function () { return xxe_detection_2.detectXXEPatterns; } });
//# sourceMappingURL=index.js.map