Back to skill

Security audit

Usage Monitor

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent usage monitor, but it asks users to store and resend full dashboard URLs that may contain sensitive account or session data.

Install only if you are comfortable keeping the configured dashboard URL and generated usage log local. Do not paste URLs containing access tokens, signatures, session IDs, passwords, or sensitive query parameters; prefer an HTTPS, stable, non-secret dashboard URL. Avoid sending alert messages with the full dashboard URL unless all recipients should see it, and add your own .gitignore entries for config.json and usage-log.md before using the skill in a repository.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
check.js:137
Finding
Potentially Sensitive Dashboard URLs Are Persisted and Propagated Without Sanitization<![CDATA[ ## Vulnerability Details **File Location**: `check.js:137-166` and `check.js:183-193` **Supporting Documentation**: `USER-GUIDE.md:26-28`, `USER-GUIDE.md:136-151`, and `usage-log.template.md:16-18` **Vulnerability Type**: Plaintext storage and disclosure of potentially sensitive URL parameters **Risk Level**: Medium ### Vulnerable Code The complete dashboard URL is written into the generated usage log: ```javascript let log = readUsageLog(); if (!log) { // Create a new log log = `# Usage Log ## Current Status (Last Updated: ${timestamp}) ### Service Info - **Service:** ${data.serviceName} - **Status:** 正常 - **Remaining Days:** ${data.remainingDays} - **Alert Threshold:** ${data.threshold}% ### Usage Tracking | Date | Current | Notes | |------|---------|-------| | ${today} | ${data.current}% | Auto-check | ### Panel URL ${data.panelUrl} --- ## Monitoring Setup - **Check Frequency:** Every ${data.checkIntervalHours} hours - **Last Check:** ${timestamp} `; fs.writeFileSync(USAGE_LOG_PATH, log); return; } ``` The same complete URL is embedded in an alert intended to be sent through a messaging tool: ```javascript function createAlertMessage(data) { return `⚠️ 服务使用量提醒 📊 服务:${data.serviceName} 📈 当前用量:${data.current}% 📈 可用额度:${100 - data.current}% ⏰ 剩余天数:${data.remainingDays} 天 🔗 查看:${data.panelUrl} 当前用量已达告警阈值(${data.threshold}%),请及时关注用量或考虑增加额度。`; } ``` The user guide explicitly acknowledges that dashboard URLs may contain user-specific parameters: ```markdown **Note:** Each user's URL may be different and may contain user-specific parameters, so it must be supplied by the user. ``` The generated-log template also requires the URL to be stored: ```markdown ## Panel URL <Populated from config.json> ``` ### Technical Analysis Dashboard URLs copied from a browser address bar can contain sensitive information, including: - Signed query parameters - Temporary access tokens - Tenant, workspace, account, or organization ide ...[truncated 3187 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Parse and validate the URL securely** Use the standard `URL` parser instead of prefix matching: ```javascript function validateAndSanitizePanelUrl(value) { const url = new URL(value); if (url.protocol !== 'https:') { throw new Error('panelUrl must use HTTPS'); } if (url.username || url.password) { throw new Error('panelUrl must not contain embedded credentials'); } return url; } ``` 2. **Do not persist query strings or fragments** Construct a sanitized display URL before logging: ```javascript function getSafeDisplayUrl(value) { const url = validateAndSanitizePanelUrl(value); url.search = ''; url.hash = ''; return url.toString(); } ``` Use this sanitized value in `usage-log.md` and alert messages. 3. **Separate navigation and display URLs** Keep the complete URL only in the protected configuration when it is genuinely necessary for navigation. Introduce an optional `displayUrl` for logs and alerts, and require it to be free of tokens and sensitive parameters. 4. **Avoid including dashboard URLs in alerts by default** Prefer a generic message such as “Open the configured service dashboard” unless the user explicitly enables link inclusion. 5. **Create the documented `.gitignore`** Add at least: ```gitignore config.json usage-log.md ``` Documentation should not claim that these files are ignored unless the protection is included and verified. 6. **Restrict generated-file permissions** On supported platforms, create sensitive files with owner-only permissions: ```javascript fs.writeFileSync(USAGE_LOG_PATH, log, { mode: 0o600 }); ``` 7. **Warn users about signed URLs** Explicitly instruct users not to configure URLs containing access tokens, signatures, session identifiers, or temporary authentication parameters. 8. **Redact existing logs and notification history** Us ...[truncated 247 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (9)

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The installation guide explicitly tells users to paste the full browser URL of a usage/quota dashboard into config.json. Such URLs commonly contain account identifiers, workspace IDs, query tokens, session artifacts, or other sensitive parameters, and the guide provides no warning to sanitize or avoid storing secrets in plaintext. In the context of a user-configurable monitoring skill, this increases the chance of credential leakage via local files, backups, screenshots, or accidental sharing.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The skill documentation is written entirely in Chinese, beginning with the description at L03 and continuing through the usage instructions and configuration details. Under the policy rules, forcing a specific language without user opt-in or a documented region-specific justification is a natural-language policy violation.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The title and core description are presented in Chinese, which imposes a specific language on users. The policy allows locale constraints only when the skill offers user choice or clearly documents and justifies the constraint, which is not present here.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
The file’s user-facing natural-language instructions, labels, and comments are written exclusively in Chinese, including the title and configuration guidance. This imposes a specific language/locale on users without any opt-in, fallback, or explanation that the tool is intended only for a Chinese-speaking or region-specific context.

Vague Triggers

Medium
Confidence
95% confidence
Finding
This JSON manifest/config schema contains natural-language descriptions exclusively in Chinese across multiple fields, but does not indicate that the skill is China/Chinese-specific or provide any user language opt-in. Under the stated policy, forcing a specific language without user choice is a natural-language policy issue applicable to all file types.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The user-facing content in this template is entirely in Chinese, including the warning and placeholder text, with no indication that the skill is region-specific or that users can opt into another language. This is a natural-language locale policy concern because it imposes a language choice by default rather than offering flexibility or justification.

Natural-Language Policy Violations

Low
Confidence
92% confidence
Finding
A language/locale policy issue exists when a skill forces a specific language without user choice or justification. This installation document presents all operational instructions only in Chinese and does not offer an alternative language, opt-in, or note that the skill is intended only for a Chinese-speaking audience.

Natural-Language Policy Violations

Low
Confidence
90% confidence
Finding
The file presents all user-facing guidance in Chinese and does not indicate that other languages are available or that Chinese is optional. This can violate a language/locale policy when a skill forces a specific language without user opt-in.

Natural-Language Policy Violations

Low
Confidence
97% confidence
Finding
This manifest-style JSON example contains all instructional natural language in Chinese, including the top-level comment and field notes. Because no language choice or locale justification is provided, it imposes a specific language on users and matches the policy category for language or locale violations.

Static analysis

No suspicious patterns detected.