insecure-configuration

A setting that turns off a protection.

Group
Code
Runs
Runs under ur scan: ur scan --rule insecure-configuration
Level
warning
Reads
Every file
Fix
None: the safe form depends on what the value is meant to be

Why

The program sets an option that turns off a protection its framework gives by default, such as httponly: false on the session cookie, which lets any script on the page read it, or escape_html_entities_in_json = false, which lets JSON written into a page close its script tag, or leaves out a setting its production environment needs, such as force_ssl = true, which serves every request over TLS. Leave the option at its default, and make the settings production needs.

The fix, as Ur suggests it: leave the protection on.

For agents

Never turn off httponly, secure cookies, TLS, or HTML escaping of JSON.

Example

config/initializers/session_store.rb
App.config.session_store :cookie_store, httponly: false
What Ur prints
$ ur scan --rule insecure-configuration
warning[insecure-configuration]: `httponly: false` makes a session cookie scripts can read
  --> ./config/initializers/session_store.rb:1:1 module's top level
  = hint: leave the protection on
  = see: Securing Rails Applications, 2.3 Session Storage, Rails Guides (2025-10-01), https://guides.rubyonrails.org/security.html#session-storage
scanned 1 file (no framework recognized)
  insecure-configuration: 1 high, 0 medium
1 finding and 0 of medium confidence

Try it in the playground →

Source

Securing Rails Applications, 2.3 Session Storage, Rails Guides (2025-10-01).