Back to skill

Security audit

The Agent Insurance Playbook

Security checks for vulnerabilities and agentic risk

Overview

This non-executing guide is purpose-aligned, but it understates the risk of using live authenticated insurance and finance workflows that can send sensitive data and create persistent webhooks.

Treat this as a Review item before installing or using. It is not an auto-running local payload, but do not paste real API tokens or regulated claims, identity, wallet, or policy data into these examples without approval. Use sandbox credentials and synthetic data, lock the API host to trusted GreenHelix domains, validate all amounts and identifiers, and only register webhooks to approved HTTPS endpoints with signing, ownership verification, monitoring, and a revocation plan.

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

Bearer Credential and Sensitive Data Exposure Through an Unrestricted API Endpoint

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:165-184
Vulnerability Type: Unrestricted remote endpoint configuration with credential forwarding
Risk Level: High

Vulnerable Code

python
GATEWAY_URL = os.environ.get("GREENHELIX_API_URL", "https://sandbox.greenhelix.net")


class InsuranceClient:
    """Client for agent insurance operations on GreenHelix."""

    def __init__(self, api_key: str):
        self.api_key = api_key
        self.headers = {
            "Authorization": f"Bearer {api_key}",
            "Content-Type": "application/json",
        }

    def execute(self, tool: str, params: dict[str, Any]) -> dict:
        """Execute a single tool via the GreenHelix REST API."""
        response = requests.post(
            f"{GATEWAY_URL}/v1",
            headers=self.headers,
            json={"tool": tool, "input": params},
            timeout=30,
        )
        response.raise_for_status()
        return response.json()

Technical Analysis

The destination for every API request can be overridden through GREENHELIX_API_URL. The client does not validate the URL scheme, hostname, port, or resolved network address before attaching the bearer token and submitting the request.

Consequently, anyone who can influence this environment variable can redirect requests to an unintended server. Every redirected request includes the Authorization: Bearer header and the complete tool input. Subsequent examples use this client for agent identities, wallet identifiers, transaction amounts, policy details, trust information, spending authorization, and insurance claim evidence.

This network behavior is relevant to the declared insurance workflow, but allowing credentials to be sent to an arbitrary endpoint exceeds the minimum privilege necessary. The guide also describes the sandbox as requiring no credentials while supplying a bearer-token client, creating ambiguity that co ...[truncated 1393 chars]

Remediation
View remediation

Remediation Suggestions

  1. Allowlist the exact approved API hosts, such as the documented GreenHelix sandbox and production hostnames.
  2. Require HTTPS and reject HTTP, non-web schemes, embedded credentials, unexpected ports, and malformed URLs.
  3. Resolve and reject loopback, private, link-local, multicast, and other non-public destination addresses where they are not explicitly required.
  4. Do not attach bearer credentials when a custom endpoint is selected. Use separate credentials with minimal scopes for each environment.
  5. Prefer explicit, trusted configuration files over inherited environment variables for security-sensitive endpoint selection.
  6. Document secure secret injection and rotation instead of encouraging credentials to be placed directly in source code.
  7. Use short-lived, operation-scoped tokens and revoke them immediately after suspected disclosure.
  8. Add tests confirming that unapproved destinations cannot receive authenticated requests.
  9. Reconcile the guide's statement that no credentials are required with the bearer-token examples and clearly distinguish sandbox examples from authenticated production use.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:1703
Finding

Unvalidated Webhook Destination Can Expose Insurance and Financial Events

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:1703-1741
Vulnerability Type: Arbitrary webhook registration without destination or disclosure controls
Risk Level: Medium

Vulnerable Code

python
def configure_regulatory_webhooks(
    pool_manager_id: str,
    webhook_url: str,
) -> list[dict]:
    """Configure webhooks for regulatory event reporting."""

    event_types = [
        "policy.bound",
        "policy.renewal_due",
        "policy.non_renewal",
        "claim.filed",
        "claim.settled",
        "claim.denied",
        "cat_bond.triggered",
        "solvency.warning",
        "solvency.critical",
    ]

    webhooks = []
    for event_type in event_types:
        webhook = client.execute("create_webhook", {
            "agent_id": pool_manager_id,
            "url": webhook_url,
            "event_type": event_type,
            "metadata": {
                "purpose": "regulatory_reporting",
                "destination": "compliance_system",
            }
        })
        webhooks.append(webhook)

    return webhooks


