T09 · Insecure Skill Coding Practices
- Location
scripts/query_service.py:30- Finding
Unrestricted API Base URL Enables Server-Side Request Forgery
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill does what it says, but it can query sensitive customer service records through an unauthenticated and caller-configurable API endpoint.
Review this skill before installing. It is not deceptive or destructive, but it should only be used in an environment where the API endpoint is trusted, network egress is controlled, and access to customer service records is authorized outside the skill. Prefer a version that pins or allowlists the API host, requires HTTPS, and uses authenticated requests.
scripts/query_service.py:30Unrestricted API Base URL Enables Server-Side Request Forgery
SKILL.md:108Customer and Service Records Are Queried Without Authentication or Authorization Context
The skill invokes a Python script that performs remote API requests, but the manifest does not declare any explicit tool scope or network permission boundaries. This creates an undeclared capability gap: an agent or reviewer cannot easily tell that customer identifiers and query parameters will be sent off-box, increasing the risk of unexpected data exfiltration or overbroad execution in environments that rely on manifest-level restrictions.
The skill handles customer names and retrieves service records, which are likely business-sensitive and may contain personal or operational details, yet it does not warn users that these identifiers and records are transmitted to a remote API. In this context, the omission is more dangerous because the skill is specifically designed to query customer service history, so users may disclose sensitive customer information without informed consent or awareness of external processing.
Natural-language strings, docstrings, comments, and CLI usage are consistently presented only in Chinese, which can amount to a language/locale policy violation when no opt-in or justification is provided. The file does not indicate that this is a region-specific tool or offer multilingual support.
This function transmits customer-identifying query data to an externally supplied base_url without any validation or allowlisting of the destination. If an attacker can influence base_url, the skill could exfiltrate customer data to an untrusted host or send it over insecure transport, which is more sensitive here because the skill explicitly handles customer service records.
payload = {"customerName": customer_name}
try:
response = requests.post(url, json=payload, timeout=30)
response.raise_for_status()
result = response.json()
This request sends customer name plus service-record date range to an externally controlled endpoint, and the response may contain sensitive customer service details. If base_url is attacker-controlled or misconfigured, the skill can leak both query parameters and returned business data to an unauthorized system, increasing risk beyond a simple lookup.
}
try:
response = requests.post(url, json=payload, timeout=30)
response.raise_for_status()
result = response.json()
This code file sends customer-provided names to a remote service via requests.post, which is a network operation involving potentially sensitive business data. While the function purpose implies querying a service, the script does not provide any explicit runtime disclosure, confirmation, or privacy warning to the user before transmitting that data.