VMware Harden
VMware compliance scanning (CIS, vSphere SCG, GB/T 22239, PCI-DSS) with drift detection.
Versions
1.0.1latestTools 8
_list_baselines_impl [READ] List all available compliance baselines: built-in (CIS ESXi 8.0, vSphere SCG v8, PCI-DSS 4.0, DengBao 2.0 L3, EU NIS2, BSI ITGS) plus any user-imported YAML baselines from ~/.vmware-harden/baselines/. Takes no parameters. Returns the family list envelope {items, returned, limit, total, truncated, hint}; each item is {id, name, version, applies_to (node types covered), rule_count}, and entries that fail to load carry an 'error' field instead. Every baseline is listed, so truncated is always false and total is exact — this is the complete set, not a page of it. Read-only — parses local baseline YAML only, no database or network access. Start here to discover valid baseline ids for get_baseline_rules and scan_target.
_list_violations_impl [READ] List compliance violations recorded by the most recent scan snapshot in the local twin DB (~/.vmware-harden/twin.duckdb). Returns an envelope {violations: [...], total, limit, offset, has_more, coverage, note}; each violation is {id, rule_id, node_id, severity, baseline_id, evidence}, sorted severity-descending then rule_id. `total` is the full matching count (unbounded by limit) so nothing is hidden — page by raising offset while has_more is true. AN EMPTY LIST IS NOT A COMPLIANCE VERDICT: rules whose data no collector gathers are not executed and count as undetermined, never as passing. Read `coverage` {evaluated, undetermined, total, tracked, complete, undetermined_rules} before summarising — when complete is false, say how many rules were evaluated out of how many and do not call the estate compliant or clean; when tracked is false the snapshot predates coverage tracking, so re-scan rather than assume. `note` states the same in one sentence, or null when coverage is complete. Empty envelope (total 0) when no scan exists — run scan_target first. Read-only local DB query, no network calls. Pass a row's 'id' to get_remediation for a fix plan. Args: severity: Return only violations of exactly this severity. One of 'critical', 'high', 'medium', 'low', 'info' — lowercase, matched exactly; anything else is refused with a ValueError naming the five. Omit to return every severity (the default). limit: Maximum rows in this page, must be >= 1 (default 50). It bounds the rows serialized, not the 'total' count, so a small limit never hides how much there is. offset: Rows to skip before the page starts, must be >= 0 (default 0 = first page). Page by raising it by 'limit' while the envelope's has_more is true.
_get_remediation_impl [READ] Fetch the persisted LLM-generated remediation Suggestion for one violation. Returns {summary, execution_plan.steps, impact_prediction (workload impact, maintenance window, rollback plan), confidence (0.0-1.0), human_review_required}, or None when no advisor suggestion has been generated for that violation yet (generate one via the vmware-harden CLI advisor). Read-only lookup in the local twin DB (~/.vmware-harden/twin.duckdb); no network calls and nothing is executed — suggestions are advisory only. Args: violation_id: The 'id' field of a row returned by list_violations (the violation's own id, not its rule_id or node_id). An id with no stored suggestion returns None rather than an error, so None means "not generated yet", not "not found".
_list_drift_events_impl [READ] List configuration drift events from the most recent scan snapshot — fields whose values changed since the prior scan of the same target. Returns the family list envelope {items, returned, limit, total, truncated, hint}; each item is {node_id, field, old_value, new_value, detected_at}. total is the snapshot's exact change-event count, so truncated tells you definitively whether rows were left behind — raise limit when it is true. Returns an empty envelope (total 0) when no snapshot exists or there was no prior snapshot to diff against (a target must be scanned at least twice). Read-only query of the local twin DB (~/.vmware-harden/twin.duckdb); no network calls. Use for change tracking; use list_violations for compliance failures. Args: limit: Maximum rows returned, ordered by node_id then field (default 50). There is no offset or cursor here — this tool cannot page, so when the envelope's 'truncated' is true the only way to see the rest is to re-call with a larger limit.
_get_baseline_rules_impl [READ] Return every rule in one compliance baseline. Returns the family list envelope {items, returned, limit, total, truncated, hint}; each item is {id, title, severity, category}, where severity is one of 'critical', 'high', 'medium', 'low', 'info'. The whole baseline is returned, so truncated is always false and total is the exact rule count. Read-only — parses local baseline YAML only, no database or network access. Use after list_baselines to preview what scan_target will check; use list_violations for actual scan findings. Args: baseline_id: A baseline id exactly as returned by list_baselines — e.g. 'cis-vmware-esxi-8.0-subset', 'vsphere-stig-v9-subset' — not the baseline's display name. Unknown ids raise a not-found error; re-run list_baselines for the valid set, which includes any YAML you dropped in ~/.vmware-harden/baselines/.
_scan_target_impl [READ] Run a compliance scan of a vCenter target against a baseline and persist results locally. Makes read-only vCenter API calls (inventory collection only — never modifies VMware infrastructure) and writes a new snapshot, violations, and drift events (vs the prior scan of the same target) to the local twin DB (~/.vmware-harden/twin.duckdb). Returns summary counts {snapshot_id, target, baseline, hosts, violations, coverage, note}; inspect details via list_violations and list_drift_events. `violations` is meaningful only together with `coverage`: rules whose data no collector gathers are not executed and count as undetermined, never as passing, so violations=0 is not by itself evidence of compliance. When coverage.complete is false, report how many rules were evaluated out of how many instead of calling the estate compliant. May take minutes on large inventories. Args: target: A vCenter target name as configured in vmware-aiops (~/.vmware-aiops/config.yaml) — this skill has no target config of its own and borrows aiops' connection manager. Use the config's target key, not a hostname or IP. baseline: A baseline id from list_baselines (default 'cis-vmware-esxi-8.0-subset'). Which baseline you pick decides which rules can reach a verdict at all: a baseline whose rules need data no collector gathers reports them as undetermined, which is why coverage must be read alongside the violation count.
_list_stig_controls_impl [READ] List the built-in vSphere 9 / VCF 9 STIG-aligned host baseline's controls (baseline id 'vsphere-stig-v9-subset'). Returns the family list envelope {items, returned, limit, total, truncated, hint}; each item is {id, title, severity (one of critical/high/medium/low/info), category, advanced_setting} where advanced_setting names the ESXi advanced setting the control governs (e.g. 'Security.AccountLockFailures'). total is the exact catalog size, so truncated tells you definitively whether to raise offset. Read-only — parses local baseline YAML only, no database, network, or compliance API (VCF Operations ACC/SPM has none). Use scan_target with baseline 'vsphere-stig-v9-subset' to evaluate these controls against a target; use describe_stig_content_sync for how this catalog is kept in sync. Args: limit: Maximum rows in this page, must be >= 1 (default 50). The whole catalog is loaded and paged locally, so 'total' stays exact whatever you pass. offset: Rows to skip before the page starts, must be >= 0 (default 0 = first page). Raise it by 'limit' while 'truncated' is true.
_describe_stig_content_sync_impl [READ] Explain harden's vSphere STIG integration and route continuous enforcement. Takes no parameters. Returns {compliance_api_available (always false — VCF Operations ACC/SPM exposes no public compliance REST API), why_no_api, content_sources (the open-source MITRE InSpec/Cinc STIG repos harden syncs against), mechanism (how upstream controls become harden rules), routing_note (use VCF Operations SPM/ACC UI for fleet-wide continuous enforcement; harden is the API-scriptable point-in-time scanner), importer_status}. Read-only, local static content — no database, network, or API call. Call this before assuming a compliance endpoint exists; use list_stig_controls to see the actual controls.
Permissions 5
network medium filesystem low shell high database medium env_vars low Scan Findings 0
No scan findings.