T09 · Insecure Skill Coding Practices
- Location
run.sh:16- Finding
Arbitrary Python Code Execution Through Unsanitized Command-Line Arguments
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This scraping skill has legitimate uses, but it includes under-scoped automation and instructions that can help bypass API, anti-bot, and dependency safety boundaries.
Install only after review. Use it only for public sites or systems where you have permission, avoid the API reverse-engineering and Cloudflare/stealth bypass sections, do not pass untrusted URLs/selectors or spider files to run.sh, and prefer pinned dependencies in an isolated environment.
run.sh:16Arbitrary Python Code Execution Through Unsanitized Command-Line Arguments
run.sh:12Automatic Installation of Unpinned Runtime Dependencies
SKILL.md:769Potential Disclosure of Sensitive Target URLs to an External Screenshot Service
SKILL.md:532Guidance and Code for Replicating Authentication Controls on Undocumented APIs
The reverse-engineering section omits a strong prohibition on replicating auth headers or using hidden/premium endpoints and instead provides a practical recipe for doing so. Because it includes discovery, token generation, and request replay steps, it directly enables unauthorized access patterns rather than merely describing web research techniques.
The cumulative narrative teaches how to inspect network traffic, locate hidden endpoints, extract auth logic from JavaScript, and replay requests with synthesized tokens. This is dangerous because the skill context is an operational scraping tool, so the instructions are immediately actionable for unauthorized backend access rather than academic discussion.
The 'spider' mode passes a user-supplied argument directly to python3, allowing execution of any local Python file. In a skill advertised for scraping, this expands behavior into a generic code runner, which is dangerous because it can execute arbitrary code with the invoking user's privileges if an attacker can influence the argument or convince a user to run an untrusted spider file.
The skill clearly enables outbound network activity through multiple fetchers, spiders, browser automation, and third-party HTTP requests, yet the manifest declares no explicit tool scope or permission boundaries. In an agent setting, that mismatch can cause over-broad runtime behavior and weak policy enforcement, especially because the skill also includes stealth and crawling features.
The documentation actively promotes stealthy fetching, anti-bot handling, and Cloudflare solving but provides only limited high-level caution and no strong warning against bypassing technical protections. In context, this normalizes behavior that may violate site terms, trigger abuse, or be used against protected services.
This section goes beyond normal scraping by teaching users how to discover backend APIs, identify authentication headers in JavaScript, and generate replacement tokens to access endpoints directly. That materially facilitates unauthorized access to hidden, rate-limited, or premium backend functionality and lowers the barrier to misuse.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
Example pattern:
# Found in Network tab:
GET https://api.example.com/v1/users/transactions
Response: {"data": [...], "pagination": {...}}
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
Example pattern:
# Found in Network tab:
GET https://api.example.com/v1/users/transactions
Response: {"data": [...], "pagination": {...}}
Sending target URLs to an external screenshot provider without an explicit privacy warning can expose confidential targets, internal hostnames, or investigative intent. In an agent workflow, users may not realize that a seemingly local extraction routine transmits data to a separate service.
The script silently performs external package management by auto-installing scrapling if it is missing, which triggers network access and code retrieval without explicit user consent. This is risky in agent or automation contexts because it changes the environment, introduces supply-chain exposure, and may surprise users who expected a local-only helper script.
The stealth mode performs remote fetching with anti-bot bypass behavior using a headless browser, but the script provides only minimal disclosure and no explicit warning about stealthy access. In the context of an agent skill, this is more dangerous because it can cause automated interaction with third-party sites in a way users may not realize, increasing legal, policy, and operational risk.
Spider mode executes a user-supplied Python file without any safety warning, which means the script can run arbitrary code under the current user's privileges. The absence of warning increases the likelihood of accidental unsafe use, especially because the skill framing suggests a scraping utility rather than a general-purpose code execution mechanism.
The brand-data example silently constructs a URL for an external screenshot service using the target site URL, creating an additional disclosure channel unrelated to direct scraping. This can leak user-supplied targets, internal URLs, or sensitive research subjects to a third party without clear consent or visibility.
No suspicious patterns detected.