AI Slop Code RIsk Monitor

django-oauth/django-oauth-toolkit

OAuth2 goodies for the Djangonauts!

22.4 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for django-oauth/django-oauth-toolkit, a Python project with 3,343 GitHub stars. SynthScan examined 134,186 lines of code across 396 source files, recording 2459 pattern matches distributed across 18 syntactic categories. The legacy adjusted pattern signal is 22.4 (Elevated 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.

22.4
Adjusted Signal
22.4
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
3.3K
Stars
Python
Language
134.2K
Lines of Code
396
Files
2.5K
Pattern Hits
2026-10-12
Scan Date
0.25
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 50.2/100 · HIGH

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

Hallucinated Dependency & Supply Chain Risk 16.4/100 · LOW

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

Agent Over-Engineering Ratio 58.5/100 · HIGH

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

PR Review Velocity Impact 70.2/100 · HIGH

Which changes need focused human review? 2459 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 18HIGH 80MEDIUM 114LOW 2247

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 2459 distinct pattern matches across 18 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.

Hyper-Verbose Identifiers1975 hits · 1700 pts
SeverityFileLineSnippetContext
LOWtests/test_www_authenticate.py24 def test_bare_bearer_when_nothing_to_advertise(self):CODE
LOWtests/test_www_authenticate.py28 def test_includes_error_and_resource_metadata(self):CODE
LOW⚡tests/test_www_authenticate.py42 def test_explicit_resource_metadata_url_overrides_default(self):CODE
LOW⚡tests/test_www_authenticate.py50 def test_explicit_none_omits_resource_metadata(self):CODE
LOW⚡tests/test_www_authenticate.py55 def test_quoted_string_values_are_escaped(self):CODE
LOWtests/test_oauth2_provider_middleware.py32 def test_malformed_bearer_header_no_token(self):CODE
LOWtests/test_oauth2_provider_middleware.py42 def test_malformed_bearer_header_empty_token(self):CODE
LOWtests/test_oauth2_provider_middleware.py74 def test_invalid_bearer_token(self):CODE
LOWtests/test_oauth2_provider_middleware.py84 def test_invalid_bearer_token_logs_at_debug_level(self):CODE
LOWtests/test_oauth2_provider_middleware.py98 def test_no_authorization_header(self):CODE
LOWtests/test_oauth2_provider_middleware.py107 def test_non_bearer_authorization_header(self):CODE
LOWtests/test_oauth2_provider_middleware.py127 def test_case_insensitive_bearer_scheme(self):CODE
LOWtests/test_oauth2_provider_middleware.py140 def test_scheme_starting_with_bearer_is_rejected(self):CODE
LOWtests/test_oauth2_provider_middleware.py150 def test_whitespace_variations(self):CODE
LOWtests/test_client_branding.py49 def test_shows_logo_and_links(self):CODE
LOW⚡tests/test_client_branding.py74 def test_logo_alt_falls_back_to_client_id(self):CODE
LOW⚡tests/test_client_branding.py80 def test_only_registered_links_are_shown(self):CODE
LOW⚡tests/test_client_branding.py88 def test_nothing_shown_without_display_metadata(self):CODE
LOWtests/test_form_encoded_requests.py73 def test_json_body_keeps_legacy_error(self):CODE
LOWtests/test_form_encoded_requests.py87 def test_multipart_body_is_accepted(self):CODE
LOWtests/test_form_encoded_requests.py94 def test_non_compliant_body_warns_about_the_coming_default(self):CODE
LOWtests/test_form_encoded_requests.py107 def test_compliant_body_does_not_warn(self):CODE
LOWtests/test_form_encoded_requests.py118 def test_get_request_does_not_warn(self):CODE
LOW⚡tests/test_form_encoded_requests.py140 def test_form_encoded_body_is_accepted(self):CODE
LOW⚡tests/test_form_encoded_requests.py147 def test_charset_parameter_is_accepted(self):CODE
LOW⚡tests/test_form_encoded_requests.py156 def test_json_body_is_rejected(self):CODE
LOW⚡tests/test_form_encoded_requests.py168 def test_multipart_body_is_rejected(self):CODE
LOW⚡tests/test_form_encoded_requests.py174 def test_missing_content_type_is_rejected(self):CODE
LOW⚡tests/test_form_encoded_requests.py180 def test_every_form_encoded_endpoint_is_covered(self):CODE
LOW⚡tests/test_form_encoded_requests.py190 def test_get_requests_are_unaffected(self):CODE
LOWtests/test_form_encoded_requests.py202 def test_disabled_endpoint_still_reports_not_found(self):CODE
LOWtests/test_form_encoded_requests.py220 def test_json_registration_still_succeeds(self):CODE
LOWtests/test_form_encoded_requests.py245 def test_userinfo_post_is_not_rejected(self):CODE
LOW⚡tests/test_form_encoded_requests.py260 def test_no_error_when_only_the_gate_is_set(self):CODE
LOW⚡tests/test_form_encoded_requests.py265 def test_no_error_when_only_the_json_backend_is_set(self):CODE
LOW⚡tests/test_form_encoded_requests.py271 def test_error_when_the_json_backend_can_never_be_reached(self):CODE
LOWtests/test_admin.py62def test_mask_credential_hides_the_secret():CODE
LOWtests/test_admin.py81def _assert_hidden_on_change_form(admin_class, model, field, masked_field):CODE
LOWtests/test_admin.py95def test_credential_admins_disable_add():CODE
LOWtests/test_admin.py108def test_admin_overrides_preserve_subclass_config():CODE
LOW⚡tests/test_admin.py129def _assert_searchable_by_app_and_user(admin_class):CODE
LOW⚡tests/test_admin.py137def test_access_token_admin_does_not_expose_token():CODE
LOW⚡tests/test_admin.py144def test_refresh_token_admin_does_not_expose_token():CODE
LOW⚡tests/test_admin.py151def test_grant_admin_does_not_expose_code():CODE
LOW⚡tests/test_admin.py158def test_stored_request_admin_does_not_expose_request_uri():CODE
LOW⚡tests/test_admin.py170def test_id_token_admin_searchable_by_app_and_user():CODE
LOW⚡tests/test_admin.py176def test_credential_admins_delete_policy():CODE
LOWtests/test_admin.py218def test_access_token_admin_revoke_action_revokes_token_family():CODE
LOWtests/test_admin.py242def test_access_token_admin_revoke_action_without_refresh_token_deletes():CODE
LOWtests/test_admin.py259def test_refresh_token_admin_revoke_action_revokes_token_family():CODE
LOWtests/test_admin.py282def test_application_admin_exposes_can_introspect():CODE
LOW⚡tests/test_oauth2_validators.py140 def test_authenticate_basic_auth_hashed_secret(self):CODE
LOW⚡tests/test_oauth2_validators.py145 def test_authenticate_basic_auth_unhashed_secret(self):CODE
LOW⚡tests/test_oauth2_validators.py154 def test_authenticate_basic_auth_default_encoding(self):CODE
LOW⚡tests/test_oauth2_validators.py159 def test_authenticate_basic_auth_wrong_client_id(self):CODE
LOW⚡tests/test_oauth2_validators.py164 def test_authenticate_basic_auth_wrong_client_secret(self):CODE
LOW⚡tests/test_oauth2_validators.py169 def test_authenticate_basic_auth_wrong_client_secret_not_logged(self):CODE
LOW⚡tests/test_oauth2_validators.py177 def test_authenticate_request_body_wrong_client_secret_not_logged(self):CODE
LOW⚡tests/test_oauth2_validators.py185 def test_authenticate_basic_auth_undecodable_credentials_not_logged(self):CODE
LOW⚡tests/test_oauth2_validators.py227 def test_authenticate_basic_auth_public_app_with_device_code(self):CODE
1915 more matches not shown…
Decorative Section Separators104 hits · 367 pts
SeverityFileLineSnippetContext
MEDIUM⚡tests/test_bcp_rfc9700.py76# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_bcp_rfc9700.py78# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_bcp_rfc9700.py340# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_bcp_rfc9700.py342# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_bcp_rfc9700.py671# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_bcp_rfc9700.py673# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_bcp_rfc9700.py41# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_bcp_rfc9700.py43# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_bcp_rfc9700.py121# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_bcp_rfc9700.py123# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_bcp_rfc9700.py296# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_bcp_rfc9700.py298# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_bcp_rfc9700.py526# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_bcp_rfc9700.py528# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_device.py256 # --------------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_device.py258 # --------------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_device.py268 # -------------------------COMMENT
MEDIUM⚡tests/test_device.py270 # -------------------------COMMENT
MEDIUMtests/test_device.py139 # -----------------------COMMENT
MEDIUMtests/test_device.py142 # -----------------------COMMENT
MEDIUMtests/test_device.py197 # --------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_device.py200 # --------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_device.py242 # --------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_device.py245 # --------------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_dcr_views.py1185# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_dcr_views.py1187# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_dcr_views.py2121# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_dcr_views.py2123# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_dcr_views.py2579# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_dcr_views.py2581# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py26# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py28# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py58# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py60# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py1042# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py1044# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py1109# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py1112# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py2292# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py2294# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py2391# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py2393# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py2417# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py2419# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py2477# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py2479# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py2658# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py2660# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_cimd.py180# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_cimd.py182# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_cimd.py231# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_cimd.py233# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_cimd.py313# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_cimd.py315# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_cimd.py933# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_cimd.py936# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_cimd.py974# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_cimd.py976# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_cimd.py990# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_cimd.py992# ---------------------------------------------------------------------------COMMENT
44 more matches not shown…
Cross-File Repetition45 hits · 225 pts
SeverityFileLineSnippetContext
HIGHtests/test_implicit.py0test for default redirect uri if omitted from query string with response_type: codeSTRING
HIGHtests/test_authorization_code.py0test for default redirect uri if omitted from query string with response_type: codeSTRING
HIGHtests/test_hybrid.py0test for default redirect uri if omitted from query string with response_type: codeSTRING
HIGHtests/test_implicit.py0test error when passing a forbidden redirect_uri in query string with response_type: codeSTRING
HIGHtests/test_authorization_code.py0test error when passing a forbidden redirect_uri in query string with response_type: codeSTRING
HIGHtests/test_hybrid.py0test error when passing a forbidden redirect_uri in query string with response_type: codeSTRING
HIGHtests/test_implicit.py0test authorization code is given for an allowed request with response_type: codeSTRING
HIGHtests/test_authorization_code.py0test authorization code is given for an allowed request with response_type: codeSTRING
HIGHtests/test_hybrid.py0test authorization code is given for an allowed request with response_type: codeSTRING
HIGHtests/test_implicit.py0if application.skip_authorization = true, should skip the authorization page.STRING
HIGHtests/test_authorization_code.py0if application.skip_authorization = true, should skip the authorization page.STRING
HIGHtests/test_hybrid.py0if application.skip_authorization = true, should skip the authorization page.STRING
HIGHtests/test_implicit.py0tests that a redirection uri with query string is allowed and query string is retained on redirection. see https://rfc-eSTRING
HIGHtests/test_authorization_code.py0tests that a redirection uri with query string is allowed and query string is retained on redirection. see https://rfc-eSTRING
HIGHtests/test_hybrid.py0tests that a redirection uri with query string is allowed and query string is retained on redirection. see https://rfc-eSTRING
HIGHtests/test_implicit.py0tests that a redirection uri is matched using scheme + netloc + pathSTRING
HIGHtests/test_authorization_code.py0tests that a redirection uri is matched using scheme + netloc + pathSTRING
HIGHtests/test_hybrid.py0tests that a redirection uri is matched using scheme + netloc + pathSTRING
HIGHoauth2_provider/scopes.py0backward-compatible import shim. ``oauth2_provider.views.base`` has moved to ``oauth2_provider.authorization_server.viewSTRING
HIGHoauth2_provider/signals.py0backward-compatible import shim. ``oauth2_provider.views.base`` has moved to ``oauth2_provider.authorization_server.viewSTRING
HIGHoauth2_provider/compat.py0backward-compatible import shim. ``oauth2_provider.views.base`` has moved to ``oauth2_provider.authorization_server.viewSTRING
HIGHoauth2_provider/oauth2_backends.py0backward-compatible import shim. ``oauth2_provider.views.base`` has moved to ``oauth2_provider.authorization_server.viewSTRING
HIGHoauth2_provider/checks.py0backward-compatible import shim. ``oauth2_provider.views.base`` has moved to ``oauth2_provider.authorization_server.viewSTRING
HIGHoauth2_provider/bcp.py0backward-compatible import shim. ``oauth2_provider.views.base`` has moved to ``oauth2_provider.authorization_server.viewSTRING
HIGHoauth2_provider/forms.py0backward-compatible import shim. ``oauth2_provider.views.base`` has moved to ``oauth2_provider.authorization_server.viewSTRING
HIGHoauth2_provider/backends.py0backward-compatible import shim. ``oauth2_provider.views.base`` has moved to ``oauth2_provider.authorization_server.viewSTRING
HIGHoauth2_provider/utils.py0backward-compatible import shim. ``oauth2_provider.views.base`` has moved to ``oauth2_provider.authorization_server.viewSTRING
HIGHoauth2_provider/http.py0backward-compatible import shim. ``oauth2_provider.views.base`` has moved to ``oauth2_provider.authorization_server.viewSTRING
HIGHoauth2_provider/exceptions.py0backward-compatible import shim. ``oauth2_provider.views.base`` has moved to ``oauth2_provider.authorization_server.viewSTRING
HIGHoauth2_provider/cimd.py0backward-compatible import shim. ``oauth2_provider.views.base`` has moved to ``oauth2_provider.authorization_server.viewSTRING
HIGHoauth2_provider/www_authenticate.py0backward-compatible import shim. ``oauth2_provider.views.base`` has moved to ``oauth2_provider.authorization_server.viewSTRING
HIGHoauth2_provider/middleware.py0backward-compatible import shim. ``oauth2_provider.views.base`` has moved to ``oauth2_provider.authorization_server.viewSTRING
HIGHoauth2_provider/dcr.py0backward-compatible import shim. ``oauth2_provider.views.base`` has moved to ``oauth2_provider.authorization_server.viewSTRING
HIGHoauth2_provider/decorators.py0backward-compatible import shim. ``oauth2_provider.views.base`` has moved to ``oauth2_provider.authorization_server.viewSTRING
HIGHoauth2_provider/views/oidc.py0backward-compatible import shim. ``oauth2_provider.views.base`` has moved to ``oauth2_provider.authorization_server.viewSTRING
HIGHoauth2_provider/views/token.py0backward-compatible import shim. ``oauth2_provider.views.base`` has moved to ``oauth2_provider.authorization_server.viewSTRING
HIGHoauth2_provider/views/device.py0backward-compatible import shim. ``oauth2_provider.views.base`` has moved to ``oauth2_provider.authorization_server.viewSTRING
HIGHoauth2_provider/views/generic.py0backward-compatible import shim. ``oauth2_provider.views.base`` has moved to ``oauth2_provider.authorization_server.viewSTRING
HIGHoauth2_provider/views/dynamic_client_registration.py0backward-compatible import shim. ``oauth2_provider.views.base`` has moved to ``oauth2_provider.authorization_server.viewSTRING
HIGHoauth2_provider/views/introspect.py0backward-compatible import shim. ``oauth2_provider.views.base`` has moved to ``oauth2_provider.authorization_server.viewSTRING
HIGHoauth2_provider/views/application.py0backward-compatible import shim. ``oauth2_provider.views.base`` has moved to ``oauth2_provider.authorization_server.viewSTRING
HIGHoauth2_provider/views/base.py0backward-compatible import shim. ``oauth2_provider.views.base`` has moved to ``oauth2_provider.authorization_server.viewSTRING
HIGHoauth2_provider/core/backends_oauthlib.py0a wrapper method that calls create_userinfo_response on the `server_class` instance. :param request: the current django.STRING
HIGHoauth2_provider/authorization_server/views/mixins.py0a wrapper method that calls create_userinfo_response on the `server_class` instance. :param request: the current django.STRING
HIGHoauth2_provider/resource_server/mixins.py0a wrapper method that calls create_userinfo_response on the `server_class` instance. :param request: the current django.STRING
Hallucination Indicators18 hits · 195 pts
SeverityFileLineSnippetContext
CRITICALtests/test_oauth2_validators.py18from oauth2_provider.core.exceptions import FatalClientErrorCODE
CRITICALtests/test_oidc_claims_parameter.py16from django.core.exceptions import ValidationErrorCODE
CRITICALtests/oracle_settings.py6# django.db.backends.oracle.utils.dsn() passes NAME to makedsn() as a *SID* whenever PORT isCOMMENT
CRITICALtests/test_authorization_request_objects.py20from oauth2_provider.core.exceptions import OAuthToolkitErrorCODE
CRITICALtests/test_dcr_views.py956 from django.core.exceptions import ValidationErrorCODE
CRITICAL⚡tests/test_resource_validators.py436 from django.core.exceptions import ValidationErrorCODE
CRITICAL⚡tests/test_resource_validators.py442 from django.core.exceptions import ValidationErrorCODE
CRITICALoauth2_provider/models.py551 from django.core.exceptions import ValidationErrorCODE
CRITICALoauth2_provider/models.py832 from django.core.exceptions import ValidationErrorCODE
CRITICALoauth2_provider/validators.py5from django.core.exceptions import ValidationErrorCODE
CRITICALoauth2_provider/core/backends_oauthlib.py21from oauth2_provider.core.exceptions import FatalClientError, OAuthToolkitErrorCODE
CRITICAL…uth2_provider/management/commands/createapplication.py3from django.core.exceptions import ValidationErrorCODE
CRITICALoauth2_provider/authorization_server/cimd.py29from django.core.exceptions import ValidationErrorCODE
CRITICALoauth2_provider/authorization_server/views/mixins.py16from oauth2_provider.core.exceptions import FatalClientErrorCODE
CRITICALoauth2_provider/authorization_server/views/device.py5from django.core.exceptions import ValidationErrorCODE
CRITICAL…horization_server/views/dynamic_client_registration.py17from django.core.exceptions import ValidationErrorCODE
CRITICALoauth2_provider/authorization_server/views/par.py11from oauth2_provider.core.exceptions import OAuthToolkitErrorCODE
CRITICALoauth2_provider/authorization_server/views/base.py52from oauth2_provider.core.exceptions import FatalClientError, OAuthToolkitErrorCODE
Cross-Language Confusion28 hits · 184 pts
SeverityFileLineSnippetContext
HIGH⚡tests/test_oidc_claims_parameter.py1038 '{"userinfo": {"\\ud800": null}}',CODE
HIGH⚡tests/test_oidc_claims_parameter.py1040 '{"userinfo": {"name\\u0000": null}}',CODE
HIGH⚡tests/test_oidc_views.py279 """Required OIDC endpoints must fail fast, not emit null, when unreversible."""STRING
HIGH⚡tests/test_pushed_authorization_request.py112 response = self.push(extra={"request_uri": f"{REQUEST_URI_PREFIX}abc"})CODE
HIGH⚡tests/test_pushed_authorization_request.py117 response = self.push(extra={"request": "eyJ.abc.def"})CODE
HIGH⚡tests/test_pushed_authorization_request.py156 response = self.push(auth=False)CODE
HIGH⚡tests/test_pushed_authorization_request.py197 response = self.push(extra={"redirect_uri": "http://not-registered.example"})CODE
HIGH⚡tests/test_pushed_authorization_request.py202 response = self.push(extra={"client_id": self.public_application.client_id})CODE
HIGH⚡tests/test_pushed_authorization_request.py209 response = self.push()CODE
HIGH⚡tests/test_pushed_authorization_request.py572 push = self.push()CODE
HIGH⚡tests/test_pushed_authorization_request.py681 push = self.push(extra={"prompt": "login"})CODE
HIGH⚡tests/test_pushed_authorization_request.py694 response = self.push(extra={"scope": "openid read", "max_age": "abc"})CODE
HIGH⚡tests/test_pushed_authorization_request.py698 response = self.push(extra={"scope": "openid read", "max_age": "60"})CODE
HIGH⚡tests/test_pushed_authorization_request.py705 request_uri = json.loads(self.push(extra={"scope": "openid read"}).content)["request_uri"]CODE
HIGH⚡tests/test_pushed_authorization_request.py716 request_uri = json.loads(self.push().content)["request_uri"]CODE
HIGH⚡tests/test_pushed_authorization_request.py729 response = self.push(extra={"scope": "openid read", "max_age": "0"}, QUERY_STRING="max_age=999999")CODE
HIGH⚡tests/test_pushed_authorization_request.py733 response = self.push(extra={"prompt": ["login", "none"]})CODE
HIGH⚡tests/test_pushed_authorization_request.py738 request_uri = json.loads(self.push(extra={"prompt": "login"}).content)["request_uri"]CODE
HIGH⚡tests/test_pushed_authorization_request.py753 first = json.loads(self.push(extra={"prompt": "login"}).content)["request_uri"]CODE
HIGH⚡tests/test_pushed_authorization_request.py758 second = json.loads(self.push(extra={"prompt": "login"}).content)["request_uri"]CODE
HIGHtests/test_pushed_authorization_request.py94 response = self.push()CODE
HIGHtests/test_pushed_authorization_request.py276 response = self.push(CODE
HIGHtests/test_pushed_authorization_request.py403 push = self.push()CODE
HIGHtests/test_pushed_authorization_request.py418 push = self.push(extra={"response_mode": "fragment"})CODE
HIGHtests/test_pushed_authorization_request.py626 push = self.push(CODE
HIGHtests/test_pushed_authorization_request.py659 push = self.push(extra={"scope": "openid read", "max_age": "60"})CODE
HIGH⚡tests/test_oidc_request_objects.py895 "claims": ['{"id_token": {"acr": null}}'],CODE
HIGH⚡tests/test_cimd.py944 assert _build_application_kwargs(null)["userinfo_signed_response_alg"] == ""CODE
Unused Imports88 hits · 79 pts
SeverityFileLineSnippetContext
LOWtests/mysql_settings.py5CODE
LOWtests/settings_swapped.py1CODE
LOWtests/test_import_compat.py317CODE
LOWtests/multi_db_settings.py3CODE
LOWtests/mysql_pr_settings.py5CODE
LOWtests/oracle_settings.py3CODE
LOWtests/multi_db_settings_invalid_token_configuration.py1CODE
LOWtests/postgres_pr_settings.py3CODE
LOWtests/postgres_settings.py3CODE
LOWtests/openid-conformance-suite/run.py30CODE
LOWtests/openid-conformance-suite/baseline.py28CODE
LOWoauth2_provider/models.py37CODE
LOWoauth2_provider/validators.py13CODE
LOWoauth2_provider/apps.py10CODE
LOWoauth2_provider/apps.py13CODE
LOWoauth2_provider/oauth2_validators.py61CODE
LOWoauth2_provider/oauth2_validators.py61CODE
LOWoauth2_provider/oauth2_validators.py61CODE
LOWoauth2_provider/core/compat.py8CODE
LOWoauth2_provider/resource_server/__init__.py14CODE
LOWoauth2_provider/resource_server/__init__.py14CODE
LOWoauth2_provider/contrib/ninja/__init__.py1CODE
LOWoauth2_provider/contrib/ninja/__init__.py2CODE
LOWoauth2_provider/contrib/ninja/__init__.py2CODE
LOWoauth2_provider/contrib/rest_framework/__init__.py2CODE
LOWoauth2_provider/contrib/rest_framework/__init__.py2CODE
LOWoauth2_provider/contrib/rest_framework/__init__.py3CODE
LOWoauth2_provider/contrib/rest_framework/__init__.py3CODE
LOWoauth2_provider/contrib/rest_framework/__init__.py3CODE
LOWoauth2_provider/contrib/rest_framework/__init__.py3CODE
LOWoauth2_provider/contrib/rest_framework/__init__.py3CODE
LOWoauth2_provider/contrib/rest_framework/__init__.py10CODE
LOWoauth2_provider/contrib/rest_framework/__init__.py10CODE
LOWoauth2_provider/views/mixins.py19CODE
LOWoauth2_provider/views/mixins.py19CODE
LOWoauth2_provider/views/mixins.py24CODE
LOWoauth2_provider/views/mixins.py25CODE
LOWoauth2_provider/views/mixins.py25CODE
LOWoauth2_provider/views/mixins.py25CODE
LOWoauth2_provider/views/mixins.py25CODE
LOWoauth2_provider/views/mixins.py25CODE
LOWoauth2_provider/views/mixins.py25CODE
LOWoauth2_provider/views/metadata.py16CODE
LOWoauth2_provider/views/metadata.py16CODE
LOWoauth2_provider/views/metadata.py16CODE
LOWoauth2_provider/views/metadata.py16CODE
LOWoauth2_provider/views/metadata.py16CODE
LOWoauth2_provider/views/metadata.py23CODE
LOWoauth2_provider/views/__init__.py10CODE
LOWoauth2_provider/views/__init__.py10CODE
LOWoauth2_provider/views/__init__.py10CODE
LOWoauth2_provider/views/__init__.py10CODE
LOWoauth2_provider/views/__init__.py16CODE
LOWoauth2_provider/views/__init__.py16CODE
LOWoauth2_provider/views/__init__.py16CODE
LOWoauth2_provider/views/__init__.py16CODE
LOWoauth2_provider/views/__init__.py16CODE
LOWoauth2_provider/views/__init__.py23CODE
LOWoauth2_provider/views/__init__.py23CODE
LOWoauth2_provider/views/__init__.py23CODE
28 more matches not shown…
Over-Commented Block40 hits · 36 pts
SeverityFileLineSnippetContext
LOWpyproject.toml101[tool.pytest.ini_options]COMMENT
LOWtox.ini1[tox]COMMENT
LOWtox.ini241# Runs the OpenID Foundation conformance suite (the OpenID Provider certificationCOMMENT
LOWtox.ini261 python tests/openid-conformance-suite/run.py {posargs}COMMENT
LOWdocker-compose.yml21 condition: service_completed_successfullyCOMMENT
LOWtests/app/idp/idp/settings.py361 "CIMD_ENABLED": env("OAUTH2_PROVIDER_CIMD_ENABLED"),COMMENT
LOWtests/app/idp/idp/settings.py401 # occasionally you may want to see what's going on in upstream in oauthlibCOMMENT
LOWtests/app/rp/src/lib/oidc-config.js1import { env } from '$env/dynamic/public';COMMENT
LOWdocs/conf.py1# Django OAuth Toolkit documentation build configuration file, created byCOMMENT
LOWdocs/conf.py81# There are two options for replacing |today|: either, you set today to someCOMMENT
LOWdocs/conf.py121COMMENT
LOWdocs/conf.py141# A shorter title for the navigation bar. Default is the same as html_title.COMMENT
LOWdocs/conf.py161COMMENT
LOWdocs/conf.py181COMMENT
LOWdocs/conf.py221# the title page.COMMENT
LOWoauth2_provider/models.py561 )COMMENT
LOWoauth2_provider/models.py1841 # refresh token when an access token is revoked -- so any that remain came from anCOMMENT
LOWoauth2_provider/models.py2001 # request smuggle "/cb;evil=1" past a registered "/cb". urlsplit() leaves theCOMMENT
LOWoauth2_provider/models.py2061 elif allowed_hostname != uri_hostname:COMMENT
LOWoauth2_provider/models.py2101 # request carry query parameters that were never registered: an attackerCOMMENT
LOWoauth2_provider/validators.py21 (r"(?:" + URLValidator.host_re, URLValidator.ipv4_re, URLValidator.ipv6_re, dotless_domain_re + ")")COMMENT
LOWoauth2_provider/oauth2_validators.py821 # First, to ensure we don't have concurrency issues, we refresh the refresh tokenCOMMENT
LOWoauth2_provider/oauth2_validators.py981 # non-rotating refresh leaves the existing row in place, so a duplicate pointsCOMMENT
LOWoauth2_provider/oauth2_validators.py1121 # as a deliberate revocation (the RFC 7009 /revoke/ endpoint, the admin,COMMENT
LOWoauth2_provider/oauth2_validators.py1141 # Enforce REFRESH_TOKEN_EXPIRE_SECONDS at validation time. Historically the settingCOMMENT
LOWoauth2_provider/settings.py41STORED_AUTHORIZATION_REQUEST_MODEL = getattr(COMMENT
LOWoauth2_provider/settings.py141 # Whether or not PKCE is requiredCOMMENT
LOWoauth2_provider/core/safe_fetch.py121 # present userinfo component (and would leak the "@" into the Host headerCOMMENT
LOW…2_provider/management/commands/cleardcrapplications.py81 # waits until this transaction ends — it can never be silentlyCOMMENT
LOW…_provider/management/commands/clearcimdapplications.py41 while True:COMMENT
LOW…provider/static/oauth2_provider/js/application_form.js1// Live client-secret UX for the Application form.COMMENT
LOWoauth2_provider/authorization_server/admin.py101 # Access tokens are issued by the OAuth flows, not hand-created in the admin.COMMENT
LOWoauth2_provider/authorization_server/cimd.py61GRANT_TYPE_MAP = {COMMENT
LOWoauth2_provider/authorization_server/cimd.py481 jwks = metadata.get("jwks")COMMENT
LOW…_provider/authorization_server/oidc/client_metadata.py21COMMENT
LOWoauth2_provider/authorization_server/oidc/views.py281 #COMMENT
LOW…horization_server/views/dynamic_client_registration.py461 return None, _error_response("invalid_client_metadata", "jwks_uri must use the https scheme")COMMENT
LOW…horization_server/views/dynamic_client_registration.py481 "invalid_client_metadata",COMMENT
LOWoauth2_provider/authorization_server/views/base.py721 # (OpenID Connect Core 1.0 section 3.1.2.1). Prompt Create 1.0COMMENT
LOWoauth2_provider/authorization_server/views/base.py1261COMMENT
Verbosity Indicators30 hits · 35 pts
SeverityFileLineSnippetContext
LOW⚡tests/test_rfc8707_integration.py99 # Step 3: Verify access token has resource binding (JSON array format)COMMENT
LOW⚡tests/test_rfc8707_integration.py104 # Step 4: Verify audience validationCOMMENT
LOWtests/test_rfc8707_integration.py47 # Step 1: Authorization request with resource parameterCOMMENT
LOWtests/test_rfc8707_integration.py80 # Step 2: Token request with resource parameterCOMMENT
LOWtests/test_rfc8707_integration.py403 # Step 1: Authorization request with limited resourcesCOMMENT
LOWtests/test_rfc8707_integration.py418 # Step 2: Token request trying to escalate to unauthorized resourceCOMMENT
LOWtests/test_rfc8707_integration.py470 # Step 1: Authorization with multiple resourcesCOMMENT
LOWtests/test_rfc8707_integration.py487 # Step 2: Token request WITHOUT resource parameterCOMMENT
LOWtests/test_rfc8707_integration.py543 # Step 1: Authorization with three resourcesCOMMENT
LOWtests/test_rfc8707_integration.py562 # Step 2: Token request repeating the resource parameter to narrow to twoCOMMENT
LOWtests/test_rfc8707_integration.py616 # Step 1: Authorization with a single resourceCOMMENT
LOWtests/test_rfc8707_integration.py630 # Step 2: Token request repeating resource params, one outside the grantCOMMENT
LOWtests/test_rfc8707_integration.py681 # Step 1: Authorization with resourceCOMMENT
LOWtests/test_rfc8707_integration.py696 # Step 2: Exchange code for tokensCOMMENT
LOWtests/test_rfc8707_integration.py724 # Step 3: Use refresh token to get new access tokenCOMMENT
LOWtests/test_rfc8707_integration.py739 # Step 4: Verify new access token preserves resource from refresh tokenCOMMENT
LOWtests/test_rfc8707_integration.py775 # Step 1: Authorization with specific resourcesCOMMENT
LOWtests/test_rfc8707_integration.py795 # Step 2: Exchange code for tokensCOMMENT
LOWtests/test_rfc8707_integration.py819 # Step 3: Attempt refresh with unauthorized resource - should failCOMMENT
LOWtests/test_rfc8707_integration.py837 # Step 4: Get fresh token to test narrowing (previous refresh may have consumed token)COMMENT
LOWtests/test_rfc8707_integration.py856 # Step 5: Refresh with subset (resource1 only) - should succeedCOMMENT
LOWtests/test_rfc8707_integration.py905 # Step 1: Authorization with resourceCOMMENT
LOWtests/test_rfc8707_integration.py920 # Step 2: Exchange code for tokensCOMMENT
LOWtests/test_rfc8707_integration.py942 # Step 3: Use refresh token (should rotate and create new refresh token)COMMENT
LOWtests/test_rfc8707_integration.py996 # Step 1: Authorization with resourceCOMMENT
LOWtests/test_rfc8707_integration.py1010 # Step 2: Exchange code for tokensCOMMENT
LOWtests/test_rfc8707_integration.py1028 # Step 3: Refresh (non-rotating — same refresh token reused, access token updated in place)COMMENT
LOW⚡tests/e2e/browser_rp/test_browser_par.py25 # Step 1: the RP server pushes the request (back channel) and returns a request_uri.COMMENT
LOW⚡tests/e2e/browser_rp/test_browser_par.py30 # Step 2: only client_id + request_uri travel through the browser to /authorize.COMMENT
LOWtests/e2e/browser_rp/test_browser_par.py43 # Step 3: the RP server exchanged the code; the token response is displayed.COMMENT
Structural Annotation Overuse30 hits · 35 pts
SeverityFileLineSnippetContext
LOW⚡tests/test_rfc8707_integration.py99 # Step 3: Verify access token has resource binding (JSON array format)COMMENT
LOW⚡tests/test_rfc8707_integration.py104 # Step 4: Verify audience validationCOMMENT
LOWtests/test_rfc8707_integration.py47 # Step 1: Authorization request with resource parameterCOMMENT
LOWtests/test_rfc8707_integration.py80 # Step 2: Token request with resource parameterCOMMENT
LOWtests/test_rfc8707_integration.py403 # Step 1: Authorization request with limited resourcesCOMMENT
LOWtests/test_rfc8707_integration.py418 # Step 2: Token request trying to escalate to unauthorized resourceCOMMENT
LOWtests/test_rfc8707_integration.py470 # Step 1: Authorization with multiple resourcesCOMMENT
LOWtests/test_rfc8707_integration.py487 # Step 2: Token request WITHOUT resource parameterCOMMENT
LOWtests/test_rfc8707_integration.py543 # Step 1: Authorization with three resourcesCOMMENT
LOWtests/test_rfc8707_integration.py562 # Step 2: Token request repeating the resource parameter to narrow to twoCOMMENT
LOWtests/test_rfc8707_integration.py616 # Step 1: Authorization with a single resourceCOMMENT
LOWtests/test_rfc8707_integration.py630 # Step 2: Token request repeating resource params, one outside the grantCOMMENT
LOWtests/test_rfc8707_integration.py681 # Step 1: Authorization with resourceCOMMENT
LOWtests/test_rfc8707_integration.py696 # Step 2: Exchange code for tokensCOMMENT
LOWtests/test_rfc8707_integration.py724 # Step 3: Use refresh token to get new access tokenCOMMENT
LOWtests/test_rfc8707_integration.py739 # Step 4: Verify new access token preserves resource from refresh tokenCOMMENT
LOWtests/test_rfc8707_integration.py775 # Step 1: Authorization with specific resourcesCOMMENT
LOWtests/test_rfc8707_integration.py795 # Step 2: Exchange code for tokensCOMMENT
LOWtests/test_rfc8707_integration.py819 # Step 3: Attempt refresh with unauthorized resource - should failCOMMENT
LOWtests/test_rfc8707_integration.py837 # Step 4: Get fresh token to test narrowing (previous refresh may have consumed token)COMMENT
LOWtests/test_rfc8707_integration.py856 # Step 5: Refresh with subset (resource1 only) - should succeedCOMMENT
LOWtests/test_rfc8707_integration.py905 # Step 1: Authorization with resourceCOMMENT
LOWtests/test_rfc8707_integration.py920 # Step 2: Exchange code for tokensCOMMENT
LOWtests/test_rfc8707_integration.py942 # Step 3: Use refresh token (should rotate and create new refresh token)COMMENT
LOWtests/test_rfc8707_integration.py996 # Step 1: Authorization with resourceCOMMENT
LOWtests/test_rfc8707_integration.py1010 # Step 2: Exchange code for tokensCOMMENT
LOWtests/test_rfc8707_integration.py1028 # Step 3: Refresh (non-rotating — same refresh token reused, access token updated in place)COMMENT
LOW⚡tests/e2e/browser_rp/test_browser_par.py25 # Step 1: the RP server pushes the request (back channel) and returns a request_uri.COMMENT
LOW⚡tests/e2e/browser_rp/test_browser_par.py30 # Step 2: only client_id + request_uri travel through the browser to /authorize.COMMENT
LOWtests/e2e/browser_rp/test_browser_par.py43 # Step 3: the RP server exchanged the code; the token response is displayed.COMMENT
Empty Error Handlers7 hits · 35 pts
SeverityFileLineSnippetContext
HIGHtests/test_device.py1092except AttributeError:CODE
HIGHtests/openid-conformance-suite/run.py184except (urllib.error.URLError, OSError, ConnectionError):CODE
HIGHtests/e2e/helpers/idp_process.py227except requests.RequestException:CODE
HIGHtests/e2e/helpers/rp_process.py177except requests.RequestException:CODE
HIGHoauth2_provider/oauth2_validators.py846except (AccessToken.DoesNotExist, RefreshToken.DoesNotExist):CODE
HIGH…th2_provider/authorization_server/client_assertions.py302except ValueError:CODE
HIGHoauth2_provider/authorization_server/oidc/claims.py198except (TypeError, ValueError):CODE
Fake / Example Data20 hits · 21 pts
SeverityFileLineSnippetContext
LOWtests/test_application_views.py691 cls.admin_user = UserModel.objects.create_superuser("admin_user", "admin@example.com", "123456")CODE
LOWtests/test_oidc_scope_claims.py227 return {"email": "user@example.com", "nickname": "user", "custom": "value"}CODE
LOWtests/test_oidc_scope_claims.py279 assert claims["email"] == "user@example.com"CODE
LOW⚡tests/test_rest_framework.py187 auth = self._create_authorization_header("fake-token")CODE
LOW⚡tests/test_rest_framework.py207 auth = self._create_authorization_header("fake-token")CODE
LOW⚡tests/test_rest_framework.py236 auth = self._create_authorization_header("fake-token")CODE
LOW⚡tests/test_rest_framework.py262 auth = self._create_authorization_header("fake-token")CODE
LOW⚡tests/test_rest_framework.py278 auth = self._create_authorization_header("fake-token")CODE
LOW⚡tests/test_rest_framework.py471 auth = self._create_authorization_header("fake-token")CODE
LOWtests/test_settings.py254 admin_user = UserModel.objects.create_superuser("admin", "admin@example.com", "password")CODE
LOWrfcs/openid-connect-registration-1_0.txt757 "contacts": ["ve7jtb@example.org", "mary@example.org"],CODE
LOWrfcs/openid-connect-registration-1_0.txt876 "contacts": ["ve7jtb@example.org", "mary@example.org"],CODE
LOWrfcs/openid-connect-registration-1_0.txt1098 "contacts": ["ve7jtb@example.org", "mary@example.org"],CODE
LOWrfcs/openid-connect-core-1_0.txt3371 "name": "Jane Doe",CODE
LOWrfcs/openid-connect-core-1_0.txt3796 "name": "Jane Doe",CODE
LOWrfcs/openid-connect-core-1_0.txt3936 "name": "Jane Doe",CODE
LOWrfcs/openid-connect-core-1_0.txt3998 "name": "Jane Doe",CODE
LOWrfcs/openid-connect-core-1_0.txt7742 "name": "Jane Doe",CODE
LOWrfcs/openid-connect-discovery-1_0.txt650 Such an example is "acct:joe%40example.com@example.org". End-UsersCODE
LOWrfcs/openid-connect-discovery-1_0.txt651 MAY input values like "joe@example.com@example.org" to initiateCODE
AI Slop Vocabulary7 hits · 20 pts
SeverityFileLineSnippetContext
MEDIUMtox.ini251# The runner scripts the harness downloads from the suite need httpx andCOMMENT
MEDIUM⚡tests/test_admin.py182 # request has none, so attach a permissive stub (no DB needed) to keep the assertion robust.COMMENT
MEDIUMtests/test_import_compat.py277 # test asserts only on the subclass-time warning below (and stays robust if theCOMMENT
MEDIUMtests/multi_db_settings.py15 # Keep ``default`` concrete so Django's test harness can use standard multi-dbCOMMENT
LOWtests/test_device.py1087 # values take effect without wiping the overrides we just set above.COMMENT
MEDIUMtests/app/idp/idp/settings.py395 # log oauth2_provider issues to facilitate troubleshootingCOMMENT
LOWtests/app/idp/idp/oauth.py11# the way we're using it, so we just use a lambda that returns NoneCOMMENT
Deep Nesting26 hits · 20 pts
SeverityFileLineSnippetContext
LOWtests/test_introspection_view.py609CODE
LOWtests/test_import_compat.py21CODE
LOWtests/test_import_compat.py369CODE
LOWtests/test_import_compat.py415CODE
LOWtests/test_dcr_views.py308CODE
LOWtests/openid-conformance-suite/run.py173CODE
LOWtests/e2e/conftest.py80CODE
LOWtests/e2e/compliance.py109CODE
LOWoauth2_provider/models.py544CODE
LOWoauth2_provider/models.py719CODE
LOWoauth2_provider/oauth2_validators.py176CODE
LOWoauth2_provider/oauth2_validators.py242CODE
LOWoauth2_provider/oauth2_validators.py281CODE
LOWoauth2_provider/oauth2_validators.py545CODE
LOWoauth2_provider/oauth2_validators.py677CODE
LOWoauth2_provider/oauth2_validators.py761CODE
LOWoauth2_provider/settings.py490CODE
LOWoauth2_provider/core/checks.py404CODE
LOW…2_provider/management/commands/cleardcrapplications.py45CODE
LOWoauth2_provider/contrib/rest_framework/permissions.py152CODE
LOW…th2_provider/authorization_server/client_assertions.py194CODE
LOW…th2_provider/authorization_server/client_assertions.py271CODE
LOWoauth2_provider/authorization_server/oidc/claims.py40CODE
LOWoauth2_provider/authorization_server/views/base.py311CODE
LOWoauth2_provider/authorization_server/views/base.py699CODE
LOWoauth2_provider/authorization_server/views/base.py1340CODE
Excessive Try-Catch Wrapping18 hits · 19 pts
SeverityFileLineSnippetContext
LOWtests/e2e/browser_cross_site/conftest.py107 except Exception as exc: # pragma: no cover - environment guardCODE
LOWtests/e2e/browser_cross_site/conftest.py135 except Exception as exc: # pragma: no cover - environment guardCODE
LOWtests/e2e/browser_cross_site/conftest.py159 except Exception as exc: # pragma: no cover - environment guardCODE
LOW…e2e/browser_cross_site/test_silent_login_cross_site.py73 except Exception as exc:CODE
LOWtests/e2e/browser_rp/conftest.py45 except Exception as exc: # pragma: no cover - environment guardCODE
LOWtests/e2e/browser_rp/conftest.py67 except Exception as exc: # pragma: no cover - environment guardCODE
LOWtests/e2e/browser_rp/conftest.py80 except Exception as exc: # pragma: no cover - environment guardCODE
LOWtests/e2e/helpers/browser.py47 except Exception as exc: # Playwright TimeoutError (or the check's own AssertionError)CODE
LOWoauth2_provider/core/checks.py439 except Exception:CODE
LOW…th2_provider/authorization_server/client_assertions.py315 except Exception:CODE
LOW⚡…th2_provider/authorization_server/client_assertions.py370 except Exception:CODE
LOW⚡…th2_provider/authorization_server/client_assertions.py383 except Exception:CODE
LOW…th2_provider/authorization_server/client_assertions.py512 except Exception:CODE
LOW…th2_provider/authorization_server/client_assertions.py647 except Exception as exc:CODE
LOWoauth2_provider/authorization_server/cimd.py754 except Exception:CODE
LOW…_provider/authorization_server/oidc/request_objects.py246 except Exception as exc:CODE
LOW…_provider/authorization_server/oidc/request_objects.py393 except Exception:CODE
LOWoauth2_provider/authorization_server/views/base.py350 except Exception:CODE
Self-Referential Comments5 hits · 15 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_oauth2_provider_middleware.py54 # Create a valid access tokenCOMMENT
MEDIUMtests/test_application_views.py46 # Create a registration view and tests that the model form is boundCOMMENT
MEDIUMtests/test_dcr_views.py1369 # Create a second application with its own tokenCOMMENT
MEDIUMdocs/conf.py4# This file is execfile()d with the current directory set to its containing dir.COMMENT
MEDIUMoauth2_provider/oauth2_validators.py878 # Creating a fresh *access* token here would violate the OneToOneCOMMENT
Modern Structural Boilerplate11 hits · 11 pts
SeverityFileLineSnippetContext
LOWoauth2_provider/models.py40logger = logging.getLogger(__name__)CODE
LOWoauth2_provider/models.py137def set_token_value(token_instance: "AbstractAccessToken | AbstractRefreshToken", raw_token: str) -> None:CODE
LOWoauth2_provider/oauth2_validators.py75__all__ = [CODE
LOWoauth2_provider/core/compat.py15__all__ = ["login_not_required"]CODE
LOWoauth2_provider/core/utils.py145def set_oauthlib_user_to_device_request_user(request: Request) -> None:CODE
LOWoauth2_provider/resource_server/__init__.py50__all__ = ["build_bearer_challenge", "challenge_status", *sorted(_LAZY)]CODE
LOWoauth2_provider/contrib/ninja/__init__.py5__all__ = ["HttpOAuth2", "OAuth2ClientRateThrottle", "OAuth2UserOrClientRateThrottle"]CODE
LOWoauth2_provider/views/mixins.py36__all__ = [CODE
LOWoauth2_provider/views/metadata.py26__all__ = [CODE
LOWoauth2_provider/client/__init__.py22__all__ = ["make_client_assertion"]CODE
LOWoauth2_provider/client/client_assertions.py22__all__ = ["make_client_assertion"]CODE
Redundant / Tautological Comments3 hits · 4 pts
SeverityFileLineSnippetContext
LOWoauth2_provider/settings.py494 # Check if present in user settingsCOMMENT
LOWoauth2_provider/resource_server/decorators.py121 # Check if provided scopes are acceptableCOMMENT
LOWoauth2_provider/resource_server/decorators.py131 # Check if method is safe. Build a fresh list per request so the read/writeCOMMENT
AI Structural Patterns4 hits · 4 pts
SeverityFileLineSnippetContext
LOWtests/e2e/helpers/oauth_client.py147CODE
LOWtests/e2e/helpers/oauth_client.py184CODE
LOWtests/e2e/helpers/idp_process.py67CODE
LOWoauth2_provider/resource_server/middleware.py65CODE