Back to skill

Security audit

Ad Context Protocol (AdCP) Advertising

Security checks for vulnerabilities and agentic risk

Overview

This advertising automation skill is mostly coherent, but it gives agents guidance for live campaign creation and budget changes without consistently requiring explicit approval before spending or reallocating money.

Review carefully before installing for production use. Treat this as capable of spending money and changing live advertising campaigns: require explicit approval for every campaign creation, budget change, pause/resume, creative reassignment, or automated optimization; use the test agent first; keep production bearer tokens in a secret manager or environment variables; and set budget caps and audit logging before connecting real ad accounts.

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
EXAMPLES.md:678
Finding

Budget Reallocation Proceeds Without Runtime User Approval

Content
View full analysis

Vulnerability Details

File Location: EXAMPLES.md, lines 678–698
Vulnerability Type: Missing authorization for a financially consequential operation
Risk Level: High

javascript
// 5. Implement optimization (if approved)
const shouldOptimize = true;  // Get user approval in real scenario

if (shouldOptimize) {
  await testAgent.updateMediaBuy({
    media_buy_id: mediaBuyId,
    updates: {
      package_updates: [
        {
          package_id: best.package_id,
          budget_change: 5000  // Add $5k
        },
        {
          package_id: worst.package_id,
          budget_change: -5000  // Remove $5k
        }
      ]
    }
  });

  console.log('✅ Budget reallocation complete');
}

Technical Analysis

The example states that optimization should occur only after approval, but shouldOptimize is hardcoded to true. Consequently, the approval condition does not enforce authorization and the call to updateMediaBuy always proceeds whenever the performance-ratio condition is met.

Although the example uses testAgent, the project describes these examples as adaptable and separately instructs users to switch to production agent endpoints and credentials. If copied into a production workflow, this pattern can authorize a financially consequential campaign update without transaction-specific user consent.

The decision also depends on remotely supplied delivery metrics and a simplistic efficiency calculation. Incorrect, incomplete, stale, or manipulated metrics could therefore trigger an inappropriate allocation change.

Attack Path

  1. An operator adapts the documented optimization example for a production AdCP client.
  2. The client retrieves package-level campaign delivery metrics.
  3. The code ranks packages and identifies the highest- and lowest-efficiency packages.
  4. When the efficiency ratio exceeds two, the code reaches the nominal approval check.
  5. Because shouldOptimize is always true, no actual user confirmation ...[truncated 752 chars]
Remediation
View remediation

Remediation Suggestions

  • Replace the hardcoded flag with a real, transaction-specific approval result that defaults to denial:
javascript
const approved = await requestExplicitApproval({
  environment: agentEnvironment,
  media_buy_id: mediaBuyId,
  changes: [
    {
      package_id: best.package_id,
      budget_change: 5000
    },
    {
      package_id: worst.package_id,
      budget_change: -5000
    }
  ]
});

if (!approved) {
  return { status: 'cancelled' };
}
  • Immediately before approval, display the environment, endpoint, campaign ID, affected package IDs, current and proposed budgets, total spend impact, and effective time.
  • Require fresh approval for every production update; do not reuse consent from campaign creation or an earlier recommendation.
  • Separate recommendation generation from mutation execution so analysis cannot directly trigger a financial action.
  • Add a dry-run mode and make it the default outside explicitly configured production execution.
  • Enforce per-operation and cumulative adjustment limits.
  • Re-fetch campaign state after approval and reject the operation if budgets, package identities, metrics, or campaign status changed.
  • Use idempotency keys to prevent duplicate reallocations during retries.
  • Validate that all target packages belong to the intended media buy and authenticated account.
  • Record the approving identity, proposed change, timestamp, endpoint, response, and resulting campaign state in an audit log.
  • Clearly distinguish test-only code from production-safe examples and include a warning that replacing testAgent with a production client requires an approval control.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (31)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

A real auth token is shown inline without any warning, scope limitation note, or handling guidance. In the context of an agent skill that can automate advertising workflows and make networked calls, this increases the chance that downstream users or agents will reuse the credential directly, leading to unauthorized operations, service abuse, or accidental trust of embedded secrets.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The quick-start flow states that a campaign 'goes live instantly,' which normalizes immediate execution of a financially impactful action without warning about real ad delivery, spend commitment, or account-level consequences. In an agent skill context, this can cause users to invoke production ad purchases under the mistaken belief they are only testing or previewing behavior.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
See [REFERENCE.md](REFERENCE.md) for complete API docs and [EXAMPLES.md](EXAMPLES.md) for detailed workflows.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
See [REFERENCE.md](REFERENCE.md) for complete API docs and [EXAMPLES.md](EXAMPLES.md) for detailed workflows.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
See [REFERENCE.md](REFERENCE.md) for complete API docs and [EXAMPLES.md](EXAMPLES.md) for detailed workflows.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
See [REFERENCE.md](REFERENCE.md) for complete API docs and [EXAMPLES.md](EXAMPLES.md) for detailed workflows.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
See [REFERENCE.md](REFERENCE.md) for complete API docs and [EXAMPLES.md](EXAMPLES.md) for detailed workflows.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The file includes a plaintext authentication token alongside a public agent URL, which is credential exposure even if intended for testing. Exposed tokens can be reused by anyone reading the skill, enabling unauthorized access, abuse of shared resources, rate-limit exhaustion, or pivoting if the token has broader privileges than documented.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- [TARGETING.md](TARGETING.md) - Advanced targeting strategies

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- [CREATIVE.md](CREATIVE.md) - Creative asset management guide

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 · CREATIVE.md (reported line 121)May include surrounding context.

