Skip to content

vectordb: hardening pgvector provider against potential SQL injection#541

Merged
DoganK01 merged 1 commit intoUpsonic:masterfrom
RinZ27:fix/pgvector-sql-injection-hardening
Mar 17, 2026
Merged

vectordb: hardening pgvector provider against potential SQL injection#541
DoganK01 merged 1 commit intoUpsonic:masterfrom
RinZ27:fix/pgvector-sql-injection-hardening

Conversation

@RinZ27
Copy link
Copy Markdown
Contributor

@RinZ27 RinZ27 commented Feb 25, 2026

Added Pydantic validation for table and schema names in PgVectorConfig to ensure they only contain alphanumeric characters and underscores. Additionally, I updated the PgVector provider to use double quotes for all DDL statements (CREATE SCHEMA, CREATE INDEX) involving user-supplied identifiers. While these values usually come from configuration, these changes provide an important layer of defense when collection names are dynamically generated by agents.

@onuratakan onuratakan requested a review from DoganK01 March 2, 2026 10:55
@DoganK01
Copy link
Copy Markdown
Member

Appreciate the contribution :)

@DoganK01 DoganK01 merged commit ea23fd3 into Upsonic:master Mar 17, 2026
4 of 5 checks passed
@RinZ27 RinZ27 deleted the fix/pgvector-sql-injection-hardening branch March 17, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants