T09 · Insecure Skill Coding Practices
- Location
skill.json:15- Finding
Hardcoded SkillPay API Credential Published in Project Files
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill has a coherent GitHub trending notification purpose, but it exposes payment and subscription data through unsafe defaults and ships a live-looking payment API key.
Review this carefully before installing or publishing. Replace and rotate the SkillPay key, add authentication and object-level authorization to all subscription and payment routes, verify payment callbacks with the provider, add rate limits, disclose third-party data sharing, escape email content, and commit a reviewed lockfile.
skill.json:15Hardcoded SkillPay API Credential Published in Project Files
src/index.js:190Unauthenticated Payment Callback Allows Unpaid Subscription Activation
src/index.js:161Missing Object-Level Authorization Exposes and Modifies Other Users' Subscriptions
src/notifiers/email.js:91Unescaped Repository and Request Data Enables HTML Injection in Email Reports
${language && language !== 'all' ? `Language: ${language}` : 'All Languages'}
${new Date().toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' })}
`; if (!repos || repos.length === 0) { html += '❌ No trending repositories found.
src/index.js:51Unauthenticated Endpoints Permit Outbound Request and Storage Amplification
package.json:23Unpinned Dependencies and Missing Lockfile Make Builds Non-Reproducible
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
├── skill.json # Clawhub configuration ├── SKILL.md # Skill documentation ├── README.md # Project README ├── .env # Environment variables ├── .gitignore # Git ignore └── test.js # Test script
The README includes what appears to be a real SkillPay API key rather than a placeholder example. Publishing live credentials in documentation can allow unauthorized third parties to use the service, incur charges, access account data, or pivot into related systems if the key remains valid.
This markdown file describes Telegram, Discord, Email notifications and subscription management, and later shows a subscription example containing a userId and chatId, but it does not warn users that these identifiers and notification content may be transmitted to third-party services. For a markdown skill description, external data-sharing behavior that could affect privacy should be disclosed explicitly.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
curl "http://localhost:3000/trending?language=javascript&since=daily"
The markdown documents POST /notify and POST /subscribe request bodies containing Telegram chat IDs and email addresses, and it describes scheduled outbound notifications. There is no user-facing warning about transmitting/storing these identifiers or about the privacy impact of sending data to Telegram, Discord, and email services.
The configuration section lists multiple sensitive credentials and connection settings without warning users to keep them secret, and in context it also includes an apparently real API key example. This increases the likelihood that users will paste real secrets into files, commit them to source control, or otherwise expose notification and email infrastructure credentials.
This markdown file documents POST /notify and POST /subscribe requests that send userId plus notification-channel data such as Telegram chat IDs, but it does not warn users that their data will be transmitted to external messaging or email services. Because markdown files should disclose behaviors affecting privacy or user data, the omission is a meaningful safety gap.
The skill requires or supports sensitive credentials including an API key, bot token, webhook URL, and SMTP credentials, but the markdown provides no caution about storing, exposing, or protecting these secrets. For a skill description, this omits an important warning about privacy and system integrity implications.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Fetch trending JavaScript repos
curl "http://localhost:3000/trending?language=javascript&since=daily"
# Subscribe to daily reports
curl -X POST http://localhost:3000/subscribe \
This manifest describes the skill generically as providing "Daily monitoring of GitHub trending repositories with multi-channel notifications" but does not specify how or when it should be invoked, nor any limiting trigger phrases or exclusion conditions. In a manifest file, this kind of broad description can contribute to ambiguous activation behavior because the trigger scope is not clearly bounded.
The code initializes a payment system and later creates payment requests, verifies payments, handles payment callbacks, and logs billable usage. With no manifest available and only code documentation identifying the app as a GitHub trending monitor, integrated payment processing is an additional business capability not inherently required to fetch or notify about trending repositories.
The GET /subscription/:userId endpoint returns the full stored subscription object for any supplied userId with no authentication or authorization checks. Because the object includes channel configuration and payment-related metadata, an attacker can enumerate or guess user IDs and retrieve other users' subscription details.
This endpoint exposes stored subscription data without any access control, allowing any caller to query another user's subscription status and associated delivery settings. In context, that can leak email targets, Telegram chat IDs, Discord usage, schedule preferences, and internal payment linkage information.
The scheduler automatically fetches trending data and sends notifications to Telegram, Discord, or email based on stored subscription settings. Although subscription creation mentions payment completion, this file does not provide any explicit user-facing warning or confirmation that ongoing automated outbound notifications will continue on a schedule.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
class SkillPayment {
constructor(apiKey) {
this.apiKey = apiKey;
this.baseURL = 'https://api.skillpay.me/v1';
this.pricePerCall = 0.001; // USDT
}
The payment description sent to the processor identifies the charge as "GitHub Trending Monitor - API Call" while the module is documented as "SkillPay Payment Integration." Mislabeling payment purposes can mislead users, complicate dispute resolution, and indicate reused or mismatched billing logic that may result in deceptive or unauthorized-looking charges.
The logUsage function transmits userId, action, timestamp, and amount to a remote analytics endpoint without any visible consent, minimization, or disclosure controls in this code. This creates privacy and compliance risk because user activity data is exported to a third party and could be collected without the user's knowledge or a clear lawful basis.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
headers['Authorization'] = `token ${this.githubToken}`;
}
const response = await axios.get('https://api.github.com/search/repositories', {
params: { q: query, sort: 'stars', order: 'desc', per_page: 25 },
headers
});
The phrase "Full English documentation" indicates an English-only documentation constraint, and the later section reiterates that all documentation is in English. This is a natural-language locale policy issue because the file presents a fixed language choice without user opt-in or a documented regional/compliance justification.
The statement "All documentation is in English" explicitly fixes the skill's documentation language and lists all materials as English-only. Because no alternative language option, opt-in, or justification is provided, this constitutes a natural-language language-policy concern under the audit criteria.
The phrase "Full English documentation" indicates the skill materials are fixed to English, and later text reinforces that all code comments and docs are in English. This can violate language or locale policy when no user choice, opt-in, or justification for the language restriction is provided.
The statement "All code in English - Comments, docs, everything!" is an explicit English-only language constraint in natural-language content. Because the file does not provide an opt-in choice or a documented justification, it matches the language-policy violation category.
This plain-text file presents "Ready? Run: npm install && npm start" as a generic call to action without clarifying context, prerequisites, or when a user should avoid running it. In a start-here document, that broad imperative can encourage unintended execution because it does not specify environment, trust boundaries, or exclusions.
The manifest uses a caret range for axios, which allows automatic installation of newer minor/patch releases rather than a single audited version. This increases supply-chain risk and makes builds non-reproducible, especially for a network-facing package with a history of advisories.
"author": "zhdryanchang",
"license": "MIT",
"dependencies": {
"axios": "^1.6.0",
"cheerio": "^1.0.0-rc.12",
"node-cron": "^3.0.3",
"telegraf": "^4.15.0",
axios has a known advisory history, and because the manifest does not pin an exact version, it is not possible to verify from this file whether deployed installs are affected. In a skill that fetches external content, a vulnerable HTTP client could increase exposure to SSRF, request smuggling, or other network-centric issues depending on the specific resolved version.