Back to skill

Security audit

投放数据分析

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent ad and financial data reporting skill, but it needs review because it writes raw, unescaped business data into local HTML reports and recursively loads input files without effective limits.

Review before installing if your input folder can contain files from other people or sensitive financial records. Use a narrow data directory, avoid opening generated HTML from untrusted spreadsheets until values are escaped, and prefer pinned dependencies or a lockfile.

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

Warning
Location
reporter.py:87
Finding

Stored HTML Injection Through Unescaped Report Data

Content
View full analysis
投放数据分析报告 - {date_range} ...

📊 投放数据分析报告

日期范围: {date_range} | 生成时间: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}
...

🔍 数据样本

超级直播数据(前5行)

text
{super_df.head().to_string() if not super_df.empty else '无数据'}

淘宝直播数据(前5行)

text
{taobao_df.head().to_string() if not taobao_df.empty else '无数据'}

财务报表数据(前5行)

text
{financial_df.head().to_string() if not financial_df.empty else '无数据'}
""" ``` ### Technical Analysis The HTML report is assembled through direct string interpolation. Spreadsheet cell values are converted to text with `DataFrame.to_string()` and inserted inside `
text
` elements without HTML escaping. The externally supplied `date_range` value is also embedded in the document title and body without validation or escaping.

The `
text
` element does not neutralize HTML markup. A malicious CSV cell containing a payload such as:

```html
text
```

closes the existing element and introduces an executable script. Because the resulting payload is stored in the generated report, it executes when a user opens that HTML file in a browser.

The generated document also lacks a Content Security Policy, so there is no secondary browser-side control preventing inline script execution.

### Attack Path

1. An attacker creates or modifies a CSV file whose fi
...[truncated 1383 chars]
Remediation
View remediation
``` 5. Add regression tests containing ``, `

T09 · Insecure Skill Coding Practices

Warning
Location
data_processor.py:48
Finding

Unbounded Recursive File Loading Enables Resource Exhaustion

Content
View full analysis
Remediation
View remediation
max_bytes: raise ValueError(f"File exceeds maximum size: {file_path}") ``` 2. Impose explicit limits on: - Number of discovered files. - Directory recursion depth. - Aggregate input size. - Maximum rows and columns. - Elapsed processing time. - Generated report size. 3. Process CSV files incrementally: ```python chunk_size = CONFIG["PERFORMANCE_CONFIG"]["chunk_size"] for chunk in pd.read_csv(file_path, encoding=enc, chunksize=chunk_size): process_chunk(chunk) ``` 4. Avoid retaining every complete DataFrame before concatenation. Aggregate required metrics incrementally or write normalized intermediate results to bounded storage. 5. Resolve every discovered path and verify that it remains beneath the approved data directory. Reject symbolic links where they are not explicitly required. 6. Run parsing in an isolated worker with operating-system or container limits for memory, CPU time, file size, and process lifetime. 7. Add tests with oversized files, excessive file counts, deeply nested directories, and long-running inputs to confirm that configured limits are actively enforced. ]]>

T08 · Insecure Dependencies

Note
Location
requirements.txt:4
Finding

Unpinned Dependencies Allow Unreviewed Future Package Versions

Content
View full analysis
=1.5.0 numpy>=1.21.0 chardet>=5.0.0 openpyxl>=3.0.0 # 用于Excel文件支持 python-dateutil>=2.8.0 tqdm>=4.60.0 # 进度条显示 ``` The documented installation command executes this unconstrained resolution: ```bash pip install -r requirements.txt ``` ### Technical Analysis Every dependency specifies only a minimum version and has no upper bound, exact version, lock file, or package hash. As a result, two installations performed at different times can install materially different package versions that were not part of the audited project. The dependencies use conventional package names and no evidence of typosquatting, dependency confusion, or a currently malicious package was identified. The weakness is that future releases are trusted automatically. If a dependency account, release process, or distribution artifact is compromised, a subsequent installation may retrieve and execute that artifact without a project-level integrity check. Python packages can execute code during installation, import, or normal use. Dependency integrity is therefore part of the Skill's execution boundary. ### Attack Path 1. A future dependency release is compromised, malicious, or otherwise unsafe. 2. A user runs `pip install -r requirements.txt`. 3. The `>=` constraints allow the package resolver to select the new release. 4. No lock file or cryptographic hash detects that the installed artifact differs from the reviewed dependency set. 5. Package-controlled code executes during installation, import, or subsequent Skill operation. ### Impact Assessment The exact impact depends on the compromised dependency. Package code generally runs with the privileges of the user installing or invoking the Skill and could potentially: - Read or modify files accessible to that user. - Access t ...[truncated 350 chars]
Remediation
View remediation
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (25)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file consistently presents the skill name, instructions, inputs, outputs, and examples only in Chinese. Per the policy, forcing a specific language without user opt-in or documented justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The module docstring presents the skill entirely in Chinese, and all user-facing output strings in this file are also Chinese-only. For a general-purpose skill, this imposes a specific language/locale without any visible opt-in or documented regional justification, which matches the language policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
77% confidence
Finding

The module docstring and all human-readable configuration labels are written only in Chinese, which can function as a language constraint for operators or downstream users reading the skill. The policy requires flagging natural-language locale restrictions when no user choice or justified region-specific limitation is documented.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains natural-language documentation and user-facing status/error messages in Chinese, beginning with the module docstring. Under the policy rule, forcing a specific language without user opt-in or a documented regional justification is a locale-policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module description and generated report content are written entirely in Chinese, indicating the skill is designed to present outputs in a fixed language. There is no visible opt-in, language selection mechanism, or documented justification for restricting output language.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The HTML report persists sampled rows from all three source dataframes directly to disk, including raw financial and business data, with no masking, minimization, or explicit consent flow. In a reporting skill, this creates a real confidentiality risk because the generated file may be shared, stored insecurely, or opened in a browser by unintended recipients.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language title, docstring, and user-facing output are entirely in Chinese, which imposes a specific language on users without any opt-in or documented locale constraint. Under the policy, language-specific behavior should either offer user choice or clearly justify the locale restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The entire skill documentation is presented only in Chinese, and there is no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking or region-specific audience. This can violate language/locale policy when a skill implicitly forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill states that it generates reports and explicitly mentions saving an HTML summary report to the desktop, but it does not clearly warn users about local file creation and where outputs will be written before execution. This can surprise users, expose sensitive business data in predictable local locations, and increase the chance of unintended disclosure on shared or monitored systems.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code file contains natural-language text exclusively in Chinese, including the module description and function docstrings, with no indication that the skill is region-specific or that users may choose another language. Under the locale-policy rule, forcing a specific language without opt-in is a policy concern even when it appears only in comments or documentation strings.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file-level natural-language description is entirely in Chinese and presents the skill as a Chinese-language skill without offering any language or locale choice. The policy requires flagging language or locale constraints when they are imposed without user opt-in or explicit justification.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

No manifest is available, so there is no declared purpose or capability baseline that would justify reading environment variables. The code explicitly pulls execution parameters from the environment, which is a broader capability than simple in-process data analysis and is not documented in the module docstring.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The function exports report data to CSV files in the output directory, which is a file write operation. The code contains only an internal docstring and no confirmation prompt, user-visible notice, or clear disclosure that multiple CSV artifacts will be created on disk.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
93% confidence
Finding

The dependency is specified with a lower bound only, so installations may resolve to different versions over time. This weakens reproducibility and makes it harder to verify whether deployed environments are using secure releases, increasing supply-chain risk if a bad or vulnerable version is selected indirectly.

Content

Scanner excerpt · requirements.txt (reported line 4)May include surrounding context.

text
# 投放数据分析技能依赖
# 基于《数据分析基础概念和逻辑v3.md》开发

pandas>=1.5.0
numpy>=1.21.0
chardet>=5.0.0
openpyxl>=3.0.0  # 用于Excel文件支持

Unverifiable Dependency: pandas has 1 known advisory(ies) (CVE-2020-13091 (** DISPUTED ** pandas through 1.0.3 can unserialize and execute commands from an)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
84% confidence
Finding

The manifest does not pin pandas, and pandas has known advisories affecting some versions, so the security status of the actually installed release cannot be verified from this file alone. In this context, the risk is limited because the requirement sets a minimum version above the cited disputed CVE range, but the lack of exact pinning still prevents firm assurance.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
93% confidence
Finding

Using an unpinned minimum version for numpy allows environment-dependent resolution to newer or unexpected versions. This creates non-reproducible builds and prevents clear assurance that only vetted package versions are installed.

Content

Scanner excerpt · requirements.txt (reported line 5)May include surrounding context.

text
# 基于《数据分析基础概念和逻辑v3.md》开发

pandas>=1.5.0
numpy>=1.21.0
chardet>=5.0.0
openpyxl>=3.0.0  # 用于Excel文件支持
python-dateutil>=2.8.0

Unverifiable Dependency: numpy has 16 known advisory(ies) (CVE-2014-1859 (Numpy arbitrary file write via symlink attack); CVE-2021-41495 (NumPy NULL Pointer Dereference); CVE-2021-33430 (NumPy Buffer Overflow (Disputed)) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
88% confidence
Finding

numpy has multiple historical advisories, but the file only specifies a minimum version, so it is impossible to determine whether deployed environments are using affected or fixed releases. This is primarily an auditability and dependency-governance weakness rather than evidence of a currently exploitable issue in the file itself.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
92% confidence
Finding

The chardet requirement is not pinned to an exact version, so dependency resolution can vary across installations. That increases uncertainty in behavior and security posture, especially when reproducing builds or investigating incidents.

Content

Scanner excerpt · requirements.txt (reported line 6)May include surrounding context.

text
pandas>=1.5.0
numpy>=1.21.0
chardet>=5.0.0
openpyxl>=3.0.0  # 用于Excel文件支持
python-dateutil>=2.8.0
tqdm>=4.60.0  # 进度条显示

Unverifiable Dependency: openpyxl has 2 known advisory(ies) (CVE-2017-5992 (Improper Restriction of XML External Entity Reference in Openpyxl); CVE-2017-5992 (Openpyxl 2.4.1 resolves external entities by default, which allows remote attack)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
90% confidence
Finding

openpyxl has known security issues in some versions, and the lack of exact version pinning means the installed package could vary and may be difficult to assess. Because this skill appears to support Excel processing, library safety matters, but this file alone does not prove an exploitable vulnerable version is in use.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
92% confidence
Finding

python-dateutil is declared with only a minimum version, which means different installs may pull different releases. This is a supply-chain hygiene issue because it complicates auditing and can unintentionally introduce vulnerable or incompatible versions.

Content

Scanner excerpt · requirements.txt (reported line 8)May include surrounding context.

text
numpy>=1.21.0
chardet>=5.0.0
openpyxl>=3.0.0  # 用于Excel文件支持
python-dateutil>=2.8.0
tqdm>=4.60.0  # 进度条显示

# 可选依赖(用于高级功能)

Unverifiable Dependency: tqdm has 4 known advisory(ies) (CVE-2024-34062 (tqdm CLI arguments injection attack); CVE-2016-10075 (TDQM Arbitrary Code Execution); CVE-2016-10075 (The tqdm._version module in tqdm versions 4.4.1 and 4.10 allows local users to e) +1 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
90% confidence
Finding

tqdm has advisories affecting some versions, and the manifest does not pin an exact release, so the resolved version cannot be verified as safe. The package is likely used only for progress display, which limits contextual danger, but the absence of version control still adds avoidable supply-chain uncertainty.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The module docstring describes the skill as a simplified data analysis tool focused on core functionality. However, the implementation not only analyzes data but also persists results by creating a text report on the local filesystem at L67-L82, which is an additional side effect not reflected in the documentation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The script writes a file to the user's Desktop without prior notice or consent, creating an unexpected side effect on the local system. In this context the write is limited to a text report and a fixed path, so the risk is low, but it can still violate user expectations and potentially expose sensitive business metrics in a highly visible location.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

This Python file contains user-facing natural-language strings and docstrings entirely in Chinese, including the module description and function description, with no indication that the skill is region-specific or that users can choose a language. The policy requires flagging language or locale constraints when a skill effectively forces a language without user opt-in or clear justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This Python file contains user-facing natural-language strings exclusively in Chinese, including the title, instructions, and usage output. Under the language/locale policy rule, forcing a specific language without user opt-in can be a policy violation when no justification or alternative is provided.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.