Back to skill

Security audit

爆款选题发现虾

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly aligned with finding Chinese social-media hot topics, but it asks users to place live browser cookies in source code without adequate safety warnings.

Review before installing. Use read-only public endpoints where possible, do not paste personal browser cookies into the skill's source file, and only write to Feishu after confirming what topic/account data will be stored. If cookie-based access is necessary, use a dedicated low-privilege account and a proper secret store or environment variable instead of editing tracked code.

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

Warning
Location
scripts/fetch-hotlist.py:25
Finding

Authenticated Session Cookies Stored in Tracked Source Code

Content
View full analysis

Vulnerability Details

File Location: scripts/fetch-hotlist.py, lines 25-29 and 116-124
Related Instructions: SKILL.md, lines 35-36; references/platform-hotlist-api.md, lines 12-18 and 55-59
Vulnerability Type: Plaintext sensitive credential storage
Risk Level: Medium

Vulnerable Code

python
# Optional: enter cookies here (Douyin and Xiaohongshu require them)
COOKIES = {
    "douyin": "",   # Enter Douyin Cookie
    "xiaohongshu": "",  # Enter Xiaohongshu Cookie
}

The configured Douyin cookie is subsequently retrieved and transmitted as an authentication header:

python
def fetch_douyin():
    """Douyin hot list (requires Cookie)"""
    cookie = COOKIES.get("douyin", "")
    if not cookie:
        return {"platform": "抖音热榜", "error": "未配置 Cookie,请在脚本顶部 COOKIES['douyin'] 填入抖音 Cookie", "items": []}
    data = fetch_url(
        "https://www.douyin.com/aweme/v1/web/hot/search/list/?device_platform=webapp&aid=6383",
        extra_headers={"Cookie": cookie, "Referer": "https://www.douyin.com/"}
    )

Technical Analysis

The project instructs users to copy authenticated browser cookies directly into a Python source file. Browser cookies can contain reusable session credentials that grant access to an authenticated account without requiring the account password.

Although the distributed values are currently empty and the script sends the Douyin cookie only to the expected HTTPS Douyin domain, populating this dictionary creates a plaintext secret inside the project directory. Such credentials can be unintentionally exposed through source-control commits, repository archives, backups, support bundles, shared project folders, or access by other local processes and users.

This is a conditional credential-exposure vulnerability: exploitation requires a user to follow the documented configuration instructions and place a valid session cookie in the source file. No ...[truncated 1339 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the COOKIES credential dictionary from tracked source code.
  2. Load credentials from environment variables, such as DOUYIN_COOKIE and XIAOHONGSHU_COOKIE.
  3. Prefer an operating-system credential manager or permission-restricted secret store for persistent credentials.
  4. If local configuration files are supported, provide an example file containing placeholders only, exclude the real file through .gitignore, and restrict its filesystem permissions.
  5. Never print, serialize, or include cookie values in exception messages or diagnostic logs.
  6. Update SKILL.md and references/platform-hotlist-api.md so they no longer instruct users to edit tracked source files with live credentials.
  7. Add automated secret scanning to development and release workflows to detect accidentally committed cookies.
  8. Document cookie rotation and revocation procedures. Any cookie previously committed or shared should be invalidated immediately.
  9. Where supported, use narrowly scoped, short-lived API credentials instead of full browser session cookies.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (13)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

描述覆盖了一个完整的“热点发现+内容分析+选题管理”工作流,但代码实现范围明显更窄,只完成了多平台热榜数据抓取与展示。已实现部分与描述一致的只有“从多个平台抓取热榜数据”。然而,描述中的核心高阶能力——内容分析、账号定位匹配、选题建议生成、竞品追踪、飞书表格入库——在代码中完全未体现。因此这不是轻微细节缺失,而是功能范围显著不符,应判定为描述与实际行为不匹配。

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill instructs the agent to run a Python script that fetches data from multiple external platforms and also references writing results to Feishu, but it declares no explicit tool scope or permissions. Missing tool scoping weakens least-privilege controls and can cause users or orchestrators to underestimate that the skill performs networked actions and external data transmission.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill description and invocation guidance are entirely in Chinese and present the behavior as the default without indicating that users may choose another language. Under the policy, locale or language constraints should either be optional via user choice or explicitly justified as region-specific.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger phrases are broad enough to match common user requests like finding recent hot topics or recommending ideas, which increases the chance of the skill activating when the user did not intend network scraping, competitor tracking, or external record storage. Over-broad activation can lead to unnecessary collection, processing, or transmission of data without sufficiently explicit user intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill supports transmitting data to external platforms and storing records in Feishu, but it does not clearly warn users about privacy implications, what data may be shared, or when third-party services are involved. This can cause unintentional disclosure of user-provided content, account-positioning keywords, competitor information, or generated topic records to external systems.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The Douyin example tells users to supply a browser cookie to access the endpoint but provides no warning that cookies are equivalent to active session credentials. In this skill context, that is dangerous because operators may copy personal account cookies into automation, exposing their accounts to theft, misuse, logging leakage, or scraping beyond intended public-data collection.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The guide explicitly recommends obtaining valid browser cookies from developer tools and reusing them to scrape platforms that require authentication. Session cookies are sensitive credentials; instructing users to extract and replay them expands the skill from public hot-topic discovery into authenticated account access, increasing the risk of account compromise, policy violations, and unintended collection of private or personalized data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The note recommending users obtain valid cookies from browser developer tools normalizes credential extraction without any account-safety, privacy, or legal warning. Because the skill is designed for routine, repeated hotlist monitoring, this guidance materially increases the chance that sensitive session tokens will be mishandled, stored insecurely, or used in ways that violate platform restrictions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file presents all instructions, examples, and headings exclusively in Chinese, which effectively forces a specific language for use of the skill. Under the policy, language-specific behavior should either be optional for users or clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Line L024 sets Accept-Language to zh-CN,zh;q=0.9, which forces a specific locale for all outbound requests. The policy requires either user opt-in or clear justification for locale constraints, and this file provides neither.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script explicitly tells users to paste live authentication cookies into source code, which encourages insecure secret handling. This makes credential leakage more likely through version control, file sharing, backups, logs, screenshots, or accidental publication, and those cookies could then be reused to access the user's platform account.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · references/platform-hotlist-api.md (reported line 59)May include surrounding context.

md
def fetch_bilibili():
    """B站热门视频(无需 Cookie)"""
    data = fetch_url("https://api.bilibili.com/x/web-interface/popular?ps=20&pn=1")
    if "error" in data:
        return {"platform": "B站热门", "error": data["error"], "items": []}
    items = []

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · scripts/fetch-hotlist.py (reported line 98)May include surrounding context.

python
def fetch_bilibili():
    """B站热门视频(无需 Cookie)"""
    data = fetch_url("https://api.bilibili.com/x/web-interface/popular?ps=20&pn=1")
    if "error" in data:
        return {"platform": "B站热门", "error": data["error"], "items": []}
    items = []

Static analysis

No suspicious patterns detected.