chagu-demo / rag_sec /query_transformer.py
talexm
update
f861dee
raw
history blame
232 Bytes
class QueryTransformer:
def transform_query(self, query):
if "DROP TABLE" in query or "SELECT *" in query:
return "Your query appears to contain SQL injection elements. Please rephrase."
return query