I have the code below in flask using SQLAlchemy and marshmallow:
def search(category_name, version):
library = Library.query.filter(Library.category == category_name).filter(Library.subversion == version).all()
library_schema = LibrarySchema(many=True)
data = library_schema.dump(library)
return data
How can I be sure the code is not vulnerable to SQL injection?