brakeman.ignore 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. {
  2. "ignored_warnings": [
  3. {
  4. "warning_type": "Cross-Site Scripting",
  5. "warning_code": 2,
  6. "fingerprint": "71cf98c8235b5cfa9946b5db8fdc1a2f3a862566abb34e4542be6f3acae78233",
  7. "check_name": "CrossSiteScripting",
  8. "message": "Unescaped model attribute",
  9. "file": "app/views/admin/disputes/appeals/_appeal.html.haml",
  10. "line": 7,
  11. "link": "https://brakemanscanner.org/docs/warning_types/cross_site_scripting",
  12. "code": "t((Unresolved Model).new.strike.action, :scope => \"admin.strikes.actions\", :name => content_tag(:span, (Unresolved Model).new.strike.account.username, :class => \"username\"), :target => content_tag(:span, (Unresolved Model).new.account.username, :class => \"target\"))",
  13. "render_path": [
  14. {
  15. "type": "template",
  16. "name": "admin/disputes/appeals/index",
  17. "line": 20,
  18. "file": "app/views/admin/disputes/appeals/index.html.haml",
  19. "rendered": {
  20. "name": "admin/disputes/appeals/_appeal",
  21. "file": "app/views/admin/disputes/appeals/_appeal.html.haml"
  22. }
  23. }
  24. ],
  25. "location": {
  26. "type": "template",
  27. "template": "admin/disputes/appeals/_appeal"
  28. },
  29. "user_input": "(Unresolved Model).new.strike",
  30. "confidence": "Weak",
  31. "cwe_id": [
  32. 79
  33. ],
  34. "note": ""
  35. },
  36. {
  37. "warning_type": "Denial of Service",
  38. "warning_code": 76,
  39. "fingerprint": "7b6abba5699755348e7ee82a4694bfbf574b41c7cce2d0db0f7c11ae3f983c72",
  40. "check_name": "RegexDoS",
  41. "message": "Model attribute used in regular expression",
  42. "file": "lib/mastodon/cli/domains.rb",
  43. "line": 128,
  44. "link": "https://brakemanscanner.org/docs/warning_types/denial_of_service/",
  45. "code": "/\\.?(#{DomainBlock.where(:severity => 1).pluck(:domain).map do\n Regexp.escape(domain)\n end.join(\"|\")})$/",
  46. "render_path": null,
  47. "location": {
  48. "type": "method",
  49. "class": "Mastodon::CLI::Domains",
  50. "method": "crawl"
  51. },
  52. "user_input": "DomainBlock.where(:severity => 1).pluck(:domain)",
  53. "confidence": "Weak",
  54. "cwe_id": [
  55. 20,
  56. 185
  57. ],
  58. "note": ""
  59. },
  60. {
  61. "warning_type": "Cross-Site Scripting",
  62. "warning_code": 4,
  63. "fingerprint": "cd5cfd7f40037fbfa753e494d7129df16e358bfc43ef0da3febafbf4ee1ed3ac",
  64. "check_name": "LinkToHref",
  65. "message": "Potentially unsafe model attribute in `link_to` href",
  66. "file": "app/views/admin/trends/links/_preview_card.html.haml",
  67. "line": 7,
  68. "link": "https://brakemanscanner.org/docs/warning_types/link_to_href",
  69. "code": "link_to((Unresolved Model).new.title, (Unresolved Model).new.url)",
  70. "render_path": [
  71. {
  72. "type": "template",
  73. "name": "admin/trends/links/index",
  74. "line": 49,
  75. "file": "app/views/admin/trends/links/index.html.haml",
  76. "rendered": {
  77. "name": "admin/trends/links/_preview_card",
  78. "file": "app/views/admin/trends/links/_preview_card.html.haml"
  79. }
  80. }
  81. ],
  82. "location": {
  83. "type": "template",
  84. "template": "admin/trends/links/_preview_card"
  85. },
  86. "user_input": "(Unresolved Model).new.url",
  87. "confidence": "Weak",
  88. "cwe_id": [
  89. 79
  90. ],
  91. "note": ""
  92. }
  93. ],
  94. "updated": "2023-07-12 11:20:51 -0400",
  95. "brakeman_version": "6.0.0"
  96. }