Back to skill

Security audit

The Agent Strategy Marketplace Playbook

Security checks for vulnerabilities and agentic risk

Overview

This guide does not install or run code itself, but its copy-paste examples can use real credentials to affect GreenHelix accounts, escrows, messaging, and signing keys.

Install only if you understand that running the examples can contact GreenHelix with your credentials and may create listings, escrows, dispute actions, messages, or metric submissions. Use sandbox credentials first, avoid production endpoints until reviewed, do not print or paste private signing keys into chats/logs, and add your own approval checks around escrow release, dispute resolution, and subscriber messaging.

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
SKILL.md:143
Finding

Private Ed25519 Signing Key Exposed Through Standard Output

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 143–159
Vulnerability Type: Plaintext secret disclosure through standard output
Risk Level: High

Complete Code Snippet

python
# Serialize the private key (store this securely --- never share it)
private_key_bytes = private_key.private_bytes(
    encoding=serialization.Encoding.Raw,
    format=serialization.PrivateFormat.Raw,
    encryption_algorithm=serialization.NoEncryption()
)

# Serialize the public key (this goes in your agent registration)
public_key_bytes = public_key.public_bytes(
    encoding=serialization.Encoding.Raw,
    format=serialization.PublicFormat.Raw
)

private_key_b64 = base64.b64encode(private_key_bytes).decode()
public_key_b64 = base64.b64encode(public_key_bytes).decode()

print(f"Private key (keep secret): {private_key_b64}")

Technical Analysis

The example serializes the raw Ed25519 private key without encryption, applies Base64 encoding, and prints the result. Base64 is a reversible transport encoding and provides no confidentiality.

Although the accompanying comment says never to share the key, printing it directly contradicts that guidance. In an AI-agent environment, standard output may be returned to the caller and retained in conversation history, execution traces, application logs, observability platforms, or other telemetry. Anyone able to read one of those channels can decode and import the private key.

The code does not constitute covert exfiltration to an undeclared third party, but it unnecessarily expands exposure of a credential that should remain confined to secure storage. This exceeds the minimum privileges and data handling required to generate and register an agent identity.

