Back to skill

Security audit

Ai Web Automation 1.0.0

Security checks for vulnerabilities and agentic risk

Overview

This web automation skill is broadly aligned with scraping, but it can make unrestricted network requests and advertises scheduled/proxy/automated submission behavior without enough user controls.

Review this before installing in any environment with access to private networks, internal services, or cloud metadata endpoints. Use it only for authorized targets, avoid automated submissions or scheduled runs unless you control the destination, and prefer adding URL allowlists and internal-address blocking before deployment.

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
main.py:12
Finding

Unrestricted URL Fetching Enables Server-Side Request Forgery

Content
View full analysis

Vulnerability Details

File Location: main.py, lines 12–16; attacker-controlled input originates at lines 50–51
Vulnerability Type: Server-Side Request Forgery (SSRF)
Risk Level: High

Vulnerable Code

python
def scrape_web(url):
    """抓取网页"""
    try:
        import requests
        response = requests.get(url, timeout=10)

The request URL is taken directly from command-line input:

python
action = sys.argv[1]
url = sys.argv[2]

if action == "scrape":
    result = scrape_web(url)

Technical Analysis

The application passes a user-controlled URL directly to requests.get() without validating the scheme, hostname, destination IP address, port, or redirect chain. Consequently, a user who can invoke the skill can cause its execution environment to send requests to destinations that may not be reachable from the user's own network.

Potential targets include loopback services, private-network hosts, link-local addresses, and cloud instance metadata endpoints. Because Python Requests follows redirects by default, validation of only an initial URL would also be insufficient: an external URL could redirect the request to an internal destination.

The response body is not returned in full. However, the generated report records the HTTP status code, response length, and any matched HTML title. These values can act as an oracle for internal service discovery and may disclose limited response-derived information.

Attack Path

  1. An attacker with permission to invoke the skill supplies a URL targeting a loopback, private, link-local, or otherwise internal address.
  2. main() reads the value from sys.argv[2] without validation.
  3. scrape_web() passes the value directly to requests.get().
  4. The process sends the request using the host environment's network access and trust boundaries.
  5. The generated Markdown report exposes the response status, content length, and potentially the page title.
  6. The attacker repeats reques ...[truncated 941 chars]
Remediation
View remediation

Remediation Suggestions

  1. Restrict accepted schemes to http and https; reject all other schemes and malformed URLs.
  2. Prefer an explicit allowlist of approved destination domains rather than accepting arbitrary hosts.
  3. Resolve the hostname before connecting and reject every address classified as loopback, private, link-local, reserved, multicast, or unspecified for both IPv4 and IPv6.
  4. Protect against DNS rebinding by ensuring that the validated address is the address actually used for the connection.
  5. Disable automatic redirects where they are unnecessary. If redirects are required, validate the scheme, hostname, port, and resolved addresses of every redirect target before following it.
  6. Reject URLs containing embedded credentials and restrict destination ports to those required for legitimate operation.
  7. Apply outbound firewall or proxy rules that prevent the process from reaching internal networks and cloud metadata services.
  8. Set response-size limits in addition to the existing timeout to reduce resource-exhaustion risk.
  9. Return a clear validation error without making a network request when a destination violates policy.
  10. Add tests covering loopback, private IPv4, private IPv6, link-local and metadata addresses, encoded IP representations, DNS rebinding scenarios, and redirects to prohibited destinations.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (4)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill explicitly advertises web scraping, automated submission, proxy-pool support, and scheduled execution, but provides no guidance on authorization, rate limiting, privacy, data retention, or legal/operational constraints. That omission can enable misuse against third-party services, accidental collection of sensitive data, or repeated automated activity that causes account, infrastructure, or compliance harm.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

SQP-3 applies to natural-language policy issues in all file types. The user-facing description and headings are presented in Chinese, and the file does not indicate that the skill is region-specific or provide an opt-in or alternative language, which can violate a language/locale policy requiring user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

Line L13 contains the only natural-language description for the function, and it is written solely in Chinese ("抓取网页"). In this file there is no indication that the skill is region-specific or that users can opt into a language/locale, so the embedded instruction text imposes a specific language context without justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The package description mixes English and Chinese ("自动化 Web 任务执行") but provides no indication that multilingual output is optional, user-selectable, or limited to a justified locale-specific context. This can violate language/locale policy when a skill appears to impose or assume a language without explicit user opt-in.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.