Back to skill

Security audit

Xanadu Social Media Manager

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches social media management, but it ships a payment module with a live-looking hardcoded billing key that could expose billing identifiers or enable charges if used.

Review before installing. Remove and rotate the bundled SkillPay key, require users or deployers to supply their own billing credentials, add explicit consent before any charge, and document that scheduled post content is stored locally in queue.json.

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
scripts/billing_config.py:5
Finding

Hardcoded SkillPay Credential Enables Unauthorized Billing API Use

Content
View full analysis

Vulnerability Details

File Location: scripts/billing_config.py:5-8; credential loading and transmission occur at scripts/billing.py:11-15 and scripts/billing.py:34-44
Vulnerability Type: Hardcoded secret and transmission of billing identity data to an external service
Risk Level: High

Vulnerable Code

scripts/billing_config.py:5-8:

python
SKILLPAY_API_KEY = "sk_41b22ea52b5a803442973b84ec1cd8f395ed098a3890905f8a196a4ffdf43c87"
SKILL_ID = "xanadu-social-manager"
OWNER_WALLET = "0xF194917738617118dfff40E0542cea20Cf7dDC55"
DEFAULT_PRICE = 0.001  # USDT per call

scripts/billing.py:11-15:

python
# Load config
try:
    from billing_config import SKILLPAY_API_KEY, SKILL_ID, DEFAULT_PRICE, OWNER_WALLET
except ImportError:
    SKILLPAY_API_KEY = os.environ.get("SKILLPAY_API_KEY")
    SKILL_ID = "xanadu-social-manager"
    DEFAULT_PRICE = 0.001
    OWNER_WALLET = None

scripts/billing.py:34-44:

python
try:
    response = requests.post(
        f"{self.base_url}/charge",
        json={
            "api_key": self.api_key,
            "skill_id": self.skill_id,
            "user_id": user_id,
            "amount": amount
        },
        timeout=10
    )
    return response.json()

Technical Analysis

A live-formatted SkillPay API key is embedded directly in a distributed source file. This contradicts the explicit instruction in SKILL.md not to hardcode credentials. Because billing_config.py is present, its import normally succeeds, causing SkillPayBilling to use the bundled credential and owner-controlled Skill ID unless the caller explicitly overrides them.

The charge() method then sends the API key, Skill ID, caller-supplied user identifier, and charge amount to https://api.skillpay.me/v1/charge. Billing is documented as optional and the method is not invoked automatically, so the network request is related to a declared ...[truncated 2384 chars]

Remediation
View remediation

