Back to skill

Security audit

Income Lab 收入实验室

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a disclosed income-tracking assistant, but its billing code exposes a reusable payment API key and uses automatic external charging with weak scoping.

Review the billing implementation before installing. The paid-use notice is visible, but the package ships a live-looking SkillPay API key in source and can charge based on an environment-provided user ID. Install only if you trust the publisher and billing provider, understand the 0.01 USDT per-call model, and are comfortable with local income records being stored under ~/.income-lab.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
payment.py:11
Finding

Hard-Coded Billing API Credential Exposed in Source Code

Content
View full analysis

Vulnerability Details

File Location: payment.py:11-19
Vulnerability Type: Hard-coded secret and externally reusable API credential
Risk Level: High

Vulnerable Code

python
BILLING_API_URL = "https://skillpay.me"
BILLING_API_KEY = "sk_f03aa8f8bbcf79f7aa11c112d904780f22e62add1464e3c41a79600a451eb1d2"
SKILL_ID = "5706cbf7-c6f7-431c-99b0-752f05736f7b"
SKILL_NAME = "income-lab"
PRICE_PER_CALL = 0.01  # USDT

HEADERS = {
    "X-API-Key": BILLING_API_KEY,
    "Content-Type": "application/json"
}

Technical Analysis

A live-looking billing API key is embedded directly in distributable source code and automatically placed in the X-API-Key header. Any user who can download, inspect, cache, or otherwise access the Skill package can recover this credential.

This implementation also conflicts with _meta.json:12, which declares SKILLPAY_API_KEY as the intended environment-variable source. The code does not read that variable and instead uses the exposed constant.

The credential is transmitted only to the fixed HTTPS endpoint https://skillpay.me, but TLS does not mitigate disclosure from the source package itself. The exact server-side authorization scope cannot be determined through static analysis. Consequently, the potential operations available to an attacker depend on the permissions assigned to this key by the billing provider.

Attack Path

  1. An attacker obtains or installs the publicly distributed Skill package.
  2. The attacker opens payment.py and extracts BILLING_API_KEY.
  3. The attacker constructs requests to the documented SkillPay billing endpoints using the stolen value in the X-API-Key header.
  4. If server-side authorization is insufficiently scoped, the attacker performs billing operations under the Skill's identity, consumes quotas, queries associated data, creates payment links, or submits unauthorized charge requests.
  5. Requests appear to originate from a ...[truncated 772 chars]
Remediation
View remediation

Remediation Suggestions

  1. Revoke the exposed API key immediately and issue a replacement; assume the current value is compromised.

  2. Remove the literal credential from source code and repository history where feasible.

  3. Load the key exclusively from the declared environment variable and fail closed when it is absent:

    python
    BILLING_API_KEY = os.environ.get("SKILLPAY_API_KEY")
    if not BILLING_API_KEY:
        raise RuntimeError("SKILLPAY_API_KEY is required")
    
  4. Use narrowly scoped credentials that can access only the required Skill and billing operations.

  5. Prefer short-lived tokens or server-mediated billing authorization over a reusable client-distributed secret.

  6. Enforce server-side validation of the authenticated Skill ID, amount, user authorization, and request uniqueness.

  7. Add idempotency keys to charge requests to reduce accidental or replayed duplicate charges.

  8. Enable credential rotation, rate limiting, anomaly detection, and audit logging at the billing provider.

  9. Add automated secret scanning to development and release pipelines.

  10. Avoid logging authentication headers, complete API responses, or sensitive identifiers.

T09 · Insecure Skill Coding Practices

Note
Location
scripts/experiment_tracker.py:23
Finding

Financial and Activity Records Stored with Umask-Dependent Permissions

Content
View full analysis

Vulnerability Details

File Location: scripts/experiment_tracker.py:23-51
Vulnerability Type: Insufficient protection of locally stored sensitive data
Risk Level: Low

Vulnerable Code

python
DATA_DIR = os.path.expanduser("~/.income-lab")
EXPERIMENTS_FILE = os.path.join(DATA_DIR, "experiments.json")
LOGS_FILE = os.path.join(DATA_DIR, "daily_logs.json")


def ensure_data_dir():
    """Ensure that the data directory exists."""
    if not os.path.exists(DATA_DIR):
        os.makedirs(DATA_DIR)


def load_data(filepath: str) -> dict:
    """Load JSON data."""
    if not os.path.exists(filepath):
        return {}
    with open(filepath, 'r', encoding='utf-8') as f:
        return json.load(f)


def save_data(filepath: str, data: dict):
    """Save JSON data."""
    ensure_data_dir()
    with open(filepath, 'w', encoding='utf-8') as f:
        json.dump(data, f, indent=2, ensure_ascii=False)

The original docstrings are localized, but the executable behavior is shown without alteration: the directory and files are created without explicit restrictive permission modes.

