brakeman.ignore 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  1. {
  2. "ignored_warnings": [
  3. {
  4. "warning_type": "Cross-Site Scripting",
  5. "warning_code": 4,
  6. "fingerprint": "0adbe361b91afff22ba51e5fc2275ec703cc13255a0cb3eecd8dab223ab9f61e",
  7. "check_name": "LinkToHref",
  8. "message": "Potentially unsafe model attribute in link_to href",
  9. "file": "app/views/admin/accounts/show.html.haml",
  10. "line": 147,
  11. "link": "http://brakemanscanner.org/docs/warning_types/link_to_href",
  12. "code": "link_to(Account.find(params[:id]).inbox_url, Account.find(params[:id]).inbox_url)",
  13. "render_path": [{"type":"controller","class":"Admin::AccountsController","method":"show","line":18,"file":"app/controllers/admin/accounts_controller.rb"}],
  14. "location": {
  15. "type": "template",
  16. "template": "admin/accounts/show"
  17. },
  18. "user_input": "Account.find(params[:id]).inbox_url",
  19. "confidence": "Weak",
  20. "note": ""
  21. },
  22. {
  23. "warning_type": "Cross-Site Scripting",
  24. "warning_code": 4,
  25. "fingerprint": "1fc29c578d0c89bf13bd5476829d272d54cd06b92ccf6df18568fa1f2674926e",
  26. "check_name": "LinkToHref",
  27. "message": "Potentially unsafe model attribute in link_to href",
  28. "file": "app/views/admin/accounts/show.html.haml",
  29. "line": 153,
  30. "link": "http://brakemanscanner.org/docs/warning_types/link_to_href",
  31. "code": "link_to(Account.find(params[:id]).shared_inbox_url, Account.find(params[:id]).shared_inbox_url)",
  32. "render_path": [{"type":"controller","class":"Admin::AccountsController","method":"show","line":18,"file":"app/controllers/admin/accounts_controller.rb"}],
  33. "location": {
  34. "type": "template",
  35. "template": "admin/accounts/show"
  36. },
  37. "user_input": "Account.find(params[:id]).shared_inbox_url",
  38. "confidence": "Weak",
  39. "note": ""
  40. },
  41. {
  42. "warning_type": "Cross-Site Scripting",
  43. "warning_code": 4,
  44. "fingerprint": "2129d4c1e63a351d28d8d2937ff0b50237809c3df6725c0c5ef82b881dbb2086",
  45. "check_name": "LinkToHref",
  46. "message": "Potentially unsafe model attribute in link_to href",
  47. "file": "app/views/admin/accounts/show.html.haml",
  48. "line": 57,
  49. "link": "http://brakemanscanner.org/docs/warning_types/link_to_href",
  50. "code": "link_to(Account.find(params[:id]).url, Account.find(params[:id]).url)",
  51. "render_path": [{"type":"controller","class":"Admin::AccountsController","method":"show","line":18,"file":"app/controllers/admin/accounts_controller.rb"}],
  52. "location": {
  53. "type": "template",
  54. "template": "admin/accounts/show"
  55. },
  56. "user_input": "Account.find(params[:id]).url",
  57. "confidence": "Weak",
  58. "note": ""
  59. },
  60. {
  61. "warning_type": "Dynamic Render Path",
  62. "warning_code": 15,
  63. "fingerprint": "44d3f14e05d8fbb5b23e13ac02f15aa38b2a2f0f03b9ba76bab7f98e155a4a4e",
  64. "check_name": "Render",
  65. "message": "Render path contains parameter value",
  66. "file": "app/views/stream_entries/embed.html.haml",
  67. "line": 3,
  68. "link": "http://brakemanscanner.org/docs/warning_types/dynamic_render_path/",
  69. "code": "render(action => \"stream_entries/#{Account.find_local!(params[:account_username]).statuses.find(params[:id]).stream_entry.activity_type.downcase}\", { Account.find_local!(params[:account_username]).statuses.find(params[:id]).stream_entry.activity_type.downcase.to_sym => Account.find_local!(params[:account_username]).statuses.find(params[:id]).stream_entry.activity, :centered => true })",
  70. "render_path": [{"type":"controller","class":"StatusesController","method":"embed","line":45,"file":"app/controllers/statuses_controller.rb"}],
  71. "location": {
  72. "type": "template",
  73. "template": "stream_entries/embed"
  74. },
  75. "user_input": "params[:id]",
  76. "confidence": "Weak",
  77. "note": ""
  78. },
  79. {
  80. "warning_type": "Dynamic Render Path",
  81. "warning_code": 15,
  82. "fingerprint": "4b6a895e2805578d03ceedbe1d469cc75a0c759eba093722523edb4b8683c873",
  83. "check_name": "Render",
  84. "message": "Render path contains parameter value",
  85. "file": "app/views/admin/action_logs/index.html.haml",
  86. "line": 5,
  87. "link": "http://brakemanscanner.org/docs/warning_types/dynamic_render_path/",
  88. "code": "render(action => Admin::ActionLog.page(params[:page]), {})",
  89. "render_path": [{"type":"controller","class":"Admin::ActionLogsController","method":"index","line":7,"file":"app/controllers/admin/action_logs_controller.rb"}],
  90. "location": {
  91. "type": "template",
  92. "template": "admin/action_logs/index"
  93. },
  94. "user_input": "params[:page]",
  95. "confidence": "Weak",
  96. "note": ""
  97. },
  98. {
  99. "warning_type": "Cross-Site Scripting",
  100. "warning_code": 4,
  101. "fingerprint": "64b5b2a02ede9c2b3598881eb5a466d63f7d27fe0946aa00d570111ec7338d2e",
  102. "check_name": "LinkToHref",
  103. "message": "Potentially unsafe model attribute in link_to href",
  104. "file": "app/views/admin/accounts/show.html.haml",
  105. "line": 156,
  106. "link": "http://brakemanscanner.org/docs/warning_types/link_to_href",
  107. "code": "link_to(Account.find(params[:id]).followers_url, Account.find(params[:id]).followers_url)",
  108. "render_path": [{"type":"controller","class":"Admin::AccountsController","method":"show","line":18,"file":"app/controllers/admin/accounts_controller.rb"}],
  109. "location": {
  110. "type": "template",
  111. "template": "admin/accounts/show"
  112. },
  113. "user_input": "Account.find(params[:id]).followers_url",
  114. "confidence": "Weak",
  115. "note": ""
  116. },
  117. {
  118. "warning_type": "Cross-Site Scripting",
  119. "warning_code": 4,
  120. "fingerprint": "82f7b0d09beb3ab68e0fa16be63cedf4e820f2490326e9a1cec05761d92446cd",
  121. "check_name": "LinkToHref",
  122. "message": "Potentially unsafe model attribute in link_to href",
  123. "file": "app/views/admin/accounts/show.html.haml",
  124. "line": 130,
  125. "link": "http://brakemanscanner.org/docs/warning_types/link_to_href",
  126. "code": "link_to(Account.find(params[:id]).salmon_url, Account.find(params[:id]).salmon_url)",
  127. "render_path": [{"type":"controller","class":"Admin::AccountsController","method":"show","line":18,"file":"app/controllers/admin/accounts_controller.rb"}],
  128. "location": {
  129. "type": "template",
  130. "template": "admin/accounts/show"
  131. },
  132. "user_input": "Account.find(params[:id]).salmon_url",
  133. "confidence": "Weak",
  134. "note": ""
  135. },
  136. {
  137. "warning_type": "Dynamic Render Path",
  138. "warning_code": 15,
  139. "fingerprint": "8d843713d99e8403f7992f3e72251b633817cf9076ffcbbad5613859d2bbc127",
  140. "check_name": "Render",
  141. "message": "Render path contains parameter value",
  142. "file": "app/views/admin/custom_emojis/index.html.haml",
  143. "line": 45,
  144. "link": "http://brakemanscanner.org/docs/warning_types/dynamic_render_path/",
  145. "code": "render(action => filtered_custom_emojis.eager_load(:local_counterpart).page(params[:page]), {})",
  146. "render_path": [{"type":"controller","class":"Admin::CustomEmojisController","method":"index","line":11,"file":"app/controllers/admin/custom_emojis_controller.rb"}],
  147. "location": {
  148. "type": "template",
  149. "template": "admin/custom_emojis/index"
  150. },
  151. "user_input": "params[:page]",
  152. "confidence": "Weak",
  153. "note": ""
  154. },
  155. {
  156. "warning_type": "SQL Injection",
  157. "warning_code": 0,
  158. "fingerprint": "9ccb9ba6a6947400e187d515e0bf719d22993d37cfc123c824d7fafa6caa9ac3",
  159. "check_name": "SQL",
  160. "message": "Possible SQL injection",
  161. "file": "lib/mastodon/snowflake.rb",
  162. "line": 87,
  163. "link": "http://brakemanscanner.org/docs/warning_types/sql_injection/",
  164. "code": "connection.execute(\" CREATE OR REPLACE FUNCTION timestamp_id(table_name text)\\n RETURNS bigint AS\\n $$\\n DECLARE\\n time_part bigint;\\n sequence_base bigint;\\n tail bigint;\\n BEGIN\\n time_part := (\\n -- Get the time in milliseconds\\n ((date_part('epoch', now()) * 1000))::bigint\\n -- And shift it over two bytes\\n << 16);\\n\\n sequence_base := (\\n 'x' ||\\n -- Take the first two bytes (four hex characters)\\n substr(\\n -- Of the MD5 hash of the data we documented\\n md5(table_name ||\\n '#{SecureRandom.hex(16)}' ||\\n time_part::text\\n ),\\n 1, 4\\n )\\n -- And turn it into a bigint\\n )::bit(16)::bigint;\\n\\n -- Finally, add our sequence number to our base, and chop\\n -- it to the last two bytes\\n tail := (\\n (sequence_base + nextval(table_name || '_id_seq'))\\n & 65535);\\n\\n -- Return the time part and the sequence part. OR appears\\n -- faster here than addition, but they're equivalent:\\n -- time_part has no trailing two bytes, and tail is only\\n -- the last two bytes.\\n RETURN time_part | tail;\\n END\\n $$ LANGUAGE plpgsql VOLATILE;\\n\")",
  165. "render_path": null,
  166. "location": {
  167. "type": "method",
  168. "class": "Mastodon::Snowflake",
  169. "method": "define_timestamp_id"
  170. },
  171. "user_input": "SecureRandom.hex(16)",
  172. "confidence": "Medium",
  173. "note": ""
  174. },
  175. {
  176. "warning_type": "Dynamic Render Path",
  177. "warning_code": 15,
  178. "fingerprint": "9f31d941f3910dba2e9bfcd81aef4513249bd24c02d0f98e13ad44fdeeccd0e8",
  179. "check_name": "Render",
  180. "message": "Render path contains parameter value",
  181. "file": "app/views/admin/accounts/index.html.haml",
  182. "line": 67,
  183. "link": "http://brakemanscanner.org/docs/warning_types/dynamic_render_path/",
  184. "code": "render(action => filtered_accounts.page(params[:page]), {})",
  185. "render_path": [{"type":"controller","class":"Admin::AccountsController","method":"index","line":12,"file":"app/controllers/admin/accounts_controller.rb"}],
  186. "location": {
  187. "type": "template",
  188. "template": "admin/accounts/index"
  189. },
  190. "user_input": "params[:page]",
  191. "confidence": "Weak",
  192. "note": ""
  193. },
  194. {
  195. "warning_type": "Cross-Site Request Forgery",
  196. "warning_code": 7,
  197. "fingerprint": "ab491f72606337a348482d006eb67a3b1616685fd48644d5ac909bbcd62a5000",
  198. "check_name": "ForgerySetting",
  199. "message": "'protect_from_forgery' should be called in WellKnown::HostMetaController",
  200. "file": "app/controllers/well_known/host_meta_controller.rb",
  201. "line": 4,
  202. "link": "http://brakemanscanner.org/docs/warning_types/cross-site_request_forgery/",
  203. "code": null,
  204. "render_path": null,
  205. "location": {
  206. "type": "controller",
  207. "controller": "WellKnown::HostMetaController"
  208. },
  209. "user_input": null,
  210. "confidence": "High",
  211. "note": ""
  212. },
  213. {
  214. "warning_type": "Redirect",
  215. "warning_code": 18,
  216. "fingerprint": "ba699ddcc6552c422c4ecd50d2cd217f616a2446659e185a50b05a0f2dad8d33",
  217. "check_name": "Redirect",
  218. "message": "Possible unprotected redirect",
  219. "file": "app/controllers/media_controller.rb",
  220. "line": 10,
  221. "link": "http://brakemanscanner.org/docs/warning_types/redirect/",
  222. "code": "redirect_to(MediaAttachment.attached.find_by!(:shortcode => ((params[:id] or params[:medium_id]))).file.url(:original))",
  223. "render_path": null,
  224. "location": {
  225. "type": "method",
  226. "class": "MediaController",
  227. "method": "show"
  228. },
  229. "user_input": "MediaAttachment.attached.find_by!(:shortcode => ((params[:id] or params[:medium_id]))).file.url(:original)",
  230. "confidence": "High",
  231. "note": ""
  232. },
  233. {
  234. "warning_type": "Cross-Site Scripting",
  235. "warning_code": 4,
  236. "fingerprint": "bb0ad5c4a42e06e3846c2089ff5269c17f65483a69414f6ce65eecf2bb11fab7",
  237. "check_name": "LinkToHref",
  238. "message": "Potentially unsafe model attribute in link_to href",
  239. "file": "app/views/admin/accounts/show.html.haml",
  240. "line": 119,
  241. "link": "http://brakemanscanner.org/docs/warning_types/link_to_href",
  242. "code": "link_to(Account.find(params[:id]).remote_url, Account.find(params[:id]).remote_url)",
  243. "render_path": [{"type":"controller","class":"Admin::AccountsController","method":"show","line":18,"file":"app/controllers/admin/accounts_controller.rb"}],
  244. "location": {
  245. "type": "template",
  246. "template": "admin/accounts/show"
  247. },
  248. "user_input": "Account.find(params[:id]).remote_url",
  249. "confidence": "Weak",
  250. "note": ""
  251. },
  252. {
  253. "warning_type": "Redirect",
  254. "warning_code": 18,
  255. "fingerprint": "bb7e94e60af41decb811bb32171f1b27e9bf3f4d01e9e511127362e22510eb11",
  256. "check_name": "Redirect",
  257. "message": "Possible unprotected redirect",
  258. "file": "app/controllers/remote_follow_controller.rb",
  259. "line": 18,
  260. "link": "http://brakemanscanner.org/docs/warning_types/redirect/",
  261. "code": "redirect_to(RemoteFollow.new(resource_params).subscribe_address_for(Account.find_local!(params[:account_username])))",
  262. "render_path": null,
  263. "location": {
  264. "type": "method",
  265. "class": "RemoteFollowController",
  266. "method": "create"
  267. },
  268. "user_input": "RemoteFollow.new(resource_params).subscribe_address_for(Account.find_local!(params[:account_username]))",
  269. "confidence": "High",
  270. "note": ""
  271. },
  272. {
  273. "warning_type": "Dynamic Render Path",
  274. "warning_code": 15,
  275. "fingerprint": "c5d6945d63264af106d49367228d206aa2f176699ecdce2b98fac101bc6a96cf",
  276. "check_name": "Render",
  277. "message": "Render path contains parameter value",
  278. "file": "app/views/admin/reports/index.html.haml",
  279. "line": 25,
  280. "link": "http://brakemanscanner.org/docs/warning_types/dynamic_render_path/",
  281. "code": "render(action => filtered_reports.page(params[:page]), {})",
  282. "render_path": [{"type":"controller","class":"Admin::ReportsController","method":"index","line":10,"file":"app/controllers/admin/reports_controller.rb"}],
  283. "location": {
  284. "type": "template",
  285. "template": "admin/reports/index"
  286. },
  287. "user_input": "params[:page]",
  288. "confidence": "Weak",
  289. "note": ""
  290. },
  291. {
  292. "warning_type": "Cross-Site Request Forgery",
  293. "warning_code": 7,
  294. "fingerprint": "d4278f04e807ec58a23925f8ab31fad5e84692f2fb9f2f57e7931aff05d57cf8",
  295. "check_name": "ForgerySetting",
  296. "message": "'protect_from_forgery' should be called in WellKnown::WebfingerController",
  297. "file": "app/controllers/well_known/webfinger_controller.rb",
  298. "line": 4,
  299. "link": "http://brakemanscanner.org/docs/warning_types/cross-site_request_forgery/",
  300. "code": null,
  301. "render_path": null,
  302. "location": {
  303. "type": "controller",
  304. "controller": "WellKnown::WebfingerController"
  305. },
  306. "user_input": null,
  307. "confidence": "High",
  308. "note": ""
  309. },
  310. {
  311. "warning_type": "Cross-Site Scripting",
  312. "warning_code": 4,
  313. "fingerprint": "e04aafe1e06cf8317fb6ac0a7f35783e45aa1274272ee6eaf28d39adfdad489b",
  314. "check_name": "LinkToHref",
  315. "message": "Potentially unsafe model attribute in link_to href",
  316. "file": "app/views/admin/accounts/show.html.haml",
  317. "line": 150,
  318. "link": "http://brakemanscanner.org/docs/warning_types/link_to_href",
  319. "code": "link_to(Account.find(params[:id]).outbox_url, Account.find(params[:id]).outbox_url)",
  320. "render_path": [{"type":"controller","class":"Admin::AccountsController","method":"show","line":18,"file":"app/controllers/admin/accounts_controller.rb"}],
  321. "location": {
  322. "type": "template",
  323. "template": "admin/accounts/show"
  324. },
  325. "user_input": "Account.find(params[:id]).outbox_url",
  326. "confidence": "Weak",
  327. "note": ""
  328. },
  329. {
  330. "warning_type": "Dynamic Render Path",
  331. "warning_code": 15,
  332. "fingerprint": "fbd0fc59adb5c6d44b60e02debb31d3af11719f534c9881e21435bbff87404d6",
  333. "check_name": "Render",
  334. "message": "Render path contains parameter value",
  335. "file": "app/views/stream_entries/show.html.haml",
  336. "line": 24,
  337. "link": "http://brakemanscanner.org/docs/warning_types/dynamic_render_path/",
  338. "code": "render(partial => \"stream_entries/#{Account.find_local!(params[:account_username]).statuses.find(params[:id]).stream_entry.activity_type.downcase}\", { :locals => ({ Account.find_local!(params[:account_username]).statuses.find(params[:id]).stream_entry.activity_type.downcase.to_sym => Account.find_local!(params[:account_username]).statuses.find(params[:id]).stream_entry.activity, :include_threads => true }) })",
  339. "render_path": [{"type":"controller","class":"StatusesController","method":"show","line":22,"file":"app/controllers/statuses_controller.rb"}],
  340. "location": {
  341. "type": "template",
  342. "template": "stream_entries/show"
  343. },
  344. "user_input": "params[:id]",
  345. "confidence": "Weak",
  346. "note": ""
  347. }
  348. ],
  349. "updated": "2018-02-16 06:42:53 +0100",
  350. "brakeman_version": "4.0.1"
  351. }