Back to skill

Security audit

Database Migration

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent database-migration guide, but it gives high-impact destructive migration and rollback examples without enough safety controls.

Review this skill carefully before installing. Use it only as general reference, not as production-ready migration code. Pin migration tooling in project dependencies, run commands through lockfile-controlled local binaries, test in staging, require verified backups and explicit approval before destructive changes, and avoid the checkpoint rollback pattern that drops a live table during exception handling.

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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:49
Finding

Unpinned npx Dependencies Permit Unreviewed Package Execution

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:294
Finding

Destructive and Non-Atomic Rollback Can Cause Data or Schema Loss

Content
View full analysis
{ // Create backup table await queryInterface.sequelize.query( "CREATE TABLE users_backup AS SELECT * FROM users", ); try { // Perform migration await queryInterface.addColumn("users", "new_field", { type: Sequelize.STRING, }); // Verify migration const [result] = await queryInterface.sequelize.query( "SELECT COUNT(*) as count FROM users WHERE new_field IS NULL", ); if (result[0].count > 0) { throw new Error("Migration verification failed"); } // Drop backup await queryInterface.dropTable("users_backup"); } catch (error) { // Restore from backup await queryInterface.sequelize.query("DROP TABLE users"); await queryInterface.sequelize.query( "CREATE TABLE users AS SELECT * FROM users_backup", ); await queryInterface.dropTable("users_backup"); throw error; } }, }; ``` ### Technical Analysis The rollback path permanently drops the live `users` table before confirming that restoration can complete. These destructive operations are not enclosed in a database transaction, and no recovery is provided if an operation fails after `DROP TABLE users`. In addition, `CREATE TABLE ... AS SELECT ...` generally copies row values but does not faithfully preserve the complete table definition. Depending on the database, omitted metadata can include primary and foreign keys, unique constraints, check constraints, indexes, defaults, generated or identity properties, triggers, comments, ownership, and grants. The backup is also a live table in the same database rather than an independently verified backup. It may therefore be affected by the same o ...[truncated 1945 chars]
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (6)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill is explicitly about database migrations, including schema changes, rollbacks, and data transformations, yet it does not prominently warn about data loss, lock contention, downtime, backup requirements, or the need to test in staging first. Because users may follow the examples directly, omission of safety guidance materially increases the risk of destructive or service-impacting actions in production environments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The examples include destructive operations such as dropTable and later column removals without nearby warnings or safeguards. In a migration skill, this context makes the issue more dangerous because readers are likely to adapt these snippets to real databases, where accidental execution can irreversibly delete data or break application compatibility.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.