AI Slop Code RIsk Monitor

django-commons/django-debug-toolbar

A configurable set of panels that display various debug information about the current request/response.

17.2 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for django-commons/django-debug-toolbar, a Python project with 8,379 GitHub stars. SynthScan examined 19,952 lines of code across 190 source files, recording 257 pattern matches distributed across 11 syntactic categories. The legacy adjusted pattern signal is 17.2 (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.

17.2
Adjusted Signal
17.2
Raw Pattern Score
100%
Time Factor
2026-10-11
Last Push
8.4K
Stars
Python
Language
20.0K
Lines of Code
190
Files
257
Pattern Hits
2026-10-12
Scan Date
0.09
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 42.9/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 7.7/100 · LOW

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

Agent Over-Engineering Ratio 50.7/100 · HIGH

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

PR Review Velocity Impact 59.3/100 · HIGH

Which changes need focused human review? 257 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 2HIGH 16MEDIUM 2LOW 237

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 257 distinct pattern matches across 11 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 Identifiers196 hits · 194 pts
SeverityFileLineSnippetContext
LOW⚡tests/test_integration_async.py125 async def test_include_package_urls(self):CODE
LOW⚡tests/test_integration_async.py135 async def test_low_level_cache_view(self):CODE
LOW⚡tests/test_integration_async.py142 async def test_cache_disable_instrumentation(self):CODE
LOW⚡tests/test_integration_async.py165 async def test_is_toolbar_request_without_djdt_urls(self):CODE
LOW⚡tests/test_integration_async.py174 async def test_is_toolbar_request_override_request_urlconf(self):CODE
LOW⚡tests/test_integration_async.py183 async def test_is_toolbar_request_with_script_prefix(self):CODE
LOWtests/test_integration_async.py98 async def test_middleware_response_insertion(self):CODE
LOWtests/test_integration_async.py106 async def test_middleware_no_injection_when_encoded(self):CODE
LOWtests/test_integration_async.py235 async def test_middleware_in_async_mode(self):CODE
LOWtests/test_integration_async.py265 async def test_render_panel_checks_show_toolbar(self):CODE
LOWtests/test_integration_async.py280 async def test_middleware_render_toolbar_json(self):CODE
LOWtests/test_integration_async.py300 async def test_template_source_checks_show_toolbar(self):CODE
LOWtests/test_integration_async.py314 async def test_template_source_errors(self):CODE
LOWtests/test_integration_async.py334 async def test_sql_select_checks_show_toolbar(self):CODE
LOWtests/test_integration_async.py358 async def test_sql_explain_checks_show_toolbar(self):CODE
LOWtests/test_integration_async.py385 async def test_sql_explain_postgres_union_query(self):CODE
LOWtests/test_integration_async.py412 async def test_sql_explain_postgres_json_field(self):CODE
LOWtests/test_integration_async.py435 async def test_sql_profile_checks_show_toolbar(self):CODE
LOWtests/test_integration_async.py460 async def test_render_panels_in_request(self):CODE
LOWtests/test_integration_async.py499 async def test_view_returns_template_response(self):CODE
LOWtests/test_integration_async.py510 async def test_server_timing_headers(self):CODE
LOWtests/test_integration_async.py534 async def test_auth_login_view_without_redirect(self):CODE
LOWtests/test_utils.py71 def test_get_stack_trace_skip(self):CODE
LOWtests/test_utils.py84 def test_deprecated_functions(self):CODE
LOWtests/test_utils.py135 def test_querydict_sanitization(self):CODE
LOWtests/test_utils.py147 def test_non_sortable_dict_keys(self):CODE
LOWtests/test_utils.py161 def test_querydict_multiple_values(self):CODE
LOWtests/test_decorators.py16def stub_require_toolbar_view(request):CODE
LOWtests/test_decorators.py21async def stub_require_toolbar_async_view(request):CODE
LOW⚡tests/test_decorators.py35 def test_require_toolbar_debug_true(self):CODE
LOW⚡tests/test_decorators.py39 def test_require_toolbar_debug_false(self):CODE
LOW⚡tests/test_decorators.py46 async def test_require_toolbar_async_debug_true(self):CODE
LOW⚡tests/test_decorators.py50 async def test_require_toolbar_async_debug_false(self):CODE
LOW⚡tests/test_decorators.py59 def test_uses_toolbar_language(self, mock_language_override):CODE
LOW⚡tests/test_decorators.py64 def test_defaults_to_django_language_code(self, mock_language_override):CODE
LOWtests/test_middleware.py73 def test_async_show_toolbar_callback_sync_middleware(self, mocked_show):CODE
LOWtests/test_middleware.py89 async def test_sync_show_toolbar_callback_async_middleware(self, mocked_show):CODE
LOWtests/test_apps.py16 def test_migrations_are_visible(self, mocked_migration_modules):CODE
LOWtests/test_apps.py24 def test_migrations_are_hidden(self, mocked_migration_modules):CODE
LOWtests/test_csp_rendering.py110 def test_does_not_exist_nonce_wasnt_used(self):CODE
LOWtests/test_csp_rendering.py155 def test_panel_content_nonce_exists(self):CODE
LOW⚡tests/test_store.py24 def test_serialize_binary_data(self):CODE
LOW⚡tests/test_store.py30 def test_deserialize_binary_data(self):CODE
LOW⚡tests/test_store.py40 def test_nested_binary_roundtrip(self):CODE
LOW⚡tests/test_store.py47 def test_postgis_sentinel_falls_back_to_bytes_without_geodjango(self):CODE
LOWtests/test_store.py60 def test_postgis_sentinel_roundtrip_without_geodjango(self):CODE
LOWtests/test_store.py77 def test_serialize_unexpected(self):CODE
LOWtests/test_store.py91 def test_methods_are_not_implemented(self):CODE
LOWtests/test_store.py196 def test_panels_nonexistent_request(self):CODE
LOWtests/test_store.py210 def test_serialize_safestring(self):CODE
LOWtests/test_store.py234 def test_get_store_with_setting(self):CODE
LOWtests/test_store.py307 def test_database_queries_are_efficient(self):CODE
LOWtests/test_store.py349 def test_custom_cache_backend(self):CODE
LOWtests/test_store.py371 def test_cache_store_operations_not_tracked_by_cache_panel(self):CODE
LOWtests/test_store.py458 def test_database_backend_not_tracked_by_sql_panel(self):CODE
LOWtests/test_store.py510 def test_database_backend_can_be_tracked_by_sql_panel(self):CODE
LOWtests/test_toolbar.py12 def test_empty_when_debug_is_false(self):CODE
LOW⚡tests/test_integration.py273 def test_is_toolbar_request_without_djdt_urls(self):CODE
LOW⚡tests/test_integration.py282 def test_is_toolbar_request_override_request_urlconf(self):CODE
LOW⚡tests/test_integration.py291 def test_is_toolbar_request_with_script_prefix(self):CODE
136 more matches not shown…
Empty Error Handlers10 hits · 50 pts
SeverityFileLineSnippetContext
HIGHtests/test_integration.py865except StaleElementReferenceException:CODE
HIGHdebug_toolbar/utils.py129except Exception: # noqa: S110, BLE001CODE
HIGHdebug_toolbar/middleware.py61except socket.gaierror:CODE
HIGHdebug_toolbar/middleware.py77except socket.gaierror:CODE
HIGHdebug_toolbar/panels/request.py58except Http404:CODE
HIGHdebug_toolbar/panels/staticfiles.py123except OSError:CODE
HIGHdebug_toolbar/panels/versions.py62except TypeError:CODE
HIGHdebug_toolbar/panels/history/panel.py88except RawPostDataException:CODE
HIGHdebug_toolbar/panels/templates/views.py50except TemplateDoesNotExist:CODE
HIGHdebug_toolbar/panels/sql/tracking.py41except (ImportError, ImproperlyConfigured):CODE
Cross-File Repetition6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHtests/panels/test_profiling.py0test that the panel only inserts content after generate_stats and not the process_request.STRING
HIGHtests/panels/test_request.py0test that the panel only inserts content after generate_stats and not the process_request.STRING
HIGHtests/panels/test_sql.py0test that the panel only inserts content after generate_stats and not the process_request.STRING
HIGHtests/panels/test_staticfiles.py0test that the panel only inserts content after generate_stats and not the process_request.STRING
HIGHtests/panels/test_cache.py0test that the panel only inserts content after generate_stats and not the process_request.STRING
HIGHtests/panels/test_template.py0test that the panel only inserts content after generate_stats and not the process_request.STRING
Hallucination Indicators2 hits · 20 pts
SeverityFileLineSnippetContext
CRITICALdebug_toolbar/forms.py5from django.core.exceptions import ValidationErrorCODE
CRITICALdebug_toolbar/panels/sql/forms.py2from django.core.exceptions import ValidationErrorCODE
Unused Imports12 hits · 12 pts
SeverityFileLineSnippetContext
LOWexample/async_/settings.py3CODE
LOWtests/test_csp_rendering.py1CODE
LOWdebug_toolbar/toolbar.py5CODE
LOWdebug_toolbar/utils.py1CODE
LOWdebug_toolbar/_compat.py4CODE
LOWdebug_toolbar/_compat.py16CODE
LOWdebug_toolbar/_compat.py27CODE
LOWdebug_toolbar/_stubs.py1CODE
LOWdebug_toolbar/panels/history/__init__.py1CODE
LOWdebug_toolbar/panels/templates/__init__.py1CODE
LOWdebug_toolbar/panels/sql/__init__.py1CODE
LOWdebug_toolbar/management/commands/debugsqlshell.py4CODE
Deep Nesting9 hits · 9 pts
SeverityFileLineSnippetContext
LOWexample/screenshot.py80CODE
LOWtests/test_checks.py243CODE
LOWdebug_toolbar/utils.py107CODE
LOWdebug_toolbar/panels/alerts.py23CODE
LOWdebug_toolbar/panels/staticfiles.py103CODE
LOWdebug_toolbar/panels/staticfiles.py138CODE
LOWdebug_toolbar/panels/templates/panel.py133CODE
LOWdebug_toolbar/panels/sql/panel.py216CODE
LOWdebug_toolbar/panels/sql/tracking.py190CODE
Redundant / Tautological Comments5 hits · 8 pts
SeverityFileLineSnippetContext
LOWexample/screenshot.py91 # Check if SQL Panel is already visible:COMMENT
LOWdebug_toolbar/apps.py246 # Check if show toolbar callback has changedCOMMENT
LOWdebug_toolbar/apps.py257 # Check if the toolbar's urls are installedCOMMENT
LOWdebug_toolbar/panels/__init__.py30 # Check if the panel is async compatibleCOMMENT
LOWdebug_toolbar/panels/templates/panel.py136 # Check if the layer is in the cache.COMMENT
Over-Commented Block7 hits · 7 pts
SeverityFileLineSnippetContext
LOWdocs/conf.py41# Add any paths that contain templates here, relative to this directory.COMMENT
LOWdocs/_static/brand/regenerate-pngs.sh1#!/usr/bin/env bashCOMMENT
LOWdebug_toolbar/panels/timer.py101 }COMMENT
LOWdebug_toolbar/panels/sql/tracking.py61 # methods, including .cursor() and .chunked_cursor(), to raise an exceptionCOMMENT
LOWdebug_toolbar/static/debug_toolbar/css/toolbar.css81#djDebug,COMMENT
LOWdebug_toolbar/static/debug_toolbar/css/toolbar.css101#djDebug cite,COMMENT
LOWdebug_toolbar/static/debug_toolbar/css/toolbar.css121#djDebug u,COMMENT
Self-Referential Comments2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_store.py425 # Create the database cache tableCOMMENT
MEDIUMdebug_toolbar/store.py210 # Create the entry if it doesn't exist (ignore otherwise)COMMENT
Modern Structural Boilerplate5 hits · 5 pts
SeverityFileLineSnippetContext
LOWdebug_toolbar/__init__.py1__all__ = ["APP_NAME", "VERSION"]CODE
LOWdebug_toolbar/toolbar.py32logger = logging.getLogger(__name__)CODE
LOWdebug_toolbar/panels/templates/__init__.py3__all__ = ["TemplatesPanel"]CODE
LOWdebug_toolbar/panels/sql/__init__.py3__all__ = ["SQLPanel"]CODE
LOWdebug_toolbar/management/commands/debugsqlshell.py17__all__ = ["Command", "PrintQueryWrapper"]CODE
Excessive Try-Catch Wrapping3 hits · 3 pts
SeverityFileLineSnippetContext
LOWdebug_toolbar/utils.py129 except Exception: # noqa: S110, BLE001CODE
LOWdebug_toolbar/utils.py207 except Exception: # noqa: BLE001CODE
LOWdebug_toolbar/panels/templates/panel.py178 except Exception: # noqa: BLE001CODE