Back to skill

Security audit

Consul Service Deregister

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says, but it can perform live batch Consul deregistration and forward ACL tokens over unvalidated HTTP targets without strong confirmation or scoping.

Review before installing. Use only with trusted Consul agent addresses, prefer HTTPS, avoid passing ACL tokens on the command line, use narrowly scoped tokens, and require an explicit dry-run and human confirmation before any live batch deregistration.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/deregister.py:33
Finding

Consul ACL Token Can Be Sent to Arbitrary Destinations over Plaintext HTTP

Content
View full analysis
str: if not agent.startswith("http"): agent = "http://" + agent return agent.rstrip("/") + CONSUL_DEREGISTER_PATH + service_id def deregister(agent: str, service_id: str, token: str = None, dry_run: bool = False) -> dict: url = build_url(agent, service_id) if dry_run: return {"agent": agent, "service_id": service_id, "url": url, "status": "DRY_RUN", "ok": True} try: req = urllib.request.Request(url, method="PUT") if token: req.add_header("X-Consul-Token", token) with urllib.request.urlopen(req, timeout=10) as resp: status = resp.status ok = status == 200 return {"agent": agent, "service_id": service_id, "url": url, "status": status, "ok": ok} ``` The affected destinations and token are accepted from user-controlled command-line inputs: ```python parser.add_argument("--agents-file", help="File with one agent address per line") parser.add_argument("--from-curl", help="Raw curl command(s) to parse and replay") parser.add_argument("--token", help="Consul ACL token (X-Consul-Token header)") ``` ```python if args.from_curl: parsed = parse_curl_commands(args.from_curl) if not parsed: print("❌ No valid consul deregister curl commands found in input.", file=sys.stderr) sys.exit(1) tasks = [(p["agent"], p["service_id"]) for p in parsed] else: if not args.service_id: parser.error("--service-id is required unless using --from-curl") agents = list(args.agents or []) if args.agents_file: ...[truncated 3111 chars]
Remediation
View remediation
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
97% confidence
Finding

The skill declares shell and network-capable behavior but does not constrain tool scope with explicit permissions or allowed-tools. In an agent environment, that means a natural-language trigger can cause live HTTP requests and command execution without clear guardrails, increasing the chance of unintended destructive actions or abuse if the skill is invoked in the wrong context.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger term "offline" is overly broad and can match many benign operational discussions unrelated to Consul deregistration. Because this skill performs irreversible service removal, accidental invocation could turn an informational conversation into live deregistration requests against production agents.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill documentation describes how to execute deregistration but does not prominently warn that it is a destructive, potentially irreversible action against live Consul agents. In this context, the absence of a strong warning lowers operator caution and raises the risk of production outages, especially since the skill supports batch and parallel execution across multiple nodes.

Content

No source excerpt is available for this finding.