Back to skill

Security audit

Agent Tax & Ledger Compliance Playbook

Security checks for vulnerabilities and agentic risk

Overview

This is a non-running guide, but it asks for sensitive payment and signing credentials and includes live examples that can send tax and financial data or create payment intents.

Install only if you are comfortable reviewing a guide that asks for high-impact credentials. Do not provide live Stripe keys, signing keys, real taxpayer identifiers, EIN data, or production wallet/account details just to read or test it; use sanitized sandbox data and add explicit approvals, allowlisted endpoints, scoped credentials, and idempotency controls before adapting any payment or ledger-writing examples.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:152
Finding

Configurable Network Destination Can Expose Credentials and Sensitive Taxpayer Data

Content
View full analysis
dict: """Execute a GreenHelix gateway tool.""" response = requests.post( f"{GATEWAY_URL}/v1", headers={ "Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json", }, json={"tool": tool_name, "input": tool_input}, ) response.raise_for_status() return response.json() ``` The wrapper is subsequently used to transmit taxpayer information: ```python claim = execute_tool("build_claim_chain", { "agent_id": agent_id, "claims": [ { "type": "beneficial_owner", "subject": taxpayer_info["taxpayer_id"], "evidence": { "ein_last_four": taxpayer_info.get("ein_last_four"), "entity_type": taxpayer_info["entity_type"], "jurisdiction": taxpayer_info["jurisdiction"], "attestation_date": datetime.utcnow().isoformat(), }, }, { "type": "dominion_and_control", "subject": taxpayer_info["taxpayer_id"], "evidence": { "wallet_access": "deployer_controlled", "withdrawal_authority": "deployer_only", "api_key_holder": taxpayer_info["taxpayer_id"], }, }, ], }) ``` ### Technical Analysis The `GREENHELIX_API_URL` environment variable fully controls the origin receiving both the bearer authorization header and the request body. The code does not validate the scheme, hostname, port, resolved address, or redirect destination against an allowlist. If an attacker can influence t ...[truncated 2278 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:14
Finding

Documentation-Only Skill Requests Unnecessary Signing and Payment Credentials

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:1482
Finding

Tax Reserve Operation Lacks Explicit Approval, Input Limits, and Replay Protection

Content
View full analysis
dict: """ Create a payment intent to reserve funds for estimated taxes. The reserved amount is held in escrow until the quarterly payment date. """ due_dates = { 1: f"{tax_year}-04-15", 2: f"{tax_year}-06-16", 3: f"{tax_year}-09-15", 4: f"{tax_year + 1}-01-15", } result = execute_tool("create_payment_intent", { "agent_id": agent_id, "amount": str(reserve_amount), "currency": "USD", "description": f"Tax reserve Q{quarter} {tax_year}", "metadata": { "purpose": "estimated_tax_payment", "quarter": quarter, "tax_year": tax_year, "due_date": due_dates[quarter], }, }) # Log the reservation execute_tool("record_transaction", { "agent_id": agent_id, "type": "tax_reserve", "amount": str(reserve_amount), "metadata": { "quarter": quarter, "tax_year": tax_year, "intent_id": result.get("intent_id"), }, }) # Track usage analytics for tax estimation accuracy execute_tool("get_usage_analytics", { "agent_id": agent_id, "period": "month", }) return { "intent_id": result.get("intent_id"), "reserved_amount": str(reserve_amount), "quarter": quarter, "due_date": due_dates[quarter], "status": "reserved", } ``` ### Technical Analysis The example performs a state-changing financial operation through `create_payment_intent`, but it does not implement safeguards appropriate for moving or reserving funds: - No explicit user confirmation is required. ...[truncated 2295 chars]
Remediation
View remediation
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 (7)

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill markets itself as a non-executable educational guide, yet the embedded examples perform authenticated POST requests and invoke state-changing operations such as submit_metrics, build_claim_chain, record_transaction, and create_payment_intent. This mismatch can mislead users or host systems into treating the skill as documentation-only while it actually contains copy-paste-ready code that transmits data and mutates remote state.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The guide documents credentials and taxpayer-linked inputs but does not prominently warn that the sample API calls send sensitive financial, identity, and transaction metadata to external GreenHelix services. Because the examples include taxpayer identifiers, wallet control assertions, reconciliation data, and audit artifacts, users may disclose regulated or confidential information without informed consent or review.

Content

No source excerpt is available for this finding.

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 39)May include surrounding context.