Technical Analysis

The tracker stores experiment names, income amounts, working hours, free-form notes, timestamps, and lessons under ~/.income-lab. Neither os.makedirs() nor open() specifies or enforces restrictive permissions. Effective permissions therefore depend on the process umask and pre-existing filesystem objects.

On a normally configured private home directory, practical exposure may be limited. On shared hosts, containers with mounted home directories, permissive umask configurations, or systems where the data directory already has broad permissions, other local principals may be able to read financial and personal activity records.

The implementation also follows existing symbolic links and does not verify that the destination is a regular file owned by the current user. In a hostile shared lo ...[truncated 1415 chars]

Remediation
View remediation

Remediation Suggestions

  1. Create the data directory with owner-only permissions and verify existing permissions:

    python
    os.makedirs(DATA_DIR, mode=0o700, exist_ok=True)
    os.chmod(DATA_DIR, 0o700)
    
  2. Create data files with mode 0600, preferably using os.open() with explicit flags and permissions.

  3. Reject symbolic links and verify that each destination is a regular file owned by the current user before reading or replacing it.

  4. Write updates atomically to a securely created temporary file in the same directory, apply mode 0600, and then replace the destination.

  5. Document what information is retained, where it is stored, and how users can delete it.

  6. Discourage users from entering credentials, account numbers, or other secrets into free-form notes.

  7. Consider optional encryption at rest when records are used on shared or managed systems.

  8. Add tests that verify directory and file permissions after initialization and subsequent saves.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (25)

