AI Slop Code RIsk Monitor

heartcombo/devise

Flexible authentication solution for Rails with Warden.

11.9 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for heartcombo/devise, a Ruby project with 24,355 GitHub stars. SynthScan examined 19,090 lines of code across 215 source files, recording 189 pattern matches distributed across 7 syntactic categories. The legacy adjusted pattern signal is 11.9 (Moderate pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

11.9
Adjusted Signal
11.9
Raw Pattern Score
100%
Time Factor
2026-10-06
Last Push
24.4K
Stars
Ruby
Language
19.1K
Lines of Code
215
Files
189
Pattern Hits
2026-10-12
Scan Date
0.00
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 41.7/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 171 finding(s).

Hallucinated Dependency & Supply Chain Risk 5.5/100 · LOW

Are imports declared and package/API names verified? 18 finding(s).

Agent Over-Engineering Ratio 12.4/100 · LOW

Are wrappers, guards, and repeated structures necessary? 44 finding(s).

PR Review Velocity Impact 41.9/100 · MEDIUM

Which changes need focused human review? 189 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 0MEDIUM 9LOW 180

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 189 distinct pattern matches across 7 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Over-Commented Block101 hits · 101 pts
SeverityFileLineSnippetContext
LOWapp/controllers/devise_controller.rb21 # Override prefixes to consider the scoped view.COMMENT
LOWtest/rails_app/config/environments/production.rb41 # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apacheCOMMENT
LOWtest/rails_app/config/environments/production.rb61COMMENT
LOWtest/rails_app/config/environments/test.rb1# frozen_string_literal: trueCOMMENT
LOWtest/rails_app/config/initializers/devise.rb1# frozen_string_literal: trueCOMMENT
LOWtest/rails_app/config/initializers/devise.rb21 config.mailer_sender = "please-change-me@config-initializers-devise.com"COMMENT
LOWtest/rails_app/config/initializers/devise.rb41 # should be aborted or not if the value is not present. By default is empty.COMMENT
LOWtest/rails_app/config/initializers/devise.rb61 # Tell if authentication through request.params is enabled. True by default.COMMENT
LOWtest/rails_app/config/initializers/devise.rb81 # When allow_unconfirmed_access_for is zero, the user won't be able to sign in without confirming.COMMENT
LOWtest/rails_app/config/initializers/devise.rb101 # Regex to use to validate the email addressCOMMENT
LOWtest/rails_app/config/initializers/devise.rb121 # :both = Enables both strategiesCOMMENT
LOWtest/rails_app/config/initializers/devise.rb141COMMENT
LOWtest/rails_app/config/initializers/devise.rb161 # The default is true, which means any logout action will sign out all active scopes.COMMENT
LOWtest/rails_app/config/initializers/devise.rb181 # If you want to use other strategies, that are not supported by Devise, orCOMMENT
LOWtest/rails_app/db/schema.rb1# encoding: UTF-8COMMENT
LOWlib/devise.rb381 # +model+ - String representing the load path to a custom *model* for this module (to autoload.)COMMENT
LOWlib/devise.rb441COMMENT
LOWlib/devise/mapping.rb1# frozen_string_literal: trueCOMMENT
LOWlib/devise/parameter_sanitizer.rb1# frozen_string_literal: trueCOMMENT
LOWlib/devise/parameter_sanitizer.rb21 # def configure_permitted_parametersCOMMENT
LOWlib/devise/parameter_sanitizer.rb81COMMENT
LOWlib/devise/test/controller_helpers.rb1# frozen_string_literal: trueCOMMENT
LOWlib/devise/test/controller_helpers.rb61 # * +scope+ - An optional +Symbol+ with the scope where the resourceCOMMENT
LOWlib/devise/test/integration_helpers.rb1# frozen_string_literal: trueCOMMENT
LOWlib/devise/mailers/helpers.rb61 template_pathCOMMENT
LOWlib/devise/strategies/authenticatable.rb61 #COMMENT
LOWlib/devise/models/omniauthable.rb1# frozen_string_literal: trueCOMMENT
LOWlib/devise/models/database_authenticatable.rb1# frozen_string_literal: trueCOMMENT
LOWlib/devise/models/database_authenticatable.rb101 falseCOMMENT
LOWlib/devise/models/database_authenticatable.rb141 resultCOMMENT
LOWlib/devise/models/authenticatable.rb1# frozen_string_literal: trueCOMMENT
LOWlib/devise/models/authenticatable.rb21 # passed to find_for_authentication method and considered in your model lookup.COMMENT
LOWlib/devise/models/authenticatable.rb41 #COMMENT
LOWlib/devise/models/authenticatable.rb141 #COMMENT
LOWlib/devise/models/authenticatable.rb161 # endCOMMENT
LOWlib/devise/models/authenticatable.rb181 # message = devise_mailer.send(notification, self, *args)COMMENT
LOWlib/devise/models/authenticatable.rb241 http_authenticatable.include?(strategy) : http_authenticatableCOMMENT
LOWlib/devise/models/recoverable.rb1# frozen_string_literal: trueCOMMENT
LOWlib/devise/models/recoverable.rb61 # reset_password_within is a model configuration, must always be an integer value.COMMENT
LOWlib/devise/models/timeoutable.rb1# frozen_string_literal: trueCOMMENT
LOWlib/devise/models/confirmable.rb1# frozen_string_literal: trueCOMMENT
LOWlib/devise/models/confirmable.rb21 #COMMENT
LOWlib/devise/models/confirmable.rb181 # in models to map to a nice sign up e-mail.COMMENT
LOWlib/devise/models/confirmable.rb201 # # allow_unconfirmed_access_for = 5.days and confirmation_sent_at = 4.days.agoCOMMENT
LOWlib/devise/models/confirmable.rb221 # Examples:COMMENT
LOWlib/devise/models/confirmable.rb301 # used to insert your own logic that is only run after the user successfullyCOMMENT
LOWlib/devise/models/lockable.rb1# frozen_string_literal: trueCOMMENT
LOWlib/devise/models/rememberable.rb1# frozen_string_literal: trueCOMMENT
LOWlib/devise/models/rememberable.rb21 # asking for credentials. After this time the user will be blocked andCOMMENT
LOWlib/devise/models/validatable.rb1# frozen_string_literal: trueCOMMENT
LOWlib/devise/controllers/helpers.rb21 # defined for normal mappings.COMMENT
LOWlib/devise/controllers/helpers.rb81 endCOMMENT
LOWlib/devise/controllers/helpers.rb101 # authenticate_admin! # Signs admin in or redirectCOMMENT
LOWlib/devise/controllers/helpers.rb181 elsif context.respond_to?(:root_path)COMMENT
LOWlib/devise/controllers/helpers.rb201 # namespace :user doCOMMENT
LOWlib/devise/controllers/sign_in_out.rb21 # to the set_user method in warden.COMMENT
LOWlib/devise/controllers/store_location.rb1# frozen_string_literal: trueCOMMENT
LOWlib/devise/controllers/url_helpers.rb1# frozen_string_literal: trueCOMMENT
LOWlib/devise/rails/routes.rb41 #COMMENT
LOWlib/devise/rails/routes.rb61 # # Confirmation routes for Confirmable, if User model has :confirmable configuredCOMMENT
41 more matches not shown…
Hyper-Verbose Identifiers44 hits · 50 pts
SeverityFileLineSnippetContext
LOWapp/mailers/devise/mailer.rb7 def confirmation_instructions(record, token, opts = {})CODE
LOWapp/mailers/devise/mailer.rb12 def reset_password_instructions(record, token, opts = {})CODE
LOWapp/controllers/devise_controller.rb216 def respond_with_navigational(*args, &block)CODE
LOWapp/controllers/devise/omniauth_callbacks_controller.rb29 def after_omniauth_failure_path_for(scope)CODE
LOW⚡app/controllers/devise/passwords_controller.rb55 def after_resetting_password_path_for(resource)CODE
LOW⚡app/controllers/devise/passwords_controller.rb60 def after_sending_reset_password_instructions_path_for(resource_name)CODE
LOWapp/controllers/devise/unlocks_controller.rb40 def after_sending_unlock_instructions_path_for(resource)CODE
LOWapp/controllers/devise/confirmations_controller.rb38 def after_resending_confirmation_instructions_path_for(resource_name)CODE
LOWapp/controllers/devise/confirmations_controller.rb43 def after_confirmation_path_for(resource_name, resource)CODE
LOWapp/controllers/devise/registrations_controller.rb111 def after_inactive_sign_up_path_for(resource)CODE
LOWapp/controllers/devise/registrations_controller.rb151 def set_flash_message_for_update(resource, prev_unconfirmed_email)CODE
LOWtest/mailers/mailer_test.rb8 def confirmation_instructions(record, token, opts = {})CODE
LOWtest/mailers/mailer_test.rb26 def confirmation_instructions(record, token, opts = {})CODE
LOWtest/integration/http_authenticatable_test.rb102 def sign_in_as_new_user_with_http(username = "user@test.com", password = "12345678")CODE
LOWtest/integration/lockable_test.rb7 def visit_user_unlock_with_token(unlock_token)CODE
LOWtest/integration/confirmable_test.rb7 def visit_user_confirmation_with_token(confirmation_token)CODE
LOWtest/integration/confirmable_test.rb291 def visit_admin_confirmation_with_token(confirmation_token)CODE
LOWtest/models/confirmable_test.rb321 def confirm_user_by_token_with_confirmation_sent_at(confirmation_sent_at)CODE
LOWtest/support/helpers.rb49 def create_user_without_email(attributes = {})CODE
LOWtest/support/helpers.rb53 def create_user_with_validations(attributes = {})CODE
LOWtest/support/assertions.rb25 def assert_raise_with_message(exception_klass, message, &block)CODE
LOWlib/devise/parameter_filter.rb19 def filtered_hash_by_method_for_given_keys(conditions, method, condition_keys)CODE
LOWlib/devise/strategies/authenticatable.rb157 def parse_authentication_key_values(hash, keys)CODE
LOWlib/devise/models/database_authenticatable.rb198 def find_for_database_authentication(conditions)CODE
LOWlib/devise/models/authenticatable.rb180 # def render_and_send_devise_message(notification, *args)COMMENT
LOWlib/devise/models/authenticatable.rb206 def apply_to_attribute_or_variable(attr, method)CODE
LOW⚡lib/devise/models/authenticatable.rb267 def find_first_by_auth_conditions(tainted_conditions, opts = {})CODE
LOW⚡lib/devise/models/authenticatable.rb272 def find_or_initialize_with_error_by(attribute, value, error = :invalid) #:nodoc:CODE
LOW⚡lib/devise/models/authenticatable.rb277 def find_or_initialize_with_errors(required_attributes, attributes, error = :invalid) #:nodoc:CODE
LOWlib/devise/models/recoverable.rb98 def send_reset_password_instructions_notification(token)CODE
LOWlib/devise/models/recoverable.rb114 def with_reset_password_token(token)CODE
LOWlib/devise/models/recoverable.rb123 def send_reset_password_instructions(attributes = {})CODE
LOWlib/devise/models/confirmable.rb318 def send_confirmation_instructions(attributes = {})CODE
LOWlib/devise/models/confirmable.rb359 def find_by_unconfirmed_email_with_errors(attributes = {})CODE
LOWlib/devise/controllers/store_location.rb56 def extract_path_from_location(location)CODE
LOWlib/devise/controllers/store_location.rb71 def add_fragment_back_to_path(uri, path)CODE
LOWlib/devise/rails/routes.rb460 def with_devise_exclusive_scope(new_path, new_as, options) #:nodoc:CODE
LOW…templates/controllers/omniauth_callbacks_controller.rb27 # def after_omniauth_failure_path_for(scope)COMMENT
LOW…nerators/templates/controllers/passwords_controller.rb26 # def after_resetting_password_path_for(resource)COMMENT
LOW…nerators/templates/controllers/passwords_controller.rb31 # def after_sending_reset_password_instructions_path_for(resource_name)COMMENT
LOW…generators/templates/controllers/unlocks_controller.rb22 # def after_sending_unlock_instructions_path_for(resource)COMMENT
LOW…tors/templates/controllers/confirmations_controller.rb22 # def after_resending_confirmation_instructions_path_for(resource_name)COMMENT
LOW…tors/templates/controllers/confirmations_controller.rb27 # def after_confirmation_path_for(resource_name, resource)COMMENT
LOW…tors/templates/controllers/registrations_controller.rb59 # def after_inactive_sign_up_path_for(resource)COMMENT
Redundant / Tautological Comments13 hits · 22 pts
SeverityFileLineSnippetContext
LOW⚡app/controllers/devise/passwords_controller.rb64 # Check if a reset_password_token is provided in the requestCOMMENT
LOW⚡app/controllers/devise/passwords_controller.rb72 # Check if the user should be signed in automatically after resetting the password.COMMENT
LOW⚡app/controllers/devise/passwords_controller.rb77 # Check if proper Lockable module methods are present & unlock strategyCOMMENT
LOWapp/controllers/devise/sessions_controller.rb57 # Check if there is no signed in user before doing the sign out.COMMENT
LOWapp/controllers/devise/registrations_controller.rb130 # Check if the user should be signed in automatically after updating the password.COMMENT
LOWtest/rails_app/config/environments/production.rb67 # Set this to true and configure the email server for immediate delivery to raise delivery errors.COMMENT
LOWlib/devise/failure_app.rb263 # Check if flash messages should be emitted. Default is to do it onCOMMENT
LOWlib/devise/strategies/authenticatable.rb60 # Check if this is a valid strategy for http authentication by:COMMENT
LOWlib/devise/strategies/authenticatable.rb70 # Check if this is a valid strategy for params authentication by:COMMENT
LOWlib/devise/strategies/authenticatable.rb82 # Check if the model accepts this strategy as http authenticatable.COMMENT
LOWlib/devise/strategies/authenticatable.rb87 # Check if the model accepts this strategy as params authenticatable.COMMENT
LOWlib/devise/models/authenticatable.rb75 # Check if the current object is valid for authentication. This method andCOMMENT
LOWlib/devise/controllers/helpers.rb270 # Check if flash messages should be emitted. Default is to do it onCOMMENT
Fake / Example Data18 hits · 22 pts
SeverityFileLineSnippetContext
LOWtest/integration/omniauthable_test.rb10 "email" => 'user@example.com',CODE
LOWtest/integration/recoverable_test.rb51 fill_in 'email', with: 'foo@bar.com'CODE
LOWtest/integration/recoverable_test.rb63 fill_in 'email', with: 'foo@bar.com'CODE
LOW⚡test/integration/recoverable_test.rb76 fill_in 'email', with: 'foo@bar.com'CODE
LOW⚡test/integration/recoverable_test.rb81 assert_have_selector "input[type=email][value='foo@bar.com']"CODE
LOW⚡test/integration/recoverable_test.rb87 create_user(email: 'foo@bar.com')CODE
LOWtest/integration/recoverable_test.rb99 create_user(email: 'foo@bar.com')CODE
LOWtest/integration/database_authenticatable_test.rb10 fill_in 'email', with: 'foo@bar.com'CODE
LOWtest/integration/database_authenticatable_test.rb21 fill_in 'email', with: 'foo@bar.com'CODE
LOWtest/integration/database_authenticatable_test.rb32 fill_in 'email', with: 'foo@bar.com'CODE
LOWtest/integration/database_authenticatable_test.rb40 create_user(email: 'foo@bar.com')CODE
LOWtest/integration/database_authenticatable_test.rb107 fill_in 'email', with: 'foo@bar.com'CODE
LOW⚡test/models/database_authenticatable_test.rb62 swap Devise, strip_whitespace_keys: [:fake_key] doCODE
LOW⚡test/models/database_authenticatable_test.rb68 swap Devise, case_insensitive_keys: [:fake_key] doCODE
LOW⚡test/models/database_authenticatable_test.rb74 conditions = { "login" => "foo@bar.com", "bool1" => true, "bool2" => false, "fixnum" => 123, "will_be_converted" => CODE
LOW⚡test/models/database_authenticatable_test.rb76 assert_equal( { "login" => "foo@bar.com", "bool1" => "true", "bool2" => "false", "fixnum" => "123", "will_be_convertCODE
LOW…st/controllers/custom_registrations_controller_test.rb17 post :create, params: { user: { email: "user@example.org", password: "password", password_confirmation: "password" }CODE
LOWguides/bug_report_templates/integration_test.rb95 login_as User.create!(email: 'test@test.com', password: 'test123456', password_confirmation: 'test123456')CODE
Self-Referential Comments7 hits · 21 pts
SeverityFileLineSnippetContext
MEDIUMtest/rails_app/db/schema.rb4# This file is auto-generated from the current state of the database. InsteadCOMMENT
MEDIUMtest/support/webrat/integrations/rails.rb21 # This method is private within webrat gem and after Ruby 2.4 we get a lot of warnings becauseCOMMENT
MEDIUMlib/devise.rb289 # Define a set of modules that are called when a mapping is added.COMMENT
MEDIUMlib/devise/models/database_authenticatable.rb10 # This module defines a `password=` method. This method will hash the argumentCOMMENT
MEDIUMlib/devise/models/authenticatable.rb245 # This method is always called during an authentication process butCOMMENT
MEDIUMlib/devise/models/rememberable.rb133 # Create the cookie key using the record id and remember_tokenCOMMENT
MEDIUMlib/devise/rails/routes.rb47 # This method is going to look inside your User model and create theCOMMENT
AI Slop Vocabulary4 hits · 9 pts
SeverityFileLineSnippetContext
LOWlib/devise/failure_app.rb115 # TODO: Remove the fallback and just use `downcase_first` once we drop support for Rails 7.0.COMMENT
LOWlib/devise/models/authenticatable.rb104 # given to :except will simply add names to exempt to Devise internal list.COMMENT
MEDIUMlib/devise/models/confirmable.rb31 # confirmation. Also, when used in conjunction with `send_email_changed_notification`,COMMENT
MEDIUMlib/generators/templates/devise.rb160 # Also, when used in conjunction with `send_email_changed_notification`,COMMENT
Slop Phrases2 hits · 3 pts
SeverityFileLineSnippetContext
LOWlib/devise/models/authenticatable.rb42 # You can overwrite this method yourself, but if you do, don't forget to call super:COMMENT
LOWlib/devise/models/authenticatable.rb42 # You can overwrite this method yourself, but if you do, don't forget to call super:COMMENT