md
Your agent executed 14,000 transactions last quarter. It bought data enrichment services from three marketplace providers, paid in USDC over x402, collected revenue through Gumroad and Stripe, and settled micro-payments through the GreenHelix A2A Commerce Gateway. You received a 1099-K from Stripe, a sales summary from Gumroad, and nothing at all from the on-chain transactions. Tax season arrives and your CPA asks a question that has no good answer: who is the taxpayer for these transactions, and where is the ledger?
The IRS does not recognize AI agents as taxpayers. The Internal Revenue Code assigns tax obligations to persons -- individuals, corporations, partnerships, estates, and trusts. Your agent is none of these. But the money it spent and earned is real, the capital gains on stablecoin conversions are taxable, and the reporting obligations fall on someone. That someone is you -- the beneficial owner, the person with dominion and control over the funds, the entity that received the economic benefit. The IRS has made this clear through existing case law, and the 2026 1099-DA reporting requirements for digital asset brokers will make the enforcement infrastructure inescapable.
This playbook solves the tax compliance problem for agent commerce systems. Seven chapters cover attribution, ledger design, multi-ledger reconciliation, 1099-DA reporting, real-time tax estimation, compliance automation patterns, and audit survival. Every chapter contains production Python code against the GreenHelix A2A Commerce Gateway -- 128 tools accessible at `https://api.greenhelix.net/v1` via the REST API (`POST /v1/{tool}`). Every pattern is designed to produce the documentation an IRS auditor would request: complete transaction histories, cost basis records, reconciliation reports, and evidence of human oversight over autonomous systems.

## What You'll Learn
- Chapter 1: The Tax Attribution Problem

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 60)May include surrounding context.

md
Your agent executed 14,000 transactions last quarter. It bought data enrichment services from three marketplace providers, paid in USDC over x402, collected revenue through Gumroad and Stripe, and settled micro-payments through the GreenHelix A2A Commerce Gateway. You received a 1099-K from Stripe, a sales summary from Gumroad, and nothing at all from the on-chain transactions. Tax season arrives and your CPA asks a question that has no good answer: who is the taxpayer for these transactions, and where is the ledger?
The IRS does not recognize AI agents as taxpayers. The Internal Revenue Code assigns tax obligations to persons -- individuals, corporations, partnerships, estates, and trusts. Your agent is none of these. But the money it spent and earned is real, the capital gains on stablecoin conversions are taxable, and the reporting obligations fall on someone. That someone is you -- the beneficial owner, the person with dominion and control over the funds, the entity that received the economic benefit. The IRS has made this clear through existing case law, and the 2026 1099-DA reporting requirements for digital asset brokers will make the enforcement infrastructure inescapable.
This playbook solves the tax compliance problem for agent commerce systems. Seven chapters cover attribution, ledger design, multi-ledger reconciliation, 1099-DA reporting, real-time tax estimation, compliance automation patterns, and audit survival. Every chapter contains production Python code against the GreenHelix A2A Commerce Gateway -- 128 tools accessible at `https://api.greenhelix.net/v1` via the REST API (`POST /v1/{tool}`). Every pattern is designed to produce the documentation an IRS auditor would request: complete transaction histories, cost basis records, reconciliation reports, and evidence of human oversight over autonomous systems.

## What You'll Learn
- Chapter 1: The Tax Attribution Problem

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

The execute_tool helper performs outbound authenticated POST requests to a remote endpoint and is reused throughout the guide for identity, metrics, reconciliation, and payment-intent actions. If copied into production or run with real data, it can exfiltrate sensitive taxpayer and transaction information to a third party and trigger remote state changes without any additional review gates.

Content

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

md
def execute_tool(tool_name: str, tool_input: dict) -> dict:
    """Execute a GreenHelix gateway tool."""
    response = requests.post(
        f"{GATEWAY_URL}/v1",
        headers={
            "Authorization": f"Bearer {API_KEY}",

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The tax-compliance playbook includes agent discovery, reputation lookup, and search-by-metrics capabilities that go beyond the minimum necessary scope for ledgering and tax reporting. In a compliance context, these features can encourage unnecessary collection and correlation of third-party metadata, increasing privacy exposure and broadening the blast radius if the examples are operationalized.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The guide states that no API key is required to get started, but its implementation pattern is centered on Bearer-authenticated API access and references scoped secrets such as STRIPE_API_KEY and AGENT_SIGNING_KEY. This inconsistency can cause users to underestimate the sensitivity of the workflow and paste real credentials into examples they believe are safe to try casually.

Content

No source excerpt is available for this finding.