T09 · Insecure Skill Coding Practices
- Location
lib/wavespeed.ts:41- Finding
Provider-Controlled Polling URL Can Receive the Wavespeed API Credential
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly does what it says, but it has a real credential-handling flaw and weak remote media download controls that users should review before installing.
Install only if you are comfortable giving it Vidu, Wavespeed, Replicate, and Cloudflare R2 credentials and having generated assets uploaded to an R2 public URL. Before use, restrict credentials to least-privilege accounts, validate the Wavespeed polling host before sending its token, add download limits and media validation, and prefer pinned dependencies with a lockfile.
lib/wavespeed.ts:41Provider-Controlled Polling URL Can Receive the Wavespeed API Credential
make-xpilot-ad.ts:141Unrestricted and Unbounded Download of Provider-Controlled Media
package.json:10Executable Dependencies Are Not Reproducibly Pinned
The skill description emphasizes ad generation but under-describes that it uses Cloudflare R2 credentials and uploads outputs to publicly hosted object storage. This can mislead users into exposing generated media and intermediate assets externally without fully understanding the data-flow or public accessibility.
The skill description emphasizes ad generation but under-describes that it uses Cloudflare R2 credentials and uploads outputs to publicly hosted object storage. This can mislead users into exposing generated media and intermediate assets externally without fully understanding the data-flow or public accessibility.
The skill description emphasizes ad generation but under-describes that it uses Cloudflare R2 credentials and uploads outputs to publicly hosted object storage. This can mislead users into exposing generated media and intermediate assets externally without fully understanding the data-flow or public accessibility.
The skill description emphasizes ad generation but under-describes that it uses Cloudflare R2 credentials and uploads outputs to publicly hosted object storage. This can mislead users into exposing generated media and intermediate assets externally without fully understanding the data-flow or public accessibility.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
*/
import "dotenv/config";
import { config as loadEnv } from "dotenv";
loadEnv({ path: ".env.local" });
import { put } from "./lib/r2";
import { writeFileSync, readFileSync, mkdtempSync } from "fs";
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
*/
import "dotenv/config";
import { config as loadEnv } from "dotenv";
loadEnv({ path: ".env.local" });
import { put } from "./lib/r2";
import { writeFileSync, readFileSync, mkdtempSync } from "fs";
The skill declares required environment variables and clearly relies on networked third-party services, but it does not declare any explicit tool scope such as permissions or allowed-tools. That weakens least-privilege controls and makes it harder for a hosting agent to constrain secret access and outbound network use before execution.
The documentation does not prominently warn users that generated assets and final videos are uploaded to publicly hosted R2 URLs. In a skill handling media that may contain branding, likenesses, or sensitive business content, silent public publication can lead to privacy, confidentiality, and reputational harm.
Using npx tsx without a pinned version allows resolution of whatever package version is current at execution time. That creates a supply-chain risk where a compromised or breaking upstream release could execute unexpected code on the operator's machine.
The second npx tsx invocation has the same issue: it may fetch and run an unpinned package version at runtime. This increases exposure to dependency hijacking or malicious upstream releases.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
* Minimal Wavespeed.ai client for the protagonist reference image step.
* Self-contained — only the t2i submit + poll path is implemented.
*/
const WAVESPEED_BASE = "https://api.wavespeed.ai/api/v3";
export interface WavespeedTask {
id: string;
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
process.exit(1);
}
const VIDU_BASE = "https://api.vidu.com/ent/v2";
// ─── Storyboard ─────────────────────────────────────────────────────────────
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
// Community models require version-based predictions endpoint.
const KOKORO_VERSION =
"f559560eb822dc509045f3921a1921234918b91739db4bf3daab2169b71c7a13";
const res = await fetch("https://api.replicate.com/v1/predictions", {
method: "POST",
headers: {
Authorization: `Token ${REPLICATE_KEY}`,
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
// Community models require version-based predictions endpoint.
const KOKORO_VERSION =
"f559560eb822dc509045f3921a1921234918b91739db4bf3daab2169b71c7a13";
const res = await fetch("https://api.replicate.com/v1/predictions", {
method: "POST",
headers: {
Authorization: `Token ${REPLICATE_KEY}`,
The file states that Replicate Kokoro TTS uses the af_bella voice, which imposes a specific voice/locale choice in the generated narration. There is no indication that users can opt into or change the language/voice selection, which may conflict with language or locale choice expectations.
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.
"finalize": "tsx xpilot-ad-finalize.ts"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.700.0",
"dotenv": "^17.0.0",
"ffmpeg-static": "^5.3.0"
},
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.
},
"dependencies": {
"@aws-sdk/client-s3": "^3.700.0",
"dotenv": "^17.0.0",
"ffmpeg-static": "^5.3.0"
},
"devDependencies": {
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.
"dependencies": {
"@aws-sdk/client-s3": "^3.700.0",
"dotenv": "^17.0.0",
"ffmpeg-static": "^5.3.0"
},
"devDependencies": {
"@types/node": "^20.0.0",
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.
"ffmpeg-static": "^5.3.0"
},
"devDependencies": {
"@types/node": "^20.0.0",
"tsx": "^4.21.0",
"typescript": "^5.0.0"
}
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.
},
"devDependencies": {
"@types/node": "^20.0.0",
"tsx": "^4.21.0",
"typescript": "^5.0.0"
}
}
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.
"devDependencies": {
"@types/node": "^20.0.0",
"tsx": "^4.21.0",
"typescript": "^5.0.0"
}
}