Back to skill

Security audit

Database Design

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a database SQL helper, but it has under-disclosed local argument logging and unsafe SQL generation that users should review before use.

Install only if you are comfortable reviewing generated SQL before applying it to any database, especially in automation. Avoid passing secrets, private dataset identifiers, or sensitive paths to the database-design command because one script records arguments locally in plain text.

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

Warning
Location
scripts/db.sh:400
Finding

Unsanitized Identifiers Allow Injection into Generated SQL

Content
View full analysis
Remediation
View remediation
&2 exit 1 fi } ``` 2. Apply validation independently to: - `TABLE` - Every field name parsed from `FIELDS` - The field name parsed from `FIELD` - Every index field - User-supplied `INDEX_NAME` - Automatically generated index names 3. Reject rather than normalize identifiers containing quotes, backticks, semicolons, whitespace, SQL comments, newlines, control characters, or other punctuation. 4. Quote validated identifiers consistently for the selected database engine. Validation should remain mandatory even when quoting is used. 5. Add an engine-aware identifier helper, for example: ```bash quote_identifier() { local identifier="$1" validate_identifier "$identifier" if [[ "$ENGINE" == "postgres" ]]; then printf '"%s"' "$identifier" else printf '`%s`' "$identifier" fi } ``` 6. Do not emit custom index names as unquoted raw text. Validate and pass them through the same quoting helper used for other identifiers. 7. Add regression tests using hostile inputs containing: - Backticks and double quotes - Semicolons - `--` and `/* ... */` comments - Newlines and control characters - Spaces and shell metacharacters - Database reserved words 8. Clearly document that generated SQL must be reviewed before execution and should be applied using a least-privileged database account. This is defense in depth and must not replace validation. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The skill metadata and body prominently present Chinese-language content alongside English, but do not state that language choice is optional or user-selectable. Under the language/locale policy, a skill should not impose a specific language or locale without explicit opt-in or justification.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The module comment and help text describe substantive capabilities such as querying, importing, exporting, transforming, validating, cleaning, and dashboarding data. In implementation, these commands largely just echo messages and call _log, with only minimal line counting or sampling behavior, which contradicts the documented intent of the tool's functionality.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script logs command arguments to a persistent history file without warning the user. If users pass sensitive data such as query contents, file paths, credentials, tokens, or proprietary dataset identifiers as arguments, those values will be stored on disk in plain text and may later be exposed to other local users, backup systems, or support tooling. In the context of a command-line data tool, users may reasonably include sensitive operational data in arguments, which makes this more dangerous.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This shell skill includes user-facing natural-language text in Chinese alongside English, starting in the help banner, without indicating that bilingual output is optional or user-selectable. That can violate a language/locale policy requiring user opt-in rather than forcing a specific locale presentation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The ER-diagram output contains multiple Chinese labels and explanatory strings such as '关系' and '图例' and Chinese relationship notes, but the script does not provide any language selection mechanism. This is a natural-language locale constraint affecting user-facing output across normal operation.

Content

No source excerpt is available for this finding.