Tainted flow: 'user_id' from os.environ.get (line 96, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · payment.py (reported line 29)May include surrounding context.

python
def check_balance(user_id: str) -> float:
    """查询用户余额"""
    try:
        resp = requests.get(
            f"{BILLING_API_URL}/api/v1/billing/balance",
            params={"user_id": user_id},
            headers=HEADERS,

Tainted flow: 'user_id' from os.environ.get (line 96, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
93% confidence
Finding

The code automatically submits a charge request to an external billing service using a user identifier taken from the environment, with no user confirmation and no visible authorization check in this file. In the context of an income-planning skill whose description does not mention paid access, this creates undisclosed paid behavior and risks unauthorized charging or account misuse if the environment variable is set incorrectly or maliciously.

Content

Scanner excerpt · payment.py (reported line 48)May include surrounding context.

python
返回: {"ok": bool, "balance": float, "payment_url": str|None}
    """
    try:
        resp = requests.post(
            f"{BILLING_API_URL}/api/v1/billing/charge",
            headers=HEADERS,
            json={

Tainted flow: 'user_id' from os.environ.get (line 96, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · payment.py (reported line 79)May include surrounding context.

python
def get_payment_link(user_id: str, amount: float = 5.0) -> str:
    """生成充值链接"""
    try:
        resp = requests.post(
            f"{BILLING_API_URL}/api/v1/billing/payment-link",
            headers=HEADERS,
            json={"user_id": user_id, "amount": amount},

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill advertises itself as an income experimentation assistant, but the content indicates hidden payment gating via SkillPay and the static finding reports external billing, execution blocking, recharge link generation, and hardcoded credentials not disclosed in the declared purpose. Undisclosed payment processing and secret handling create risks of deceptive charging, unauthorized external data transfer, and credential compromise, especially because users invoking a generic 'make money' skill would not expect transactional behavior.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file adds mandatory billing enforcement to the skill, including automatic charging and termination when payment fails, but the stated skill description does not disclose any paid-access requirement. Hidden monetization logic is dangerous because users and integrators may invoke the skill without informed consent, and the mismatch increases the risk of deceptive behavior and unauthorized charges.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description says the skill should be used whenever a user wants to make money, does not know where to start, wants to track attempts, or needs reminders and retrospectives. These conditions are broad and lack clear trigger boundaries or exclusion cases, which could cause unintended invocation for general career or finance conversations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The natural-language instructions, examples, and user-facing content are all presented in Chinese, and the file does not indicate that the user can choose another language. Under the language/locale policy, forcing a specific language without user opt-in is a violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The module description includes Chinese text (自动集成付费验证功能), and the runtime user messages and docstrings are also presented in Chinese, but the file does not offer any language/locale choice or explain that the skill is intentionally region-specific. This can violate language/locale policy when users are forced into a specific language without opt-in.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
83% confidence
Finding

This external transmission sends billing-related data to a third-party service in order to debit the user. The danger comes from the surrounding behavior: the transmission is part of undisclosed automatic charging in a skill whose declared purpose does not justify or explain such networked billing actions.

Content

Scanner excerpt · payment.py (reported line 48)May include surrounding context.

python
返回: {"ok": bool, "balance": float, "payment_url": str|None}
    """
    try:
        resp = requests.post(
            f"{BILLING_API_URL}/api/v1/billing/charge",
            headers=HEADERS,
            json={

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code transmits a user identifier to a third-party billing service and triggers a charge without any explicit user-facing warning or confirmation in the code path. This is dangerous because it undermines informed consent and can lead to silent billing events, especially given the skill description does not advertise paid usage.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · payment.py (reported line 79)May include surrounding context.

python
def get_payment_link(user_id: str, amount: float = 5.0) -> str:
    """生成充值链接"""
    try:
        resp = requests.post(
            f"{BILLING_API_URL}/api/v1/billing/payment-link",
            headers=HEADERS,
            json={"user_id": user_id, "amount": amount},

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill reads a billing identity from the environment and uses it for payment enforcement, even though that capability is not justified by the described purpose of experimenting with income strategies. This creates unnecessary access to sensitive runtime context and can cause misbilling or privacy issues if the environment variable is controlled by another component or mapped to the wrong user.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill pulls a billing-related identifier from an environment variable and sends it externally without explicit disclosure to the user. Even if the identifier is not highly sensitive on its own, undisclosed transfer of runtime-linked identity data to a third party creates privacy and transparency risks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file explicitly promotes crypto airdrop participation with a large earnings range and only a minimal note that a project may not issue tokens. In this skill context, that is risky because airdrop hunting commonly involves scams, phishing, wallet compromise, sybil/account farming, and financial-loss exposure, yet the document does not provide meaningful security or legal-risk warnings.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This is a natural-language policy issue because the skill forces a specific language/locale in its docstring and command guidance, which may exclude users who do not read Chinese. The file does not provide any opt-in, fallback language, or justification that it is intended only for a Chinese-speaking region or audience.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This file contains the title and usage instructions entirely in Chinese, and the command descriptions and output strings throughout the script are also Chinese-only. Under the language/locale policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale limitation is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

SQP-3 applies to all file types and includes language or locale policy violations. This file presents all guidance in Chinese and assumes Chinese-language platforms and context, but does not indicate that the language is optional or that the skill is specifically intended for Chinese-speaking users.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file presents all instructions and templates exclusively in Chinese, which can amount to a language/locale policy issue when no user opt-in or alternative is provided. The document does not state that it is intended only for Chinese-speaking users or a region-specific audience.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

The dependency is specified with a lower bound only, so builds may resolve to different versions over time. This weakens reproducibility and can allow introduction of vulnerable or breaking upstream releases through normal installation or CI/CD, even though the file itself does not name a known-bad version.

Content

Scanner excerpt · requirements.txt (reported line 4)May include surrounding context.

text
# Income Lab 依赖

# 数据处理(可选)
pandas>=2.0.0
numpy>=1.24.0
matplotlib>=3.7.0

Unverifiable Dependency: pandas has 1 known advisory(ies) (CVE-2020-13091 (** DISPUTED ** pandas through 1.0.3 can unserialize and execute commands from an)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
86% confidence
Finding

Because pandas is not pinned, it is impossible to determine from this manifest whether an affected version with known advisories could be installed. The cited advisory is disputed and older than the declared minimum, which lowers severity, but the lack of version certainty still creates a real verification gap.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

Using an unpinned numpy version means the installed package can vary by environment and time. This creates supply-chain and reproducibility risk because a newly published vulnerable or incompatible release could be pulled in automatically.

Content

Scanner excerpt · requirements.txt (reported line 5)May include surrounding context.

text
# 数据处理(可选)
pandas>=2.0.0
numpy>=1.24.0
matplotlib>=3.7.0

# 日期处理

Unverifiable Dependency: numpy has 16 known advisory(ies) (CVE-2014-1859 (Numpy arbitrary file write via symlink attack); CVE-2021-41495 (NumPy NULL Pointer Dereference); CVE-2021-33430 (NumPy Buffer Overflow (Disputed)) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
91% confidence
Finding

The manifest does not pin numpy, so some environments could resolve to versions impacted by one of several known advisories, depending on resolver behavior and transitive constraints. This uncertainty is a supply-chain hygiene issue rather than evidence of active exploitation in the skill itself.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

An unconstrained upper version range for matplotlib allows dependency resolution to drift. While not an exploit by itself, it increases the chance of consuming a vulnerable or maliciously impacted upstream release without review.

Content

Scanner excerpt · requirements.txt (reported line 6)May include surrounding context.

text
# 数据处理(可选)
pandas>=2.0.0
numpy>=1.24.0
matplotlib>=3.7.0

# 日期处理
python-dateutil>=2.8.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

python-dateutil is also only minimally constrained, so installations are not deterministic. This can expose the project to avoidable supply-chain risk and make it difficult to verify whether deployed environments are using safe versions.

Content

Scanner excerpt · requirements.txt (reported line 9)May include surrounding context.

text
matplotlib>=3.7.0

# 日期处理
python-dateutil>=2.8.0