Back to skill

Security audit

品牌GEO分析

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it claims, but its generated HTML report can include unsafe unescaped content and misleading sentiment text.

Review carefully before installing. Use only non-confidential brand, competitor, and query data unless you are comfortable sending it through RedFox and the named AI search platforms. Treat generated reports as untrusted HTML until escaping, URL validation, and the hard-coded sentiment summary are fixed.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
scripts/lib/report_template.py:195
Finding

Stored HTML Injection in Generated Reports

Content
View full analysis
报告摘要 · {brand}

综合评估: {brand} 跨平台GEO综合得分 {geo_o} 分,{grade_text}。品牌提及率 {mr_pct}%({total_mentioned}/{total_completed} 条回答提及),正面率 100%(无负面评价)。在 {_pct(int(mr_overall*100),100) if mr_overall else 0}% 的有效回答中被主动推荐或提及,整体品牌认知度{'较高' if mr_pct >= 50 else '有待提升'}。

各平台表现:
{platform_html}

竞品格局: AI回答中高频出现的竞品包括{comp_text}等,竞争环境较为拥挤。

发力方向: {directions_text}。

""" ``` An additional unescaped interpolation occurs in the source-analysis section: ```python if any(any(kw in d.lower() for kw in brand_keywords) for d, _ in top_domains): brand_note = f'* {brand} 品牌官网' ``` ### Technical Analysis The report generator constructs HTML through Python f-string interpolation. The `brand` value originates from the user-controlled `--brand` command-line argument. The `comp_text` value is assembled from competitor names, including names discovered through AI analysis of remote search responses. These values are inserted directly into HTML without passing through the existing `_esc()` escaping function. As a result, HTML metacharacters remain active markup rather than being rendered as text. For example, a malicious brand value containing an HTML element with an event handler could be written directly into `geo_report.html`. The same issue may arise if an external AI response causes a malicious string to be accepted as a discovered competitor name. This is a stored injection because the malicious value is persisted in the generated report and becomes ...[truncated 1250 chars]
Remediation
View remediation
`, `"`, `'`, event-handler attributes, and closing tags. 5. Apply a restrictive Content Security Policy, preferably disallowing inline scripts and limiting network destinations. 6. Treat AI-derived structured fields as untrusted input even when an agent has converted them into JSON. 7. Apply `_esc(brand)` to the interpolation at line 862 and audit all other template interpolations for consistent contextual encoding. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/lib/report_template.py:848
Finding

Unvalidated Citation URLs Embedded in Report Links

Content
View full analysis
{i+1}{title}{count}' ``` ### Technical Analysis Citation URLs originate from remote search API responses and are inserted into anchor `href` attributes. The code applies HTML escaping, but escaping is not equivalent to URL validation. HTML escaping can prevent quotation-mark attribute breakout, but it does not reject dangerous or unexpected schemes such as `javascript:`, `data:`, or custom protocol handlers. It also does not establish whether the destination belongs to a trustworthy website. Consequently, a malicious or compromised upstream response can place a hostile URL in the generated report. Browser handling of active schemes varies, but the report currently provides no scheme-level security boundary. ### Attack Path 1. A search provider, compromised upstream service, or manipulated source result supplies a malicious citation URL. 2. `extract_result()` stores the URL in `search_results.json`. 3. `_collect_sources()` propagates it to the report source data. 4. `_render_sources_analysis()` HTML-escapes the string but performs no URL parsing or scheme validation. 5. The URL is inserted into an `href` attribute. 6. The user clicks the citation in the generated report. 7. The browser navigates to or invokes the attacker-controlled destination or protocol, subject to browser policy. ### Impact Assessment Exploitation requires user interaction with the citation link. It can lead to phishing, deceptive navigation, exposure to attac ...[truncated 291 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:27
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis
Remediation
View remediation
``` 2. Generate and verify package hashes, for example with a locked requirements file using `--require-hashes`. 3. Install only from an explicitly trusted package index. 4. Review and pin transitive dependencies where reproducible builds are required. 5. Use an isolated virtual environment rather than modifying the global Python environment. 6. Establish a regular dependency-update process that includes vulnerability scanning and review before changing pinned versions. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (21)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/lib/analyzer.py (reported line 377)May include surrounding context.

python
请确保输出是合法 JSON,不要包含注释或额外文本。"""

    return prompt


