Skip to content

Commit

Permalink
Merge pull request openaustralia#1162 from mario-areias/master
Browse files Browse the repository at this point in the history
Bumped brakeman version to remove unnecessary ignored warnings
  • Loading branch information
henare authored Oct 3, 2017
2 parents 7c61377 + f50f068 commit 125803a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 203 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ GEM
bootstrap-sass (3.3.1.0)
sass (~> 3.2)
bootstrap-select-rails (1.6.2)
brakeman (3.6.1)
brakeman (3.7.0)
builder (3.2.2)
capistrano (3.7.2)
airbrussh (>= 1.0.0)
Expand Down
204 changes: 2 additions & 202 deletions config/brakeman.ignore
Original file line number Diff line number Diff line change
@@ -1,205 +1,5 @@
{
"ignored_warnings": [
{
"warning_type": "Redirect",
"warning_code": 18,
"fingerprint": "042a828671916c24b504008143ef4a3474bd45308f1a7646e4324dfa3e4eb7bb",
"check_name": "Redirect",
"message": "Possible unprotected redirect",
"file": "app/controllers/members_controller.rb",
"line": 71,
"link": "http://brakemanscanner.org/docs/warning_types/redirect/",
"code": "redirect_to(params.to_unsafe_hash.merge(:only_path => true, :showall => nil, :display => \"everyvote\"))",
"render_path": null,
"location": {
"type": "method",
"class": "MembersController",
"method": "show_redirect"
},
"user_input": "params.to_unsafe_hash.merge(:only_path => true, :showall => nil, :display => \"everyvote\")",
"confidence": "High",
"note": "Redirect necessary to mantain compatibility with PHP urls from publicwhip. This redirect is safe, because it will always redirect to a specific URL, only changing the paramters (which are also safe)."
},
{
"warning_type": "Redirect",
"warning_code": 18,
"fingerprint": "29465364882e09d041edb71a8005ba675e8c4d14101f61040bb121b034c4e8ba",
"check_name": "Redirect",
"message": "Possible unprotected redirect",
"file": "app/controllers/divisions_controller.rb",
"line": 93,
"link": "http://brakemanscanner.org/docs/warning_types/redirect/",
"code": "redirect_to(params.to_unsafe_hash.merge(:only_path => true, :display => nil))",
"render_path": null,
"location": {
"type": "method",
"class": "DivisionsController",
"method": "show_redirect"
},
"user_input": "params.to_unsafe_hash.merge(:only_path => true, :display => nil)",
"confidence": "High",
"note": "Redirect necessary to mantain compatibility with PHP urls from publicwhip. This redirect is safe, because it will always redirect to a specific URL, only changing the paramters (which are also safe)."
},
{
"warning_type": "Redirect",
"warning_code": 18,
"fingerprint": "393ef7f8207397e55e224cb5c5bb22f49bd08ae6cd168ea111016205c29aeb29",
"check_name": "Redirect",
"message": "Possible unprotected redirect",
"file": "app/controllers/divisions_controller.rb",
"line": 97,
"link": "http://brakemanscanner.org/docs/warning_types/redirect/",
"code": "redirect_to(params.to_unsafe_hash.merge(:only_path => true, :house => \"representatives\"))",
"render_path": null,
"location": {
"type": "method",
"class": "DivisionsController",
"method": "show_redirect"
},
"user_input": "params.to_unsafe_hash.merge(:only_path => true, :house => \"representatives\")",
"confidence": "High",
"note": "Redirect necessary to mantain compatibility with PHP urls from publicwhip. This redirect is safe, because it will always redirect to a specific URL, only changing the paramters (which are also safe)."
},
{
"warning_type": "Redirect",
"warning_code": 18,
"fingerprint": "8c845b4d99688f76acf646d2628cf32611b09219883b7b7ff76704c306af7416",
"check_name": "Redirect",
"message": "Possible unprotected redirect",
"file": "app/controllers/divisions_controller.rb",
"line": 6,
"link": "http://brakemanscanner.org/docs/warning_types/redirect/",
"code": "redirect_to(params.to_unsafe_hash.merge(:only_path => true, :rdisplay2 => nil, :sort => \"rebellions\"))",
"render_path": null,
"location": {
"type": "method",
"class": "DivisionsController",
"method": "index_redirect"
},
"user_input": "params.to_unsafe_hash.merge(:only_path => true, :rdisplay2 => nil, :sort => \"rebellions\")",
"confidence": "High",
"note": "Redirect necessary to mantain compatibility with PHP urls from publicwhip. This redirect is safe, because it will always redirect to a specific URL, only changing the paramters (which are also safe)."
},
{
"warning_type": "Redirect",
"warning_code": 18,
"fingerprint": "98f40a0a41985885c0891757e8972f101573f14deb2423f4e34934dfaa0706a8",
"check_name": "Redirect",
"message": "Possible unprotected redirect",
"file": "app/controllers/electorates_controller.rb",
"line": 3,
"link": "http://brakemanscanner.org/docs/warning_types/redirect/",
"code": "redirect_to(params.to_unsafe_hash.merge(:only_path => true, :display => nil, :dmp => nil, :house => ((params[:house] or \"representatives\"))))",
"render_path": null,
"location": {
"type": "method",
"class": "ElectoratesController",
"method": "show_redirect"
},
"user_input": "params.to_unsafe_hash.merge(:only_path => true, :display => nil, :dmp => nil, :house => ((params[:house] or \"representatives\")))",
"confidence": "High",
"note": "Redirect necessary to mantain compatibility with PHP urls from publicwhip. This redirect is safe, because it will always redirect to a specific URL, only changing the paramters (which are also safe)."
},
{
"warning_type": "Redirect",
"warning_code": 18,
"fingerprint": "c404a0f847b08447f4cb499b58abcd8491e34c6de43cd81d5949bd415a05573f",
"check_name": "Redirect",
"message": "Possible unprotected redirect",
"file": "app/controllers/divisions_controller.rb",
"line": 89,
"link": "http://brakemanscanner.org/docs/warning_types/redirect/",
"code": "redirect_to(params.to_unsafe_hash.merge(:only_path => true, :sort => nil))",
"render_path": null,
"location": {
"type": "method",
"class": "DivisionsController",
"method": "show_redirect"
},
"user_input": "params.to_unsafe_hash.merge(:only_path => true, :sort => nil)",
"confidence": "High",
"note": "Redirect necessary to mantain compatibility with PHP urls from publicwhip. This redirect is safe, because it will always redirect to a specific URL, only changing the paramters (which are also safe)."
},
{
"warning_type": "Redirect",
"warning_code": 18,
"fingerprint": "d49c9a44f74a5faea2f13f89cd8159f57c34991c002c91d16bae13dae3a9a836",
"check_name": "Redirect",
"message": "Possible unprotected redirect",
"file": "app/controllers/members_controller.rb",
"line": 52,
"link": "http://brakemanscanner.org/docs/warning_types/redirect/",
"code": "redirect_to(params.to_unsafe_hash.merge(:only_path => true, :mpn => (Member.find_by!(:id => params[:mpid]) or (begin\n Member.find_by!(:gid => params[:id])\nrescue ActiveRecord::RecordNotFound\n Member.find_by!(:gid => params[:id].gsub(/member/, \"lord\"))\nend or Member.with_name(params[:mpn].gsub(\"_\", \" \")).in_house(params[:house]).order(:entered_house => :desc).first)).url_name, :mpc => (Member.find_by!(:id => params[:mpid]) or (begin\n Member.find_by!(:gid => params[:id])\nrescue ActiveRecord::RecordNotFound\n Member.find_by!(:gid => params[:id].gsub(/member/, \"lord\"))\nend or Member.with_name(params[:mpn].gsub(\"_\", \" \")).in_house(params[:house]).order(:entered_house => :desc).first)).url_electorate, :house => (Member.find_by!(:id => params[:mpid]) or (begin\n Member.find_by!(:gid => params[:id])\nrescue ActiveRecord::RecordNotFound\n Member.find_by!(:gid => params[:id].gsub(/member/, \"lord\"))\nend or Member.with_name(params[:mpn].gsub(\"_\", \" \")).in_house(params[:house]).order(:entered_house => :desc).first)).house, :mpid => nil, :id => nil))",
"render_path": null,
"location": {
"type": "method",
"class": "MembersController",
"method": "show_redirect"
},
"user_input": "params.to_unsafe_hash.merge(:only_path => true, :mpn => (Member.find_by!(:id => params[:mpid]) or (begin\n Member.find_by!(:gid => params[:id])\nrescue ActiveRecord::RecordNotFound\n Member.find_by!(:gid => params[:id].gsub(/member/, \"lord\"))\nend or Member.with_name(params[:mpn].gsub(\"_\", \" \")).in_house(params[:house]).order(:entered_house => :desc).first)).url_name, :mpc => (Member.find_by!(:id => params[:mpid]) or (begin\n Member.find_by!(:gid => params[:id])\nrescue ActiveRecord::RecordNotFound\n Member.find_by!(:gid => params[:id].gsub(/member/, \"lord\"))\nend or Member.with_name(params[:mpn].gsub(\"_\", \" \")).in_house(params[:house]).order(:entered_house => :desc).first)).url_electorate, :house => (Member.find_by!(:id => params[:mpid]) or (begin\n Member.find_by!(:gid => params[:id])\nrescue ActiveRecord::RecordNotFound\n Member.find_by!(:gid => params[:id].gsub(/member/, \"lord\"))\nend or Member.with_name(params[:mpn].gsub(\"_\", \" \")).in_house(params[:house]).order(:entered_house => :desc).first)).house, :mpid => nil, :id => nil)",
"confidence": "High",
"note": "Redirect necessary to mantain compatibility with PHP urls from publicwhip. This redirect is safe, because it will always redirect to a specific URL, only changing the paramters (which are also safe)."
},
{
"warning_type": "Redirect",
"warning_code": 18,
"fingerprint": "d4cd3ef8eecff92b585b43ab25ff9fd3f15fbd914af3892299f2acd19e5f24e8",
"check_name": "Redirect",
"message": "Possible unprotected redirect",
"file": "app/controllers/divisions_controller.rb",
"line": 106,
"link": "http://brakemanscanner.org/docs/warning_types/redirect/",
"code": "redirect_to(params.to_unsafe_hash.merge(:only_path => true, :mpc => Member.in_house(params[:house]).where(:first_name => params[:mpn].split(\"_\")[0], :last_name => params[:mpn].split(\"_\")[1]).first.url_electorate))",
"render_path": null,
"location": {
"type": "method",
"class": "DivisionsController",
"method": "show_redirect"
},
"user_input": "params.to_unsafe_hash.merge(:only_path => true, :mpc => Member.in_house(params[:house]).where(:first_name => params[:mpn].split(\"_\")[0], :last_name => params[:mpn].split(\"_\")[1]).first.url_electorate)",
"confidence": "High",
"note": "Redirect necessary to mantain compatibility with PHP urls from publicwhip. This redirect is safe, because it will always redirect to a specific URL, only changing the paramters (which are also safe)."
},
{
"warning_type": "Redirect",
"warning_code": 18,
"fingerprint": "eac3f3dc0bd589cb700e4ee1a9c4aecca49c1feef8634fd6bb521a62ffc727fd",
"check_name": "Redirect",
"message": "Possible unprotected redirect",
"file": "app/controllers/members_controller.rb",
"line": 63,
"link": "http://brakemanscanner.org/docs/warning_types/redirect/",
"code": "redirect_to(params.to_unsafe_hash.merge(:only_path => true, :display => nil))",
"render_path": null,
"location": {
"type": "method",
"class": "MembersController",
"method": "show_redirect"
},
"user_input": "params.to_unsafe_hash.merge(:only_path => true, :display => nil)",
"confidence": "High",
"note": "Redirect necessary to mantain compatibility with PHP urls from publicwhip. This redirect is safe, because it will always redirect to a specific URL, only changing the paramters (which are also safe)."
},
{
"warning_type": "Redirect",
"warning_code": 18,
"fingerprint": "eac3f3dc0bd589cb700e4ee1a9c4aecca49c1feef8634fd6bb521a62ffc727fd",
"check_name": "Redirect",
"message": "Possible unprotected redirect",
"file": "app/controllers/members_controller.rb",
"line": 67,
"link": "http://brakemanscanner.org/docs/warning_types/redirect/",
"code": "redirect_to(params.to_unsafe_hash.merge(:only_path => true, :display => nil))",
"render_path": null,
"location": {
"type": "method",
"class": "MembersController",
"method": "show_redirect"
},
"user_input": "params.to_unsafe_hash.merge(:only_path => true, :display => nil)",
"confidence": "High",
"note": "Redirect necessary to mantain compatibility with PHP urls from publicwhip. This redirect is safe, because it will always redirect to a specific URL, only changing the paramters (which are also safe)."
},
{
"warning_type": "Cross Site Scripting",
"warning_code": 4,
Expand All @@ -220,6 +20,6 @@
"note": "This is a false positive. It's not possible to do a Cross Site Scripting, this was verified with manual testing."
}
],
"updated": "2017-04-13 19:14:24 +1000",
"brakeman_version": "3.6.1"
"updated": "2017-08-05 19:42:35 +1000",
"brakeman_version": "3.7.0"
}

0 comments on commit 125803a

Please sign in to comment.