AI-generated remediation package for a single confirmed finding.
| 36 | """AI-generated remediation package for a single confirmed finding.""" |
| 37 | cve_id: str |
| 38 | target: str |
| 39 | service: str |
| 40 | version: str |
| 41 | model_used: str |
| 42 | |
| 43 | immediate_mitigation: str = "" # Quick block / reduce exposure |
| 44 | permanent_fix: str = "" # Root cause fix |
| 45 | rollback_script: str = "" # Undo permanent fix |
| 46 | verification_command: str = "" # Confirm fix worked |
| 47 | explanation: str = "" # Plain-English explanation |
| 48 | |
| 49 | validation: ScriptValidationResult | None = None |
| 50 | safe: bool = False |
| 51 | warnings: list[str] = field(default_factory=list) |
| 52 | |
| 53 | |
| 54 | # ── System prompt ───────────────────────────────────────────────────────────── |
| 55 | |
| 56 | _SYSTEM_PROMPT = """\ |
| 57 | You are an expert Linux and network security hardening engineer. |
no outgoing calls
no test coverage detected