[P16] Fix SQL injection in provision_postgres password rotation #113
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The current code uses string interpolation to build SQL:
While
pwcomes from HKDF derivation (hex or base64url, no special SQL chars), this is still a security anti-pattern. A future format change or bug could introduce injection.Fix
When migrating to direct psycopg connection (#109), use parameterized queries:
Acceptance criteria
sql.Identifier()