# API Reference — Performing Endpoint Vulnerability Remediation

## Libraries Used
- **csv**: Parse vulnerability scan CSV exports (Nessus, Qualys, Rapid7)
- **subprocess**: Check installed Windows patches via `wmic qfe`
- **socket**: Validate port-based remediation

## CLI Interface
```
python agent.py parse --scan-file scan.csv
python agent.py patches
python agent.py validate --host 10.0.0.1 --port 445
python agent.py report --scan-file scan.csv [--output plan.json]
```

## Core Functions
### `parse_scan_report(csv_file)` — Parse and prioritize vulnerabilities by severity
### `check_windows_patches()` — List installed Windows hotfixes via WMIC
### `validate_remediation(host, port)` — TCP connect to verify port closure
### `generate_remediation_report(scan_file, output)` — Group vulns by host for remediation

## Dependencies
No external packages — Python standard library only.
