AI Slop Code RIsk Monitor

doorkeeper-gem/doorkeeper

Doorkeeper is an OAuth 2 provider for Ruby on Rails / Grape.

5.7 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for doorkeeper-gem/doorkeeper, a Ruby project with 5,523 GitHub stars. SynthScan examined 43,752 lines of code across 357 source files, recording 237 pattern matches distributed across 6 syntactic categories. The legacy adjusted pattern signal is 5.7 (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.

5.7
Adjusted Signal
5.7
Raw Pattern Score
100%
Time Factor
2026-10-11
Last Push
5.5K
Stars
Ruby
Language
43.8K
Lines of Code
357
Files
237
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 24.7/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 0.0/100 · LOW

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

Agent Over-Engineering Ratio 8.6/100 · LOW

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

PR Review Velocity Impact 24.8/100 · LOW

Which changes need focused human review? 237 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 6LOW 231

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 237 distinct pattern matches across 6 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 Block154 hits · 142 pts
SeverityFileLineSnippetContext
LOW.rubocop_todo.yml1# This configuration was generated byCOMMENT
LOWapp/controllers/doorkeeper/tokens_controller.rb61 # The client also includes its authentication credentials as describedCOMMENT
LOWapp/controllers/doorkeeper/tokens_controller.rb81 # RFC7009COMMENT
LOWapp/controllers/doorkeeper/authorizations_controller.rb81 # superCOMMENT
LOW…llers/doorkeeper/authorized_applications_controller.rb41 # nil, and so does any block written as a bare lookup such asCOMMENT
LOWspec/dummy/app/assets/config/manifest.js1// JS and CSS bundlesCOMMENT
LOWspec/dummy/config/environments/production.rb21COMMENT
LOWspec/dummy/config/environments/production.rb41 # Use a different cache store in productionCOMMENT
LOWspec/dummy/config/environments/test.rb21 # Show full error reports and disable cachingCOMMENT
LOWspec/dummy/config/initializers/backtrace_silencers.rb1# frozen_string_literal: trueCOMMENT
LOWspec/dummy/config/initializers/session_store.rb1# frozen_string_literal: trueCOMMENT
LOWspec/dummy/config/initializers/doorkeeper.rb1# frozen_string_literal: trueCOMMENT
LOWspec/dummy/config/initializers/doorkeeper.rb21 # Admin.find_by_id(session[:admin_id]) || redirect_to(new_admin_session_url)COMMENT
LOWspec/dummy/config/initializers/doorkeeper.rb41 #COMMENT
LOWspec/dummy/config/initializers/doorkeeper.rb61 # Change the way client credentials are retrieved from the request object.COMMENT
LOWspec/dummy/config/initializers/doorkeeper.rb81 #COMMENT
LOWspec/dummy/config/initializers/doorkeeper.rb101 # puts "BEFORE HOOK FIRED! #{request}"COMMENT
LOWspec/dummy/config/initializers/doorkeeper.rb121 #COMMENT
LOWspec/dummy/config/initializers/doorkeeper.rb141 # `authorized_client` is nil if and only if `authorized_token` is present, and vice versa.COMMENT
LOWspec/dummy/config/initializers/doorkeeper.rb161 #COMMENT
LOWspec/dummy/config/initializers/secret_token.rb1# frozen_string_literal: trueCOMMENT
LOWspec/dummy/db/schema.rb1# This file is auto-generated from the current state of the database. InsteadCOMMENT
LOWspec/requests/endpoints/metadata_spec.rb201 context "with a custom tokens controller outside the doorkeeper namespace" doCOMMENT
LOWspec/requests/applications/api_only_spec.rb1# frozen_string_literal: trueCOMMENT
LOWspec/support/helpers/application_model_helper.rb1# frozen_string_literal: trueCOMMENT
LOWspec/lib/doorkeeper/orm/active_record_spec.rb61COMMENT
LOWspec/lib/doorkeeper/orm/active_record_spec.rb161 expect(CustomStiAccessGrant.ancestors).to include(COMMENT
LOWlib/doorkeeper/request.rb81 # credentials and body credentials is rejected even when only one ofCOMMENT
LOWlib/doorkeeper/http_fetcher.rb1# frozen_string_literal: trueCOMMENT
LOWlib/doorkeeper/http_fetcher.rb21 # loopback interface is intentionally not implemented. These rules followCOMMENT
LOWlib/doorkeeper/http_fetcher.rb41 # Ceiling on the whole exchange, so a body delivered one byte perCOMMENT
LOWlib/doorkeeper/config.rb1# frozen_string_literal: trueCOMMENT
LOWlib/doorkeeper/config.rb61 # @param { Hash } with grant_types as keys.COMMENT
LOWlib/doorkeeper/config.rb101 #COMMENT
LOWlib/doorkeeper/config.rb141 # (writable) database when automatic role switching is enabled.COMMENT
LOWlib/doorkeeper/config.rb221 # Provide a different secret storage implementation class for tokensCOMMENT
LOWlib/doorkeeper/config.rb341 #COMMENT
LOWlib/doorkeeper/config.rb361 #COMMENT
LOWlib/doorkeeper/config.rb381 # Allows to forbid specific Application redirect URI's by custom rules.COMMENT
LOWlib/doorkeeper/config.rb401 #COMMENT
LOWlib/doorkeeper/config.rb421 # different server process; a multi-process deployment can supply aCOMMENT
LOWlib/doorkeeper/config.rb441 # private_key_jwt_jwks_cache Doorkeeper::DocumentCache.new(ttl: 300)COMMENT
LOWlib/doorkeeper/config.rb461COMMENT
LOWlib/doorkeeper/config.rb481 # https://doorkeeper.gitbook.io/guides/configuration/other-configurations#custom-application-secret-generatorCOMMENT
LOWlib/doorkeeper/config.rb541 #COMMENT
LOWlib/doorkeeper/config.rb581 # Doorkeeper Access Token model class.COMMENT
LOWlib/doorkeeper/oauth/nonstandard.rb1# frozen_string_literal: trueCOMMENT
LOWlib/doorkeeper/oauth/nonstandard.rb21 #COMMENT
LOWlib/doorkeeper/oauth/authorization_code_request.rb181COMMENT
LOWlib/doorkeeper/oauth/authorization_code_request.rb241COMMENT
LOWlib/doorkeeper/oauth/client.rb1# frozen_string_literal: trueCOMMENT
LOWlib/doorkeeper/oauth/token.rb21 # RFC 6750 §2: "Clients MUST NOT use more than one method to transmitCOMMENT
LOWlib/doorkeeper/oauth/refresh_token_request.rb141 # used to obtain a new access token when the current access tokenCOMMENT
LOWlib/doorkeeper/oauth/scopes.rb81 # DEPRECATED: With dynamic scopes, #allowed should be called becauseCOMMENT
LOWlib/doorkeeper/oauth/token_introspection.rb41 privateCOMMENT
LOWlib/doorkeeper/oauth/token_introspection.rb121COMMENT
LOWlib/doorkeeper/oauth/token_introspection.rb141 # much of the authorization server's state to a third party, theCOMMENT
LOWlib/doorkeeper/oauth/token_introspection.rb161 # before its expiration time).COMMENT
LOWlib/doorkeeper/oauth/token_introspection.rb181 # place.COMMENT
LOWlib/doorkeeper/oauth/password_access_token_request.rb61 # other authentication requirements), the client MUST authenticate with the authorizationCOMMENT
94 more matches not shown…
Hyper-Verbose Identifiers70 hits · 79 pts
SeverityFileLineSnippetContext
LOWapp/controllers/doorkeeper/tokens_controller.rb179 def before_successful_authorization(context = nil)CODE
LOWapp/controllers/doorkeeper/tokens_controller.rb183 def after_successful_authorization(context)CODE
LOWapp/controllers/doorkeeper/authorizations_controller.rb233 def before_successful_authorization(context = nil)CODE
LOWapp/controllers/doorkeeper/authorizations_controller.rb237 def after_successful_authorization(context)CODE
LOW⚡spec/support/helpers/model_helper.rb12 def authorization_code_exists(options = {})CODE
LOW⚡spec/support/helpers/model_helper.rb20 def access_grant_should_exist_for(client, resource_owner)CODE
LOW⚡spec/support/helpers/model_helper.rb29 def access_token_should_exist_for(client, resource_owner)CODE
LOWspec/support/helpers/model_helper.rb46 def access_grant_should_have_scopes(*args)CODE
LOWspec/support/helpers/model_helper.rb51 def access_token_should_have_scopes(*args)CODE
LOWspec/support/helpers/authorization_request_helper.rb4 def resource_owner_is_authenticated(resource_owner = nil)CODE
LOW⚡spec/support/helpers/authorization_request_helper.rb21 def client_should_be_authorized(client)CODE
LOW⚡spec/support/helpers/authorization_request_helper.rb25 def client_should_not_be_authorized(client)CODE
LOW⚡spec/support/helpers/authorization_request_helper.rb29 def i_should_be_on_client_callback(client)CODE
LOW⚡spec/support/helpers/authorization_request_helper.rb33 def allowing_forgery_protection(&_block)CODE
LOWspec/support/helpers/url_helper.rb19 def password_token_endpoint_params(options = {})CODE
LOWspec/support/helpers/url_helper.rb30 def authorization_endpoint_url(options = {})CODE
LOWspec/support/helpers/url_helper.rb48 def refresh_token_endpoint_params(options = {})CODE
LOWspec/support/helpers/request_spec_helper.rb24 def url_should_not_have_param(param)CODE
LOWspec/support/helpers/request_spec_helper.rb56 def basic_auth_header_for_client(client)CODE
LOW⚡spec/support/helpers/request_spec_helper.rb69 def i_should_see_translated_error_message(key)CODE
LOW⚡spec/support/helpers/request_spec_helper.rb73 def i_should_not_see_translated_error_message(key)CODE
LOW⚡spec/support/helpers/request_spec_helper.rb81 def i_should_see_translated_invalid_request_error_message(key, value)CODE
LOW⚡spec/support/helpers/request_spec_helper.rb85 def translated_invalid_request_error_message(key, value)CODE
LOW⚡spec/support/helpers/request_spec_helper.rb89 def response_status_should_be(status)CODE
LOWspec/lib/oauth/client_spec.rb20 def with_deprecation_warnings(enabled: true)CODE
LOW…ec/generators/previous_refresh_token_generator_spec.rb23 def stub_previous_refresh_token_column(exists:)CODE
LOWspec/generators/refresh_token_scopes_generator_spec.rb15 def stub_refresh_token_scopes_column(exists:)CODE
LOW…ec/generators/grant_reuse_revocation_generator_spec.rb16 def stub_access_token_id_column(exists:)CODE
LOW⚡spec/controllers/protected_resources_controller_spec.rb14 def doorkeeper_unauthorized_render_options(*); endCODE
LOW⚡spec/controllers/protected_resources_controller_spec.rb16 def doorkeeper_forbidden_render_options(*); endCODE
LOW⚡spec/controllers/protected_resources_controller_spec.rb18 def doorkeeper_bad_request_render_options(*); endCODE
LOWspec/controllers/protected_resources_controller_spec.rb199 def doorkeeper_unauthorized_render_options(error: nil)CODE
LOWspec/controllers/protected_resources_controller_spec.rb209 def doorkeeper_unauthorized_render_options(error: nil); endCODE
LOWspec/controllers/protected_resources_controller_spec.rb229 def doorkeeper_unauthorized_render_options(**)CODE
LOWspec/controllers/protected_resources_controller_spec.rb239 def doorkeeper_unauthorized_render_options(error: nil); endCODE
LOWspec/controllers/protected_resources_controller_spec.rb257 def doorkeeper_unauthorized_render_options(**)CODE
LOWspec/controllers/protected_resources_controller_spec.rb267 def doorkeeper_unauthorized_render_options(error: nil); endCODE
LOWspec/controllers/protected_resources_controller_spec.rb289 def doorkeeper_forbidden_render_options(*); endCODE
LOWspec/controllers/protected_resources_controller_spec.rb315 def doorkeeper_forbidden_render_options(*)CODE
LOWspec/controllers/protected_resources_controller_spec.rb336 def doorkeeper_forbidden_render_options(*)CODE
LOWspec/controllers/protected_resources_controller_spec.rb354 def doorkeeper_forbidden_render_options(*)CODE
LOWspec/controllers/protected_resources_controller_spec.rb373 def doorkeeper_forbidden_render_options(*)CODE
LOWspec/controllers/protected_resources_controller_spec.rb397 def doorkeeper_bad_request_render_options(*); endCODE
LOWspec/controllers/protected_resources_controller_spec.rb406 def doorkeeper_bad_request_render_options(error: nil)CODE
LOWspec/controllers/protected_resources_controller_spec.rb430 def doorkeeper_bad_request_render_options(**)CODE
LOWspec/controllers/protected_resources_controller_spec.rb451 def doorkeeper_bad_request_render_options(**)CODE
LOWlib/doorkeeper/request.rb14 def client_authentication_method(request)CODE
LOWlib/doorkeeper/request.rb128 def build_fallback_strategy_class(grant_or_request_type)CODE
LOWlib/doorkeeper/oauth/base_request.rb29 def find_or_create_access_token(client, resource_owner, scopes, custom_attributes, server)CODE
LOWlib/doorkeeper/oauth/token.rb78 def from_bearer_authorization(request)CODE
LOWlib/doorkeeper/oauth/token.rb100 def transmission_methods_used(request, method)CODE
LOWlib/doorkeeper/oauth/token.rb144 def decode_basic_credentials_token(encoded_header)CODE
LOWlib/doorkeeper/oauth/client_credentials/creator.rb68 def find_active_existing_token_for(client, scopes, attributes)CODE
LOWlib/doorkeeper/oauth/authorization/token.rb107 def public_client_expires_in_cap(configuration, application)CODE
LOWlib/doorkeeper/models/access_token_mixin.rb57 def by_previous_refresh_token(previous_refresh_token)CODE
LOWlib/doorkeeper/models/access_token_mixin.rb110 def find_access_token_in_batches(relation, **args, &block)CODE
LOWlib/doorkeeper/models/access_token_mixin.rb437 def last_authorized_token_for(application_id, resource_owner)CODE
LOWlib/doorkeeper/models/access_token_mixin.rb467 def extract_custom_attributes(attributes)CODE
LOWlib/doorkeeper/orm/active_record/mixins/application.rb106 def read_attribute_for_serialization(key)CODE
LOWlib/doorkeeper/orm/active_record/mixins/application.rb161 def extract_serializable_attributes(options = {})CODE
10 more matches not shown…
Slop Phrases7 hits · 14 pts
SeverityFileLineSnippetContext
LOWspec/dummy/config/initializers/doorkeeper.rb144 # them to make sure you doesn't get NoMethodError exception.COMMENT
MEDIUMlib/doorkeeper/config.rb362 # For example you can add an additional database column to `oauth_applications` table,COMMENT
MEDIUMlib/generators/doorkeeper/templates/initializer.rb531 # For example you can add an additional database column to `oauth_applications` table,COMMENT
LOWlib/generators/doorkeeper/templates/initializer.rb56 # Don't forget to include Doorkeeper ORM mixins into your custom models:COMMENT
LOWlib/generators/doorkeeper/templates/initializer.rb87 # [NOTE] If you apply this option on already existing project don't forget to manuallyCOMMENT
LOWlib/generators/doorkeeper/templates/initializer.rb87 # [NOTE] If you apply this option on already existing project don't forget to manuallyCOMMENT
LOWlib/generators/doorkeeper/templates/initializer.rb653 # them to make sure you doesn't get NoMethodError exception.COMMENT
Self-Referential Comments2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMspec/dummy/config/initializers/wrap_parameters.rb5# This file contains settings for ActionController::ParamsWrapper whichCOMMENT
MEDIUMspec/dummy/db/schema.rb1# This file is auto-generated from the current state of the database. InsteadCOMMENT
Modern AI Meta-Vocabulary2 hits · 5 pts
SeverityFileLineSnippetContext
MEDIUMREADME.md7[![GuardRails badge](https://api.guardrails.io/v2/badges/21183?token=66768ce8f6995814df81f65a2cff40f739f688492704f973e62CODE
MEDIUM.agents/skills/antipattern-prevention/SKILL.md82# GOOD — explicit orchestration in request objectsCOMMENT
Verbosity Indicators2 hits · 3 pts
SeverityFileLineSnippetContext
LOWapp/controllers/doorkeeper/tokens_controller.rb101 # Token belongs to specific client, so we need to check ifCOMMENT
LOWlib/doorkeeper/orm/active_record/mixins/application.rb83 # if application belongs to some owner we need to check if it's the same asCOMMENT