Back to skill

Security audit

Db Explorer

Security checks for vulnerabilities and agentic risk

Overview

This database helper is mostly legitimate, but it under-discloses high-impact restore and migration commands and includes unsafe credential and Redis examples.

Review before installing. Use only least-privilege, preferably read-only database accounts unless you explicitly need admin work. Avoid copying examples that put passwords in command lines, do not run restore/import/migration commands without a backup and explicit confirmation, and replace Redis KEYS "*" with bounded SCAN-style inspection.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:49
Finding
Database Credentials Exposed Through Command-Line Arguments## Vulnerability Details **File Location**: `SKILL.md`, lines 49–51 **Vulnerability Type**: Credential exposure through process arguments and shell history **Risk Level**: High ### Vulnerable Code ```bash psql "postgresql://user:password@host:5432/dbname" -c "\dt" # list tables psql "postgresql://user:password@host:5432/dbname" -c "\d table_name" # describe table psql "postgresql://user:password@host:5432/dbname" -c "SELECT count(*) FROM table_name;" ``` Similar unsafe patterns also appear for MongoDB and Redis at lines 65–71, including a password in a MongoDB URI and the Redis `-a password` argument. ### Technical Analysis The documented commands instruct the agent to place database usernames and passwords directly in command-line arguments. If supplied credentials are substituted into these examples, they may become visible in shell history, process listings, terminal transcripts, agent execution logs, audit telemetry, or error reports. This behavior conflicts with the safety rule in the same file stating that passwords must not be placed in history. A connection string does not protect a password when the complete URI is passed as a literal command-line argument. Exploitation requires an attacker to have access to local process information, command history, execution logs, or another system that records agent commands. Once recovered, the credentials can be reused until they expire or are revoked. ### Attack Path 1. A user provides valid database credentials to the agent. 2. The agent substitutes those credentials into one of the documented command templates. 3. The command is executed with the plaintext password in its argument vector. 4. Shell history, process monitoring, terminal capture, or agent telemetry records the command. 5. An attacker with access to one of those sources extracts the credentials. 6. The attacker connects to the database and performs operations allowed by the compromised ac ...[truncated 632 chars]
Remediation
## Remediation Suggestions - Remove examples that embed passwords in connection URIs or command-line options. - Use database-specific protected credential mechanisms: - PostgreSQL: a permission-restricted `.pgpass` file or interactive password prompt. - MySQL: `mysql_config_editor` and encrypted login paths. - MongoDB: an interactive password prompt or a protected configuration mechanism. - Redis: a protected configuration file or another client-supported mechanism that avoids exposing secrets in process arguments. - Set credential-file permissions to `0600` and delete temporary files immediately after use. - Disable command history for sensitive operations where feasible and prevent agent telemetry from recording secrets. - Redact credentials from commands, errors, transcripts, and audit logs. - Use short-lived, read-only credentials with access restricted to the required database and network source. - Add an explicit rule prohibiting literal credentials in both URLs and command-line options.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:71
Finding
Unbounded Redis Key Enumeration Can Degrade Production Availability## Vulnerability Details **File Location**: `SKILL.md`, line 71 **Vulnerability Type**: Unsafe blocking keyspace enumeration **Risk Level**: Medium ### Vulnerable Code ```bash redis-cli -h host -p 6379 -a password KEYS "*" ``` ### Technical Analysis Redis `KEYS "*"` traverses the entire selected keyspace and can block the server's event loop while the operation runs. Its execution time grows with the number of keys, making it unsuitable for routine exploration against large or latency-sensitive production instances. The command is unbounded and contradicts the skill's general requirement to limit query results. In addition to availability risk, returning every key name may disclose tenant identifiers, session identifiers, email addresses, internal object names, or other sensitive metadata encoded in naming conventions. An attacker does not gain new Redis privileges through this command; exploitation requires credentials that already permit execution of `KEYS`. However, an agent following the documented workflow can unintentionally cause service degradation within the authorized environment. ### Attack Path 1. The agent connects to a production Redis instance using credentials that permit the `KEYS` command. 2. The selected logical database contains a large number of keys. 3. The agent follows the skill documentation and executes `KEYS "*"`. 4. Redis performs a synchronous traversal of the full keyspace. 5. Other client requests experience increased latency or timeouts while the operation runs. 6. The full list of key names is returned to the terminal or agent transcript, potentially exposing sensitive metadata to anyone with access to that output. ### Impact Assessment The primary impact is reduced Redis availability, including elevated latency, request timeouts, and temporary disruption of applications that depend on the affected instance. The severity depends on keyspace size, server resources, request volume, ...[truncated 316 chars]
Remediation
## Remediation Suggestions - Replace `KEYS "*"` with cursor-based `SCAN`, for example: ```bash redis-cli --scan --count 100 ``` - Enforce a maximum number of keys collected and stop scanning after the configured limit. - Require explicit confirmation before broad enumeration of a production keyspace. - Allow users to supply a narrow match pattern instead of defaulting to all keys. - Redact or avoid retaining key names that contain sensitive identifiers. - Configure Redis ACLs to deny `KEYS` to routine exploration accounts when it is not required. - Use a read-only replica for extensive diagnostics where available. - Document that the `COUNT` value is a work hint rather than a strict result limit, and implement client-side bounds.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Intent-Code Divergence

High
Confidence
98% confidence
Finding
The safety section promises read-only-by-default behavior and explicit confirmation for writes, but later sections provide direct restore/import commands that bypass those safeguards in the documentation itself. In an agent setting, contradictory guidance is dangerous because operational examples often get followed more readily than policy text, leading to unintended writes or destructive restores.

Missing User Warnings

High
Confidence
96% confidence
Finding
The backup, restore, and migration sections include commands that can overwrite data, import rows, or alter system state, yet the skill description does not prominently warn that it supports irreversible operations. In a tool intended for agent use, burying destructive capability deep in the document increases the chance of accidental execution without informed consent or appropriate safeguards.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The activation cues are broad enough to match common requests like checking data, debugging issues, or showing database contents, which can cause the skill to trigger in situations where the user did not intend direct database access. Because this skill can expose sensitive schema/data and includes write-oriented instructions elsewhere, overbroad activation meaningfully raises the risk of unintended high-privilege actions.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The skill is marketed as a database exploration/query/export tool, but it also embeds restore and migration commands that can modify or overwrite data. This mismatch increases the chance an agent or user invokes the skill under a read-oriented mental model while being exposed to destructive workflows not clearly scoped in the manifest.

Static analysis

No suspicious patterns detected.