-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathavoid-raw.yaml
More file actions
18 lines (18 loc) · 776 Bytes
/
Copy pathavoid-raw.yaml
File metadata and controls
18 lines (18 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
rules:
- id: avoid-raw
metadata:
owasp: 'A7: Cross-Site Scripting (XSS)'
cwe: "CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')"
references:
- https://api.rubyonrails.org/classes/ActionView/Helpers/OutputSafetyHelper.html#method-i-raw
- https://www.netsparker.com/blog/web-security/preventing-xss-ruby-on-rails-web-applications/
category: security
technology:
- rails
message: |
'raw()' bypasses HTML escaping. If external data can reach here, this exposes your application
to cross-site scripting (XSS) attacks. If you must do this, construct individual strings
and mark them as safe for HTML rendering with `html_safe()`.
languages: [ruby]
severity: WARNING
pattern: raw(...)