import { Shield, ShieldAlert, ShieldCheck, ShieldX, Info } from "lucide-react"; import type { InjectionResult, InjectionPattern } from "@/lib/api"; interface InjectionPanelProps { result: InjectionResult | null; onJumpToLine?: (line: number) => void; } const RISK_CONFIG = { critical: { label: "CRITICAL", color: "oklch(0.60 0.20 25)", bg: "oklch(0.60 0.20 25 / 0.12)", border: "oklch(0.60 0.20 25 / 0.35)", icon: ShieldX, }, high: { label: "HIGH", color: "oklch(0.72 0.18 55)", bg: "oklch(0.72 0.18 55 / 0.12)", border: "oklch(0.72 0.18 55 / 0.35)", icon: ShieldAlert, }, medium: { label: "MEDIUM", color: "oklch(0.78 0.18 90)", bg: "oklch(0.78 0.18 90 / 0.12)", border: "oklch(0.78 0.18 90 / 0.35)", icon: ShieldAlert, }, low: { label: "LOW", color: "oklch(0.68 0.16 210)", bg: "oklch(0.68 0.16 210 / 0.12)", border: "oklch(0.68 0.16 210 / 0.35)", icon: Shield, }, }; function RiskMeter({ score }: { score: number }) { const color = score >= 75 ? "oklch(0.60 0.20 25)" : score >= 50 ? "oklch(0.72 0.18 55)" : score >= 25 ? "oklch(0.78 0.18 90)" : "oklch(0.72 0.17 160)"; return (
{pattern.detail}
{/* Offending token */} {pattern.offending_token && (Offending token:
{pattern.offending_token}
{pattern.recommendation}
Run analysis to check for injection risks
{summary}
SQL appears safe
No known injection patterns were found