Back to skill

Security audit

Consul API

Security checks for vulnerabilities and agentic risk

Overview

This is a Consul API reference skill with no executable code, but it documents powerful administrative operations that should be used carefully.

Install only if you want agent help with Consul administration. Treat it as a powerful API cheat sheet: verify the target datacenter, namespace, key prefix, service, or intention before making changes; use least-privilege ACL tokens; redact secrets; and require explicit review before DELETE, PUT, POST, ACL, recursive KV, service deregistration, session, transaction, or maintenance operations.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The skill documents destructive Consul operations such as service deregistration and KV deletion without any warning, confirmation guidance, or scope-limiting advice. In an agent setting, this increases the chance that a model or user will perform state-changing operations that delete data or disrupt service discovery and cluster behavior.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The skill shows authentication with Consul ACL tokens and references ACL token management without emphasizing that these credentials are highly sensitive and can grant broad cluster privileges. In agent workflows, lack of secrecy and least-privilege guidance can lead to token exposure, reuse in logs, or overprivileged operations against the Consul control plane.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
### 删除 KV
```bash
DELETE /kv/:key           # 删除单个 key
DELETE /kv/:prefix?recurse  # 删除前缀下所有 key
DELETE /kv/:key?cas=100   # Check-And-Set 删除
```
Confidence
93% confidence
Finding
The documented DELETE /kv/:key operation is a high-risk mutating endpoint that can remove configuration or application data from Consul. Without warnings, validation guidance, or confirmation requirements, an agent could be induced to delete important keys, causing outages or loss of critical runtime configuration.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
### 删除 KV
```bash
DELETE /kv/:key           # 删除单个 key
DELETE /kv/:prefix?recurse  # 删除前缀下所有 key
DELETE /kv/:key?cas=100   # Check-And-Set 删除
```
Confidence
97% confidence
Finding
DELETE /kv/:prefix?recurse is especially dangerous because it allows bulk deletion across a namespace or subtree, amplifying the blast radius of a mistaken or manipulated parameter. In a Consul environment this can wipe service configuration, feature flags, or coordination state at scale, leading to widespread disruption.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
```bash
DELETE /kv/:key           # 删除单个 key
DELETE /kv/:prefix?recurse  # 删除前缀下所有 key
DELETE /kv/:key?cas=100   # Check-And-Set 删除
```

### 分布式锁
Confidence
90% confidence
Finding
Although CAS adds concurrency control, DELETE /kv/:key?cas=100 still performs deletion and can be abused if an attacker or erroneous workflow supplies a valid index. The presence of CAS may create a false sense of safety while still enabling destructive changes to Consul state.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
"DestinationName": "db",
  "Action": "allow"
}
DELETE /connect/intention/:id
```

## Sessions (分布式锁)
Confidence
87% confidence
Finding
DELETE /connect/intention/:id removes service mesh intentions, which can change or disable traffic authorization rules between services. In production Consul Connect environments, accidental or manipulated deletion may open unintended communication paths or break legitimate service connectivity, creating both security and availability risks.

Static analysis

No suspicious patterns detected.