Remediation Suggestions

  1. Revoke and rotate the exposed SkillPay API key immediately; assume that it has already been copied.
  2. Remove SKILLPAY_API_KEY, the owner wallet, and owner-specific billing defaults from all distributed files and repository history.
  3. Require the API key to be supplied explicitly through a deployment secret manager or protected environment variable. Fail closed when it is absent rather than silently selecting an owner credential.
  4. Require explicit, informed user or administrator consent before enabling billing or sending a user identifier to a third party.
  5. Use a conventional authorization header, such as Authorization: Bearer ..., instead of placing the API key in the JSON body, subject to the SkillPay API specification.
  6. Validate user_id and amount locally, enforce positive values and configured limits, and prevent callers from selecting arbitrary charge amounts unless that behavior is required.
  7. Configure the external credential with the narrowest possible permissions, transaction limits, account restrictions, and rotation policy.
  8. Avoid logging request bodies or authorization headers and document the external recipient, transmitted fields, retention policy, and billing behavior.
  9. Replace broad exception handling with specific handling for timeouts, transport failures, non-success HTTP statuses, and invalid JSON. Call response.raise_for_status() before accepting the response.
  10. Add automated secret scanning and tests that reject committed API keys and verify that billing cannot operate without explicit deployment configuration.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (15)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is presented primarily as a social media manager, but it also includes payment-processing and billing integration behavior via SkillPay. Undisclosed monetization or payment handling is security-relevant because users may provide billing credentials or authorize actions they did not expect from the stated purpose of the skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is presented primarily as a social media manager, but it also includes payment-processing and billing integration behavior via SkillPay. Undisclosed monetization or payment handling is security-relevant because users may provide billing credentials or authorize actions they did not expect from the stated purpose of the skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill is presented primarily as a social media manager, but it also includes payment-processing and billing integration behavior via SkillPay. Undisclosed monetization or payment handling is security-relevant because users may provide billing credentials or authorize actions they did not expect from the stated purpose of the skill.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file implements payment charging logic even though the skill is described as a social media management tool. Hidden or out-of-scope billing functionality is dangerous because it can trigger charges or transmit billing-related identifiers without a clear user expectation, expanding the trust boundary beyond the declared purpose.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill makes outbound calls to a payment API to charge a user, which is unrelated to the declared social media management function. In this context, undisclosed external billing behavior is especially risky because users and operators would not reasonably expect a social publishing skill to contact a payment processor or initiate charges.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill advertises capabilities that imply access to environment variables, files, and networked APIs, but it does not declare any explicit tool scope or permissions boundaries. This makes the operational surface ambiguous and can lead to overbroad access being granted implicitly, especially since the skill handles third-party credentials and external integrations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The activation description is very broad and could cause the skill to trigger for many ordinary social-media-related requests, increasing the chance that users are routed into a workflow involving external APIs, file access, or billing-adjacent setup without clear necessity. Broad activation becomes more concerning here because the skill also references credential collection and monetization features.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · scripts/analytics.py (reported line 65)May include surrounding context.

python
# Platform API endpoints (would need actual keys)
PLATFORM_APIS = {
    "twitter": "https://api.twitter.com/2",
    "instagram": "https://graph.instagram.com",
    "linkedin": "https://api.linkedin.com/v2",
    "facebook": "https://graph.facebook.com/v18.0"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · scripts/analytics.py (reported line 67)May include surrounding context.

python
PLATFORM_APIS = {
    "twitter": "https://api.twitter.com/2",
    "instagram": "https://graph.instagram.com",
    "linkedin": "https://api.linkedin.com/v2",
    "facebook": "https://graph.facebook.com/v18.0"
}

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The code loads payment credentials from local config or environment variables despite the skill's declared purpose being unrelated to payments. This indicates undeclared access to sensitive secrets and supports hidden monetization behavior, increasing the risk of unauthorized billing operations if the skill is deployed.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · scripts/billing.py (reported line 26)May include surrounding context.

python
def __init__(self, api_key: str = None, skill_id: str = None):
        self.api_key = api_key or SKILLPAY_API_KEY
        self.skill_id = skill_id or SKILL_ID
        self.base_url = "https://api.skillpay.me/v1"
        
        if not self.api_key:
            raise ValueError("SkillPay API key required")

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

This outbound network call sends data to an external payment endpoint, including a user identifier and billing-related information. External transmission is not inherently malicious, but in this skill context it is security-relevant because the destination and purpose are outside the stated social media management scope.

Content

Scanner excerpt · scripts/billing.py (reported line 36)May include surrounding context.

python
amount = amount or DEFAULT_PRICE
        
        try:
            response = requests.post(
                f"{self.base_url}/charge",
                json={
                    "api_key": self.api_key,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The charge request transmits user_id together with a billing credential to an external service without any disclosure or consent mechanism shown in this file. Even over HTTPS, sending credential and user-linked billing data off-platform without transparency creates privacy, compliance, and unauthorized charging risks.

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 API key is hardcoded directly in source code, which makes it exposed to anyone with repository, package, log, or deployment artifact access. If this credential is valid, an attacker could abuse the billing or payment integration, impersonate the skill, incur charges, or tamper with service usage tied to the associated account.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

This code writes queued post content and scheduling metadata to a local JSON file, which affects user data persistence. While the module docstring describes scheduling generally, there is no user-facing warning, log message, or inline disclosure near the write operation that queued content will be stored on disk.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.