Back to skill

Security audit

Database Schema Differ

Security checks for vulnerabilities and agentic risk

Overview

This schema tool is not malicious, but it needs review because it encourages unsafe database credential handling and overstates capabilities the code does not implement.

Review before installing. Do not paste real database passwords into command-line URLs, prefer SQL files or secret-managed connection methods, and manually inspect any generated migration before applying it to a database. Treat the advertised live-database and visual/history features as unreliable in this version.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:57
Finding

Database Credentials Exposed Through Command-Line Arguments

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:57-66; additional examples at SKILL.md:75-78, README.md:16-22, and README.md:47-48
Vulnerability Type: Plaintext sensitive data in process arguments
Risk Level: Medium

Vulnerable documentation snippet:

bash
# Compare two database connections
python3 scripts/main.py compare postgresql://user:pass@host1/db postgresql://user:pass@host2/db

# Generate migration script from schema differences
python3 scripts/main.py diff dev_db.sql prod_db.sql --output migration.sql

# Create schema snapshot for future comparison
python3 scripts/main.py snapshot postgresql://user:pass@host/db --save snapshot.json

Technical Analysis

The documented interface instructs users to embed database usernames and passwords directly in positional command-line arguments. Command-line arguments are commonly exposed through shell history, process inspection utilities, operating-system process metadata, CI/CD logs, terminal recordings, and command-auditing systems.

The CLI accepts these values as ordinary strings. Although the current implementation does not support live database connections, users following the advertised interface may still provide genuine production credentials. This makes disclosure possible without requiring successful database connectivity.

Attack Path

  1. A user follows the documented example and substitutes a real database username and password into the connection URL.
  2. The shell records the complete command in its history, or a CI/CD system records it in job logs.
  3. While the process is running, another authorized local user or monitoring process may inspect its command-line arguments.
  4. An attacker or unauthorized log consumer retrieves the plaintext database URL.
  5. The attacker uses the disclosed credentials to connect to the database, subject to network reachability and the account's assigned permissions.

Impact Assessment

...[truncated 396 chars]

Remediation
View remediation

Remediation Suggestions

  • Do not place passwords or other secrets in command-line arguments.
  • Accept secrets through an interactive password prompt using a non-echoing facility such as Python's getpass.
  • Support protected environment variables, operating-system credential stores, or dedicated secret-management services.
  • Permit connection URLs without embedded passwords and obtain the password through a separate secure channel.
  • Update all examples to use redacted or passwordless URLs.
  • Ensure diagnostic messages redact user information, passwords, tokens, and sensitive URL query parameters.
  • Warn users to remove any previously entered credentials from shell history and rotate credentials that may have entered logs.
  • In CI/CD environments, use masked secret variables and disable command tracing around secret-handling operations.

T08 · Insecure Dependencies

Note
Location
README.md:32
Finding

Unpinned and Unnecessary Third-Party Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: README.md:32-40; duplicated at SKILL.md:222-228
Vulnerability Type: Uncontrolled third-party dependency resolution
Risk Level: Low

Vulnerable documentation snippet:

bash
pip3 install sqlalchemy alembic psycopg2-binary pymysql

Technical Analysis

The installation command resolves mutable latest versions of four third-party packages without a lockfile, exact version constraints, integrity hashes, or an explicitly trusted package index. This makes installations non-reproducible and allows future dependency releases to change the code users receive without a corresponding project review.

The audited implementation does not import SQLAlchemy, Alembic, psycopg2, or PyMySQL. It relies on Python standard-library modules and explicitly reports that database connections are not implemented. Consequently, the documented installation introduces supply-chain attack surface that is not required by the current executable functionality.

No evidence was found that the named packages are malicious. The risk arises from unconstrained package retrieval and unnecessary dependency installation rather than from a confirmed compromised package.

Attack Path

  1. A user follows the installation instructions.
  2. pip resolves the newest available versions from its configured package index.
  3. A future compromised release, compromised package-index account, unsafe transitive dependency, or tampered package source supplies attacker-controlled installation or runtime code.
  4. Package build or installation behavior executes with the privileges of the user running pip.
  5. The attacker gains access within that user's operating-system security context.

Impact Assessment

If the dependency supply chain is compromised, attacker-controlled code may execute with the privileges of the installing user. This can expose files, environment variables, developer credentials, and acc ...[truncated 350 chars]

Remediation
View remediation

Remediation Suggestions

  • Remove SQLAlchemy, Alembic, psycopg2-binary, and PyMySQL from installation instructions until functionality requiring them is implemented.
  • Declare only dependencies actually imported and used by the executable code.
  • Pin each required dependency to a reviewed version or tightly controlled compatible range.
  • Maintain a lockfile or hashed requirements file and install with hash verification, such as pip install --require-hashes.
  • Use a trusted, explicitly configured package index or an internally controlled dependency mirror.
  • Audit both direct and transitive dependencies with automated vulnerability and provenance checks.
  • Perform dependency updates through reviewed pull requests rather than resolving uncontrolled latest versions during deployment.
  • Install packages in an isolated virtual environment under a non-privileged account.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • 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)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README includes example commands with full database connection URIs containing usernames and passwords inline. Even as examples, this normalizes unsafe operational practice and can lead users to expose credentials through shell history, process listings, CI logs, screenshots, or copied documentation.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill advertises capabilities that imply reading and writing files, including generating migration scripts and snapshots, but it does not declare any explicit tool scope or permissions boundaries. In an agent setting, this increases the risk of overbroad file access or unintended writes because the runtime and user are not clearly informed what filesystem operations the skill expects to perform.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill prominently describes automatic generation of migration scripts, including DDL that can drop constraints, columns, indexes, or tables, without an explicit warning that generated migrations must be manually reviewed before execution. In the database context this is more dangerous because schema changes against staging or production can cause outages, data loss, failed deployments, or irreversible rollback issues if applied blindly.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

This code performs file writes for generated migration output without a confirmation prompt, overwrite warning, or nearby user-facing disclosure beyond a success message after the write completes. Because writing to arbitrary user-supplied paths can affect local data, the skill should warn the user before or while performing the operation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The snapshot command writes JSON data to a user-specified path, but there is no confirmation prompt, overwrite check, or pre-write disclosure explaining that local files will be modified. For a code file, this qualifies as a safety-relevant file write lacking visible user warning.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.