rules:
- id: model-attributes-attr-protected
  message: >-
    Checks for models that use attr_protected, as use of allowlist instead of denylist
    is better practice.
    Attr_protected was also found to be vulnerable to bypass. The fixed versions of
    Ruby are: 3.2.12, 3.1.11, 2.3.17.
    To prevent bypass, use attr_accessible instead.
  metadata:
    references:
    - https://github.com/presidentbeef/brakeman/blob/main/lib/brakeman/checks/check_model_attributes.rb
    - https://groups.google.com/g/rubyonrails-security/c/AFBKNY7VSH8/discussion
    category: security
    technology:
    - ruby
  languages:
  - ruby
  severity: WARNING
  pattern: attr_protected
