adobe / aquarium-fish

Your best secure distributed heterogeneous dynamic compute resource manager for CI
Other
7 stars 2 forks source link

Security: SQL injection in API: filter #33

Closed sparshev closed 1 year ago

sparshev commented 1 year ago

According to gorm if the user input is not a second argument to prepared statement - than it's an sql injection threat: https://gorm.io/docs/security.html#Query-Condition

Need to find out a better way to allow user to filter the data.

sparshev commented 1 year ago

Found a nice library https://github.com/rqlite/sql which can parse only expression and return it without any additional statements. If it founds non-expression or sub-statement it will raise an error.