You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BUG-041: f-string in te_loader.py execute() — SQL injection risk #10
Error: execute() called with an f-string at ['te_loader.py:99']
Root cause
The function was extracted from an inline block during the sync from
PostgreDataMigrationApp. The original used psycopg2.sql.Identifier; the
extraction accidentally used an f-string instead.
Fix
Replace line 99 in api/services/te_loader.py:
Before:
cur.execute(f"DROP TABLE IF EXISTS {table_name}")
After:
from psycopg2 import sql as _sql
cur.execute(
_sql.SQL("DROP TABLE IF EXISTS {}").format(
_sql.Identifier(*table_name.split("."))
if "." in table_name
else _sql.Identifier(table_name)
)
)
Activity
amar-python commentedon Aug 11, 2026
Fixed — _cleanup_prior_registry_entries extracted with psycopg2.sql.Identifier, no f-strings