Back to skill

Security audit

Website Flow Monitor

Security checks for vulnerabilities and agentic risk

Overview

This website-monitoring skill is mostly coherent, but it needs review because its helper can be pointed at arbitrary web addresses, including private or internal services via redirects.

Install only if you are comfortable with the agent making outbound requests to URLs you provide and creating recurring checks after confirmation. Do not use it on private, internal, localhost, metadata, or third-party sites unless you have authorization; ideally constrain the helper to approved public hostnames and disable or validate redirects before use.

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/discover_flows.py:40
Finding
Unrestricted URL Fetching Enables Server-Side Request Forgery<![CDATA[ ## Vulnerability Details **File Location**: `scripts/discover_flows.py`, lines 40–54 **Vulnerability Type**: Server-Side Request Forgery (SSRF) **Risk Level**: High ### Vulnerable Code ```python ap.add_argument('--url', required=True) ap.add_argument('--timeout', type=int, default=20) args = ap.parse_args() base = args.url.strip() if not base.startswith('http://') and not base.startswith('https://'): base = 'https://' + base pages = ['/', '/pricing', '/api', '/docs', '/blog', '/changelog', '/downloads'] seen = set() discovered = [] for p in pages: try: r = requests.get(urljoin(base, p), timeout=args.timeout, allow_redirects=True, headers={'User-Agent': 'OpenClawFlowMonitor/1.0'}) ``` ### Technical Analysis The command-line `--url` value is used as the base of outbound HTTP requests without validating its hostname, destination port, DNS resolution results, or network address range. Both HTTP and HTTPS destinations are accepted. Consequently, a user can direct the script to loopback, private, link-local, reserved, or otherwise internal network destinations. The fixed `pages` collection causes the application to make up to seven requests against the selected host, allowing it to probe several common application paths. The use of `allow_redirects=True` creates an additional bypass path. Even if validation of the original URL were added elsewhere, an attacker-controlled public endpoint could redirect the request to an internal address. The script does not inspect or revalidate redirect destinations. Although response bodies are not printed directly, they are parsed for links. Discovered URLs and source locations are subsequently included in the generated JSON output, which can reveal internal hostnames, paths, ports, and service structure. ### Attack Path 1. An attacker supplies a target such as `http://127.0.0.1:8080`, a private-network hostname, a link-local cloud metadata address, or an attacker-controlled public redirector. ...[truncated 1600 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Restrict supported schemes** - Permit HTTPS by default. - Reject non-HTTP schemes explicitly. - Permit plain HTTP only through a deliberate, documented override. 2. **Validate resolved addresses** - Resolve the destination hostname before each connection. - Reject IPv4 and IPv6 addresses that are loopback, private, link-local, multicast, reserved, unspecified, or otherwise non-global. - Validate every returned DNS address rather than only the first result. - Protect against DNS rebinding by ensuring the validated address is the address actually used for the connection. 3. **Secure redirect handling** - Disable automatic redirects with `allow_redirects=False`. - If redirects are necessary, process them one at a time with a strict maximum. - Normalize, resolve, and validate the scheme, hostname, port, and resolved addresses of every redirect target before following it. 4. **Restrict destinations and ports** - Prefer an explicit hostname allowlist for scheduled monitoring. - Bind each monitoring job to the hostname explicitly approved by the user. - Restrict ports to an approved set such as 443, with narrowly scoped exceptions where required. 5. **Limit response processing** - Use streaming requests and enforce a maximum response-body size. - Accept and parse only expected textual content types. - Apply separate connection and read timeouts. 6. **Reduce information exposure** - Avoid returning internal destination details in generated JSON or logs. - Report rejected requests without disclosing sensitive network-resolution information. - Log validation failures securely for administrative review. 7. **Add security tests** - Test direct requests to loopback, RFC1918, IPv4-mapped IPv6, link-local, and cloud metadata addresses. - Test public-to-private redirects, alternate IP representations, DNS rebinding scenarios, and user-info or port parsing edge cases. ]]>
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (3)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The implemented code covers only the discovery portion of the declared description: it crawls a few predefined site paths, extracts links, and categorizes them as possible monitoring candidates. However, the declared purpose emphasizes a broader workflow including identifying business-critical flows, proposing a monitoring plan, and scheduling recurring checks after explicit user confirmation. None of those latter capabilities are present in this code chunk. Because the actual behavior is materially narrower and lacks key advertised functionality, this is a description-behavior mismatch.

Lp3

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding
The skill instructs the agent to scan websites and use a discovery script, which implies network-capable behavior, but it does not declare an explicit tool scope such as allowed network access. Undeclared capabilities weaken policy enforcement and reviewability, increasing the chance that the skill is invoked with broader access than intended or performs external requests without clear user/admin visibility.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The description uses broad trigger language such as monitoring a website, checking uptime, designing checks, and automating recurring checks, which can cause the skill to activate in loosely related contexts. Over-broad invocation increases the risk of unintended network reconnaissance or premature automation behavior on external sites when a narrower, more specific skill should have been selected.