Back to skill

Security audit

Agentic Advertising: Build Autonomous Media-Buying Agents

Security checks for vulnerabilities and agentic risk

Overview

This is a non-executing tutorial, but its examples can target a production API and create real ad-spend commitments despite sandbox-oriented language.

Treat this as a review-needed guide, not ready-to-run production code. Do not run the examples with real credentials, funded wallets, or production campaign data until the endpoint is explicitly sandboxed, secrets are stored safely, dry-run behavior is default, spend limits and human approvals are enforced before any payment or escrow call, and critical SLA violations are proven to halt or pause real remote state.

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

Error
Location
SKILL.md:167
Finding

Examples Target the Production API Despite Repeated Sandbox Claims

Content
View full analysis
All examples use the GreenHelix sandbox (https://sandbox.greenhelix.net) which > provides 500 free credits — no API key required to get started. ``` The implementation instead directs every request to the main API endpoint: ```markdown All code runs against the GreenHelix A2A Commerce Gateway at `https://api.greenhelix.net/v1`. ``` ```python import requests import json import time from datetime import datetime, timedelta base_url = "https://api.greenhelix.net/v1" api_key = "your-api-key" # From GreenHelix dashboard session = requests.Session() session.headers["Authorization"] = f"Bearer {api_key}" session.headers["Content-Type"] = "application/json" def execute(tool: str, inputs: dict) -> dict: """Execute a GreenHelix tool and return the result.""" resp = session.post( f"{base_url}/v1", json={"tool": tool, "input": inputs} ) resp.raise_for_status() return resp.json() ``` ### Technical Analysis The guide establishes a safety expectation that its examples operate exclusively against a free sandbox. However, the shared request helper targets `https://api.greenhelix.net/v1`, not `https://sandbox.greenhelix.net`. Every subsequent example uses the `execute()` helper for account registration, wallet creation, payment intents, escrow operations, metrics submission, and messaging. Consequently, a user who copies the examples while relying on the sandbox notice may unknowingly transmit credentials and campaign information to the production-facing service. The endpoint is also constructed as `https://api.greenhelix.net/v1/v1` because `base_url` already contains `/v1` and the request appends another `/v1`. ...[truncated 1434 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:583
Finding

Examples Automatically Create High-Value Financial Commitments Before Approval Controls

Content
View full analysis
0: effective_amount = allocation * (1 - discount["discount_rate"]) effective_amount = round(effective_amount, 2) print(f" Volume discount from {publisher['name']}: " f"{discount['discount_rate']:.1%} off " f"(${allocation} -> ${effective_amount})") # Create escrow -- budget is locked but not yet released escrow = execute("create_escrow", { "payer_id": buyer_agent_id, "payee_id": publisher_id, "amount": s ...[truncated 4353 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:1523
Finding

Critical Compliance Branch Reports Escrows as Paused Without Performing a Pause Operation

Content
View full analysis
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)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill references an agent signing key credential but does not clearly instruct users on secure generation, storage, rotation, and non-disclosure of that sensitive material. Because the credential is tied to cryptographic identity and transaction signing, poor handling could enable impersonation or unauthorized signed requests.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The guide encourages autonomous escrow-backed ad spend workflows without prominently warning that the examples model real financial commitments and could lock, release, or reallocate funds if adapted directly. In this context, the omission is risky because the skill is specifically about autonomous commerce, so users may treat example code as safe to operationalize without adequate controls.

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

md
- Compliance guardrails including spending caps, approval workflows, and audit trails
- A production deployment pattern for scaling to a fleet of autonomous buyers

All code runs against the GreenHelix A2A Commerce Gateway at `https://api.greenhelix.net/v1`.

---

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

md
- Compliance guardrails including spending caps, approval workflows, and audit trails
- A production deployment pattern for scaling to a fleet of autonomous buyers

All code runs against the GreenHelix A2A Commerce Gateway at `https://api.greenhelix.net/v1`.

---

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The code records and reports that escrows were paused on critical SLA violations, but it does not actually invoke any escrow-pausing or campaign-halting action. In an autonomous spending system, this creates a false sense of enforcement and could allow financial commitments to continue during fraud, overspend, or compliance incidents.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The update_creative_weights docstring says it uses Thompson sampling, which is a specific probabilistic bandit algorithm. The implementation instead just normalizes avg_attention values into proportional weights, with no sampling, priors, or exploration logic. This is an active documentation-to-code contradiction rather than a mere omission.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest and body describe a guide covering publisher discovery, escrow, analytics, compliance, and related topics, and the table of contents ends at Chapter 7 plus next steps. The final summary claims Production Fleet Operations (Chapter 8) including fleet registration, SLAs, alerting, and auto-scaling, but no such chapter or code appears in this file. This is a description-behavior mismatch at the document level.

Content

No source excerpt is available for this finding.