Back to skill

Security audit

Elon马斯克情报内参

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a small demo HTTP service, but it ships a live-looking SkillPay API key in source and exposes a network listener by default.

Review before installing. The active service appears to return demo JSON and sample payment links, but the publisher should remove and rotate the embedded SkillPay key, clarify whether the payment behavior is only a sample, and ensure users are comfortable with a service binding to 0.0.0.0 on one or more ports.

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
main.py:7
Finding

Hardcoded SkillPay API Credential in Source Code

Content
View full analysis

Vulnerability Details

File Location: main.py, lines 7-8
Vulnerability Type: Hardcoded secret
Risk Level: High

Vulnerable Code:

python
SKILLPAY_API_KEY = "sk_8b36c2ca9e774eb0243752f907b086e78c8af866a4088d3e3475113ed446b71"
SKILLPAY_API_BASE = "https://api.skillpay.me"

Technical Analysis

A credential-shaped SkillPay API key is embedded directly in the distributed source code. Any user or system with access to the project package can recover this value without needing privileged runtime access.

The credential is not currently referenced elsewhere in main.py, and skill.yaml configures bare.py rather than main.py as the entry point. These facts reduce immediate exposure through normal execution but do not mitigate disclosure: secrets stored in source remain available in distributed archives, source repositories, build artifacts, backups, and logs.

Static analysis cannot establish whether the key remains valid or determine its permissions. Nevertheless, it must be treated as compromised because its format and adjacent API base declaration indicate that it was intended as an authentication credential.

Attack Path

  1. An attacker obtains the Skill package or read access to its source.
  2. The attacker opens main.py and extracts the hardcoded SkillPay API key from line 7.
  3. The attacker sends requests to the declared SkillPay API endpoint using the exposed key as an authentication credential.
  4. If the key is valid, the attacker invokes any API operations authorized by its assigned account role and scopes.
  5. The attacker may continue using the key until it is revoked, rotated, or expires.

Impact Assessment

If valid, the exposed credential could permit unauthorized access to the associated SkillPay account or API resources. The precise impact depends on the key's server-side scopes and may include unauthorized API requests, quota or billing consumption, transaction-relate ...[truncated 332 chars]

Remediation
View remediation

Remediation Suggestions

  1. Revoke the exposed key immediately and issue a replacement; removing it from the current source alone does not invalidate copies already disclosed.
  2. Remove the credential from the complete repository history, release archives, build artifacts, logs, caches, and backups where feasible.
  3. Store replacement credentials in a managed secret store or protected runtime environment variable rather than source code.
  4. Validate that the required secret exists at startup and fail safely without printing its value.
  5. Assign the replacement key only the minimum API scopes required by the application.
  6. Apply expiration, rotation, usage limits, and source restrictions where supported by SkillPay.
  7. Review API and account audit logs for suspicious activity involving the exposed key.
  8. Add automated secret scanning to local development, continuous integration, and release workflows to prevent recurrence.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Possible Typosquatting: 'uvicorn' resembles popular package 'gunicorn'

High
Category
Supply Chain
Confidence
70% confidence
Finding

Package name closely resembles a popular package, suggesting possible typosquatting. Attackers publish malicious packages with similar names to trick developers into installing them.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file presents its operational description and usage instructions exclusively in Chinese. The policy explicitly calls for flagging language or locale constraints when a skill forces a specific language without user opt-in, and no alternative language option or justification is provided here.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The file binds the server to 0.0.0.0 by default and starts serving HTTP requests, which affects system/network exposure. There is no confirmation prompt, print/log message, or explanatory comment/docstring warning the user that the skill opens a network service accessible beyond localhost.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The HTTP responses contain Chinese-only titles, notices, and payment messages, which imposes a specific language on users. The file does not offer an opt-in or alternative locale, nor does it document that the skill is intentionally region- or language-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Comments and user-facing response messages are written in Chinese only, including the payment prompt and briefing content, with no indication that users may choose another language. This creates a language policy issue because the skill appears to enforce a specific language without opt-in or documented justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

A live-looking SkillPay API key is hardcoded directly in source, which risks credential exposure through source sharing, logs, backups, or repository history. If valid, an attacker could abuse the payment account, create unauthorized charges, query account data, or incur financial and operational damage.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The description is written only in Chinese and provides no indication that users may choose another language or locale. This can violate language/locale policy when a skill implicitly enforces one language without documented opt-in or region-specific justification.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

The comment at L07 says the service is no longer dependent on any external environment variables, reinforced by hardcoding the API key and base URL at L08-L09. However, the startup logic at L45-L63 still reads HOST and several PORT-related environment variables to determine bind settings, so the comment contradicts actual behavior.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.