Repository Analysis

heartcombo/devise

Flexible authentication solution for Rails with Warden.

11.9 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of heartcombo/devise, a Ruby project with 24,347 GitHub stars. SynthScan v2.0 examined 19,087 lines of code across 215 source files, recording 189 pattern matches distributed across 7 syntactic categories. The overall adjusted score of 11.9 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

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

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 0MEDIUM 9LOW 180

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

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 statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

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.rb215 def respond_with_navigational(*args, &block)CODE
LOWapp/controllers/devise/omniauth_callbacks_controller.rb29 def after_omniauth_failure_path_for(scope)CODE
LOWapp/controllers/devise/passwords_controller.rb55 def after_resetting_password_path_for(resource)CODE
LOWapp/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
LOWlib/devise/models/authenticatable.rb267 def find_first_by_auth_conditions(tainted_conditions, opts = {})CODE
LOWlib/devise/models/authenticatable.rb272 def find_or_initialize_with_error_by(attribute, value, error = :invalid) #:nodoc:CODE
LOWlib/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
LOWapp/controllers/devise/passwords_controller.rb64 # Check if a reset_password_token is provided in the requestCOMMENT
LOWapp/controllers/devise/passwords_controller.rb72 # Check if the user should be signed in automatically after resetting the password.COMMENT
LOWapp/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
LOWtest/integration/recoverable_test.rb76 fill_in 'email', with: 'foo@bar.com'CODE
LOWtest/integration/recoverable_test.rb81 assert_have_selector "input[type=email][value='foo@bar.com']"CODE
LOWtest/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
LOWtest/models/database_authenticatable_test.rb62 swap Devise, strip_whitespace_keys: [:fake_key] doCODE
LOWtest/models/database_authenticatable_test.rb68 swap Devise, case_insensitive_keys: [:fake_key] doCODE
LOWtest/models/database_authenticatable_test.rb74 conditions = { "login" => "foo@bar.com", "bool1" => true, "bool2" => false, "fixnum" => 123, "will_be_converted" => CODE
LOWtest/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