def merge_analysis(deterministic, ai_analysis):

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The README explicitly says the skill can be invoked through unrestricted natural language with 'no commands to memorize,' which creates overly broad activation criteria. In an agent ecosystem, this increases the chance the skill will trigger on ordinary user requests about brands, search visibility, or analysis, causing unintended external queries and report generation with the user's context.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README instructs users to invoke the skill with very broad natural-language phrases such as general GEO, AI search optimization, and brand visibility requests, without defining boundaries, confirmation steps, or exclusions. This can cause the skill to activate in unintended contexts and trigger external multi-platform queries or report generation from ambiguous user input, increasing the chance of unauthorized data processing or accidental use.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill instructs the agent to access environment variables, read and write local files, and perform networked requests to external services, but it declares no explicit tool scope or permissions boundary. Without a declared allowlist, an integrating runtime may grant broader-than-expected capabilities, increasing the chance of unintended data access or exfiltration if the skill is misused or later modified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The workflow sends user-provided brand names, industry/category data, competitors, and generated or user-supplied questions to third-party AI search platforms, but the skill description does not clearly warn users of this external transmission. This creates a privacy and consent risk, especially when the analyzed brand strategy, competitor set, or custom queries are sensitive business information.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The module docstring, CLI description, help text, and runtime guidance are written exclusively in Chinese, which imposes a specific language on users without any opt-in or alternative locale support. This matches the language/locale policy violation category because the file gives no indication that the tool is region-specific or that users can choose another language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code file includes natural-language usage and output descriptions entirely in Chinese, and the CLI help strings later continue that pattern. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Argument help text, error output, and progress messages are all emitted only in Chinese. This imposes a fixed language on users of the skill without presenting a choice or documenting a justified region-specific limitation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The docstring, CLI descriptions, and runtime messages are presented only in Chinese, with no indication that the user can choose another language. This creates a language-policy issue because the skill imposes a locale/language constraint rather than offering an explicit opt-in or alternative.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The function builds a user-facing prompt entirely in Chinese and gives no mechanism for selecting another language or locale. Because this prompt text directly controls downstream agent behavior, the hardcoded locale is a clearer policy issue than internal comments alone.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

The function transmits raw user-supplied queries to a third-party service at redfox.hk, which likely relays them onward to multiple external AI/search providers. In a brand-analysis context, those queries may contain sensitive business intelligence, campaign plans, or proprietary brand-monitoring terms, creating a real data exposure risk if users are not informed or if data minimization is absent.

Content

Scanner excerpt · scripts/lib/platforms.py (reported line 79)May include surrounding context.

python
url = f"{API_BASE}{config['submit_path']}"

    for attempt in range(max_retries + 1):
        resp = requests.post(
            url,
            json={"inquiry_text": query, "source": source or SOURCE_TAG},
            headers=_get_headers(),

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The submit() function sends the user's query and source tag to an external service via HTTPS, and poll() later sends task identifiers, but the code provides no print/log statement, confirmation prompt, or comment/docstring warning that user-provided data is transmitted off-host. For this file type, outbound network transmission of user or system data should have some visible disclosure unless clearly covered elsewhere.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

The polling request sends task identifiers to the same external service, which is an additional outbound data flow. While task IDs are generally less sensitive than the original query, they can still function as correlators that link user activity across requests and may expose metadata about analyses if intercepted or mishandled by the third party.

Content

Scanner excerpt · scripts/lib/platforms.py (reported line 118)May include surrounding context.

python
config = PLATFORMS[platform]
    url = f"{API_BASE}{config['result_path']}"

    resp = requests.post(
        url,
        json={"taskId": task_id},
        headers=_get_headers(),

Tainted flow: 'task_id' from requests.post (line 88, network input) → requests.post (network output)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/lib/platforms.py (reported line 118)May include surrounding context.

python
config = PLATFORMS[platform]
    url = f"{API_BASE}{config['result_path']}"

    resp = requests.post(
        url,
        json={"taskId": task_id},
        headers=_get_headers(),

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The summary HTML hard-codes the statement '正面率 100%(无负面评价)' instead of deriving it from the actual sentiment counts. This can misrepresent negative results to users, causing false trust in the report and undermining decision-making based on the analysis output. In a brand-analysis skill, report integrity is security-relevant because users may act on inaccurate reputational assessments.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The main instructions and examples are written entirely in Chinese, which can amount to a language constraint if this README is used as the operational skill description. While alternate language links are present, the skill text does not explicitly state that users may interact in their preferred language or that output language is configurable.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill writes raw search results, intermediate analyses, and a final HTML report to local output files, but it does not clearly warn users that third-party AI responses and derived analysis artifacts will be persisted on disk. This can expose sensitive prompts, brand intelligence, or externally sourced content to other local users, backup systems, or later unintended reuse.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

该 markdown 文档全文以中文编写,未见任何提供语言/地区选择、双语说明或适用范围限定的自然语言声明。根据规则,若技能内容实际上强制特定语言而没有用户选择或明确合理性说明,可视为语言/locale 策略问题。

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script persists raw user queries and third-party platform responses to a JSON file on disk by default, which can expose sensitive business questions, internal research topics, or personal data to anyone with filesystem access or to later processes that reuse the output directory. In this GEO-analysis context, the collected content is likely to include potentially confidential brand-monitoring inputs and external responses, so silent persistence creates a real privacy and data-retention risk even though it is not an exploit primitive by itself.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

This Python file contains natural-language documentation and AI prompt content entirely in Chinese, and the generated analysis prompt instructs the agent in Chinese only. The file does not offer a language choice or explain that the skill is intentionally limited to a Chinese-language or region-specific context, which can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code hardcodes the generated document language as zh-CN, which enforces a specific locale for all rendered reports. The file also consistently uses Chinese-only UI text and does not offer a user opt-in or locale selection mechanism, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.