A configurable set of panels that display various debug information about the current request/response.
This report presents the forensic synthetic code analysis of django-commons/django-debug-toolbar, a Python project with 8,375 GitHub stars. SynthScan v2.0 examined 18,926 lines of code across 178 source files, recording 234 pattern matches distributed across 10 syntactic categories. The overall adjusted score of 15.0 places this repository in the Moderate 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).
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.
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.
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.
The scanner identified 234 distinct pattern matches across 10 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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/test_integration_async.py | 125 | async def test_include_package_urls(self): | CODE |
| LOW⚡ | tests/test_integration_async.py | 135 | async def test_low_level_cache_view(self): | CODE |
| LOW⚡ | tests/test_integration_async.py | 142 | async def test_cache_disable_instrumentation(self): | CODE |
| LOW⚡ | tests/test_integration_async.py | 165 | async def test_is_toolbar_request_without_djdt_urls(self): | CODE |
| LOW⚡ | tests/test_integration_async.py | 174 | async def test_is_toolbar_request_override_request_urlconf(self): | CODE |
| LOW⚡ | tests/test_integration_async.py | 183 | async def test_is_toolbar_request_with_script_prefix(self): | CODE |
| LOW | tests/test_integration_async.py | 98 | async def test_middleware_response_insertion(self): | CODE |
| LOW | tests/test_integration_async.py | 106 | async def test_middleware_no_injection_when_encoded(self): | CODE |
| LOW | tests/test_integration_async.py | 235 | async def test_middleware_in_async_mode(self): | CODE |
| LOW | tests/test_integration_async.py | 265 | async def test_render_panel_checks_show_toolbar(self): | CODE |
| LOW | tests/test_integration_async.py | 280 | async def test_middleware_render_toolbar_json(self): | CODE |
| LOW | tests/test_integration_async.py | 300 | async def test_template_source_checks_show_toolbar(self): | CODE |
| LOW | tests/test_integration_async.py | 314 | async def test_template_source_errors(self): | CODE |
| LOW | tests/test_integration_async.py | 334 | async def test_sql_select_checks_show_toolbar(self): | CODE |
| LOW | tests/test_integration_async.py | 358 | async def test_sql_explain_checks_show_toolbar(self): | CODE |
| LOW | tests/test_integration_async.py | 385 | async def test_sql_explain_postgres_union_query(self): | CODE |
| LOW | tests/test_integration_async.py | 412 | async def test_sql_explain_postgres_json_field(self): | CODE |
| LOW | tests/test_integration_async.py | 435 | async def test_sql_profile_checks_show_toolbar(self): | CODE |
| LOW | tests/test_integration_async.py | 460 | async def test_render_panels_in_request(self): | CODE |
| LOW | tests/test_integration_async.py | 499 | async def test_view_returns_template_response(self): | CODE |
| LOW | tests/test_integration_async.py | 510 | async def test_server_timing_headers(self): | CODE |
| LOW | tests/test_integration_async.py | 533 | async def test_auth_login_view_without_redirect(self): | CODE |
| LOW | tests/test_utils.py | 71 | def test_get_stack_trace_skip(self): | CODE |
| LOW | tests/test_utils.py | 84 | def test_deprecated_functions(self): | CODE |
| LOW | tests/test_utils.py | 135 | def test_querydict_sanitization(self): | CODE |
| LOW | tests/test_utils.py | 147 | def test_non_sortable_dict_keys(self): | CODE |
| LOW | tests/test_utils.py | 161 | def test_querydict_multiple_values(self): | CODE |
| LOW | tests/test_decorators.py | 16 | def stub_require_toolbar_view(request): | CODE |
| LOW | tests/test_decorators.py | 21 | async def stub_require_toolbar_async_view(request): | CODE |
| LOW⚡ | tests/test_decorators.py | 35 | def test_require_toolbar_debug_true(self): | CODE |
| LOW⚡ | tests/test_decorators.py | 39 | def test_require_toolbar_debug_false(self): | CODE |
| LOW⚡ | tests/test_decorators.py | 46 | async def test_require_toolbar_async_debug_true(self): | CODE |
| LOW⚡ | tests/test_decorators.py | 50 | async def test_require_toolbar_async_debug_false(self): | CODE |
| LOW⚡ | tests/test_decorators.py | 59 | def test_uses_toolbar_language(self, mock_language_override): | CODE |
| LOW⚡ | tests/test_decorators.py | 64 | def test_defaults_to_django_language_code(self, mock_language_override): | CODE |
| LOW | tests/test_middleware.py | 73 | def test_async_show_toolbar_callback_sync_middleware(self, mocked_show): | CODE |
| LOW | tests/test_middleware.py | 89 | async def test_sync_show_toolbar_callback_async_middleware(self, mocked_show): | CODE |
| LOW | tests/test_apps.py | 16 | def test_migrations_are_visible(self, mocked_migration_modules): | CODE |
| LOW | tests/test_apps.py | 24 | def test_migrations_are_hidden(self, mocked_migration_modules): | CODE |
| LOW | tests/test_csp_rendering.py | 110 | def test_does_not_exist_nonce_wasnt_used(self): | CODE |
| LOW | tests/test_csp_rendering.py | 155 | def test_panel_content_nonce_exists(self): | CODE |
| LOW⚡ | tests/test_store.py | 24 | def test_serialize_binary_data(self): | CODE |
| LOW⚡ | tests/test_store.py | 30 | def test_deserialize_binary_data(self): | CODE |
| LOW⚡ | tests/test_store.py | 40 | def test_nested_binary_roundtrip(self): | CODE |
| LOW⚡ | tests/test_store.py | 47 | def test_postgis_sentinel_falls_back_to_bytes_without_geodjango(self): | CODE |
| LOW | tests/test_store.py | 60 | def test_postgis_sentinel_roundtrip_without_geodjango(self): | CODE |
| LOW | tests/test_store.py | 77 | def test_serialize_unexpected(self): | CODE |
| LOW | tests/test_store.py | 91 | def test_methods_are_not_implemented(self): | CODE |
| LOW | tests/test_store.py | 196 | def test_panels_nonexistent_request(self): | CODE |
| LOW | tests/test_store.py | 210 | def test_serialize_safestring(self): | CODE |
| LOW | tests/test_store.py | 234 | def test_get_store_with_setting(self): | CODE |
| LOW | tests/test_store.py | 307 | def test_database_queries_are_efficient(self): | CODE |
| LOW | tests/test_store.py | 349 | def test_custom_cache_backend(self): | CODE |
| LOW | tests/test_store.py | 371 | def test_cache_store_operations_not_tracked_by_cache_panel(self): | CODE |
| LOW | tests/test_store.py | 458 | def test_database_backend_not_tracked_by_sql_panel(self): | CODE |
| LOW | tests/test_store.py | 510 | def test_database_backend_can_be_tracked_by_sql_panel(self): | CODE |
| LOW | tests/test_toolbar.py | 12 | def test_empty_when_debug_is_false(self): | CODE |
| LOW⚡ | tests/test_integration.py | 256 | def test_is_toolbar_request_without_djdt_urls(self): | CODE |
| LOW⚡ | tests/test_integration.py | 265 | def test_is_toolbar_request_override_request_urlconf(self): | CODE |
| LOW⚡ | tests/test_integration.py | 274 | def test_is_toolbar_request_with_script_prefix(self): | CODE |
| 123 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/panels/test_profiling.py | 0 | test that the panel only inserts content after generate_stats and not the process_request. | STRING |
| HIGH | tests/panels/test_request.py | 0 | test that the panel only inserts content after generate_stats and not the process_request. | STRING |
| HIGH | tests/panels/test_sql.py | 0 | test that the panel only inserts content after generate_stats and not the process_request. | STRING |
| HIGH | tests/panels/test_staticfiles.py | 0 | test that the panel only inserts content after generate_stats and not the process_request. | STRING |
| HIGH | tests/panels/test_cache.py | 0 | test that the panel only inserts content after generate_stats and not the process_request. | STRING |
| HIGH | tests/panels/test_template.py | 0 | test that the panel only inserts content after generate_stats and not the process_request. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | debug_toolbar/forms.py | 5 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | debug_toolbar/panels/sql/forms.py | 2 | from django.core.exceptions import ValidationError | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | example/screenshot.py | 64 | CODE | |
| LOW | tests/test_checks.py | 243 | CODE | |
| LOW | debug_toolbar/utils.py | 107 | CODE | |
| LOW | debug_toolbar/panels/alerts.py | 23 | CODE | |
| LOW | debug_toolbar/panels/staticfiles.py | 102 | CODE | |
| LOW | debug_toolbar/panels/staticfiles.py | 137 | CODE | |
| LOW | debug_toolbar/panels/templates/panel.py | 132 | CODE | |
| LOW | debug_toolbar/panels/sql/panel.py | 215 | CODE | |
| LOW | debug_toolbar/panels/sql/tracking.py | 190 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | example/async_/settings.py | 3 | CODE | |
| LOW | tests/test_csp_rendering.py | 1 | CODE | |
| LOW | debug_toolbar/toolbar.py | 5 | CODE | |
| LOW | debug_toolbar/utils.py | 1 | CODE | |
| LOW | debug_toolbar/_compat.py | 4 | CODE | |
| LOW | debug_toolbar/_compat.py | 16 | CODE | |
| LOW | debug_toolbar/_stubs.py | 1 | CODE | |
| LOW | debug_toolbar/management/commands/debugsqlshell.py | 4 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | debug_toolbar/utils.py | 129 | except Exception: | CODE |
| LOW | debug_toolbar/utils.py | 207 | except Exception: # findsource raises platform-dependant exceptions | CODE |
| LOW | debug_toolbar/panels/settings.py | 14 | except Exception as e: | CODE |
| MEDIUM | debug_toolbar/panels/settings.py | 11 | def safe_pformat(obj): | CODE |
| LOW | debug_toolbar/panels/templates/panel.py | 177 | except Exception: | CODE |
| LOW | debug_toolbar/panels/templates/views.py | 25 | except Exception: | CODE |
| LOW | debug_toolbar/panels/sql/views.py | 91 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/conf.py | 41 | # Add any paths that contain templates here, relative to this directory. | COMMENT |
| LOW | debug_toolbar/panels/sql/tracking.py | 61 | # methods, including .cursor() and .chunked_cursor(), to raise an exception | COMMENT |
| LOW | debug_toolbar/panels/sql/tracking.py | 241 | # PostgreSQL does not expose any sort of transaction ID, so it is | COMMENT |
| LOW | debug_toolbar/static/debug_toolbar/css/toolbar.css | 61 | --djdt-button-border-color: #666; | COMMENT |
| LOW | debug_toolbar/static/debug_toolbar/css/toolbar.css | 81 | #djDebug h5, | COMMENT |
| LOW | debug_toolbar/static/debug_toolbar/css/toolbar.css | 101 | #djDebug s, | COMMENT |
| LOW | debug_toolbar/static/debug_toolbar/css/toolbar.css | 121 | #djDebug form, | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | example/screenshot.py | 75 | # Check if SQL Panel is already visible: | STRING |
| LOW | debug_toolbar/apps.py | 247 | # Check if show toolbar callback has changed | COMMENT |
| LOW | debug_toolbar/apps.py | 258 | # Check if the toolbar's urls are installed | COMMENT |
| LOW | debug_toolbar/panels/__init__.py | 30 | # Check if the panel is async compatible | COMMENT |
| LOW | debug_toolbar/panels/templates/panel.py | 135 | # Check if the layer is in the cache. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_store.py | 425 | # Create the database cache table | COMMENT |
| MEDIUM | debug_toolbar/store.py | 210 | # Create the entry if it doesn't exist (ignore otherwise) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | debug_toolbar/__init__.py | 1 | __all__ = ["APP_NAME", "VERSION"] | CODE |
| LOW | debug_toolbar/toolbar.py | 32 | logger = logging.getLogger(__name__) | CODE |
| LOW | debug_toolbar/panels/templates/__init__.py | 3 | __all__ = [TemplatesPanel.panel_id] | CODE |
| LOW | debug_toolbar/panels/sql/__init__.py | 3 | __all__ = [SQLPanel.panel_id] | CODE |
| LOW | debug_toolbar/management/commands/debugsqlshell.py | 17 | __all__ = ["Command", "PrintQueryWrapper"] | CODE |