I am developing an application using hibernate. When I try to create a Login page, The problem of SQL Injection arises,I'm Using Veracode as scanning analyser.
I have the following code:
Session session = getSession();
HashMap<String, String> parameters = new HashMap<String, String>();
String finalValue = _helper.constructSearchSQLQuery(searchCriteria, session, parameters);
SQLQuery sqlQuery = session.createSQLQuery(finalValue);
sqlQuery.addScalar("requestId", Hibernate.LONG);
Set<String> keys = parameters.keySet();
At place of SQLQuery sqlQuery=session showing sql injection .Please help me how to fix this.