webhooks = configure_regulatory_webhooks(
    pool_manager_id="risk-pool-manager-001",
    webhook_url="https://compliance.example.com/webhooks/insurance-events",
)
print(f"Configured {len(webhooks)} regulatory webhooks")

Technical Analysis

The function accepts an arbitrary webhook_url and registers it for nine policy, claim, catastrophe-bond, and solvency event categories. It performs no validation of the scheme, hostname, port, resolved address, redirect behavior, or organizational ownership of the destination.

The example also does not establish webhook signing, destination verification, payload minimization, secret rotation, explicit operator approval, or a revocation procedure. If a malicious or mistaken URL is registered, future events may be delivered continuously to an unauthorized recipient.

Becau ...[truncated 1660 chars]

Remediation
View remediation

Remediation Suggestions

  1. Permit only HTTPS webhook destinations on an explicit organizational allowlist.
  2. Reject embedded credentials, unexpected ports, IP-literal hosts, URL fragments, and unsupported schemes.
  3. Resolve destinations and block loopback, private, link-local, multicast, metadata-service, and other special-purpose addresses.
  4. Revalidate every redirect destination or disable redirects during delivery.
  5. Require an explicit administrative approval step that displays the destination and subscribed event categories.
  6. Verify destination ownership through a challenge-response registration process.
  7. Sign each webhook payload with a rotating secret and require timestamp and replay validation.
  8. Send only the minimum fields required for regulatory reporting; exclude claim evidence, identity details, and complete financial records unless explicitly necessary.
  9. Maintain an auditable subscription inventory and provide immediate revocation and secret-rotation procedures.
  10. Document data-retention, consent, and incident-response requirements for external compliance processors.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • 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 (8)

Unvalidated Output Injection

High
Category
Output Handling
Confidence
85% confidence
Finding

The code injects variable data such as member_agent_id, risk_tier, and coverage_amount directly into an externally created SLA/policy artifact without validation or normalization. If attacker-controlled or malformed values are propagated into contracts, downstream dashboards, workflow engines, or rendering layers could be manipulated, causing policy corruption, misleading records, or secondary injection issues.

Content

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

