Back to skill

Security audit

Agent Dispute Resolution & Chargeback Defense

Security checks for vulnerabilities and agentic risk

Overview

This is a non-executable guide, but its examples under-disclose credentialed production API use and automate consequential escrow and dispute actions.

Install only if you treat it as a high-risk educational guide, not drop-in production code. Before running copied examples, force sandbox configuration, use sandbox-only or narrowly scoped credentials, remove full-mandate disclosure, and add human approval for escrow release, dispute concessions, and other financial or legal-state changes.

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

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:458
Finding
Selective Disclosure Function Exposes the Complete Authorization Mandate<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:458-486` **Vulnerability Type**: Sensitive authorization-policy disclosure **Risk Level**: Medium ### Vulnerable Code ```python def create_selective_disclosure(mandate: dict, clause_path: str) -> dict: """Create a selective disclosure proof for a specific mandate clause. Reveals only the requested clause while proving it belongs to the full mandate via the registered hash. """ # Extract the specific clause value keys = clause_path.split(".") value = mandate for key in keys: if key.endswith("]"): field, idx = key[:-1].split("[") value = value[field][int(idx)] else: value = value[key] # Compute the full mandate hash (verifier already has this from the chain) mandate_bytes = json.dumps(mandate, sort_keys=True).encode("utf-8") full_hash = hashlib.sha256(mandate_bytes).hexdigest() return { "clause_path": clause_path, "clause_value": value, "full_mandate_hash": full_hash, "full_mandate": mandate, # Provided to verifier under NDA/escrow "verification_method": "sha256_json_sorted_keys", } ``` ### Technical Analysis The function claims to reveal only a requested mandate clause, but the returned object also contains the complete mandate through the `full_mandate` field. The example mandate contains potentially sensitive information such as the human principal's identity, approved vendors, permitted actions, budget ceiling, agent identifier, and authorization validity period. A hash does not provide selective disclosure by itself. Giving the verifier the complete preimage defeats the confidentiality objective and exposes substantially more information than is necessary to prove that one clause was authorized. ### Attack Path 1. A dispute participant or verifier requests proof that a particular action was authorized. 2. The application invokes `create_selec ...[truncated 1128 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the complete mandate from the disclosure object: ```python return { "clause_path": clause_path, "clause_value": value, "commitment": clause_commitment, "proof": merkle_proof, "verification_method": "merkle_sha256", } ``` 2. Use a genuine selective-disclosure design, such as: - A Merkle tree with one independently committed mandate claim per leaf. - Signed per-claim credentials. - An established selective-disclosure credential format. - A zero-knowledge proof where confidentiality requirements justify it. 3. Define an explicit disclosure policy specifying which fields each verifier role may receive. 4. Redact principal identifiers, vendor lists, budget ceilings, and unrelated mandate clauses from dispute evidence by default. 5. Add tests asserting that generated proof objects never contain the original mandate or unrelated fields. 6. If exceptional workflows require full disclosure, implement them as a separate, explicitly named function with recipient authorization, encryption, audit logging, and informed operator approval. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:760
Finding
Autonomous Workflow Can Perform Consequential Financial and Dispute Actions Without Approval<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:760-789`, `SKILL.md:1299-1320`, `SKILL.md:1779-1828`, `SKILL.md:1919-1947`, `SKILL.md:2331` **Vulnerability Type**: Unsafe autonomous financial and legal-state transitions **Risk Level**: Medium ### Vulnerable Code The release loop directly releases escrow funds when remotely supplied gate fields evaluate as true: ```python def release_gate_loop(escrow_id: str, sla_id: str, check_interval_seconds: int = 3600, max_checks: int = 168): """Poll release gates and release escrow when all gates pass.""" for i in range(max_checks): result = check_release_gates(escrow_id, sla_id) print(f"Check {i+1}/{max_checks}: {result['gates']}") if result["all_passed"]: # All gates passed -- release the escrow resp = session.post(f"{base_url}/v1", json={ "tool": "release_escrow", "input": {"escrow_id": escrow_id} }) release = resp.json() print(f"Escrow released: {release}") return {"status": "released", "check_number": i + 1} time.sleep(check_interval_seconds) # Max checks reached without release -- trigger dispute print("Release gates never passed. Initiating dispute.") return {"status": "timeout", "action": "initiate_dispute"} ``` The automated dispute handler concedes a partial resolution when no human escalation callback exists: ```python else: # Evidence does not support us -- escalate or concede if self.escalation_callback: self.escalation_callback(dispute, evidence_bundle) self.handled_disputes[dispute_id] = "escalated" return {"action": "escalated_to_human"} else: # No escalation path -- propose partial resolution response = self._execute("respond_dispute", { "dispute_id": dispute_id, "agent_id": self.agent_id, "response ...[truncated 3115 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Require explicit human approval for: - Escrow releases above a configurable threshold. - Full or partial dispute concessions. - First-time counterparties. - Conflicting, incomplete, or low-confidence evidence. - Actions with contractual or card-network consequences. 2. Make the safe default an escalation or hold: ```python if not self.escalation_callback: return { "action": "held_for_manual_review", "reason": "no_authorized_escalation_path", } ``` 3. Add idempotency keys to every state-changing API request and persist them across retries. 4. Include expected object state and version in release and dispute requests so stale observations cannot authorize a transition. 5. Re-fetch and independently validate escrow, SLA, and dispute status immediately before committing a consequential action. 6. Enforce per-action amount limits and ensure the token is scoped to only the minimum agents, escrows, and operations required. 7. Require signed or otherwise authenticated SLA evidence where the measurement source is security-sensitive. 8. Treat missing fields and API errors as a reason to hold, not as evidence of compliance or non-compliance. 9. Maintain immutable audit records containing the evidence snapshot, policy decision, approver, idempotency key, and API result. 10. Separate read-only monitoring credentials from narrowly scoped credentials permitted to release funds or answer disputes. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:17
Finding
Sandbox-Only Safety Claim Conflicts With Production-Named API Defaults<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:17-26`, with repeated clients beginning at `SKILL.md:110-125` **Vulnerability Type**: Misleading environment configuration and unintended external data transmission **Risk Level**: Medium ### Vulnerable Documentation and Code The introductory notice states that all examples use a credential-free sandbox: ```markdown > **Notice**: This is an educational guide with illustrative code examples. > It does not execute code, require credentials, or install dependencies. > All examples use the GreenHelix sandbox (https://sandbox.greenhelix.net) which > provides 500 free credits — no API key required to get started. Your autonomous agent just purchased $12,000 of cloud compute from a counterparty agent. ... > **Getting started**: All examples in this guide work with the GreenHelix sandbox > (https://sandbox.greenhelix.net) which provides 500 free credits — no API key required. ``` However, the API client defaults to a different production-named endpoint and attaches a bearer credential: ```python class DisputeContext: """Track the dispute context across all three fronts for a transaction.""" def __init__(self, api_key: str, agent_id: str, base_url: str = "https://api.greenhelix.net/v1"): self.api_key = api_key self.agent_id = agent_id self.base_url = base_url self.session = requests.Session() self.session.headers.update({ "Content-Type": "application/json", "Authorization": f"Bearer {api_key}", }) def _execute(self, tool: str, input_data: dict) -> dict: resp = self.session.post( f"{self.base_url}/v1", json={"tool": tool, "input": input_data}, ) resp.raise_for_status() return resp.json() ``` The same endpoint pattern is repeated throughout the guide. ### Technical Analysis The guide creates a mismatch between the stated execution environment ...[truncated 2121 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Change every example to default to the documented sandbox: ```python base_url = "https://sandbox.greenhelix.net" ``` 2. Require explicit production opt-in through configuration rather than using a production-named endpoint as the default: ```python environment = os.environ.get("GREENHELIX_ENV", "sandbox") if environment == "production": base_url = os.environ["GREENHELIX_PRODUCTION_URL"] else: base_url = "https://sandbox.greenhelix.net" ``` 3. Print or log the selected environment before any state-changing call and require confirmation when production is selected. 4. Correct endpoint construction so the API version appears exactly once: ```python base_url = "https://sandbox.greenhelix.net" resp = session.post(f"{base_url}/v1", ...) ``` 5. Clearly document whether the sandbox requires credentials and use sandbox-specific credentials if it does. 6. Add prominent warnings before examples that create, release, or cancel escrow or modify disputes. 7. Use separate credentials for sandbox and production, with narrowly scoped production permissions. 8. Add automated tests that reject production endpoints in tutorial and example configurations unless an explicit production flag is enabled. 9. Document exactly which request fields and evidence records are transmitted to the external service. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (26)

Intent-Code Divergence

High
Confidence
99% confidence
Finding
The helper advertises selective disclosure but returns `full_mandate` in the proof object, exposing the entire sensitive authorization document. That can leak budget ceilings, vendor allowlists, validity windows, and principal identity to counterparties or dispute processors, defeating the privacy and minimization goal.

Description-Behavior Mismatch

Medium
Confidence
97% confidence
Finding
The guide claims no credentials are required to get started, but the code examples consistently require an `api_key` and send it as a bearer token. This mismatch can mislead operators into trusting and deploying examples under false assumptions about authentication and may encourage unsafe experimentation against a real external service.

External Transmission

Medium
Category
Data Exfiltration
Content
"""Track the dispute context across all three fronts for a transaction."""

    def __init__(self, api_key: str, agent_id: str,
                 base_url: str = "https://api.greenhelix.net/v1"):
        self.api_key = api_key
        self.agent_id = agent_id
        self.base_url = base_url
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
"""Track the dispute context across all three fronts for a transaction."""

    def __init__(self, api_key: str, agent_id: str,
                 base_url: str = "https://api.greenhelix.net/v1"):
        self.api_key = api_key
        self.agent_id = agent_id
        self.base_url = base_url
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
"""Track the dispute context across all three fronts for a transaction."""

    def __init__(self, api_key: str, agent_id: str,
                 base_url: str = "https://api.greenhelix.net/v1"):
        self.api_key = api_key
        self.agent_id = agent_id
        self.base_url = base_url
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
"""Track the dispute context across all three fronts for a transaction."""

    def __init__(self, api_key: str, agent_id: str,
                 base_url: str = "https://api.greenhelix.net/v1"):
        self.api_key = api_key
        self.agent_id = agent_id
        self.base_url = base_url
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
"""Track the dispute context across all three fronts for a transaction."""

    def __init__(self, api_key: str, agent_id: str,
                 base_url: str = "https://api.greenhelix.net/v1"):
        self.api_key = api_key
        self.agent_id = agent_id
        self.base_url = base_url
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
"""Track the dispute context across all three fronts for a transaction."""

    def __init__(self, api_key: str, agent_id: str,
                 base_url: str = "https://api.greenhelix.net/v1"):
        self.api_key = api_key
        self.agent_id = agent_id
        self.base_url = base_url
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
"""Track the dispute context across all three fronts for a transaction."""

    def __init__(self, api_key: str, agent_id: str,
                 base_url: str = "https://api.greenhelix.net/v1"):
        self.api_key = api_key
        self.agent_id = agent_id
        self.base_url = base_url
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
"""Track the dispute context across all three fronts for a transaction."""

    def __init__(self, api_key: str, agent_id: str,
                 base_url: str = "https://api.greenhelix.net/v1"):
        self.api_key = api_key
        self.agent_id = agent_id
        self.base_url = base_url
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
"""Track the dispute context across all three fronts for a transaction."""

    def __init__(self, api_key: str, agent_id: str,
                 base_url: str = "https://api.greenhelix.net/v1"):
        self.api_key = api_key
        self.agent_id = agent_id
        self.base_url = base_url
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
"""Track the dispute context across all three fronts for a transaction."""

    def __init__(self, api_key: str, agent_id: str,
                 base_url: str = "https://api.greenhelix.net/v1"):
        self.api_key = api_key
        self.agent_id = agent_id
        self.base_url = base_url
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
"""Track the dispute context across all three fronts for a transaction."""

    def __init__(self, api_key: str, agent_id: str,
                 base_url: str = "https://api.greenhelix.net/v1"):
        self.api_key = api_key
        self.agent_id = agent_id
        self.base_url = base_url
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
"""Track the dispute context across all three fronts for a transaction."""

    def __init__(self, api_key: str, agent_id: str,
                 base_url: str = "https://api.greenhelix.net/v1"):
        self.api_key = api_key
        self.agent_id = agent_id
        self.base_url = base_url
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
"""Track the dispute context across all three fronts for a transaction."""

    def __init__(self, api_key: str, agent_id: str,
                 base_url: str = "https://api.greenhelix.net/v1"):
        self.api_key = api_key
        self.agent_id = agent_id
        self.base_url = base_url
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
"""Track the dispute context across all three fronts for a transaction."""

    def __init__(self, api_key: str, agent_id: str,
                 base_url: str = "https://api.greenhelix.net/v1"):
        self.api_key = api_key
        self.agent_id = agent_id
        self.base_url = base_url
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
"""Track the dispute context across all three fronts for a transaction."""

    def __init__(self, api_key: str, agent_id: str,
                 base_url: str = "https://api.greenhelix.net/v1"):
        self.api_key = api_key
        self.agent_id = agent_id
        self.base_url = base_url
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
"""Track the dispute context across all three fronts for a transaction."""

    def __init__(self, api_key: str, agent_id: str,
                 base_url: str = "https://api.greenhelix.net/v1"):
        self.api_key = api_key
        self.agent_id = agent_id
        self.base_url = base_url
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
"""Track the dispute context across all three fronts for a transaction."""

    def __init__(self, api_key: str, agent_id: str,
                 base_url: str = "https://api.greenhelix.net/v1"):
        self.api_key = api_key
        self.agent_id = agent_id
        self.base_url = base_url
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
"""Track the dispute context across all three fronts for a transaction."""

    def __init__(self, api_key: str, agent_id: str,
                 base_url: str = "https://api.greenhelix.net/v1"):
        self.api_key = api_key
        self.agent_id = agent_id
        self.base_url = base_url
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
"""Track the dispute context across all three fronts for a transaction."""

    def __init__(self, api_key: str, agent_id: str,
                 base_url: str = "https://api.greenhelix.net/v1"):
        self.api_key = api_key
        self.agent_id = agent_id
        self.base_url = base_url
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
"""Track the dispute context across all three fronts for a transaction."""

    def __init__(self, api_key: str, agent_id: str,
                 base_url: str = "https://api.greenhelix.net/v1"):
        self.api_key = api_key
        self.agent_id = agent_id
        self.base_url = base_url
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
"""Track the dispute context across all three fronts for a transaction."""

    def __init__(self, api_key: str, agent_id: str,
                 base_url: str = "https://api.greenhelix.net/v1"):
        self.api_key = api_key
        self.agent_id = agent_id
        self.base_url = base_url
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
"""Track the dispute context across all three fronts for a transaction."""

    def __init__(self, api_key: str, agent_id: str,
                 base_url: str = "https://api.greenhelix.net/v1"):
        self.api_key = api_key
        self.agent_id = agent_id
        self.base_url = base_url
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
### Failure Mode 3: Unauthorized Merchant

The agent transacts with a merchant that is not on its approved vendor list. This can happen when the agent discovers a cheaper option through marketplace search and acts on it without checking its vendor allowlist, or when a malicious agent impersonates an approved vendor.

```python
import requests
Confidence
75% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Static analysis

No suspicious patterns detected.