Back to skill

Security audit

Traefik Mantrae Diagnostics

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a Traefik troubleshooting helper, but it also exposes broad authenticated Mantrae API access that can exceed its read-only description.

Review before installing. Use only narrowly scoped read-only Traefik/Mantrae credentials, avoid --insecure and plaintext non-loopback URLs, and do not let agents use arbitrary Mantrae RPC paths unless you intend to grant administrative control-plane authority.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/mantrae_api.py:42
Finding

Mantrae credentials can be transmitted over an unauthenticated or plaintext connection

Content
View full analysis
dict: parsed = urllib.parse.urlparse(base_url) url_base = base_url.rstrip("/") host_header = None if connect_ip: netloc = connect_ip if parsed.port: netloc = f"{connect_ip}:{parsed.port}" url_base = urllib.parse.urlunparse( (parsed.scheme, netloc, parsed.path.rstrip("/"), "", "", "") ) host_header = parsed.netloc url = url_base + path body = json.dumps(payload).encode("utf-8") headers = { "Accept": "application/json", "Content-Type": "application/json", "Connect-Protocol-Version": "1", } if token: headers["Authorization"] = f"Bearer {token}" if host_header: headers["Host"] = host_header req = urllib.request.Request(url, data=body, headers=headers, method="POST") context = ssl._create_unverified_context() if insecure else None with urllib.request.urlopen(req, timeout=timeout, context=context) as response: return json.loads(response.read()) ``` ```python parser.add_argument("--insecure", action="store_true", help="Skip TLS verification") ``` The script also accepts a caller-controlled base URL and defines a plaintext HTTP default: ```python DEFAULT_BASE_URL = "http://localhost:3000" ``` ### Technical Analysis The Mantrae helper sends either a bearer token in the `Authorization` header or login credentials in a JSON request body. Although sending authentication material to the configured Mantrae service is necessary for the declared functionality, the transport protections are insuff ...[truncated 2405 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/mantrae_api.py:150
Finding

Read-oriented Mantrae helper permits arbitrary authenticated RPC operations

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is presented as a read-only Traefik troubleshooting skill, but the documented behavior expands into authenticated access to a broader Mantrae control plane and supports arbitrary API path/method usage. This mismatch is dangerous because operators and policy systems may trust the manifest description while the actual skill can reach more sensitive resources and potentially perform state-changing operations through POST-based RPC methods.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The example uses curl with -k, which disables TLS certificate verification. In a skill designed to access internal control-plane endpoints and authentication surfaces, this makes man-in-the-middle interception or spoofing materially easier, especially when combined with token- or credential-based access.

Content

Scanner excerpt · SKILL.md (reported line 77)May include surrounding context.

If DNS does not resolve from the OpenClaw host, test through Traefik IP with curl:

bash
curl -k --resolve mantrae.example.internal:443:10.0.0.10 https://mantrae.example.internal/openapi.json

Do not call create/update/delete/restore endpoints without a fresh backup and Igor's confirmation.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

request_json is a generic authenticated RPC primitive that can send arbitrary JSON bodies to arbitrary API paths, and it supports bearer tokens, password-based login, host-header override via connect_ip, and optional TLS verification disablement. In the context of a supposedly read-only Traefik inspection skill, this is dangerous because it provides a reusable building block for broad authenticated API access well beyond the stated purpose, increasing the chance of unauthorized administrative actions or sensitive data access.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill declares network and environment-driven behavior but does not define an explicit tool scope such as allowed tools or permissions. That omission weakens containment and reviewability, making it easier for an agent to use broader capabilities than the manifest implies, especially in a skill that reaches internal APIs and consumes secrets from environment variables.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Stating the skill is 'Read-only by default' while later instructing its use for controlled config changes creates a misleading safety boundary. That ambiguity can cause users or higher-level agents to treat the skill as inherently safe even though it may cross into administrative actions against production routing infrastructure.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation explicitly says Mantrae can be used for controlled configuration changes, which conflicts with the skill's read-only positioning. In context, this makes accidental misuse more likely because a troubleshooting skill may be invoked in lower-trust situations where write access should never be available.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest describes a skill for inspecting and troubleshooting Traefik reverse proxies via read-only API, dashboard, logs, and config checks. However, this script includes capabilities to authenticate as a user and query broader Mantrae platform resources such as profiles, agents, DNS providers, backups, audit logs, and settings, which extend beyond plainly read-only Traefik inspection.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code falls back to accepting any user-supplied RPC path when the method alias is not in the allowlist, enabling arbitrary authenticated POST requests to the Mantrae Connect RPC API. In a skill advertised as read-only Traefik troubleshooting, this bypasses the declared scope and could expose write, admin, or user-management operations if valid credentials or tokens are present.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The code and CLI text describe the tool as read-only, but the implementation allows querying arbitrary paths rather than only the declared Traefik inspection endpoints. That mismatch is security-relevant because operators or calling agents may rely on the 'read-only' claim when deciding whether to permit use, leading to over-trust and unintended access to sensitive resources exposed over HTTP.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The helper is presented as a read-only Traefik inspection tool, but it accepts an arbitrary endpoint/path and joins it to a user-controlled base URL. While this script only performs GET requests, arbitrary path access can still reach undocumented, sensitive, or non-inspection endpoints and undermines the safety boundary implied by the skill description. In an agent context, this broadens reachable surface area and can expose internal data or interact with unexpected HTTP resources.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.insecure_tls_verification

HTTPS certificate verification is disabled.

Warn
Code
suspicious.insecure_tls_verification
Location
scripts/mantrae_api.py:68