Back to skill

Security audit

数据库实例巡检与报告生成

Security checks for vulnerabilities and agentic risk

Overview

The skill has a legitimate database-inspection purpose, but its broad automatic triggers and unsafe command templates need review before use.

Review this skill before installing in an environment with database access. Use it only where dbskiter is trusted and configured for intended databases, require explicit database target confirmation, and ensure the agent runs dbskiter with structured arguments or strict input validation rather than interpolating names into a shell command.

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

Error
Location
SKILL.md:18
Finding

Unvalidated Database Name Interpolation May Enable Shell Command Injection

Content
View full analysis
inspector run dbskiter --output-mode=ai --database= inspector report --output report.html dbskiter --output-mode=ai --database= inspector baseline --create dbskiter --output-mode=ai --database= inspector intelligent dbskiter --output-mode=ai --database= inspector anomalies --metric=cpu_usage dbskiter --output-mode=ai --database= inspector root-cause --issue="CPU飙升" ``` Equivalent unquoted database-name placeholders also appear throughout the command examples and decision flows in `SKILL.md`. ### Technical Analysis The Skill instructs an Agent to replace `` with a user-selected database name and execute the resulting command. It does not require validation, shell-safe quoting, or execution through a structured process API. If an Agent constructs a command string and passes it to a shell, metacharacters in the database name can terminate or alter the intended `dbskiter` command. For example, a database name shaped like: ```text prod; attacker-command ``` could produce a command equivalent to: ```bash dbskiter --output-mode=ai --database=prod; attacker-command inspector run ``` The shell would treat the semicolon as a command separator. Exploitability therefore depends on whether the consuming Agent accepts an attacker-controlled database name and executes the generated string through a shell. The document does not establish a safe boundary against that behavior. ### Attack Path 1. An attacker asks the Agent to inspect a database and supplies a database name containing shell metacharacters and an additional command. 2. The Agent substitutes the supplied value for `` as directed by the Skill. 3. The Agent executes the assembled command thr ...[truncated 946 chars]
Remediation
View remediation
` must be validated and supplied as one process argument. 5. If a shell is unavoidable, apply platform-appropriate quoting after validation. Quoting alone should not replace input validation. 6. Add negative tests covering semicolons, pipes, ampersands, redirections, backticks, `$()` substitutions, embedded quotes, spaces, and newline injection. 7. Apply the same structured argument handling to other user-derived parameters, including issue descriptions, metric JSON, anomaly JSON, output paths, and time horizons. ]]>
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger phrase "巡检" is very broad and can match many ordinary user requests without confirming the user wants this specific database-inspection skill. In an agent setting, that can cause unintended command execution against a database context, especially because the documented action immediately runs an inspection command rather than asking for clarification.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The phrase "生成报告" is generic and could refer to many unrelated report-generation tasks, yet the skill maps it directly to a database inspection report command. This increases the chance of accidental invocation and unintended access to database inspection data or report output.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs activation whenever listed keywords are mentioned, but it does not define boundaries, exclusions, or disambiguation rules. In a command-executing agent, keyword-only routing is dangerous because incidental mentions can trigger sensitive operational actions such as running inspections, generating reports, or baseline creation without sufficient user intent verification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The natural-language content throughout the file assumes Chinese-language interaction and does not indicate that users may choose another language or that the skill is intentionally limited to a Chinese-speaking environment. Under the policy, forcing a specific language without opt-in can be a locale/language policy issue.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.