T08 · Insecure Dependencies
- Location
SKILL.md:193- Finding
Unpinned Global Dependency Installation Creates a Supply-Chain Execution Risk
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This database skill has useful database helpers, but it automatically searches for credentials and relies on risky plaintext and global-install workflows.
Install only if you are comfortable with the agent reading project configuration files for database credentials and connecting to real databases. Prefer supplying a limited, non-production, read-only credential yourself; avoid passing real passwords on the command line; and use a project-local dependency install instead of the documented global npm install.
SKILL.md:193Unpinned Global Dependency Installation Creates a Supply-Chain Execution Risk
SKILL.md:77Automatic Discovery Reads Credential-Bearing Project Configuration Without Explicit Per-Source Approval
SKILL.md:239Database Passwords Are Passed Through Process Command-Line Arguments
scripts/test-connection.ts:22PostgreSQL TLS Requirement Is Discarded During Connection URL Parsing
scripts/describe-table.ts:261SQLite Schema Inspection Interpolates Untrusted Identifiers into PRAGMA Statements
The description presents a broad database operations skill covering connection testing, schema exploration, arbitrary SQL execution, and DDL/DML changes across MySQL/PostgreSQL/SQLite. The actual code only implements one narrow function: describe a specified table's schema. It does connect to the declared database types, but only to fetch metadata for a single table. There is no functionality for executing user-provided SQL, inserting/updating/deleting data, creating or altering schema, or listing tables. This is a material scope mismatch: the declared primary purpose is a general database operations tool, while the code chunk is a table-schema inspection script.
声明描述的是一个较完整的多数据库操作工具,涵盖连接、Schema 浏览、DDL/DML 和多类数据库管理触发场景。但提供的代码片段只包含 test-connection.ts,其核心功能是测试数据库连接并读取版本号,不支持表结构查询、列出表、执行用户 SQL、插入/更新/删除数据或修改 Schema。虽然“测试数据库连接”属于声明触发场景之一,但代码实际主功能明显比声明范围窄,无法代表所宣称的数据库操作工具整体能力,因此存在描述与实际行为不一致。
Referenced artifact was not completely inspected
- ✅ 使用 `scripts/describe-table.ts` 查询实际数据库中的表结构
Referenced artifact was not completely inspected
- ✅ 使用 `scripts/describe-table.ts` 查询实际数据库中的表结构
The skill explicitly instructs the agent to automatically search project files such as .env, application.yml, settings.py, and ORM configs for database connection details before asking the user. This is dangerous because those files commonly contain secrets, and the agent is being directed to discover and use credentials without explicit user consent, expanding access to sensitive data and enabling lateral movement into real databases.
The guidance specifically targets .env and .env.production files, which are high-probability secret stores for production credentials. In the context of a database skill, instructing an agent to inspect these files materially increases the chance of unauthorized credential access and use against live systems.
1. 环境变量文件
- .env, .env.local, .env.development, .env.production
2. 应用配置文件(常见框架)
- **Spring Boot**: application.yml, application.yaml, application.properties
The skill goes beyond locating config files and instructs extraction, placeholder resolution, and normalization of sensitive values including database passwords and full connection URLs. That creates a clear credential-handling vulnerability: it operationalizes secret harvesting and makes it easier for the agent to surface, transform, and potentially leak usable credentials.
The example includes a literal DATABASE_URL with embedded username and password, normalizing the practice of extracting and handling plaintext credentials. In a skill designed to connect to databases, this materially increases the risk of credential disclosure, misuse, and accidental propagation into outputs or follow-on commands.
```env
# .env
DATABASE_URL=mysql://root:secret@localhost:3306/mydb
The natural-language description and operational instructions are presented entirely in Chinese, with no indication that the user may choose another language or that the skill is intentionally limited to a Chinese-speaking context. Under the language/locale policy, a forced language without opt-in can be a policy issue unless explicitly justified.
The activation condition "任何涉及数据库 DDL/DML 操作的请求" is extremely broad and does not define clear boundaries for when the skill should or should not activate. Because it lacks exclusions or a constrained trigger list, it could match a wide range of routine conversation about databases and cause unintended invocation.
Lines L021-L023 present the skill as non-persistent and not writing files, creating an expectation of minimal local side effects for handling connection information. However, L194-L215 instructs global package installation and modification of the shell environment via NODE_PATH, which are persistent host-level changes and contradict the '不写入任何文件/不持久化存储' framing as written.
The examples explicitly place database passwords on the command line and normalize this as standard usage. Command-line secrets can be exposed through shell history, process listings, audit logs, CI job output, and shared terminal recordings, which creates a real credential leakage risk for a database-access skill.
This markdown file includes DROP TABLE IF EXISTS users; and TRUNCATE TABLE users;, which can delete data or schema state, but the surrounding documentation provides no warning about irreversibility, data loss, or the need to verify the target environment first. Under the markdown-specific warning criteria, examples that affect user data or system integrity should be accompanied by clear cautionary language.
The file includes destructive SQL operations such as DELETE and TRUNCATE with no accompanying warning about irreversible data loss, backup requirements, or safe execution practices. In a skill explicitly triggered for live DDL/DML database operations, these examples can be copied directly into production-like contexts and increase the chance of accidental mass deletion.
The documentation includes example commands that place the database password directly on the command line and inside a connection URL. Command-line arguments can be exposed through shell history, process listings, logs, and audit tooling, which can leak credentials to other local users or monitoring systems. In a database-operation skill, this is more dangerous because users are likely to copy-paste the examples verbatim with real production credentials.
The documentation includes destructive SQL examples such as DROP TABLE ... CASCADE and TRUNCATE without adjacent warnings about irreversible data loss or guidance to verify environment/backup status first. In a database-operation skill, users are likely to copy commands directly into real systems, which increases the chance of accidental production data deletion.
This markdown file documents data-modifying and data-deleting SQL operations, including broad updates and deletes such as updating inactive users and deleting multiple rows. Under the markdown-file criteria, the description should warn that these commands can alter or remove user data if run against a real database, but no such warning is present near the examples.
The documentation includes destructive SQLite DELETE examples, including deleting all rows and resetting sqlite_sequence, without any warning about irreversible data loss, backups, or transaction safeguards. In a skill explicitly designed to help users execute DDL/DML against live databases, such examples can be copied directly into production contexts and cause accidental mass deletion.
The usage examples explicitly encourage passing the database password on the command line, which can leak secrets through shell history, process listings, audit logs, and orchestration telemetry. In a database administration skill, exposing credentials is especially risky because those credentials may grant broad access to production data and schema metadata.
The MySQL connection code initiates a network connection using supplied host, user, and password values, and similar behavior exists for PostgreSQL. While connecting to a database is part of the script's purpose, there is no explicit warning in code comments or CLI help that credentials and schema queries will be sent to a remote database server.
This code opens whatever path is supplied in config.database for SQLite, which performs local filesystem access. Although the script header explains usage, it does not warn users that providing a SQLite database path will cause the tool to open and inspect a local file.
The file's natural-language description, usage notes, and output explanation are presented exclusively in Chinese. Under the policy, forcing a specific language without offering a user choice or documenting a justified locale constraint is a natural-language policy violation.
This code opens outbound MySQL connections using host, user, password, and database parameters, which sends potentially sensitive connection data to a remote system. Although network access is central to the script's purpose, the file does not include any user-facing warning or disclosure that credentials and connection metadata will be transmitted to the specified server.
The PostgreSQL client is configured with host, user, password, and database values and then connects to a remote endpoint. The script lacks any comment or user-facing warning that running it will contact an external server and use the provided credentials during that connection attempt.
SQP-3 applies to all file types and covers language or locale policy violations. This file presents all instructions in Chinese only, with no indication that the skill is region-specific or that users may choose another language, which can amount to an undocumented forced language constraint.