2018-01-11 15:54:39 +01:00
{
"ignored_warnings": [
2019-07-17 16:04:05 +02:00
{
"warning_type": "Cross-Site Scripting",
"warning_code": 2,
"fingerprint": "483ae8c038244eb3ed709e89846335e2c8ff6579260348ec31d3d03d1c94ad64",
"check_name": "CrossSiteScripting",
"message": "Unescaped model attribute",
"file": "app/views/users/dossiers/merci.html.haml",
2019-10-16 13:02:42 +02:00
"line": 28,
2019-07-17 16:04:05 +02:00
"link": "https://brakemanscanner.org/docs/warning_types/cross_site_scripting",
"code": "current_user.dossiers.includes(:procedure).find(params[:id]).procedure.monavis_embed",
2019-12-12 16:38:27 +01:00
"render_path": [{"type":"controller","class":"Users::DossiersController","method":"merci","line":181,"file":"app/controllers/users/dossiers_controller.rb"}],
2019-07-17 16:04:05 +02:00
"location": {
"type": "template",
"template": "users/dossiers/merci"
},
"user_input": "current_user.dossiers.includes(:procedure)",
"confidence": "Weak",
"note": ""
},
2019-12-12 16:38:27 +01:00
{
"warning_type": "Redirect",
"warning_code": 18,
"fingerprint": "8b22d0fa97c6b32921a3383a60dd63f1d2c0723c48f30bdc2d4abe41fe4abccc",
"check_name": "Redirect",
"message": "Possible unprotected redirect",
"file": "app/controllers/instructeurs/procedures_controller.rb",
"line": 198,
"link": "https://brakemanscanner.org/docs/warning_types/redirect/",
"code": "redirect_to(Export.find_or_create_export(params[:export_format], current_instructeur.groupe_instructeurs.where(:procedure => procedure)).file.service_url)",
"render_path": null,
"location": {
"type": "method",
"class": "Instructeurs::ProceduresController",
"method": "download_export"
},
"user_input": "Export.find_or_create_export(params[:export_format], current_instructeur.groupe_instructeurs.where(:procedure => procedure)).file.service_url",
"confidence": "High",
"note": ""
},
2018-10-05 16:15:19 +02:00
{
"warning_type": "SQL Injection",
"warning_code": 0,
2019-02-14 19:02:34 +01:00
"fingerprint": "bd1df30f95135357b646e21a03d95498874faffa32e3804fc643e9b6b957ee14",
2018-10-05 16:15:19 +02:00
"check_name": "SQL",
"message": "Possible SQL injection",
2019-02-14 19:02:34 +01:00
"file": "app/models/concerns/dossier_filtering_concern.rb",
"line": 18,
2018-10-05 16:15:19 +02:00
"link": "https://brakemanscanner.org/docs/warning_types/sql_injection/",
2019-02-14 19:02:34 +01:00
"code": "where(\"#{values.count} OR #{\"(#{ProcedurePresentation.sanitized_column(table, column)} ILIKE ?)\"}\", *values.map do\n \"%#{value}%\"\n end)",
2018-10-05 16:15:19 +02:00
"render_path": null,
"location": {
"type": "method",
2019-02-14 19:02:34 +01:00
"class": "DossierFilteringConcern",
"method": null
2018-10-05 16:15:19 +02:00
},
2019-02-14 19:02:34 +01:00
"user_input": "values.count",
"confidence": "Medium",
"note": "The table and column are escaped, which should make this safe"
2018-10-05 16:15:19 +02:00
},
{
"warning_type": "SQL Injection",
"warning_code": 0,
2019-02-14 19:02:34 +01:00
"fingerprint": "e6f09095e3d381bcf6280d2f9b06c239946be3e440330136934f34611bc2b2d9",
2018-10-05 16:15:19 +02:00
"check_name": "SQL",
"message": "Possible SQL injection",
"file": "app/models/procedure_presentation.rb",
2019-12-12 16:38:27 +01:00
"line": 107,
2018-10-05 16:15:19 +02:00
"link": "https://brakemanscanner.org/docs/warning_types/sql_injection/",
2019-02-14 19:02:34 +01:00
"code": "((\"self\" == \"self\") ? (dossiers) : (dossiers.includes(\"self\"))).order(\"#{self.class.sanitized_column(\"self\", column)} #{order}\")",
2018-10-05 16:15:19 +02:00
"render_path": null,
"location": {
"type": "method",
"class": "ProcedurePresentation",
"method": "sorted_ids"
},
2019-02-14 19:02:34 +01:00
"user_input": "self.class.sanitized_column(\"self\", column)",
2018-10-05 16:15:19 +02:00
"confidence": "Weak",
2019-02-14 19:02:34 +01:00
"note": "`table`, `column` and `order` come from the model, which is validated to prevent injection attacks. Furthermore, `table` and `column` are escaped."
2018-10-05 16:15:19 +02:00
},
{
"warning_type": "SQL Injection",
"warning_code": 0,
2019-02-14 19:02:34 +01:00
"fingerprint": "f85ed20c14a223884f624d744ff99070f6fc0697d918f54a08e7786ad70bb243",
2018-10-05 16:15:19 +02:00
"check_name": "SQL",
"message": "Possible SQL injection",
"file": "app/models/procedure_presentation.rb",
2019-10-16 13:02:42 +02:00
"line": 95,
2018-10-05 16:15:19 +02:00
"link": "https://brakemanscanner.org/docs/warning_types/sql_injection/",
2019-02-14 19:02:34 +01:00
"code": "dossiers.includes(((\"type_de_champ\" == \"type_de_champ\") ? (:champs) : (:champs_private))).where(\"champs.type_de_champ_id = #{column.to_i}\").order(\"champs.value #{order}\")",
2018-10-05 16:15:19 +02:00
"render_path": null,
"location": {
"type": "method",
"class": "ProcedurePresentation",
"method": "sorted_ids"
},
2019-02-14 19:02:34 +01:00
"user_input": "order",
2018-10-05 16:15:19 +02:00
"confidence": "Weak",
2019-02-14 19:02:34 +01:00
"note": "`column` and `order` come from the model, which is validated to prevent injection attacks. Furthermore, the sql injection attack on `column` would need to survive the `to_i`"
2019-10-16 13:02:42 +02:00
},
{
"warning_type": "SQL Injection",
"warning_code": 0,
"fingerprint": "fd9d738975ccb93c8915833fceb3f43ac35410d653b8c64a1c92c1afc36d2177",
"check_name": "SQL",
"message": "Possible SQL injection",
"file": "app/models/procedure_presentation.rb",
2019-12-12 16:38:27 +01:00
"line": 103,
2019-10-16 13:02:42 +02:00
"link": "https://brakemanscanner.org/docs/warning_types/sql_injection/",
"code": "dossiers.includes(:followers_instructeurs).joins(\"LEFT OUTER JOIN users instructeurs_users ON instructeurs_users.instructeur_id = instructeurs.id\").order(\"instructeurs_users.email #{order}\")",
"render_path": null,
"location": {
"type": "method",
"class": "ProcedurePresentation",
"method": "sorted_ids"
},
"user_input": "order",
"confidence": "Weak",
"note": ""
2018-10-05 16:15:19 +02:00
}
2018-01-11 15:54:39 +01:00
],
2019-12-12 16:38:27 +01:00
"updated": "2019-12-12 16:36:32 +0100",
2018-10-05 16:06:24 +02:00
"brakeman_version": "4.3.1"
2018-01-11 15:54:39 +01:00
}