T09 · Insecure Skill Coding Practices
- Location
.env:1- Finding
Hard-Coded AtlasCloud API Credential
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This image-editing skill is purpose-aligned, but it needs Review because it mishandles API tokens and persists image/job data in ways users are not clearly told about.
Install only if you are comfortable sending image URLs and prompts to AtlasCloud. Do not provide a long-lived or high-privilege API token unless the skill is changed to avoid persistent memory storage and command-line secrets. The packaged API key should be treated as compromised and removed or revoked, and runtime result files/logs may retain image URLs and job metadata.
.env:1Hard-Coded AtlasCloud API Credential
generate.js:97API Token Exposed Through Process Arguments and Persistent Agent Memory
generate.js:128Image URLs and Job Metadata Persisted in Predictable Plaintext Files
generate.js:42Sensitive Prompt, Image URL, and Provider Response Logging
The lockfile pins axios to 1.14.0, and the static analysis indicates multiple published advisories affecting that version, including SSRF-related proxy bypass and prototype-pollution-based request/response manipulation issues. In an agent skill, HTTP client libraries are high-risk because they often handle outbound requests, credentials, redirects, and proxy behavior; if the vulnerable code paths are reachable, exploitation could lead to credential leakage, request forgery, or traffic interception/manipulation.
The lockfile includes form-data 4.0.5, and the reported CRLF injection issue in multipart field names/filenames can enable malformed request construction or header injection when untrusted input is embedded into multipart uploads. In an agent skill that may upload files or relay user-supplied form fields to external services, this increases the risk of request smuggling-like effects, downstream parser confusion, or abuse of receiving services.
This skill depends on axios through a broad version range, and the analysis indicates that a vulnerable axios version such as 1.14.0 may be resolved. Because this skill appears to make external network requests for image-generation workflows, flaws in the HTTP client can materially increase risk, including SSRF, credential leakage, or response tampering depending on how requests are constructed and where the skill runs.
The skill explicitly instructs the agent to store the user's AtlasCloud API token in memory for future reuse, creating unnecessary persistent handling of a secret. For a single-purpose image-editing workflow, long-term retention of an API credential increases exposure to unintended reuse, leakage to other skills or sessions, and abuse if memory is later accessed or mis-scoped.
The skill tells the agent to save the user's API token to memory 'so it is not needed again' without warning the user that their credential will be stored persistently. This undermines informed consent around secret retention and can lead users to disclose credentials they would not knowingly agree to have stored beyond the immediate operation.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
const fs = require("fs");
const path = require("path");
const BASE_URL = "https://api.atlascloud.ai/api/v1";
const MODEL = "google/nano-banana-2/edit";
function log(...args) { console.log(...args); }
The polling loop logs the full API response on every attempt, which may expose sensitive data returned by the remote service into terminal history, CI logs, or centralized log collectors. In this context, the skill sends user prompts and image references to a third-party service, so verbose response logging increases the chance of leaking generated URLs, metadata, or error payloads beyond the intended user.
The script writes prediction metadata, output URLs, timestamps, and original input image references to local files without user warning or consent. If used on shared systems, workstations with backups, or agent environments that persist working directories, these files can unintentionally retain sensitive image sources or internal URLs after execution.
The header comment describes the script only as editing/combining images via the AtlasCloud model. In addition to calling the remote image-generation API, the implementation writes last_result.json and last_url.txt to disk, which is a side effect not reflected in the documentation and materially expands what the script does.
The lockfile includes follow-redirects 1.15.11, which the scanner flags for leaking custom authentication headers across cross-domain redirects. In a skill context, that matters because agent integrations commonly make authenticated HTTP calls; if a malicious or compromised endpoint can trigger redirects, sensitive headers could be exposed to another domain.
The dependency is specified with a caret range (^1.6.0), which allows automatic installation of newer minor and patch releases. This weakens reproducibility and can silently introduce vulnerable or incompatible versions into the skill, especially important here because the same dependency is also flagged as having vulnerable releases.
"license": "MIT",
"keywords": ["atlascloud", "nanobanana", "image-to-image", "ai", "image-generation"],
"dependencies": {
"axios": "^1.6.0"
}
}