T09 · Insecure Skill Coding Practices
- Location
scripts/produce.js:16- Finding
Hardcoded MiniMax API Credentials
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill has a coherent video-generation purpose, but it ships embedded API keys and unsafe execution paths that need human review before installation.
Do not install this version without review and remediation. Require the publisher to remove and rotate embedded API keys, disclose third-party MiniMax data sharing, replace shell-string execution with argument-array execution, validate filenames and storyboard schema, avoid raw generated-code concatenation, and sandbox rendering/output directories.
scripts/produce.js:16Hardcoded MiniMax API Credentials
scripts/produce.js:95Shell Command Injection Through Storyboard Narration
scripts/produce.js:337Arbitrary JavaScript and JSX Injection in Generated Remotion Source
scripts/produce.js:214Storyboard-Controlled Path Traversal in Generated Material Filenames
If the implementation rewrites local source files like produce.js instead of acting as a straightforward media generator, the skill behaves as a code-modification tool under a misleading label. Hidden source rewriting can introduce persistence, break neighboring projects, or smuggle malicious changes into a codebase without informed user consent.
If the implementation rewrites local source files like produce.js instead of acting as a straightforward media generator, the skill behaves as a code-modification tool under a misleading label. Hidden source rewriting can introduce persistence, break neighboring projects, or smuggle malicious changes into a codebase without informed user consent.
If the implementation rewrites local source files like produce.js instead of acting as a straightforward media generator, the skill behaves as a code-modification tool under a misleading label. Hidden source rewriting can introduce persistence, break neighboring projects, or smuggle malicious changes into a codebase without informed user consent.
If the implementation rewrites local source files like produce.js instead of acting as a straightforward media generator, the skill behaves as a code-modification tool under a misleading label. Hidden source rewriting can introduce persistence, break neighboring projects, or smuggle malicious changes into a codebase without informed user consent.
If the implementation rewrites local source files like produce.js instead of acting as a straightforward media generator, the skill behaves as a code-modification tool under a misleading label. Hidden source rewriting can introduce persistence, break neighboring projects, or smuggle malicious changes into a codebase without informed user consent.
The script includes a real-looking API key as a fallback when the environment variable is absent, which means anyone with access to the code can reuse the credential and make unauthorized calls. In a video-production skill, embedding a hidden credential is unnecessary and increases risk of secret leakage, billing abuse, and downstream compromise if the same key is reused elsewhere.
Using a hardcoded API key fallback bypasses safe credential handling and can silently enable outbound paid API usage without the operator knowingly provisioning a secret. This exposes the credential to source disclosure, accidental redistribution, and abuse by anyone who can read the file or recover the repository history.
The file embeds hardcoded API keys for external AI services and uses them by default if environment variables are absent. Anyone with access to the skill source can extract and abuse those credentials for unauthorized API usage, billing fraud, or access to service-linked data, and the skill's video-production context does not justify shipping secrets in code.
Hardcoded API credentials are not only stored in code but are automatically used and transmitted to third-party services without any explicit warning to the user. This compounds the secret-exposure issue by enabling silent external service usage under embedded credentials, increasing the chance of unnoticed abuse and unexpected data processing or charges.
browserslist 4.28.1 is reported with a crash/prototype-write issue and unbounded memory growth when processing untrusted stats/query-related input. Even though this dependency is commonly used for build tooling, prototype pollution-style behavior and resource exhaustion can become significant if any user-controllable input reaches it in automated pipelines or services.
extract-zip 2.0.1 is associated with arbitrary file write and symlink path traversal issues during archive extraction. This is particularly relevant in a video-production skill because media workflows often ingest external assets; if archives from users or upstream tools are unpacked, an attacker could overwrite files outside the intended directory.
fast-uri 3.1.0 is flagged for multiple URI parsing issues including host confusion and SSRF-relevant normalization problems. In isolation this is just a dependency risk, but in an agent skill that may fetch remote media, parse URLs, or process user-provided endpoints, URI confusion bugs can enable access-control bypasses or unintended outbound requests.
nanoid 3.3.11 is reported with several denial-of-service and overflow conditions around invalid size handling and custom/non-secure generators. This is a real dependency weakness, though its exploitability depends on whether attacker-controlled parameters influence ID generation in the skill or its toolchain.
postcss 8.5.8 is flagged for multiple serious issues including arbitrary file read/information disclosure and XSS-related output handling. Because this skill includes web/rendering and bundling dependencies, PostCSS may process attacker-influenced style or source-mapping data in build or studio flows, making the risk more relevant than a purely dormant dependency.
ws 8.17.1 is associated with memory disclosure and memory-exhaustion denial-of-service issues. This is especially concerning if the Remotion studio/server components expose WebSocket interfaces during rendering or preview sessions, because network-reachable parsing flaws can be triggered remotely.
The skill describes capabilities that inherently require privileged operations such as environment/credential access, file writes, and likely external service usage, but it declares no explicit tool scope or permissions. This creates an authorization/transparency gap where the runtime may expose more capability than users or reviewers expect, increasing the chance of unintended secret access or unsafe execution.
The description and title present the skill as a Chinese-language video-generation skill, and no opt-in or alternative language behavior is documented anywhere in the file. SQP-3 requires flagging language or locale policy violations when a specific language is imposed without user choice or clear justification.
The skill describes creating multiple files including code, media, and final outputs without warning about overwrite behavior, output paths, or disk impact. In an automation context, silent file creation/modification can destroy user data, pollute repositories, or be abused to place executable artifacts where they are later trusted.
The code serializes the user-provided prompt and sends it in an HTTPS POST request to api.minimaxi.com. Although the script logs progress, it does not clearly warn users that scene prompt content will be transmitted to a third-party service, which is relevant to privacy and data handling.
The file identifies itself as a Chinese short-video generation script and references a Chinese-specific TTS path, while all user-facing logs and outputs are fixed in Chinese. There is no indication that the user can opt into another language or that the locale restriction is formally documented as a necessary regional constraint.
The script sends prompts and scene text derived from user input to external image-generation and TTS services, but provides no meaningful disclosure or consent mechanism before transmission. In this skill context, user content may include proprietary scripts, personal data, or sensitive business material, so silent exfiltration to third-party APIs creates a real privacy and compliance risk.
The script executes npx remotion render without pinning an exact package version or using a vendored/local dependency. If the package is missing locally, npx may resolve and run whatever version is available from the registry at execution time, creating a supply-chain execution risk in a script that already performs filesystem writes and media rendering.
The script unconditionally rewrites produce.js in place using fs.writeFileSync after performing string-based code replacement, with no confirmation, backup, integrity check, or atomic write pattern. In an agent skill context, this can silently alter executable project logic, cause accidental code loss, or persist unsafe modifications if the script is triggered on an unexpected or tampered input file.
This JSON file contains all user-facing content in Chinese, including the topic, point text, and ending strings. Under the policy, forcing a specific language without user opt-in or a documented region-specific justification is a natural-language policy violation.
This JavaScript file contains multiple user-visible strings in Chinese, such as the scene titles and description, while providing no indication that the skill is region-specific or that users can opt into this locale. Under the policy, forcing a specific language without user choice is a natural-language policy violation.
Detected: suspicious.dangerous_exec