md
sla_terms = tier_slas[risk_tier]

    sla = client.execute("create_sla", {
        "agent_id": "risk-pool-manager-001",
        "counterparty": member_agent_id,
        "terms": {

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The manifest declares credentials: none, yet the documented client uses Bearer authentication and an API key variable. This creates a trust and deployment integrity problem: platforms or users may classify the skill as safe/non-secret-bearing when it actually prompts authenticated external operations.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The guide explicitly states that it does not require credentials, but nearby content says examples run against a live API with Bearer tokens and later hard-codes an API-key parameter. This mismatch can mislead users into treating the skill as non-sensitive and encourage unsafe handling of authentication and production data.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The text advertises a live external API endpoint and states that examples run against it with a Bearer token. While external communication is expected for API-based examples, the vulnerability lies in normalizing remote transmission of sensitive insurance and compliance workflows without corresponding cautions about data sensitivity or approval boundaries.

Content

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

md
Your autonomous agent just executed a $200,000 procurement deal on behalf of a Fortune 500 client. The supplier delivered defective components. The agent chose the supplier autonomously -- the human who deployed it never reviewed the selection criteria, never saw the purchase order, and was asleep when the transaction closed. Who pays for the defective goods? The deployer who built the agent? The enterprise that authorized it to spend? The agent itself, which has no legal personhood and no assets? Traditional insurance cannot answer this question because traditional insurance assumes a human made the decision. Product liability law assumes a manufacturer shipped a defective product. Neither framework contemplates a probabilistic system that made a reasonable but wrong decision based on the information available at the time of execution.
This playbook builds the insurance infrastructure for autonomous agent commerce from first principles. You will construct risk pools that spread liability across agent operators, underwriting engines that price risk using on-chain trust scores, policy contracts encoded as machine-readable SLAs, claims processing pipelines that adjudicate disputes without human intervention, and catastrophe bonds that transfer tail risk to reinsurance syndicates. Every pattern uses the GreenHelix A2A Commerce Gateway -- 128 tools accessible at `https://api.greenhelix.net/v1` via a single the REST API (`POST /v1/{tool}`) endpoint. Every code example runs against the live API with a Bearer token.
The regulatory clock is ticking. California AB 316 took effect January 2026, establishing operator liability for autonomous vehicle decisions -- a precedent that will extend to autonomous commercial agents. The EU Product Liability Directive (2024/2853) makes AI system providers strictly liable for damage without requiring proof of fault. The EU AI Act's high-risk obligations land August 2, 2026. If your agents handle money, make purchasing decisions, or operat
...[truncated 25 chars]

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The guide encourages live API usage with Bearer tokens for insurance, claims, compliance, and identity workflows but does not warn that these requests may transmit highly sensitive financial, operational, and potentially regulated data to an external service. In this context, omission of data-handling warnings materially increases privacy, compliance, and third-party exposure risk.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

This repeated promotion of the live API endpoint reinforces the expectation that users should run examples against an external service with authenticated requests. In a high-sensitivity business domain, repeated unaudited encouragement to transmit live operational data increases the chance of inadvertent disclosure or policy violations.

Content

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

md
Your autonomous agent just executed a $200,000 procurement deal on behalf of a Fortune 500 client. The supplier delivered defective components. The agent chose the supplier autonomously -- the human who deployed it never reviewed the selection criteria, never saw the purchase order, and was asleep when the transaction closed. Who pays for the defective goods? The deployer who built the agent? The enterprise that authorized it to spend? The agent itself, which has no legal personhood and no assets? Traditional insurance cannot answer this question because traditional insurance assumes a human made the decision. Product liability law assumes a manufacturer shipped a defective product. Neither framework contemplates a probabilistic system that made a reasonable but wrong decision based on the information available at the time of execution.

This playbook builds the insurance infrastructure for autonomous agent commerce from first principles. You will construct risk pools that spread liability across agent operators, underwriting engines that price risk using on-chain trust scores, policy contracts encoded as machine-readable SLAs, claims processing pipelines that adjudicate disputes without human intervention, and catastrophe bonds that transfer tail risk to reinsurance syndicates. Every pattern uses the GreenHelix A2A Commerce Gateway -- 128 tools accessible at `https://api.greenhelix.net/v1` via a single the REST API (`POST /v1/{tool}`) endpoint. Every code example runs against the live API with a Bearer token.

The regulatory clock is ticking. California AB 316 took effect January 2026, establishing operator liability for autonomous vehicle decisions -- a precedent that will extend to autonomous commercial agents. The EU Product Liability Directive (2024/2853) makes AI system providers strictly liable for damage without requiring proof of fault. The EU AI Act's high-risk obligations land August 2, 2026. If your agents handle money, make purchasing decisions, or oper
...[truncated 25 chars]

External Transmission

Medium
Category
Data Exfiltration
Confidence
92% confidence
Finding

The client sends arbitrary tool names and parameter payloads to an external endpoint using Bearer authentication. In a skill centered on insurance, identity, claims, and compliance, that means users may transmit sensitive regulated data off-system with little friction and no built-in safeguards around destination validation, data minimization, or environment separation.

Content

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

md
def execute(self, tool: str, params: dict[str, Any]) -> dict:
        """Execute a single tool via the GreenHelix REST API."""
        response = requests.post(
            f"{GATEWAY_URL}/v1",
            headers=self.headers,
            json={"tool": tool, "input": params},

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The webhook section forwards policy, claim, solvency, and catastrophe-bond events to an arbitrary external endpoint without warning about the sensitivity of those events or the need for recipient trust, encryption, minimization, and authentication. Because these events can reveal claims activity, financial health, and regulated compliance details, silent forwarding to third parties is especially dangerous here.

Content

No source excerpt is available for this finding.