Title: Refactored to use parameterized SQL APIs by pixeebot[bot] · Pull Request #16 · Pixee-Bot-Java/Chat2DB · GitHub
Open Graph Title: Refactored to use parameterized SQL APIs by pixeebot[bot] · Pull Request #16 · Pixee-Bot-Java/Chat2DB
X Title: Refactored to use parameterized SQL APIs by pixeebot[bot] · Pull Request #16 · Pixee-Bot-Java/Chat2DB
Description: This change refactors SQL statements to be parameterized, rather than built by hand. Without parameterization, developers must remember to escape inputs using the rules for that database. It's usually buggy, at the least -- and sometimes vulnerable. Our changes look something like this: - Statement stmt = connection.createStatement(); - ResultSet rs = stmt.executeQuery("SELECT * FROM users WHERE name = '" + user + "'"); + PreparedStatement stmt = connection.prepareStatement("SELECT * FROM users WHERE name = ?"); + stmt.setString(1, user); + ResultSet rs = stmt.executeQuery(); More reading https://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.html https://cwe.mitre.org/data/definitions/89.html 🧚🤖 Powered by Pixeebot Feedback | Community | Docs | Codemod ID: pixee:java/sql-parameterizer
Open Graph Description: This change refactors SQL statements to be parameterized, rather than built by hand. Without parameterization, developers must remember to escape inputs using the rules for that database. It's ...
X Description: This change refactors SQL statements to be parameterized, rather than built by hand. Without parameterization, developers must remember to escape inputs using the rules for that database. It...
Opengraph URL: https://github.com/Pixee-Bot-Java/Chat2DB/pull/16
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:af736d9e-b3ed-a605-1348-88c9aff93862 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | B9C4:139E28:22514F:2AD61E:699068D6 |
| html-safe-nonce | cb99d37365c284a68ed4ee7b7963aecff2f0d65c97abec5b27e30655002d3a31 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOUM0OjEzOUUyODoyMjUxNEY6MkFENjFFOjY5OTA2OEQ2IiwidmlzaXRvcl9pZCI6IjUzNDU4OTkwNDAwODgyODc0NDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 70d6dd464bff2e15c3284616eeea3f6f8f0a7aeedc64b5e2abc9b74ff74da79e |
| hovercard-subject-tag | pull_request:2733211511 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/Pixee-Bot-Java/Chat2DB/pull/16/checks |
| twitter:image | https://avatars.githubusercontent.com/in/193111?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/in/193111?s=400&v=4 |
| og:image:alt | This change refactors SQL statements to be parameterized, rather than built by hand. Without parameterization, developers must remember to escape inputs using the rules for that database. It's ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/Pixee-Bot-Java/Chat2DB git https://github.com/Pixee-Bot-Java/Chat2DB.git |
| octolytics-dimension-user_id | 143516492 |
| octolytics-dimension-user_login | Pixee-Bot-Java |
| octolytics-dimension-repository_id | 694162215 |
| octolytics-dimension-repository_nwo | Pixee-Bot-Java/Chat2DB |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 656227652 |
| octolytics-dimension-repository_parent_nwo | CodePhiliaX/Chat2DB |
| octolytics-dimension-repository_network_root_id | 656227652 |
| octolytics-dimension-repository_network_root_nwo | CodePhiliaX/Chat2DB |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3b33c5aedc9808f45bc5fcf0b1e4404cf749dac7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width