Skip to content

Conversation

@andrecsilva
Copy link
Contributor

@andrecsilva andrecsilva commented Apr 16, 2024

@sonarqubecloud
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@andrecsilva andrecsilva marked this pull request as ready for review April 16, 2024 13:08
@andrecsilva andrecsilva requested a review from nahsra April 16, 2024 13:08

void indirect(String tainted) {
String query = "select p from Person p where p.name like '" + tainted + "'";
Query<User> hqlQuery = session.createQuery(query);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we adding these hqlQuery.list() calls?

Copy link
Contributor Author

@andrecsilva andrecsilva Apr 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid removing hqlQuery as unused variable.

@andrecsilva andrecsilva merged commit f016b0a into main Apr 17, 2024
@andrecsilva andrecsilva deleted the custom-traversal branch April 17, 2024 10:34
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.

Add RemoveUnusedLocalVariables transform to SQLParameterizerWithCleanup

2 participants