rules:
- id: json-entity-escape
  pattern-either:
  - pattern: |
      ActiveSupport.escape_html_entities_in_json = false
  - pattern: |
      config.active_support.escape_html_entities_in_json = false
  message: >-
    Checks if HTML escaping is globally disabled for JSON output. This could lead
    to XSS.
  metadata:
    references:
    - https://github.com/presidentbeef/brakeman/blob/main/lib/brakeman/checks/check_json_entity_escape.rb
    category: security
    technology:
    - ruby
  languages:
  - ruby
  severity: WARNING