md
},
  click_through_url: 'https://brand.com/campaign',
  tracking_pixels: [
    'https://analytics.brand.com/impression?id=123',
    'https://analytics.brand.com/click?id=123'
  ],
  status: 'active'

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 · CREATIVE.md (reported line 122)May include surrounding context.

md
},
  click_through_url: 'https://brand.com/campaign',
  tracking_pixels: [
    'https://analytics.brand.com/impression?id=123',
    'https://analytics.brand.com/click?id=123'
  ],
  status: 'active'

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 · CREATIVE.md (reported line 149)May include surrounding context.

md
},
  click_through_url: 'https://brand.com/campaign',
  tracking_pixels: [
    'https://analytics.brand.com/impression?id=123',
    'https://analytics.brand.com/click?id=123'
  ],
  status: 'active'

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 · CREATIVE.md (reported line 150)May include surrounding context.

md
},
  click_through_url: 'https://brand.com/campaign',
  tracking_pixels: [
    'https://analytics.brand.com/impression?id=123',
    'https://analytics.brand.com/click?id=123'
  ],
  status: 'active'

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 · REFERENCE.md (reported line 832)May include surrounding context.

md
},
  click_through_url: 'https://brand.com/campaign',
  tracking_pixels: [
    'https://analytics.brand.com/impression?id=123',
    'https://analytics.brand.com/click?id=123'
  ],
  status: 'active'

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The optimizeCreativeRotation example analyzes performance and then calls updateMediaBuy to replace active creative assignments with the top performers. The documentation does not warn that this can immediately change live campaign behavior and potentially remove currently serving creatives, which is a system-integrity-impacting action for a markdown skill guide.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The examples invoke live campaign-creation and campaign-update operations with concrete budgets and no prominent warning that these actions may spend real money or alter production advertising state. In an agent-skill context, users may copy or trigger example flows directly, causing unintended financial loss and unauthorized media-buy changes.

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 · EXAMPLES.md (reported line 360)May include surrounding context.

md
},
        click_through_url: 'https://streamtech.com/signup',
        tracking_pixels: [
          'https://analytics.streamtech.com/impression',
          'https://analytics.streamtech.com/completion'
        ]
      }],

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 · EXAMPLES.md (reported line 361)May include surrounding context.

md
},
        click_through_url: 'https://streamtech.com/signup',
        tracking_pixels: [
          'https://analytics.streamtech.com/impression',
          'https://analytics.streamtech.com/completion'
        ]
      }],

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The documentation exposes what appears to be a usable authentication token for a publicly reachable test agent. Even if labeled as a test token, publishing credentials in skill docs enables unauthorized access, abuse of the external service, and normalizes unsafe secret-handling practices in a high-automation advertising skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation includes credential material without any warning about sensitivity, storage, or safe handling, which normalizes copying secrets into prompts, code, logs, and shared documents. In a skill meant for automation and agent use, this increases the likelihood of accidental propagation and misuse because users may treat the token as harmless sample data.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The quick reference publishes a bearer token for a test agent directly in documentation, which is credential exposure even if the environment is intended for testing. Exposed tokens are easily harvested and reused for unauthorized API access, abuse of shared infrastructure, quota exhaustion, or pivoting if the token has broader scope than documented.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README.md (reported line 14)May include surrounding context.

md
Transform how you run advertising campaigns. This skill provides OpenClaw agents with AI-powered advertising automation:

- 🔍 **Discover ad inventory** - Find display ads, video placements, CTV spots using natural language
- 🎯 **Launch campaigns instantly** - Create multi-channel campaigns across display, video, CTV, audio, native, DOOH
- 🎨 **Manage ad creatives** - Upload banners, videos, HTML5 ads and track performance by creative
- 📊 **Monitor ROI in real-time** - Get impressions, clicks, conversions, CPM, CTR, and spend data instantly
- 🎛️ **Auto-optimize performance** - Reallocate budgets, pause underperformers, scale winners automatically

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The feature list advertises automatic optimization, including reallocating budgets and pausing campaigns, without clearly warning that these behaviors can change live campaign delivery and spend. For an automation skill handling advertising, omission of this warning can lead to unexpected operational and financial effects if users enable or invoke optimization casually.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README encourages switching from a test environment to production and launching campaigns with real budgets, but it does not present a prominent warning that these actions can spend real money and create binding ad purchases. In an agentic context, users may treat conversational commands as low-risk, increasing the chance of unintended financial commitments or budget changes.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
PROTOCOLS.md:393