databases
Warn
Audited by Socket on Sep 23, 2026
1 alert found:
SecuritySecurityscripts/db_migrate.py
MEDIUMSecurityMEDIUM
scripts/db_migrate.py
No clear evidence of embedded malware (backdoor/exfiltration/obfuscation) is present in this module. However, it creates a high security risk by design: it executes SQL text (up_sql/down_sql) loaded verbatim from local migration JSON files via psycopg2 cursor execute, and it applies MongoDB index operations defined by unvalidated JSON content. If an attacker can modify the migrations directory/files or influence what the tool loads, they can cause arbitrary database changes (including destructive/sabotage actions) with the privileges of the configured database account. Treat migrations_dir as a sensitive trust boundary and add integrity controls/allowlists to reduce risk.
Confidence: 62%Severity: 74%
Audit Metadata