alembic

Pass

Audited by Gen Agent Trust Hub on Sep 15, 2026

Risk Level: SAFEINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTION
Full Analysis
  • [INDIRECT_PROMPT_INJECTION]: The skill documents the use of Alembic, which generates migration code by comparing application models to a database schema, creating a potential surface for instructions embedded in external data to influence code generation.
  • Ingestion points: SQLAlchemy model definitions (e.g., target_metadata = Base.metadata in env.py) and reflected database objects from the connected database (SKILL.md, references/env-configuration.md).
  • Boundary markers: The instructions explicitly advise users to "Always review autogenerated scripts before running them" and repeat this warning in the autogenerate guide (SKILL.md, references/autogenerate-guide.md).
  • Capability inventory: Alembic has the capability to create new Python files (alembic revision), write to the filesystem, and execute SQL against a database (alembic upgrade). Additionally, env.py and post_write_hooks allow for arbitrary Python and shell command execution.
  • Sanitization: Relies on manual review of generated migration scripts by the developer.
  • [DYNAMIC_EXECUTION]: The documentation includes instructions for configuring post_write_hooks and custom Python hooks, which involve executing external tools or dynamic code.
  • Evidence: The skill provides examples for configuring ruff or black as execution hooks in alembic.ini or pyproject.toml (e.g., ruff.type = exec, ruff.executable = ruff) (SKILL.md, references/autogenerate-guide.md).
  • Evidence: It demonstrates registering a custom Python function (@write_hooks.register("add_noqa")) in env.py that performs file I/O on generated migration scripts (references/autogenerate-guide.md).
  • Context: These are standard and documented features of Alembic designed for automated code formatting and ensuring migration scripts meet project standards.
Audit Metadata
Risk Level
SAFE
Analyzed
Sep 15, 2026, 08:19 PM