Attack Path

  1. A user or agent runs the documented key-generation example.
  2. The raw private key is serialized without encryption and Base64-encoded.
  3. The complete encoded private key is emitted ...[truncated 1138 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove all output of private-key material. Print only the public key or a non-sensitive fingerprint.
  2. Store the generated private key directly in a dedicated secrets manager, hardware-backed keystore, or protected file rather than passing it through standard output.
  3. If file storage is necessary, create the file with owner-only permissions such as 0600, avoid shared temporary directories, and prevent backup or telemetry systems from collecting it.
  4. Prefer encrypted private-key serialization using a strong passphrase when the selected key format supports it. Do not describe Base64 as a security control.
  5. Configure application logging, exception handling, tracing, and agent responses to redact private keys and related environment variables.
  6. Use separate environment variable names consistently. The metadata declares AGENT_SIGNING_KEY, while examples later reference GREENHELIX_PRIVATE_KEY; standardizing the name reduces unsafe manual key handling.
  7. Add an explicit rotation procedure. Any key previously printed or logged should be revoked or deregistered and replaced immediately.
  8. Provide a safer example that writes the secret directly to protected storage and returns only the public key:
python
import os

private_key_path = "agent-signing-key.bin"
fd = os.open(
    private_key_path,
    os.O_WRONLY | os.O_CREAT | os.O_EXCL,
    0o600,
)
with os.fdopen(fd, "wb") as key_file:
    key_file.write(private_key_bytes)

print(f"Public key: {public_key_b64}")
print(f"Private key stored securely at: {private_key_path}")
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 (13)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill operationalizes use of a live API key and an agent signing key, including generation, serialization, environment storage, and authenticated transmission, without strong upfront warnings about financial, identity, and secret-handling risks. In this context, the combination of trading/escrow operations and credential handling increases the chance that users expose secrets or invoke real account actions under the mistaken belief they are following harmless educational content.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file presents itself as non-executable educational material, but it contains concrete operational code and API workflows for registering agents, listing services, creating escrows, submitting metrics, and resolving disputes. That mismatch can mislead users and downstream systems into treating the skill as low-risk documentation when it actually facilitates authenticated external actions with financial and identity implications.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

The curl example sends authenticated requests to an external service using an environment-provided bearer token. Even as documentation, it is copy-paste ready and can trigger real registration or account actions, which is dangerous when combined with marketplace and escrow operations.

Content

Scanner excerpt · SKILL.md (reported line 172)May include surrounding context.

curl:

bash
curl -s -X POST https://sandbox.greenhelix.net/v1 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $GREENHELIX_API_KEY" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · SKILL.md (reported line 191)May include surrounding context.

md
import requests
import os

BASE_URL = "https://api.greenhelix.net/v1"
API_KEY = os.environ["GREENHELIX_API_KEY"]

def execute_tool(tool: str, input_data: dict) -> dict:

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · SKILL.md (reported line 240)May include surrounding context.

md
import requests
import os

BASE_URL = "https://api.greenhelix.net/v1"
API_KEY = os.environ["GREENHELIX_API_KEY"]

def execute_tool(tool: str, input_data: dict) -> dict:

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · SKILL.md (reported line 1285)May include surrounding context.

md
import requests
import os

BASE_URL = "https://api.greenhelix.net/v1"
API_KEY = os.environ["GREENHELIX_API_KEY"]

def execute_tool(tool: str, input_data: dict) -> dict:

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · SKILL.md (reported line 1830)May include surrounding context.

md
import requests
import os

BASE_URL = "https://api.greenhelix.net/v1"
API_KEY = os.environ["GREENHELIX_API_KEY"]

def execute_tool(tool: str, input_data: dict) -> dict:

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

This code performs authenticated external POST requests to a third-party API using a bearer token, enabling transmission of sensitive operational data and initiation of marketplace actions. In a skill package marketed as a guide, embedding ready-to-run network code is risky because users may execute it with real credentials, causing unintended account, escrow, or identity operations.

Content

Scanner excerpt · SKILL.md (reported line 196)May include surrounding context.

md
def execute_tool(tool: str, input_data: dict) -> dict:
    """Execute a tool on the GreenHelix gateway."""
    response = requests.post(
        f"{BASE_URL}/v1",
        headers={
            "Content-Type": "application/json",

External Transmission

Medium
Category
Data Exfiltration
Confidence
86% confidence
Finding

This example transmits authenticated requests to retrieve agent reputation data from a third-party service. Although read-oriented, it still leaks operational metadata externally and reinforces a pattern of executing live API calls inside a supposedly non-executable educational skill.

Content

Scanner excerpt · SKILL.md (reported line 368)May include surrounding context.

Confirm your agent is registered by checking your reputation endpoint (newly registered agents start with a baseline score).

bash
curl -s -X POST https://sandbox.greenhelix.net/v1 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $GREENHELIX_API_KEY" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
82% confidence
Finding

The guide includes another authenticated external request as part of regime-based gating logic, expanding the scope from explanation into active operational querying. This broadens the attack surface by encouraging repeated external calls tied to trading and subscriber management workflows.

Content

Scanner excerpt · SKILL.md (reported line 1469)May include surrounding context.

bash
# Check current regime and adjust strategy visibility
curl -s -X POST https://sandbox.greenhelix.net/v1 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $GREENHELIX_API_KEY" \
  -d '{

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The guide includes a direct messaging pattern that uses authenticated agent-to-agent communication with subscriber IDs, which extends beyond passive marketplace documentation into active outbound contact workflows. In a skill context, this can normalize unsolicited messaging or be repurposed for spam, pressure tactics, or social engineering against buyers under the guise of dispute prevention.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The notice says the sandbox provides free credits and 'no API key required to get started,' yet the surrounding examples consistently use Authorization: Bearer $GREENHELIX_API_KEY and environment-based credentials for registration and API calls. This is an active contradiction in the guide's setup expectations, not merely an omitted detail.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The playbook claims to cover dispute resolution and performance verification, but these examples invoke a lower-level get_verified_claims capability to retrieve claim histories programmatically. That broader claim-history extraction capability is not described in the manifest and expands the guide into platform data-retrieval tooling rather than just marketplace selling workflows.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.