|
| 1 | +{ |
| 2 | + "ignored_warnings": [ |
| 3 | + { |
| 4 | + "warning_type": "Cross-Site Scripting", |
| 5 | + "warning_code": 4, |
| 6 | + "fingerprint": "8ba988098c444755698e4e65d38a94f4095948c1a9bc6220c7e2a4636c3c04d7", |
| 7 | + "check_name": "LinkToHref", |
| 8 | + "message": "Potentially unsafe model attribute in `link_to` href", |
| 9 | + "file": "app/views/shared/_dojo.html.erb", |
| 10 | + "line": 6, |
| 11 | + "link": "https://brakemanscanner.org/docs/warning_types/link_to_href", |
| 12 | + "code": "link_to(\"#{Dojo.new.name} (#{Dojo.new.prefecture.name})\", Dojo.new.url, :target => \"_blank\", :rel => \"external noopener\")", |
| 13 | + "render_path": [ |
| 14 | + { |
| 15 | + "type": "controller", |
| 16 | + "class": "HomeController", |
| 17 | + "method": "show", |
| 18 | + "line": 7, |
| 19 | + "file": "app/controllers/home_controller.rb", |
| 20 | + "rendered": { |
| 21 | + "name": "home/show", |
| 22 | + "file": "app/views/home/show.html.erb" |
| 23 | + } |
| 24 | + }, |
| 25 | + { |
| 26 | + "type": "template", |
| 27 | + "name": "home/show", |
| 28 | + "line": 161, |
| 29 | + "file": "app/views/home/show.html.erb", |
| 30 | + "rendered": { |
| 31 | + "name": "shared/_dojos", |
| 32 | + "file": "app/views/shared/_dojos.html.erb" |
| 33 | + } |
| 34 | + }, |
| 35 | + { |
| 36 | + "type": "template", |
| 37 | + "name": "shared/_dojos", |
| 38 | + "line": 2, |
| 39 | + "file": "app/views/shared/_dojos.html.erb", |
| 40 | + "rendered": { |
| 41 | + "name": "shared/_dojo", |
| 42 | + "file": "app/views/shared/_dojo.html.erb" |
| 43 | + } |
| 44 | + } |
| 45 | + ], |
| 46 | + "location": { |
| 47 | + "type": "template", |
| 48 | + "template": "shared/_dojo" |
| 49 | + }, |
| 50 | + "user_input": "Dojo.new.url", |
| 51 | + "confidence": "Weak", |
| 52 | + "cwe_id": [ |
| 53 | + 79 |
| 54 | + ], |
| 55 | + "note": "" |
| 56 | + }, |
| 57 | + { |
| 58 | + "warning_type": "Cross-Site Scripting", |
| 59 | + "warning_code": 2, |
| 60 | + "fingerprint": "b22a549fb14a7e6b3a9c34991ffcacd354dc768d74d50a8f6901e23c3ea19538", |
| 61 | + "check_name": "CrossSiteScripting", |
| 62 | + "message": "Unescaped model attribute", |
| 63 | + "file": "app/views/podcasts/show.html.erb", |
| 64 | + "line": 39, |
| 65 | + "link": "https://brakemanscanner.org/docs/warning_types/cross_site_scripting", |
| 66 | + "code": "Rinku.auto_link(Kramdown::Document.new(self.convert_shownote(Podcast.find_by(:id => params[:id]).content), :input => \"GFM\").to_html)", |
| 67 | + "render_path": [ |
| 68 | + { |
| 69 | + "type": "controller", |
| 70 | + "class": "PodcastsController", |
| 71 | + "method": "show", |
| 72 | + "line": 31, |
| 73 | + "file": "app/controllers/podcasts_controller.rb", |
| 74 | + "rendered": { |
| 75 | + "name": "podcasts/show", |
| 76 | + "file": "app/views/podcasts/show.html.erb" |
| 77 | + } |
| 78 | + } |
| 79 | + ], |
| 80 | + "location": { |
| 81 | + "type": "template", |
| 82 | + "template": "podcasts/show" |
| 83 | + }, |
| 84 | + "user_input": "Podcast.find_by(:id => params[:id]).content", |
| 85 | + "confidence": "Weak", |
| 86 | + "cwe_id": [ |
| 87 | + 79 |
| 88 | + ], |
| 89 | + "note": "" |
| 90 | + }, |
| 91 | + { |
| 92 | + "warning_type": "Cross-Site Scripting", |
| 93 | + "warning_code": 4, |
| 94 | + "fingerprint": "b29f98f4da690ffb7c663390c21db3a71174dae17d06234deab9d6655af6babe", |
| 95 | + "check_name": "LinkToHref", |
| 96 | + "message": "Potentially unsafe model attribute in `link_to` href", |
| 97 | + "file": "app/views/shared/_dojo.html.erb", |
| 98 | + "line": 3, |
| 99 | + "link": "https://brakemanscanner.org/docs/warning_types/link_to_href", |
| 100 | + "code": "link_to(lazy_image_tag(Dojo.new.logo, :alt => (\"CoderDojo #{Dojo.new.name}\"), :class => \"dojo-picture\"), Dojo.new.url, :target => \"_blank\", :rel => \"external noopener\")", |
| 101 | + "render_path": [ |
| 102 | + { |
| 103 | + "type": "controller", |
| 104 | + "class": "HomeController", |
| 105 | + "method": "show", |
| 106 | + "line": 7, |
| 107 | + "file": "app/controllers/home_controller.rb", |
| 108 | + "rendered": { |
| 109 | + "name": "home/show", |
| 110 | + "file": "app/views/home/show.html.erb" |
| 111 | + } |
| 112 | + }, |
| 113 | + { |
| 114 | + "type": "template", |
| 115 | + "name": "home/show", |
| 116 | + "line": 161, |
| 117 | + "file": "app/views/home/show.html.erb", |
| 118 | + "rendered": { |
| 119 | + "name": "shared/_dojos", |
| 120 | + "file": "app/views/shared/_dojos.html.erb" |
| 121 | + } |
| 122 | + }, |
| 123 | + { |
| 124 | + "type": "template", |
| 125 | + "name": "shared/_dojos", |
| 126 | + "line": 2, |
| 127 | + "file": "app/views/shared/_dojos.html.erb", |
| 128 | + "rendered": { |
| 129 | + "name": "shared/_dojo", |
| 130 | + "file": "app/views/shared/_dojo.html.erb" |
| 131 | + } |
| 132 | + } |
| 133 | + ], |
| 134 | + "location": { |
| 135 | + "type": "template", |
| 136 | + "template": "shared/_dojo" |
| 137 | + }, |
| 138 | + "user_input": "Dojo.new.url", |
| 139 | + "confidence": "Weak", |
| 140 | + "cwe_id": [ |
| 141 | + 79 |
| 142 | + ], |
| 143 | + "note": "" |
| 144 | + }, |
| 145 | + { |
| 146 | + "warning_type": "Cross-Site Scripting", |
| 147 | + "warning_code": 2, |
| 148 | + "fingerprint": "e4187193a881ef4e98b77f205c86fcafbef3d65d9269bba30e8612f6a59273ed", |
| 149 | + "check_name": "CrossSiteScripting", |
| 150 | + "message": "Unescaped model attribute", |
| 151 | + "file": "app/views/docs/show.html.erb", |
| 152 | + "line": 12, |
| 153 | + "link": "https://brakemanscanner.org/docs/warning_types/cross_site_scripting", |
| 154 | + "code": "Kramdown::Document.new(Document.new(params[:id]).content, :input => \"GFM\").to_html", |
| 155 | + "render_path": [ |
| 156 | + { |
| 157 | + "type": "controller", |
| 158 | + "class": "DocsController", |
| 159 | + "method": "show", |
| 160 | + "line": 42, |
| 161 | + "file": "app/controllers/docs_controller.rb", |
| 162 | + "rendered": { |
| 163 | + "name": "docs/show", |
| 164 | + "file": "app/views/docs/show.html.erb" |
| 165 | + } |
| 166 | + } |
| 167 | + ], |
| 168 | + "location": { |
| 169 | + "type": "template", |
| 170 | + "template": "docs/show" |
| 171 | + }, |
| 172 | + "user_input": "Document.new(params[:id]).content", |
| 173 | + "confidence": "Weak", |
| 174 | + "cwe_id": [ |
| 175 | + 79 |
| 176 | + ], |
| 177 | + "note": "" |
| 178 | + } |
| 179 | + ], |
| 180 | + "brakeman_version": "7.1.0" |
| 181 | +} |
0 commit comments