Middleware Query

PassAudited by ClawScan on May 10, 2026.

Overview

The skill is coherent for read-only database querying, but it intentionally handles database credentials and data, and may optionally send query prompts to OpenAI.

This skill appears benign and purpose-aligned. Before installing or using it, configure only least-privileged read-only database accounts, keep connection files private, review generated query plans for broad reads, and avoid enabling the OpenAI planner if database-related prompt text must stay local.

Findings (4)

Artifact-based informational review of SKILL.md, metadata, install specs, static scan signals, and capability signals. ClawScan does not execute the skill or run runtime probes.

What this means

If configured with broad or production credentials, the agent can read sensitive database records through this skill.

Why it was flagged

The skill intentionally uses database usernames and passwords to access MySQL, Redis, and MongoDB. This is expected for the stated purpose, but it grants read access to whatever those accounts can see.

Skill content
Require all connection parameters explicitly for each datasource: `host`, `port`, `username`, `password` ... Store connection profiles in `scripts/connections.json`
Recommendation

Use dedicated read-only, least-privileged database accounts; avoid production credentials unless necessary; keep `connections.json` private.

What this means

Database-related query text may leave the local environment if the optional OpenAI planner is enabled.

Why it was flagged

When `OPENAI_API_KEY` is present, the LLM planner sends the natural-language request and default profile names to OpenAI. The code does not send database credentials or query results here, but the prompt itself may contain sensitive schema, key, or business context.

Skill content
client = OpenAI(api_key=api_key) ... {"role": "user", "content": prompt}
Recommendation

Do not set `OPENAI_API_KEY` for highly sensitive local-only use, or avoid putting secrets and sensitive record values in natural-language prompts.

What this means

A generated or user-provided read query could retrieve more database data than intended if the configured account has broad access.

Why it was flagged

The SQL executor runs user/planner-provided SQL after a read-only regex and denylist check. This is central to the skill and not hidden, but broad SELECT queries can still expose large amounts of accessible data.

Skill content
validate_sql(args.sql) ... cur.execute(sql)
Recommendation

Review generated plans for sensitive queries, keep database permissions narrow, and prefer explicit limits and scoped tables/collections.

What this means

Query-plan details may remain on disk after the command finishes.

Why it was flagged

The one-command workflow writes the generated query plan to a temporary file with deletion disabled. The plan may include profile names, table/collection/key names, filters, or SQL text.

Skill content
tempfile.NamedTemporaryFile(prefix="mw-plan-", suffix=".json", delete=False)
Recommendation

Clean up temporary `mw-plan-*.json` files when queries contain sensitive names or filters, and avoid saving plans unless needed.