diff --git a/config/brakeman.ignore b/config/brakeman.ignore index e8efe1367..73af45bf8 100644 --- a/config/brakeman.ignore +++ b/config/brakeman.ignore @@ -1,5 +1,25 @@ { "ignored_warnings": [ + { + "warning_type": "SQL Injection", + "warning_code": 0, + "fingerprint": "25d6ed4f7f9120faf69596aa97d9e0558fd86817583b99b9b7879aff43ec2751", + "check_name": "SQL", + "message": "Possible SQL injection", + "file": "app/models/procedure_presentation.rb", + "line": 111, + "link": "https://brakemanscanner.org/docs/warning_types/sql_injection/", + "code": "dossiers.with_type_de_champ_private(column).order(\"champs.value #{order}\")", + "render_path": null, + "location": { + "type": "method", + "class": "ProcedurePresentation", + "method": "sorted_ids" + }, + "user_input": "order", + "confidence": "Weak", + "note": "`table`, `column` and `order` come from the model, which is validated to prevent injection attacks. Furthermore, `table` and `column` are escaped." + }, { "warning_type": "Cross-Site Scripting", "warning_code": 2, @@ -10,7 +30,19 @@ "line": 28, "link": "https://brakemanscanner.org/docs/warning_types/cross_site_scripting", "code": "current_user.dossiers.includes(:procedure).find(params[:id]).procedure.monavis_embed", - "render_path": [{"type":"controller","class":"Users::DossiersController","method":"merci","line":181,"file":"app/controllers/users/dossiers_controller.rb"}], + "render_path": [ + { + "type": "controller", + "class": "Users::DossiersController", + "method": "merci", + "line": 195, + "file": "app/controllers/users/dossiers_controller.rb", + "rendered": { + "name": "users/dossiers/merci", + "file": "app/views/users/dossiers/merci.html.haml" + } + } + ], "location": { "type": "template", "template": "users/dossiers/merci" @@ -26,7 +58,7 @@ "check_name": "Redirect", "message": "Possible unprotected redirect", "file": "app/controllers/instructeurs/procedures_controller.rb", - "line": 198, + "line": 176, "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, @@ -59,6 +91,26 @@ "confidence": "Medium", "note": "The table and column are escaped, which should make this safe" }, + { + "warning_type": "SQL Injection", + "warning_code": 0, + "fingerprint": "d6031dd493ff36d62af2d75d0b1e4606c665413a62ef26a847902af4ad97d81f", + "check_name": "SQL", + "message": "Possible SQL injection", + "file": "app/models/procedure_presentation.rb", + "line": 106, + "link": "https://brakemanscanner.org/docs/warning_types/sql_injection/", + "code": "dossiers.with_type_de_champ(column).order(\"champs.value #{order}\")", + "render_path": null, + "location": { + "type": "method", + "class": "ProcedurePresentation", + "method": "sorted_ids" + }, + "user_input": "order", + "confidence": "Weak", + "note": "`table`, `column` and `order` come from the model, which is validated to prevent injection attacks. Furthermore, `table` and `column` are escaped." + }, { "warning_type": "SQL Injection", "warning_code": 0, @@ -66,7 +118,7 @@ "check_name": "SQL", "message": "Possible SQL injection", "file": "app/models/procedure_presentation.rb", - "line": 107, + "line": 123, "link": "https://brakemanscanner.org/docs/warning_types/sql_injection/", "code": "((\"self\" == \"self\") ? (dossiers) : (dossiers.includes(\"self\"))).order(\"#{self.class.sanitized_column(\"self\", column)} #{order}\")", "render_path": null, @@ -79,26 +131,6 @@ "confidence": "Weak", "note": "`table`, `column` and `order` come from the model, which is validated to prevent injection attacks. Furthermore, `table` and `column` are escaped." }, - { - "warning_type": "SQL Injection", - "warning_code": 0, - "fingerprint": "f85ed20c14a223884f624d744ff99070f6fc0697d918f54a08e7786ad70bb243", - "check_name": "SQL", - "message": "Possible SQL injection", - "file": "app/models/procedure_presentation.rb", - "line": 95, - "link": "https://brakemanscanner.org/docs/warning_types/sql_injection/", - "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}\")", - "render_path": null, - "location": { - "type": "method", - "class": "ProcedurePresentation", - "method": "sorted_ids" - }, - "user_input": "order", - "confidence": "Weak", - "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`" - }, { "warning_type": "SQL Injection", "warning_code": 0, @@ -106,7 +138,7 @@ "check_name": "SQL", "message": "Possible SQL injection", "file": "app/models/procedure_presentation.rb", - "line": 103, + "line": 119, "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, @@ -117,9 +149,9 @@ }, "user_input": "order", "confidence": "Weak", - "note": "" + "note": "`table`, `column` and `order` come from the model, which is validated to prevent injection attacks. Furthermore, `table` and `column` are escaped." } ], - "updated": "2019-12-12 16:36:32 +0100", - "brakeman_version": "4.3.1" + "updated": "2020-09-17 13:28:51 +0200", + "brakeman_version": "4.8.1" }