T09 · Insecure Skill Coding Practices
- Location
SKILL.md:201- Finding
Irreversible MCP restore operation lacks an enforced approval gate
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:201-218
Vulnerability Type: Unenforced authorization for an irreversible infrastructure operation
Risk Level: HighEvidence
markdown ## Governance & Safety The skill delivers reads and writes and records them; it does **not** decide whether a write is permitted. That is your agent's judgement, or the permission of the Veeam account you connect it with (a read-only or restricted role on the VBR server — writes then fail at the server). There is no read-only switch, policy file, or approval gate. - Credentials stored **encrypted** in `~/.veeam-aiops/secrets.enc` (Fernet/AES-128 + scrypt key derivation; chmod 600) — never plaintext on disk; the master password is never stored, only a per-store salt + ciphertext - **Audit is the guarantee, and it is not bypassable.** Every operation — MCP and CLI alike — is logged to `~/.veeam-aiops/audit.db` (relocatable via `VEEAM_AIOPS_HOME`): params (secrets redacted), result, status, duration, and the risk tier. The CLI writes the same row the MCP path does. - `VEEAM_AUDIT_APPROVED_BY` / `VEEAM_AUDIT_RATIONALE` are optional annotations recorded on the audit row (who/why); they are never required and never block. - **Runaway guard** — a safety backstop, not authorization: cumulative tool calls and wall-time are capped, and the same call looped in a tight session-poll/retry window trips a circuit breaker. - Writes support `--dry-run` / `dry_run=True` and double confirmation at the CLI; CLI writes execute through the same governed tools, so they are audited + undo-recorded. - Reversible writes (job start/stop/retry, enable/disable) record an inverse undo descriptor; the irreversible `start_vm_restore` and `session_stop` record none.Supporting behavior is documented in
references/capabilities.md:43-79:start_vm_restoreis a high-risk, restore-to-original operation with no undo, whiledry_run=Trueis an optional parameter. Double confirmation is d ...[truncated 3177 chars]- Remediation
View remediation
Remediation Suggestions
-
Implement a mandatory two-phase MCP restore protocol:
- Phase one resolves the restore-point identifier and returns the exact VM identity, creation time, target location, operation type, and expected overwrite behavior.
- Phase two requires a short-lived, single-use approval token bound to those exact parameters.
-
Reject direct restore execution unless:
- A successful preview has occurred.
- The preview resolved the target unambiguously.
- The caller supplies the matching approval token.
- Explicit confirmation is present and has not expired.
-
Remove
acknowledge_unresolvedor equivalent bypasses from agent-callable interfaces. Require unresolved restores to be performed manually through the Veeam console. -
Add an enforceable read-only mode and default to it. Write tools should not be registered or should fail closed unless write access is explicitly enabled for the current session.
-
Make approval metadata mandatory for irreversible operations and validate it before issuing the Veeam API request rather than recording it only as an optional audit annotation.
-
Bind authorization to the resolved object, configured target, selected restore point, and operation type so approval cannot be reused for another VM or Veeam server.
-
Retain the existing audit, dry-run, and target-protection mechanisms as defense-in-depth, but do not treat them as substitutes for pre-execution authorization.
-
Continue recommending a restricted Veeam service account. Server-side least privilege should constrain the maximum impact if an agent or workflow invokes the wrong tool.
-
