Back to skill

Security audit

Proposal Copilot

Security checks for vulnerabilities and agentic risk

Overview

The skill is a proposal-writing helper, but it ships broken JavaScript with an exposed billing API key and an under-scoped external charging flow.

Review before installing. The proposal-writing behavior is understandable, but the publisher should remove and rotate the exposed billing key, document the billing endpoint and transmitted fields, require explicit confirmation before any charge, fix the paid/free command logic, and repair the JavaScript syntax error.

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

Error
Location
index.js:2
Finding

Hard-Coded Billing API Credential

Content
View full analysis

Vulnerability Details

File Location: index.js:2
Vulnerability Type: Hard-coded secret in distributable source code
Risk Level: High

Vulnerable Code

js
const BILLING_API_KEY = 'sk_2842f59e03e64e418c15771b0928c3f94a1f1da73ae7e72adc8f483e9f6fe6b1';

The credential is subsequently placed in the billing request header:

js
const headers = {
  'X-API-Key': BILLING_API_KEY,
  'Content-Type': 'application/json',
};

Technical Analysis

A live-format billing API key is embedded directly in a distributable JavaScript file. Anyone who can download, inspect, or otherwise access the Skill package can recover the credential without executing the code.

The credential is intended to authenticate requests to https://skillpay.me. Although the billing function is not called by the current execution path, this does not protect the secret: disclosure occurs as soon as the source package is distributed. The actual permissions and server-side restrictions attached to the key cannot be determined from the reviewed files.

Attack Path

  1. Obtain or download the Skill package.
  2. Open index.js and extract the API key from line 2.
  3. Identify the billing host and request format from lines 1 and 6-19.
  4. Send independent requests to the billing service with the stolen value in the X-API-Key header.
  5. Abuse any operations permitted to that credential, subject to the billing service's server-side authorization controls.

Impact Assessment

An attacker may be able to impersonate the Skill when communicating with the billing API. Depending on the key's server-side scope, this could enable unauthorized billing operations, financial or quota abuse, access to associated API responses, and attribution of attacker-generated requests to the credential owner.

The source does not establish that the key grants administrative privileges or access to the local host. The practical impact is limited by the billing service's authorization, endpoint ...[truncated 46 chars]

Remediation
View remediation

Remediation Suggestions

  1. Revoke and rotate the exposed API key immediately; removal from a later source revision does not invalidate copies already distributed.
  2. Remove all credentials from source code and repository history.
  3. Keep long-lived billing credentials in a server-side secret manager or protected runtime configuration that is unavailable to Skill consumers.
  4. Prefer a trusted backend proxy or short-lived, narrowly scoped tokens instead of distributing a shared billing credential to clients.
  5. Restrict tokens to the minimum required billing operation, skill identifier, amount range, and environment.
  6. Enforce server-side authorization so callers cannot select arbitrary users, skills, amounts, or privileged endpoints.
  7. Add rate limiting, replay protection, request auditing, anomaly detection, and rapid credential-revocation procedures.
  8. Add secret scanning to development and release pipelines to prevent future credential exposure.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is presented as a proposal-generation assistant, but its documented behavior includes charging via an external billing API, and the finding indicates undeclared network access and a hardcoded secret API key. This mismatch is dangerous because users and reviewers cannot accurately assess the skill's real capabilities, and hardcoded credentials combined with external calls can lead to unauthorized charges, secret leakage, or abuse of the billing backend.

Content

No source excerpt is available for this finding.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · SKILL.md (reported line 20)May include surrounding context.

md
- `proposal 报价 <JD文本> <fixed|hourly> [min] [max]`: Return pricing suggestion (paid)
- `proposal 跟进 <客户名> <岗位简述>`: Return D+1/D+3/D+7 follow-up copies (paid)

## Output Rules

Always return concise, copy-paste ready text.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill references an external billing flow via a SkillPay API, which implies network use, but it does not declare any allowed tools or permissions. Undeclared network capability is dangerous because it bypasses transparency and consent expectations, making it harder to audit what external calls the skill may perform or what data may be transmitted.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill defines invocation commands using Chinese terms like 帮助, 生成, 评分, 报价, and 跟进, and also requires at least one Chinese output field description (投标建议结论). This imposes a locale/language expectation without opt-in or a documented region-specific reason, which fits the language policy violation category.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill embeds a live billing endpoint and a hard-coded secret API key for an external charging service, which is outside the stated proposal-generation scope. Even though the current code does not invoke charging, bundling account-charging capability and credentials into a content-generation skill creates unauthorized billing risk and exposes a reusable secret that could be abused by anyone with code access.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code and documentation are inconsistent about which features are paid, and the charging function is never called before returning scored output. This can lead to unauthorized free access, billing disputes, and trust erosion because users are told features are monetized while enforcement is absent or misleading.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill sends user_id, skill_id, and billing metadata to an external service via callBilling, but this code path contains no confirmation prompt, print/log statement, or explanatory comment disclosing that user-related data will be transmitted. The visible skill description mentions billing integration generally, but does not clearly warn that invoking paid functions may send user identifiers to a third-party endpoint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The code returns Chinese-only error/help guidance such as 请使用 proposal 或 提案 命令, and the info() output is predominantly Chinese. There is no indication that the user can choose English or another locale, which creates a language policy issue for a general-purpose skill.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code computes a paid flag for premium operations but never uses it, so features labeled as paid are delivered without any billing or access control. This is a logic flaw that weakens monetization controls and can be exploited simply by invoking the premium commands directly.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.