Back to skill

Security audit

Agent Harness

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly does what it says, but it delegates coding work to external agents and ships a payment module with an exposed API key and under-scoped network behavior that users should review before installing.

Review this before installing if your workspace contains proprietary code or secrets. Use it only when you intentionally want to send coding tasks or attachments to external ACP agents, and treat the bundled SkillPay key as compromised until the publisher rotates it and moves payment credentials out of source code.

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 Reusable SkillPay API Credential

Content
View full analysis

Vulnerability Details

File Location: payment.py, lines 11-37
Vulnerability Type: Hard-coded secret and externally transmitted bearer credential
Risk Level: High

Vulnerable Code

python
SKILLPAY_API_KEY = "[REDACTED_EXPOSED_API_KEY]"
SKILLPAY_BASE_URL = "https://api.skillpay.io/v1"
SKILL_SLUG = "shenmeng-agent-harness"
PRICE_PER_CALL = 0.01  # USDT


def require_payment():
    try:
        headers = {
            "Authorization": f"Bearer {SKILLPAY_API_KEY}",
            "Content-Type": "application/json"
        }

        data = {
            "skill_slug": SKILL_SLUG,
            "price": PRICE_PER_CALL
        }

        response = requests.post(
            f"{SKILLPAY_BASE_URL}/verify",
            headers=headers,
            json=data,
            timeout=10
        )

The credential value has been redacted from this report to avoid further disclosure. The source file contains the complete plaintext key.

Technical Analysis

A reusable API key is embedded directly in the distributed source code and used as a bearer token in requests to https://api.skillpay.io/v1. Anyone who can download or inspect the Skill can extract the credential without executing the code.

Bearer credentials provide access based solely on possession. Consequently, an attacker can copy the key and submit requests independently of the Skill. The same key is also used by get_balance() at lines 64-71, increasing the number of locations through which it is exposed and used.

The network operation is related to the payment feature disclosed in SKILL.md, and the audited code does not send local files, environment variables, user credentials, or host information. Nevertheless, embedding a shared secret in a public or distributable client violates least-privilege and secret-management principles. No evidence in the project establishes that the credential is restricted to a single harmless endp ...[truncated 1099 chars]

Remediation
View remediation

Remediation Suggestions

  1. Revoke and rotate the exposed API key immediately; assume it has already been compromised.
  2. Remove the key from source code and repository history.
  3. Obtain the credential from a protected runtime secret store or, where appropriate, an environment variable supplied by the deployment platform.
  4. Prefer short-lived, per-installation or per-user credentials instead of one shared package-wide key.
  5. Restrict the credential to only the required verification operation. A verification client should not inherit administrative, transfer, mutation, or unrelated account permissions.
  6. Implement server-side rate limits, anomaly detection, expiration, rotation, and revocation.
  7. Add automated secret scanning to development and release pipelines.
  8. Document the external service, transmitted fields, authorization model, and required network access in the Skill metadata and user-facing documentation.

T09 · Insecure Skill Coding Practices

Warning
Location
payment.py:52
Finding

Payment Authorization Fails Open When Verification Raises an Exception

Content
View full analysis

Vulnerability Details

File Location: payment.py, lines 52-55
Vulnerability Type: Fail-open authorization and improper exception handling
Risk Level: Medium

Vulnerable Code

python
except Exception as e:
    print(f"Payment verification error: {e}")
    # Do not block use when an error occurs; only record the event.
    return True

The displayed messages and comment are English translations of the source text; the control flow is unchanged.

Technical Analysis

require_payment() is intended to confirm payment before protected functionality is used. However, its broad exception handler returns True, treating an inability to verify payment as successful authorization.

Exceptions can result from connection timeouts, DNS failures, TLS failures, malformed JSON, unexpected response structures, dependency errors, or other runtime failures. Because all such conditions enter the same except Exception block, payment authorization can be bypassed by making the verification process fail.

This differs from ordinary non-success HTTP responses, which return False. The inconsistency means that preventing a response or causing response processing to raise an exception is more favorable to an unauthorized caller than receiving an explicit rejection.

Attack Path

  1. A caller invokes functionality protected by require_payment() without satisfying the intended payment requirement.
  2. The caller or an attacker with influence over network availability blocks access to api.skillpay.io, causes a timeout, or otherwise makes request processing raise an exception.
  3. Control reaches the broad exception handler at line 52.
  4. The function returns True at line 55.
  5. Any calling code that interprets True as successful payment proceeds despite the absence of verified authorization.

The repository does not show require_payment() being called by the declared SKILL.md entry point. Therefore, ...[truncated 724 chars]

Remediation
View remediation

