T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/duckdb_analyzer.py:547- Finding
Unrestricted DuckDB SQL Execution Permits Unauthorized Filesystem and Database Access
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent DuckDB data-analysis tool, but it exposes broad local SQL, file-read, file-write, and persistence behavior without enough containment.
Install only if you are comfortable giving this skill broad local DuckDB authority over files and writable output paths. Use it on trusted datasets, avoid untrusted SQL or hostile file headers, prefer preview/query output before saving, and treat CSV/Excel exports and persistent DuckDB files as potentially sensitive retained data.
scripts/duckdb_analyzer.py:547Unrestricted DuckDB SQL Execution Permits Unauthorized Filesystem and Database Access
scripts/duckdb_analyzer.py:316SQL Injection Through Unquoted Paths, Table Names, and Dataset Column Names
scripts/duckdb_analyzer.py:739Spreadsheet Formula Injection in CSV and Excel Exports
The skill documents capabilities to export query results and persist data to a DuckDB database, which implies file-write behavior, but it declares no explicit tool scope or permissions boundary. In an agent environment, this can lead to unintended writes to local files or databases without clear authorization controls, increasing the risk of data leakage, overwriting files, or persistence of sensitive data.
The trigger conditions are broad enough to match many generic data-analysis requests, so the skill may activate in situations where the user did not specifically intend SQL execution, file handling, or persistence. Over-broad activation increases the chance of unnecessary access to user data, accidental query execution, or unexpected file output in contexts where safer or narrower tools should be used.
The skill advertises output export and DuckDB persistence features without a prominent warning that these operations write to disk. Users or higher-level agents may assume analysis is ephemeral, but the skill can create result files or database artifacts that persist sensitive data and may be accessible later.
The export examples encourage saving query results in multiple formats but do not warn that the exported content may include sensitive or regulated data from the source dataset. This omission can lead to inadvertent exfiltration, insecure storage, or broader distribution of confidential records through generated CSV, Excel, JSON, or Parquet files.
The file title and all user-facing guidance are written entirely in Chinese, with no indication that other languages are supported or that the Chinese-only requirement is optional. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale restriction is clearly justified.
The manifest describes the skill as applicable to CSV/JSON/Parquet/Excel and related data analysis tasks. This file's FAQ explicitly states that the current version does not directly support Excel files, creating a direct contradiction between the documented capability and the skill's stated intent.
This code file contains natural-language descriptions, help text, and runtime output exclusively in Chinese, beginning with the module docstring and continuing throughout the CLI interface. Under the policy, forcing a specific language without offering a user choice is a natural-language policy violation.
The script can write imported data into a persistent DuckDB database and can also export query results to arbitrary output paths on disk. For a skill presented as a query/analysis tool, these side effects materially expand its capability from transient analysis to local data retention and file creation, which can leak sensitive data or violate least-privilege expectations if users assume in-memory processing only.
Allowing persistent database/table creation is not inherently malicious, but it is a meaningful expansion of capability beyond simple ad hoc querying. In an agent context, storing imported datasets as real tables can create unintended long-term retention, cross-session data exposure, or accumulation of sensitive data without strong justification or controls.
The natural-language description is written entirely in Chinese and the document consistently assumes Chinese-language interaction, examples, and output conventions. There is no indication that users may choose another language or locale, which can violate language or locale policy when no opt-in is provided.