Back to skill

Security audit

投放Agent自动化体验测试

Security checks for vulnerabilities and agentic risk

Overview

This skill is an understandable Tencent Ads testing helper, but it asks for live session cookies and can submit real campaign-changing commands without adequate safeguards.

Only use this with a dedicated test advertising account and short-lived credentials. Do not paste full browser cookies into chat or store them in a project folder; avoid production accounts, remove budget-changing and pause-ad prompts, keep reports/screenshots free of sensitive account data, and delete any cookie files immediately after testing.

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 (4)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/inject_cookies.js:26
Finding

Overbroad Collection and Cross-Domain Injection of Authentication Cookies

Content
View full analysis
s.trim()).filter(Boolean); for (const pair of pairs) { const eqIdx = pair.indexOf('='); if (eqIdx === -1) continue; const name = pair.substring(0, eqIdx).trim(); const value = pair.substring(eqIdx + 1).trim(); if (!name) continue; // 根据cookie名推断域名 let domain = defaultDomain; if (['ptcz', 'ptui_loginuin', 'RK', 'p_uin', 'p_skey', 'pt4_token'].includes(name)) { domain = '.qq.com'; } else if (['RIO_TOKEN', 'RIO_TOKEN_HTTPS', 'x_host_key_access_https', 'x-client-ssid', 'DiggerTraceId', 'DiggerTraceIdTs'].includes(name)) { domain = '.woa.com'; } const cookie = { name, value, domain, path: '/', }; // 敏感cookie加安全属性 if (['gdt_mlogin', 'gdt_protect', 'tap_free_login_token', 'RIO_TOKEN', 'RIO_TOKEN_HTTPS', 'x_host_key_access_https'].includes(name)) { cookie.secure = true; cookie.httpOnly = true; cookie.sameSite = 'None'; } cookies.push(cookie); } return cookies; } ``` The associated instructions tell the user to run `document.cookie` and send the complete result to the Agent rather than supplying only narrowly scoped credentials. ### Technical Analysis The parser accepts every cookie in the supplied string. It does not enforce an allowlist of cookies required for the declared `ad.qq.com` UX test. It also recognizes selected authentication and internal-ne ...[truncated 2092 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/inject_cookies.js:93
Finding

Authentication Cookies Stored in a Predictable Plaintext File

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/run_test.js:150
Finding

Automated Production Campaign Mutations Without Confirmation or Dry-Run Controls

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/run_test.js:33
Finding

Chromium Security Sandbox Explicitly Disabled

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (21)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description presents a full automation testing skill for Tencent Ads Agent, including exercising multiple product features and producing a UX report. The supplied code chunk does not perform any of those core behaviors. It only converts a user-provided cookie string into a Playwright-compatible JSON cookie file and performs lightweight validation. While cookie injection support is consistent with the setup described, this chunk’s actual purpose is a preparatory cookie-processing utility, not the advertised end-to-end Agent experience test. Therefore the code behavior is materially narrower and different from the declared primary purpose.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill explicitly instructs users to run document.cookie and paste the result into the agent, which exposes live authentication credentials in natural-language form without any meaningful warning or containment. This is highly dangerous because anyone with access to the chat transcript or logs may replay the session and impersonate the user.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill tells users to extract full browser cookies and paste them back to the agent, directly exposing sensitive session tokens in conversational text. This creates a severe secret-handling failure: transcripts, logs, prompt history, or downstream integrations can all become credential exfiltration paths.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documented 'test' flow includes real operational actions such as changing budgets and pausing ads, which go beyond passive UX evaluation and can directly affect live advertising campaigns. In the context of an authenticated session injected via cookies, these instructions could cause unauthorized or accidental business-impacting changes.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill describes budget changes and bulk pausing of ads as part of a 'test' plan without warning that these actions can modify live campaigns and cause immediate financial or business harm. In context, the use of injected authenticated sessions makes accidental execution especially risky.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The guide explicitly instructs users to extract their full browser cookie via document.cookie and send the complete value onward, without treating it as a secret credential. Authentication cookies are equivalent to a live session token, so disclosure can enable account takeover, impersonation, or unauthorized access to ad accounts during the cookie validity window.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Directing users to copy full authentication cookies and transmit them in plain form creates an intentional credential exfiltration path. In this skill's context, the danger is elevated because the cookie is specifically for ad.qq.com/adhome access and the skill is built around cookie injection into automation, meaning the stolen value is immediately usable for authenticated actions as the victim.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The FAQ normalizes transmission of large cookie strings by recommending splitting them into parts or saving them to a file for sending, which further operationalizes leakage of session secrets. This materially increases exploitability by helping users bypass friction that might otherwise prevent disclosure of sensitive authentication data.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script's '自由对话' scenarios include explicit state-changing operational requests such as adjusting all active ad budgets and pausing ads above a cost threshold. In the context of a live authenticated ad-management session, this goes beyond passive UX testing and can trigger real account modifications, financial impact, or service disruption if the agent executes those instructions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
90% confidence
Finding

The '妙招' workflow navigates into bulk-operation features named like '批量清理低效创意' and '批量关停无效广告', then inspects the '一键执行' control. Even without clicking execute in this version, the automation is coupled to operational bulk-action surfaces and could easily be extended or accidentally triggered in a real account context, making it materially riskier than passive UI inspection.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
73% confidence
Finding

The skill clearly contemplates code-capable actions such as environment inspection, shell commands, Playwright usage, and cookie handling, but it declares no explicit tool scope or permission boundaries. That increases the chance an agent will use broader runtime capabilities than users expect, especially when handling sensitive authentication material.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The file specifies a Chinese-font prerequisite, reflecting a Chinese-language operating assumption, but does not state that the skill is China-specific or otherwise justify the locale requirement. Under the policy, forcing a specific language or locale without opt-in or clear justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
84% confidence
Finding

Using npx playwright without a pinned version introduces supply-chain and reproducibility risk because the resolved package/version can change over time. In a skill that handles authentication cookies and browser automation, an unexpected dependency version could alter behavior or introduce malicious code paths.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill asks for broad SSO and login cookies, including internal-domain and QQ login-state cookies, which exceeds the minimum needed for a narrow UX test and grants powerful session access. Possession of these cookies can enable account takeover within the session scope, lateral access, or misuse of ad-platform capabilities.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown template is entirely written in Chinese and prescribes Chinese section headings and report labels, which implies the skill output is expected in a specific language. The policy allows locale constraints only when the skill offers user choice or clearly documents a justified region-specific requirement, which is not stated here.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The script reads RAW_COOKIE from an environment variable and processes cookie values that include login and token-like fields, which are sensitive credentials. Although the file header explains how to run the script, it does not explicitly warn users about the sensitivity of supplying session cookies via environment variables or the associated privacy and account-security risks.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script automatically maps selected cookie names to broader domains such as .qq.com and .woa.com, then persists them for browser automation. In the context of an ad.qq.com testing skill, expanding injected authentication cookies to additional domains materially increases the privilege and session scope being imported, which can enable unintended access to unrelated services if the cookie jar is later used by automation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script writes active authentication cookies to cookies.json on disk in plaintext with no protection, warning, or lifecycle controls. Persisting session tokens this way creates a high risk of credential theft through local compromise, accidental inclusion in logs/backups, or later reuse by other processes, especially because these cookies may grant access across multiple domains.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script loads authentication cookies from disk and injects them directly into the browser context, enabling authenticated access to the ad account without interactive login. These cookies are sensitive credentials; if mishandled, reused, or collected from insecure storage, they can enable account takeover or unauthorized access to advertising data and controls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The automation sends authenticated, account-scoped prompts to the remote ad platform and captures resulting content without clearly warning that account data, campaign metadata, and operational context may be transmitted during testing. In an ad-management setting, that can expose sensitive business information or trigger processing of real account data beyond what a user expects from a UX test.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The manifest describes a workflow where the user provides an adhome cookie for browser automation testing. While cookie injection itself is in-scope, this implementation also pulls the cookie from process environment state, which is a separate credential-ingestion capability not called out in the stated purpose. That makes the skill capable of sourcing sensitive auth material from ambient environment rather than explicit user input.

Content

No source excerpt is available for this finding.