T09 · Insecure Skill Coding Practices
- Location
vecml-pipeline.py:22- Finding
Unrestricted API Endpoint Override Can Disclose API Credentials and User Datasets
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This AutoML skill mostly matches its stated purpose, but it can send CSV data and the VecML API key to an undocumented environment-controlled endpoint, so users should review it before installing.
Install only if you intend to send the selected CSV data to VecML for cloud processing. Use it with non-sensitive or approved datasets, keep VECML_API_KEY protected, and ensure VECML_API_URL is unset or points only to a trusted HTTPS VecML endpoint before running it.
vecml-pipeline.py:22Unrestricted API Endpoint Override Can Disclose API Credentials and User Datasets
The API base URL is taken directly from the VECML_API_URL environment variable and then used for outbound requests, while the payload includes the VECML API key and uploaded dataset content. If an attacker can influence the environment, they can redirect requests to an attacker-controlled host and exfiltrate credentials and sensitive CSV data; this is especially risky because the skill’s core function is uploading full datasets to a remote service.
headers={"Content-Type": "application/json"},
)
try:
with urllib.request.urlopen(req, timeout=120) as resp:
return json.loads(resp.read().decode())
except urllib.error.HTTPError as e:
body = e.read().decode()
The trigger phrases include very broad terms like "train," "predict," "model," "CSV," and "accuracy," which are common in ordinary conversation and many unrelated tasks. This can cause the skill to activate unexpectedly, leading the agent to read user files, request sensitive datasets, or transmit data to an external ML service when the user did not explicitly intend to use this integration.
The skill invokes Python, reads local CSV files, writes prediction outputs, consumes an API key from the environment, and sends data to a remote VecML service, but it does not declare an explicit tool/permission scope. That makes the skill's effective capabilities broader and less transparent to the agent and user, increasing the chance of unintended file access, data exfiltration, or unsafe execution in contexts where tighter scoping should have blocked it.
The skill states that data is uploaded and even base64 encoded, but it does not clearly warn users that their CSV contents are transmitted to a third-party external service. In an AutoML context, CSVs often contain sensitive business, personal, or regulated data, so missing disclosure undermines informed consent and can result in privacy, compliance, or confidentiality violations.
The training workflow silently base64-encodes and uploads feature and label data from the user’s CSV to a remote API, but the description and command interface do not clearly warn that local data is being transmitted off-host. In an agent skill context, this can cause unintended disclosure of proprietary or regulated data because users may interpret 'drop a CSV, train a model' as a local operation.
The predict command writes a _predictions.csv file to disk, which is a file-write side effect. Although the script prints the saved path after writing, there is no prior disclosure in the usage/docstring or argument help that running prediction creates an output file.
No suspicious patterns detected.