Back to skill

Security audit

Zero-Trust Agent Verification: Cryptographic Reputation Systems

Security checks for vulnerabilities and agentic risk

Overview

The skill is a non-executable verification guide, but it asks for powerful GreenHelix credentials and includes escrow-creation code that could lock funds without built-in safeguards.

Install or use this as documentation only if you are comfortable sharing GreenHelix credentials with workflows derived from it. Do not expose AGENT_SIGNING_KEY unless a specific, reviewed integration actually needs it. Treat the escrow code as unsafe sample code until it enforces verification internally, requires explicit user confirmation, validates payee and amount, uses spending limits and idempotency, and separates sandbox from production credentials.

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

Warning
Location
SKILL.md:1797
Finding
Trust Verification Can Be Bypassed Before Escrow Creation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:1797-1836` **Vulnerability Type**: Missing authorization enforcement before a financial operation **Risk Level**: Medium ### Vulnerable Code ```python @tool def hire_with_escrow( agent_id: str, amount: float, task_description: str, ) -> str: """Create an escrow-protected contract with a verified agent. IMPORTANT: Always call verify_before_hire first. Args: agent_id: The GreenHelix agent ID to hire. amount: Payment amount in USD. task_description: What the agent should do. """ import requests resp = requests.post( "https://sandbox.greenhelix.net/v1", headers={ "Content-Type": "application/json", "Authorization": f"Bearer {os.environ['GREENHELIX_API_KEY']}", }, json={ "tool": "create_escrow", "input": { "payer_agent_id": os.environ["AGENT_ID"], "payee_agent_id": agent_id, "amount": str(amount), "description": task_description, }, }, ) resp.raise_for_status() result = resp.json() return f"Escrow created: {result.get('escrow_id')}. ${amount} locked." ``` ### Technical Analysis The function performs an authenticated, state-changing financial operation using `GREENHELIX_API_KEY`. Although its docstring instructs callers to invoke `verify_before_hire` first, the function does not technically enforce that prerequisite. The verification and escrow operations are exposed as separate tools. Consequently, an LLM, framework, or direct caller can select `hire_with_escrow` without first invoking the verification tool. The function does not: - Call `verify_before_hire` or `AgentVerifier.full_audit`. - Require a signed or short-lived verification approval. - Bind an approval to the payee, amount, task, or authenticated payer. - Validate that the amount is positive and w ...[truncated 2395 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Enforce verification inside the financial function.** Do not rely on the model or caller to invoke a separate tool. ```python def hire_with_escrow(agent_id, amount, task_description): amount = Decimal(str(amount)) if amount <= 0 or amount > MAX_ESCROW_AMOUNT: raise ValueError("Escrow amount is outside the authorized range") report = verifier.full_audit(agent_id) if not is_approved(report): raise PermissionError("Payee failed mandatory trust verification") # Continue only after mandatory checks succeed. ``` 2. **Bind approval to the transaction.** Create a short-lived, server-validated approval containing the payer, payee, amount, task hash, verification result, expiration time, and nonce. Reject an approval if any transaction property changes. 3. **Require explicit confirmation.** For financial actions, present the exact payee, amount, and task summary to the user and require confirmation immediately before submission. Higher amounts should require stronger or out-of-band approval. 4. **Apply least privilege.** Use a dedicated API credential restricted to escrow creation, with per-transaction and cumulative spending limits. Do not provide unrelated read/write permissions. 5. **Validate all inputs.** Enforce an allowlisted agent-ID format, positive decimal amounts, maximum limits, currency rules, and task-description length and sensitivity constraints. 6. **Prevent duplicate transactions.** Supply a unique idempotency key and securely record the resulting transaction identifier. 7. **Harden network behavior.** Add a short timeout, bounded retries only when paired with idempotency, and strict response-schema validation. 8. **Avoid unnecessary secret requirements.** Remove `AGENT_SIGNING_KEY` from the Skill metadata because the audited examples do not use it. Requiring an unused private signing key violates least-privilege principles and unnecessarily exposes a high-value credenti ...[truncated 32 chars]
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
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (15)

Memory Manipulation

High
Category
Memory Poisoning
Content
### Why Traditional Vetting Fails for Autonomous Agents

Star ratings, written reviews, and social proof work for human commerce because humans have persistent identities and social consequences. A restaurant with fake Yelp reviews risks public exposure and reputational damage to its owners. An agent with fake ratings faces no such risk. It can spin up a new identity in milliseconds. It can create a hundred sock puppet agents that all rate it five stars. It can list the same service under different names and accumulate reviews across all of them. Traditional vetting mechanisms assume that creating a new identity is expensive and that social punishment for dishonesty is real. Neither assumption holds for autonomous agents.

### What Merkle Claim Chains Solve That Ratings Do Not
Confidence
80% confidence
Finding
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Intent-Code Divergence

High
Confidence
98% confidence
Finding
The documentation explicitly claims the verifier 'only reads, queries, and verifies,' yet later provides write-capable code that creates escrows. This mismatch is dangerous because downstream agents and users may trust the read-only framing and execute examples without realizing they can trigger financial side effects.

Description-Behavior Mismatch

High
Confidence
97% confidence
Finding
The guide is presented as buyer-side trust verification, but it later includes a concrete `create_escrow` example that performs a state-changing financial action and can lock funds. Mixing verification guidance with transaction-execution code increases the risk that an agent or user follows the example as part of due diligence and commits money before independent approval or policy checks.

External Script Fetching

High
Category
Supply Chain
Content
```bash
# Verify any agent from the command line before interacting with it
curl -s -X POST https://sandbox.greenhelix.net/v1 \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Transmission

Medium
Category
Data Exfiltration
Content
It reads, queries, and verifies other agents' trust profiles.
    """

    def __init__(self, api_key: str, base_url: str = "https://api.greenhelix.net/v1"):
        self.base_url = base_url
        self.session = requests.Session()
        self.session.headers.update({
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
It reads, queries, and verifies other agents' trust profiles.
    """

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

Context-Inappropriate Capability

Medium
Confidence
83% confidence
Finding
The skill queries another agent's budget guardrail status and treats absence of caps as a trust signal, but this is not clearly necessary for buyer-side identity and reputation verification. Exposing or normalizing access to counterparties' operational spending controls can leak sensitive operational posture and encourage over-collection of data beyond least-privilege trust checks.

External Transmission

Medium
Category
Data Exfiltration
Content
return "caution"
```

### Checking Identity with curl

Before doing anything else, confirm the agent exists and has a registered cryptographic identity.
Confidence
60% 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
```

```bash
curl -s -X POST https://sandbox.greenhelix.net/v1 \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
Confidence
60% 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
```

```bash
curl -s -X POST https://sandbox.greenhelix.net/v1 \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
Confidence
60% 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
```

```bash
curl -s -X POST https://sandbox.greenhelix.net/v1 \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The escrow-creation example can cause real financial commitment by locking funds, but it lacks an explicit warning, confirmation workflow, or precondition checks. In an agentic context, examples are often operationalized directly, so omission of safety interlocks can lead to unintended or unauthorized transactions.

External Transmission

Medium
Category
Data Exfiltration
Content
"""
    import requests

    resp = requests.post(
        "https://sandbox.greenhelix.net/v1",
        headers={
            "Content-Type": "application/json",
Confidence
60% 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
"""
    import requests

    resp = requests.post(
        "https://sandbox.greenhelix.net/v1",
        headers={
            "Content-Type": "application/json",
Confidence
70% 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
```bash
# Verify any agent from the command line before interacting with it
curl -s -X POST https://sandbox.greenhelix.net/v1 \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.