alembic-migrations
Fail
Audited by Gen Agent Trust Hub on Feb 15, 2026
Risk Level: HIGHCREDENTIALS_UNSAFECOMMAND_EXECUTIONPROMPT_INJECTION
Full Analysis
- [CREDENTIALS_UNSAFE] (HIGH): Hardcoded PostgreSQL credentials ('user:pass') are found in the
DATABASESconfiguration withinreferences/alembic-advanced.md. - [COMMAND_EXECUTION] (HIGH): The script
scripts/create-migration.mdutilizes shell interpolation (!) to execute local system commands such asgit diff,alembic current, anddate. - [PROMPT_INJECTION] (HIGH): Vulnerability to indirect prompt injection in
scripts/create-migration.mdvia the$ARGUMENTSparameter. 1. Ingestion points: The$ARGUMENTSvariable is interpolated directly into the generated Python file. 2. Boundary markers: Absent; the variable is placed inside a triple-quoted Python docstring ("""$ARGUMENTS..."""). 3. Capability inventory: The resulting file is a Python script intended for execution by the Alembic migration runner, providing a direct path to code execution. 4. Sanitization: None. An attacker can use triple quotes to escape the docstring and inject arbitrary Python commands. - [COMMAND_EXECUTION] (MEDIUM): Potential SQL injection in
scripts/migration-template.py. The_add_not_null_column_safelyhelper function uses f-strings to interpolate thetableandcolumnparameters into SQL statements, which is unsafe for database identifiers.
Recommendations
- AI detected serious security threats
Audit Metadata