Remediation Suggestions

  1. Fail closed by returning False when payment cannot be verified.
  2. Catch specific exceptions such as requests.Timeout, requests.ConnectionError, and JSON-decoding failures instead of using a broad except Exception.
  3. Distinguish confirmed payment, confirmed rejection, and temporary verification failure with explicit result states.
  4. Prevent protected functionality from continuing unless the remote service provides a cryptographically and semantically valid positive verification result.
  5. Validate the response schema and expected field types before accepting verified.
  6. Use bounded retries with backoff for transient failures, while retaining a deny-by-default authorization decision.
  7. Record structured security logs without including bearer tokens or other sensitive response data.
  8. Add tests covering timeouts, connection failures, malformed JSON, unexpected schemas, and explicit negative verification responses.
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 (14)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description says this skill manages Agent Harness/ACP setup and usage for AI coding assistants. The supplied code does not create, configure, or operate ACP harnesses or coding assistants. Instead, its primary function is billing enforcement: it calls SkillPay endpoints to verify payment and check balance, and prints recharge instructions when funds are insufficient. This is a materially different purpose and introduces undeclared external network access to a payment service. Therefore the description does not accurately represent the code's behavior.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This module introduces payment-gating behavior and remote payment verification into a skill whose stated purpose is agent harness management, which is an unjustified capability expansion. In this context, unrelated monetization logic increases supply-chain and trust risk because users may execute a development tool that silently contacts a third-party payment service and enforces access controls outside the declared scope.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The docstring says payment must be verified before use, but the exception handler returns True on verification errors, effectively fail-open. Any network error, API outage, TLS interception issue, or local exception would bypass the payment check and permit use, undermining the control entirely.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill description and usage instructions are presented in Chinese only, with no indication that the user may choose another language. This can violate language-choice policy when the skill effectively constrains communication to a single language without opt-in or justification.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The invocation guidance is overly broad: 'when the user needs to call an ACP agent for code development, use this Skill' does not define clear boundaries, approval conditions, or safety checks. In a skill that can create sessions, send coding tasks, and interact with external coding agents, vague triggering can cause unnecessary delegation, accidental execution of risky development actions, or use of external agents without sufficient user confirmation.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill documents use of external agents and paid/network-backed services, but it does not declare any explicit tool scope such as permissions or allowed-tools. That makes the skill's effective capabilities less transparent to the host and user, increasing the chance of unexpected network/data egress or overbroad tool use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill explicitly encourages sending tasks and attachments to external AI agents, but the warning about sensitive information appears only later and is not presented as an upfront gating disclosure. Users may unknowingly transmit proprietary source code, secrets, or personal data to third-party services before understanding the privacy and security implications.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger phrases are broad enough to match common user requests about coding help, bug fixing, or starting an agent. This can cause the skill to activate in situations the user did not specifically intend, leading to unintended delegation of tasks to external agents and possible leakage of code or context.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
98% confidence
Finding

The file contains a hardcoded live-looking API key alongside the external service base URL, enabling unauthorized use of the payment API if the code is exposed. Hardcoded secrets are a direct credential-management failure and can lead to account abuse, fraudulent charges, service disruption, or compromise of associated billing data.

Content

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

python
# SkillPay API 配置
SKILLPAY_API_KEY = "sk_f03aa8f8bbcf79f7aa11c112d904780f22e62add1464e3c41a79600a451eb1d2"
SKILLPAY_BASE_URL = "https://api.skillpay.io/v1"
SKILL_SLUG = "shenmeng-agent-harness"
PRICE_PER_CALL = 0.01  # USDT

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module embeds a sensitive API key and performs outbound payment-verification requests without clear user-facing disclosure. Hardcoded credentials are highly sensitive because anyone with source access can reuse or abuse the key, and undisclosed network behavior is especially risky in a developer tool where users may not expect external billing-related traffic.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

This code transmits data to an external payment-verification endpoint, which is security-relevant because it introduces third-party data flow and remote control over local feature access. In the context of a harness-management skill, the transmission is harder to justify and more suspicious because it is not aligned with the declared purpose.

Content

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

python
"price": PRICE_PER_CALL
        }
        
        response = requests.post(
            f"{SKILLPAY_BASE_URL}/verify",
            headers=headers,
            json=data,

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The outbound verification request to an external payment service is not justified by the skill's stated harness-management function. Even if the transmitted fields are limited, this creates an unnecessary external dependency and leaks usage metadata about the skill to a third party without clear need in the declared functionality.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The description field is written entirely in Chinese and provides no indication that language selection is optional or that the skill is intended only for a Chinese-speaking or region-specific audience. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The module description and user-facing strings are written only in Chinese, with no indication that the skill supports language choice or that the locale is intentionally constrained. Under SQP-3, forcing a specific language without opt-in can violate language/locale policy expectations.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.