T09 · Insecure Skill Coding Practices
- Location
index.js:17- Finding
Hardcoded SkillPay Merchant Credential Used for Payment Requests
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill does generate Twitter/X content, but it also automatically contacts a payment service using an embedded merchant credential, so it should be reviewed before install.
Install only if you are comfortable with a paid per-use skill that contacts SkillPay before generating content. The publisher should remove and rotate the embedded merchant credential, require explicit user configuration and confirmation for charges, use HTTPS registry sources, pin installer versions, and align the package versions before this is treated as low risk.
index.js:17Hardcoded SkillPay Merchant Credential Used for Payment Requests
package-lock.json:23Dependencies Retrieved from Plaintext Third-Party Mirror and Mutable Installer Version
A skill marketed as tweet generation but also performing payment-related actions creates a trust and transparency failure. Even if payment is expected for a paid skill, failing to clearly declare billing behavior can lead to unauthorized or confusing transactions and makes abuse harder to detect.
A skill marketed as tweet generation but also performing payment-related actions creates a trust and transparency failure. Even if payment is expected for a paid skill, failing to clearly declare billing behavior can lead to unauthorized or confusing transactions and makes abuse harder to detect.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
prompt += `\nFormat each tweet as:\n[TWEET 1]\ncontent...\n\n[TWEET 2]\ncontent...`;
}
return prompt;
}
/**
The lockfile pins axios 1.13.6, and the static analysis indicates multiple advisories affecting that version, including SSRF-related NO_PROXY bypass behavior and prototype-pollution-assisted request/response manipulation. In an agent skill that likely makes outbound HTTP requests to generate or fetch Twitter/X-related content, a vulnerable HTTP client increases the risk of server-side request forgery, credential leakage, or man-in-the-middle style abuse depending on how requests are constructed.
form-data 4.0.5 is reported as vulnerable to CRLF injection via unescaped multipart field names and filenames. If this skill ever builds multipart requests using attacker-influenced values, an attacker may be able to alter request structure or inject unintended headers/body content, which can lead to request smuggling-like effects against downstream services.
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.
The README instructs users to execute npx clawhub@latest install twitter-content-generator, which fetches and runs remote code at install time without pinning to an immutable version. That creates a supply-chain risk: if the package is updated maliciously or compromised, users following the documentation may execute attacker-controlled code.
The README states that usage is paid per invocation and that payment is handled automatically via an embedded merchant key, but it does not present a prominent warning about charges, payment triggers, limits, or user consent flow. In a CLI skill context, this can lead to unexpected financial charges and weakens informed consent, especially when combined with a simple one-command install and execution model.
The skill references environment variables and operational capabilities but does not declare any explicit tool scope or permissions boundary. In a skill ecosystem, this increases the risk of unintended access to secrets or runtime capabilities because users and hosting platforms cannot clearly determine what the skill is allowed to read or use.
The configuration contains a hardcoded merchant key fallback embedded directly in source code. Hardcoded secrets are vulnerable to source disclosure, reuse by unauthorized parties, and accidental charging against the embedded account; in this context, it is especially dangerous because the skill automatically uses that key if the environment variable is absent.
// Configuration
const CONFIG = {
skillpay_api: 'https://api.skillpay.me/v1',
merchant_key: process.env.SKILLPAY_MERCHANT_KEY || 'sk_91fff75ae2a7a71f8eceadcbcd816e24d57e58d9d04ccca45f0b3856af130aea',
price_per_use: 0.002,
currency: 'USDT',
The implementation executes an external openclaw binary via child_process.spawn, which is a stronger system capability than the manifest's simple content-generation description suggests. While invoking an AI backend is expected, spawning a local executable is not an obvious or explicitly declared requirement from the stated purpose alone.
Code issues a request to a loopback, link-local, or private-range host. This can reach internal services not meant to be exposed and is a common SSRF pivot.
* Fallback to API call
*/
async function fallbackAPICall(prompt) {
const response = await axios.post('http://localhost:18789/api/agent/run', {
agentId: 'sloan',
prompt: prompt,
stream: false
The skill is presented as a Twitter/X content generator, but its normal execution path charges an external payment service before doing the stated task. This creates a capability and trust mismatch: users invoking a content tool may unknowingly trigger financial transactions, especially because payment is enabled by default and only skipped with a test flag.
Including payment processing inside a content-generation skill is security-relevant because it extends the skill's behavior into financial operations not implied by the primary purpose. Even if intended for monetization, hidden or unexpected charging increases the risk of unauthorized spending and abuse in automated environments.
The code sends a sensitive merchant credential in an outbound request during normal execution, without an explicit runtime warning or confirmation step before charging. In agentic or automated contexts, this can silently monetize user actions or misuse the operator's billing account, especially when combined with the hidden default key fallback.
The test suite validates payment-processing behavior in a skill described only as a Twitter/X content generator, indicating hidden or undocumented capability. Undisclosed financial functionality expands the attack surface, can bypass reviewer/user expectations, and may enable monetization flows or credential handling unrelated to the stated purpose of the skill.
A payment capability appears unjustified for a Twitter/X content generation skill, which is a strong indicator of over-privileged or deceptive functionality. Even though this file is only a test, it confirms the existence of a payment flow that could expose users to phishing-style payment URLs, unauthorized charges, or collection of sensitive financial/API-related data outside the expected feature set.
follow-redirects 1.15.11 is flagged for leaking custom authentication headers across cross-domain redirects. Because axios depends on this package, any authenticated outbound request that follows redirects could unintentionally disclose API keys, bearer tokens, or other headers to attacker-controlled domains if redirect targets are not strictly validated.
The dependency is version-ranged with a caret (^1.6.0), which allows installation of newer minor/patch releases that may differ from what was originally tested. In a skill package, this weakens supply-chain integrity and can silently introduce breaking changes or newly vulnerable versions during install.
"author": "Matt",
"license": "MIT",
"dependencies": {
"axios": "^1.6.0"
},
"engines": {
"node": ">=18.0.0"
Detected: suspicious.dangerous_exec, suspicious.env_credential_access