/** * AUP Compliance Assessor * Scans MCP server for Acceptable Use Policy violations * * Checks: * - Tool names and descriptions * - README content * - Source code (if sourceCodePath provided) * * Based on Anthropic's 14 AUP categories (A-N) * * Supports optional Claude Code integration for semantic analysis * to reduce false positives (e.g., security tools, disclaimers). */ import { BaseAssessor } from "./BaseAssessor.js"; import { AssessmentContext } from "../AssessmentOrchestrator.js"; import type { AUPComplianceAssessment, AUPViolation } from "../../../lib/assessmentTypes.js"; import type { ClaudeCodeBridge } from "../lib/claudeCodeBridge.js"; /** * Extended AUP violation with semantic analysis results */ export interface EnhancedAUPViolation extends AUPViolation { semanticAnalysis?: { isConfirmedViolation: boolean; confidence: number; reasoning: string; source: "claude-verified" | "pattern-only"; }; } /** * Extended AUP compliance assessment with semantic analysis */ export interface EnhancedAUPComplianceAssessment extends AUPComplianceAssessment { confirmedViolations: EnhancedAUPViolation[]; flaggedForReview: EnhancedAUPViolation[]; semanticAnalysisEnabled: boolean; falsePositivesFiltered: number; } export declare class AUPComplianceAssessor extends BaseAssessor { private claudeBridge; /** * Set the Claude Code bridge for semantic violation analysis */ setClaudeBridge(bridge: ClaudeCodeBridge | null): void; /** * Check if Claude semantic analysis is enabled */ private isSemanticAnalysisEnabled; /** * Run AUP compliance assessment * If Claude semantic analysis is enabled, violations are verified to reduce false positives. */ assess(context: AssessmentContext): Promise; /** * Run Claude semantic analysis on flagged violations * Separates confirmed violations from likely false positives */ private runSemanticAnalysis; /** * Generate explanation for semantic analysis results */ private generateSemanticExplanation; /** * Generate recommendations for semantic analysis results */ private generateSemanticRecommendations; /** * Scan a tool name for AUP violations */ private scanToolName; /** * Scan a tool description for AUP violations */ private scanToolDescription; /** * Scan README content for AUP violations */ private scanReadme; /** * Scan a source file for AUP violations */ private scanSourceFile; /** * Check if a file should be skipped for AUP scanning */ private shouldSkipFile; /** * Determine overall status based on violations */ private determineAUPStatus; /** * Generate explanation text */ private generateExplanation; /** * Generate recommendations */ private generateRecommendations; /** * Build enrichment data for Stage B Claude validation (Issue #194) * * Provides Claude with: * - Tool inventory with names, descriptions, and inferred capabilities * - Pattern coverage showing what AUP patterns were checked * - Flags for tools with sensitive capabilities (even without violations) */ private buildEnrichmentData; } //# sourceMappingURL=AUPComplianceAssessor.d.ts.map