Repository Analysis

netbox-community/netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/products/free-netbox-cloud/

14.2 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of netbox-community/netbox, a Python project with 21,090 GitHub stars. SynthScan v2.0 examined 270,118 lines of code across 1774 source files, recording 3023 pattern matches distributed across 20 syntactic categories. The overall adjusted score of 14.2 places this repository in the Low AI signal band.

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

14.2
Adjusted Score
14.2
Raw Score
100%
Time Factor
2026-07-14
Last Push
21.1K
Stars
Python
Language
270.1K
Lines of Code
1.8K
Files
3.0K
Pattern Hits
2026-07-14
Scan Date
0.04
HC Hit Rate

What These Metrics Mean

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

Score History

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

Severity Breakdown

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

CRITICAL 62HIGH 8MEDIUM 147LOW 2806

Directory Score Breakdown

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

Pattern Findings

The scanner identified 3023 distinct pattern matches across 20 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.

Hyper-Verbose Identifiers1662 hits · 1604 pts
SeverityFileLineSnippetContext
LOWnetbox/netbox/denormalized.py31def update_denormalized_fields(sender, instance, created, raw, **kwargs):CODE
LOWnetbox/netbox/utils.py60def register_request_processor(func):CODE
LOWnetbox/netbox/middleware.py46 def should_redirect_with_slash(self, request):CODE
LOWnetbox/netbox/tables/tables.py298 def _restrict_customlink_columns(self, user):CODE
LOWnetbox/netbox/forms/mixins.py77 def _append_customfield_fields(self):CODE
LOWnetbox/netbox/plugins/registration.py20def register_template_extensions(class_list):CODE
LOWnetbox/netbox/plugins/registration.py81def register_user_preferences(plugin_name, preferences):CODE
LOWnetbox/netbox/plugins/registration.py88def register_serializer_resolver(app_label, resolver):CODE
LOWnetbox/netbox/tests/test_forms.py35 def test_empty_string_to_none_nullable_charfield(self):CODE
LOWnetbox/netbox/tests/test_forms.py48 def test_empty_string_to_none_nullable_integerfield(self):CODE
LOWnetbox/netbox/tests/test_forms.py61 def test_empty_string_to_none_nullable_smallintegerfield(self):CODE
LOWnetbox/netbox/tests/test_forms.py74 def test_empty_string_to_none_nullable_decimalfield(self):CODE
LOWnetbox/netbox/tests/test_forms.py89 def test_empty_string_to_none_nullable_foreignkey(self):CODE
LOWnetbox/netbox/tests/test_forms.py108 def test_empty_string_preserved_non_nullable_charfield(self):CODE
LOWnetbox/netbox/tests/test_forms.py124 def test_empty_string_not_converted_for_required_fields(self):CODE
LOWnetbox/netbox/tests/test_forms.py138 def test_non_string_none_value_preserved(self):CODE
LOWnetbox/netbox/tests/test_forms.py153 def test_non_string_numeric_values_preserved(self):CODE
LOWnetbox/netbox/tests/test_forms.py168 def test_manytomany_fields_skipped(self):CODE
LOWnetbox/netbox/tests/test_forms.py181 def test_fields_not_in_cleaned_data_skipped(self):CODE
LOWnetbox/netbox/tests/test_forms.py195 def test_valid_string_values_preserved(self):CODE
LOWnetbox/netbox/tests/test_forms.py213 def test_multiple_nullable_fields_with_empty_strings(self):CODE
LOWnetbox/netbox/tests/test_forms.py237 def test_mixed_nullable_and_non_nullable_empty_strings(self):CODE
LOWnetbox/netbox/tests/test_forms.py258 def test_wireless_fields_nullable(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py15 def test_explicit_module_wins(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py23 def test_checkout_uses_default_module(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py30 def test_checkout_missing_module_raises_improperly_configured(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py40 def test_wheel_prefers_conf_dir(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py103 def test_import_from_path_removes_module_on_failure(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py112 def test_import_from_path_rejects_unloadable_path(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py120 def test_import_from_path_preserves_preexisting_sys_path_entry(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py204 def test_wheel_mode_suggests_console_command(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py207 def test_checkout_mode_suggests_generate_secret_key_script(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py215 def test_loads_sibling_ldap_config(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py224 def test_legacy_fallback_loads_historical_module_with_warning(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py232 def test_legacy_fallback_prefers_sibling_file(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py242 def test_legacy_fallback_disabled_raises(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py249 def test_legacy_fallback_missing_module_raises(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py258 def test_legacy_fallback_reraises_broken_dependency(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py267 def test_none_config_dir_raises(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py276 def test_configuration_dir_setting_matches_active_configuration(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py57 def test_wheel_falls_back_to_legacy_with_warning(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py72 def test_wheel_missing_configuration_raises(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py79 def test_explicit_module_reraises_other_import_error(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py91 def test_import_from_path_loads_module_and_restores_sys_path(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py135 def test_wheel_both_configs_present_warns_and_prefers_conf(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py157 def test_returns_directory_of_module_file(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py162 def test_returns_none_without_file(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py181 def test_wheel_roots_default_netbox_root(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py193 def test_netbox_root_env_override_is_abspathed(self):CODE
LOWnetbox/netbox/tests/test_model_test_coverage.py168 def test_api_test_cases_exist_for_api_models(self):CODE
LOWnetbox/netbox/tests/test_model_test_coverage.py183 def test_view_test_cases_exist_for_ui_models(self):CODE
LOWnetbox/netbox/tests/test_model_test_coverage.py198 def test_filterset_test_cases_exist_for_registered_filtersets(self):CODE
LOWnetbox/netbox/tests/test_model_test_coverage.py225 def test_import_optional_returns_module_when_present(self):CODE
LOWnetbox/netbox/tests/test_model_test_coverage.py230 def test_import_optional_returns_none_for_missing_submodule(self):CODE
LOWnetbox/netbox/tests/test_model_test_coverage.py234 def test_import_optional_returns_none_for_missing_parent(self):CODE
LOWnetbox/netbox/tests/test_model_test_coverage.py238 def test_import_optional_propagates_unrelated_find_spec_error(self):CODE
LOWnetbox/netbox/tests/test_model_test_coverage.py252 def test_import_optional_propagates_import_module_errors(self):CODE
LOWnetbox/netbox/tests/test_model_test_coverage.py272 def test_has_tests_detects_test_methods(self):CODE
LOWnetbox/netbox/tests/test_model_test_coverage.py284 def test_get_queryset_model_prefers_queryset(self):CODE
LOWnetbox/netbox/tests/test_model_test_coverage.py290 def test_get_queryset_model_falls_back_to_filterset(self):CODE
1602 more matches not shown…
Unused Imports927 hits · 900 pts
SeverityFileLineSnippetContext
LOWnetbox/netbox/settings.py1045CODE
LOWnetbox/netbox/settings.py353CODE
LOWnetbox/netbox/tables/__init__.py1CODE
LOWnetbox/netbox/tables/__init__.py2CODE
LOWnetbox/netbox/tables/tables.py17CODE
LOWnetbox/netbox/tables/tables.py27CODE
LOWnetbox/netbox/forms/model_forms.py7CODE
LOWnetbox/netbox/forms/mixins.py5CODE
LOWnetbox/netbox/forms/mixins.py6CODE
LOWnetbox/netbox/forms/filtersets.py4CODE
LOWnetbox/netbox/forms/__init__.py1CODE
LOWnetbox/netbox/forms/__init__.py2CODE
LOWnetbox/netbox/forms/__init__.py3CODE
LOWnetbox/netbox/forms/__init__.py4CODE
LOWnetbox/netbox/forms/__init__.py5CODE
LOWnetbox/netbox/forms/__init__.py6CODE
LOWnetbox/netbox/forms/bulk_import.py5CODE
LOWnetbox/netbox/forms/bulk_edit.py5CODE
LOWnetbox/netbox/plugins/__init__.py14CODE
LOWnetbox/netbox/plugins/__init__.py15CODE
LOWnetbox/netbox/plugins/__init__.py16CODE
LOWnetbox/netbox/plugins/__init__.py17CODE
LOWnetbox/netbox/tests/test_import.py2CODE
LOWnetbox/netbox/tests/test_jobs.py14CODE
LOWnetbox/netbox/tests/dummy_plugin/__init__.py27CODE
LOWnetbox/netbox/tests/dummy_plugin/__init__.py27CODE
LOWnetbox/netbox/tests/dummy_plugin/__init__.py27CODE
LOWnetbox/netbox/tests/dummy_plugin/views.py14CODE
LOWnetbox/netbox/navigation/menu.py7CODE
LOWnetbox/netbox/models/mixins.py5CODE
LOWnetbox/netbox/models/__init__.py10CODE
LOWnetbox/netbox/models/features.py15CODE
LOWnetbox/netbox/graphql/enums.py3CODE
LOWnetbox/netbox/graphql/filter_mixins.py19CODE
LOWnetbox/netbox/graphql/filter_mixins.py20CODE
LOWnetbox/netbox/graphql/filter_mixins.py22CODE
LOWnetbox/netbox/graphql/filters.py12CODE
LOWnetbox/netbox/api/serializers/__init__.py1CODE
LOWnetbox/netbox/api/serializers/__init__.py2CODE
LOWnetbox/netbox/api/serializers/__init__.py3CODE
LOWnetbox/netbox/api/serializers/__init__.py4CODE
LOWnetbox/netbox/api/serializers/__init__.py6CODE
LOWnetbox/netbox/api/serializers/__init__.py7CODE
LOWnetbox/netbox/views/__init__.py1CODE
LOWnetbox/netbox/views/__init__.py2CODE
LOWnetbox/netbox/views/generic/__init__.py1CODE
LOWnetbox/netbox/views/generic/__init__.py2CODE
LOWnetbox/netbox/views/generic/__init__.py3CODE
LOWnetbox/core/signals.py15CODE
LOWnetbox/core/filtersets.py12CODE
LOWnetbox/core/filtersets.py13CODE
LOWnetbox/core/apps.py9CODE
LOWnetbox/core/apps.py31CODE
LOWnetbox/core/apps.py32CODE
LOWnetbox/core/apps.py32CODE
LOWnetbox/core/apps.py32CODE
LOWnetbox/core/apps.py33CODE
LOWnetbox/core/apps.py36CODE
LOWnetbox/core/apps.py36CODE
LOWnetbox/core/apps.py36CODE
867 more matches not shown…
Hallucination Indicators62 hits · 625 pts
SeverityFileLineSnippetContext
CRITICALnetbox/netbox/models/mixins.py1from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/core/tests/test_signals.py6from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/core/tests/test_management_commands.py295 data_source_model.objects.filter.return_value.update.assert_called_once_with(CODE
CRITICALnetbox/core/models/files.py6from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/core/models/change_logging.py5from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/core/models/jobs.py10from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/core/models/data.py10from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/virtualization/forms/model_forms.py5from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/virtualization/tests/test_models.py3from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/virtualization/models/clusters.py3from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/virtualization/models/virtualmachines.py4from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/circuits/models/virtual_circuits.py4from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/circuits/models/circuits.py3from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/tenancy/models/contacts.py2from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/vpn/forms/model_forms.py2from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/vpn/forms/bulk_import.py1from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/vpn/tests/test_models.py1from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/vpn/models/tunnels.py2from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/vpn/models/crypto.py1from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/vpn/models/l2vpn.py2from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/dcim/fields.py2from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/dcim/cable_profiles.py3from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/dcim/svg/racks.py5from django.core.exceptions import FieldErrorCODE
CRITICALnetbox/dcim/tests/test_models.py1from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/dcim/models/mixins.py3from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/dcim/models/device_component_templates.py2from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/dcim/models/sites.py4from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/dcim/models/modules.py5from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/dcim/models/racks.py7from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/dcim/models/cables.py10from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/dcim/models/cables.py659 termination = self.termination._meta.model.objects.get(pk=self.termination_id)CODE
CRITICALnetbox/dcim/models/cables.py667 termination = self.termination._meta.model.objects.get(pk=self.termination_id)CODE
CRITICALnetbox/dcim/models/devices.py7from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/dcim/models/power.py1from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/dcim/models/base.py1from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/utilities/password_validation.py1from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/utilities/validators.py4from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/utilities/jsonschema.py7from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/utilities/filters.py5from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/utilities/templatetags/form_helpers.py54 return field.field.widget.__class__.__name__.lower()CODE
CRITICALnetbox/utilities/forms/fields/csv.py3from django.core.exceptions import FieldError, MultipleObjectsReturned, ObjectDoesNotExistCODE
CRITICALnetbox/wireless/models.py1from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/users/views.py1from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/users/forms/model_forms.py8from django.core.exceptions import FieldErrorCODE
CRITICALnetbox/users/tests/test_models.py5from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/users/models/users.py13from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/users/models/tokens.py8from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/ipam/formfields.py2from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/ipam/fields.py1from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/ipam/filtersets.py4from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/ipam/validators.py1from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/ipam/tests/test_models.py3from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/ipam/models/asns.py1from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/ipam/models/ip.py5from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/ipam/models/vlans.py4from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/extras/validators.py4from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/extras/tests/test_signals.py5from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/extras/tests/test_lookups.py1from django.core.exceptions import FieldErrorCODE
CRITICALnetbox/extras/tests/test_customfields.py6from django.core.exceptions import ValidationErrorCODE
CRITICALnetbox/extras/tests/test_customvalidators.py2from django.core.exceptions import ValidationErrorCODE
2 more matches not shown…
Self-Referential Comments132 hits · 388 pts
SeverityFileLineSnippetContext
MEDIUMupgrade.sh50# Create a new virtual environmentCOMMENT
MEDIUMnetbox/netbox/configuration_example.py71# Define a mapping of cryptographic peppers to use when hashing API tokens. A minimum of one pepper is required toCOMMENT
MEDIUMnetbox/netbox/tables/columns.py323 # Create the actions dropdown menuCOMMENT
MEDIUMnetbox/netbox/tables/tables.py268 # Create a copy to avoid modifying the original ColumnCOMMENT
MEDIUMnetbox/netbox/tests/test_authentication.py37 # Create a v1 tokenCOMMENT
MEDIUMnetbox/netbox/tests/test_authentication.py59 # Create a v2 tokenCOMMENT
MEDIUMnetbox/netbox/tests/test_authentication.py718 # Create a permitted objectCOMMENT
MEDIUMnetbox/netbox/tests/test_config.py65 # Creating the first ConfigRevision fires the post_save handler, which activates it andCOMMENT
MEDIUMnetbox/netbox/tests/test_config.py107 # Create a config but don't load it into the cacheCOMMENT
MEDIUMnetbox/netbox/tests/test_config.py117 # Create a config and load it into the cacheCOMMENT
MEDIUMnetbox/netbox/tests/test_config.py129 # Create a config and load it into the cacheCOMMENT
MEDIUMnetbox/netbox/models/deletion.py54 # Create a unique key for this relationCOMMENT
MEDIUMnetbox/netbox/api/viewsets/mixins.py66 # Creating a single objectCOMMENT
MEDIUMnetbox/netbox/views/generic/object_views.py588 # Create the new componentsCOMMENT
MEDIUMnetbox/netbox/authentication/__init__.py106 # Create a dictionary mapping permissions to their constraintsCOMMENT
MEDIUMnetbox/netbox/authentication/__init__.py314# Create a new instance of django-auth-ldap's LDAPBackend with our own ObjectPermissionsCOMMENT
MEDIUMnetbox/core/tests/test_changelog.py46 # Create a custom field on the Site modelCOMMENT
MEDIUMnetbox/core/tests/test_changelog.py56 # Create a select custom field on the Site modelCOMMENT
MEDIUMnetbox/core/tests/test_changelog.py234 # Create a SiteCOMMENT
MEDIUMnetbox/core/tests/test_changelog.py264 # Create a SiteCOMMENT
MEDIUMnetbox/core/tests/test_changelog.py335 # Create a cable between the interfacesCOMMENT
MEDIUMnetbox/core/tests/test_changelog.py405 # Create a custom field on the Site modelCOMMENT
MEDIUMnetbox/core/tests/test_changelog.py415 # Create a select custom field on the Site modelCOMMENT
MEDIUMnetbox/core/tests/test_changelog.py654 # Create a new ModuleCOMMENT
MEDIUMnetbox/core/tests/test_changelog.py666 # Create an Interface on the ModuleCOMMENT
MEDIUMnetbox/virtualization/tests/test_views.py666 # Create a child interfaceCOMMENT
MEDIUMnetbox/virtualization/tests/test_models.py62 # Create the first VMCOMMENT
MEDIUMnetbox/virtualization/tests/test_models.py71 # Create the second VMCOMMENT
MEDIUMnetbox/virtualization/tests/test_models.py108 # Create the cluster typeCOMMENT
MEDIUMnetbox/virtualization/tests/test_models.py647 # Create a VM pinned to device_in_clusterCOMMENT
MEDIUMnetbox/virtualization/tests/test_models.py665 # Create a VM pinned to a deviceCOMMENT
MEDIUMnetbox/virtualization/tests/test_api.py739 # Create a child interfaceCOMMENT
MEDIUMnetbox/tenancy/tests/test_models.py10 # Create a tree of contact groups:COMMENT
MEDIUMnetbox/dcim/views.py118 # Create a new Form class from ConfirmationFormCOMMENT
MEDIUMnetbox/dcim/svg/cables.py429 # Create the connectorCOMMENT
MEDIUMnetbox/dcim/tests/test_cablepaths2.py1245 # Create a 2-connector trunk cable with both A-side connectorsCOMMENT
MEDIUMnetbox/dcim/tests/test_cablepaths2.py1988 # Create a PortMapping between frontport1 and rearport1COMMENT
MEDIUMnetbox/dcim/tests/test_signals.py312 # Creating a PortMapping connecting the front and rear ports should retrace pathsCOMMENT
MEDIUMnetbox/dcim/tests/test_views.py2739 # Create a module *without* replicating componentsSTRING
MEDIUMnetbox/dcim/tests/test_views.py2748 # Create a second module (in the next bay) with replicated componentsSTRING
MEDIUMnetbox/dcim/tests/test_views.py977 # Create the manufacturer and platformSTRING
MEDIUMnetbox/dcim/tests/test_views.py1560 # Create the manufacturerSTRING
MEDIUMnetbox/dcim/tests/test_views.py2776 # Create a module *without* replicating componentsSTRING
MEDIUMnetbox/dcim/tests/test_views.py2797 # Create a second module (in the next bay) with replicated componentsSTRING
MEDIUMnetbox/dcim/tests/test_views.py2835 # Create an interface to be adoptedSTRING
MEDIUMnetbox/dcim/tests/test_views.py2842 # Create a module with adopted componentsSTRING
MEDIUMnetbox/dcim/tests/test_views.py2879 # Create an interface to be adoptedSTRING
MEDIUMnetbox/dcim/tests/test_views.py2886 # Create a module with adopted componentsSTRING
MEDIUMnetbox/dcim/tests/test_views.py3402 # Create a child interfaceSTRING
MEDIUMnetbox/dcim/tests/test_models.py1751 # Create a module type with a rear port templateCOMMENT
MEDIUMnetbox/dcim/tests/test_models.py1757 # Create a rear port template with 12 positions (splice)COMMENT
MEDIUMnetbox/dcim/tests/test_models.py1836 # Create a module type without any port template mappingsCOMMENT
MEDIUMnetbox/dcim/tests/test_models.py1842 # Create a rear port templateCOMMENT
MEDIUMnetbox/dcim/tests/test_models.py496 # Create a CustomField with a default value & assign it to all component modelsCOMMENT
MEDIUMnetbox/dcim/tests/test_models.py904 # Create a disabled device bay with a device being installedCOMMENT
MEDIUMnetbox/dcim/tests/test_models.py945 # Create an enabled device bay with a device installedCOMMENT
MEDIUMnetbox/dcim/tests/test_models.py974 # Create a CustomField with a default value & assign it to all component modelsCOMMENT
MEDIUMnetbox/dcim/tests/test_models.py1886 # Create a disabled module bayCOMMENT
MEDIUMnetbox/dcim/tests/test_models.py2324 # Create a VirtualChassis with two member devicesCOMMENT
MEDIUMnetbox/dcim/tests/test_models.py2369 # Create a VirtualChassisCOMMENT
72 more matches not shown…
Deep Nesting102 hits · 99 pts
SeverityFileLineSnippetContext
LOWnetbox/netbox/filtersets.py102CODE
LOWnetbox/netbox/filtersets.py176CODE
LOWnetbox/netbox/filtersets.py382CODE
LOWnetbox/netbox/jobs.py99CODE
LOWnetbox/netbox/tables/tables.py119CODE
LOWnetbox/netbox/models/__init__.py83CODE
LOWnetbox/netbox/models/features.py139CODE
LOWnetbox/netbox/models/deletion.py16CODE
LOWnetbox/netbox/search/backends.py118CODE
LOWnetbox/netbox/search/backends.py199CODE
LOWnetbox/netbox/graphql/pagination.py29CODE
LOWnetbox/netbox/api/fields.py65CODE
LOWnetbox/netbox/api/pagination.py115CODE
LOWnetbox/netbox/views/generic/object_views.py270CODE
LOWnetbox/netbox/views/generic/object_views.py553CODE
LOWnetbox/netbox/views/generic/bulk_views.py396CODE
LOWnetbox/netbox/views/generic/bulk_views.py489CODE
LOWnetbox/netbox/views/generic/bulk_views.py554CODE
LOWnetbox/netbox/views/generic/bulk_views.py702CODE
LOWnetbox/netbox/views/generic/bulk_views.py792CODE
LOWnetbox/netbox/views/generic/bulk_views.py887CODE
LOWnetbox/netbox/views/generic/bulk_views.py1021CODE
LOWnetbox/netbox/views/generic/bulk_views.py1055CODE
LOWnetbox/netbox/views/generic/bulk_views.py1158CODE
LOWnetbox/netbox/views/generic/bulk_views.py1281CODE
LOWnetbox/core/signals.py88CODE
LOWnetbox/core/signals.py165CODE
LOWnetbox/core/models/data.py180CODE
LOWnetbox/virtualization/forms/model_forms.py142CODE
LOWnetbox/virtualization/forms/bulk_edit.py301CODE
LOWnetbox/virtualization/models/virtualmachines.py288CODE
LOWnetbox/circuits/models/circuits.py417CODE
LOWnetbox/vpn/forms/model_forms.py462CODE
LOWnetbox/dcim/views.py130CODE
LOWnetbox/dcim/svg/cables.py152CODE
LOWnetbox/dcim/svg/cables.py336CODE
LOWnetbox/dcim/forms/model_forms.py1390CODE
LOWnetbox/dcim/forms/model_forms.py1876CODE
LOWnetbox/dcim/forms/connections.py12CODE
LOWnetbox/dcim/forms/connections.py16CODE
LOWnetbox/dcim/forms/object_create.py57CODE
LOWnetbox/dcim/forms/common.py74CODE
LOWnetbox/dcim/forms/bulk_edit.py1611CODE
LOWnetbox/dcim/models/mixins.py105CODE
LOWnetbox/dcim/models/modules.py332CODE
LOWnetbox/dcim/models/racks.py487CODE
LOWnetbox/dcim/models/racks.py550CODE
LOWnetbox/dcim/models/cables.py276CODE
LOWnetbox/dcim/models/cables.py373CODE
LOWnetbox/dcim/models/cables.py845CODE
LOWnetbox/dcim/api/serializers_/devices.py213CODE
LOWnetbox/utilities/fields.py77CODE
LOWnetbox/utilities/fields.py237CODE
LOWnetbox/utilities/prefetch.py11CODE
LOWnetbox/utilities/choices.py20CODE
LOWnetbox/utilities/tracking.py62CODE
LOWnetbox/utilities/templatetags/tabs.py20CODE
LOWnetbox/utilities/templatetags/form_helpers.py121CODE
LOWnetbox/utilities/templatetags/navigation.py14CODE
LOWnetbox/utilities/templatetags/helpers.py451CODE
42 more matches not shown…
Cross-Language Confusion7 hits · 42 pts
SeverityFileLineSnippetContext
HIGHnetbox/netbox/api/pagination.py26 offset-based pagination. In cursor mode, `count` is omitted (null) for performance.STRING
HIGHnetbox/dcim/forms/bulk_edit.py1629 # Query for VLANs assigned to the same site and VLANs with no site assigned (null).COMMENT
HIGHnetbox/dcim/models/cables.py898 # If not null, push cable positions onto the stackCOMMENT
HIGHnetbox/utilities/tests/test_filter_modifiers.py113 # Simulate a query for objects with no tenant assigned (?tenant_id=null)COMMENT
HIGHnetbox/extras/lookups.py80 A key is considered empty if it is "", null, or does not exist.STRING
HIGHnetbox/extras/tests/test_models.py1483 clean() should accept a JSON object (or null) as action_data.STRING
HIGHnetbox/extras/models/models.py147 # action_data must be a JSON object (or null)COMMENT
Excessive Try-Catch Wrapping37 hits · 40 pts
SeverityFileLineSnippetContext
LOWnetbox/netbox/jobs.py117 except Exception as e:CODE
LOWnetbox/netbox/settings_utils.py111 except Exception:CODE
LOWnetbox/netbox/tables/columns.py596 except Exception as e:STRING
LOWnetbox/netbox/tables/columns.py605 except Exception:STRING
MEDIUMnetbox/netbox/tables/columns.py592def render(self, record, table, **kwargs):CODE
MEDIUMnetbox/netbox/tables/columns.py601def value(self, record, table, **kwargs):CODE
LOWnetbox/netbox/views/misc.py52 except Exception:CODE
LOWnetbox/netbox/views/misc.py64 except Exception:CODE
LOWnetbox/netbox/views/generic/bulk_views.py137 except Exception as e:CODE
LOWnetbox/core/checks.py69 except Exception:CODE
LOWnetbox/core/checks.py93 except Exception:CODE
LOWnetbox/core/apps.py54 except Exception:CODE
LOWnetbox/core/jobs.py53 except Exception as e:CODE
LOWnetbox/core/tables/tasks.py110 except Exception as e:CODE
MEDIUMnetbox/core/tables/tasks.py107def render_callable(self, value, record):CODE
LOWnetbox/core/tests/test_data_backends.py78 except Exception:CODE
LOWnetbox/core/management/commands/syncdatasource.py41 except Exception as e:CODE
LOWnetbox/utilities/request.py120 except Exception as e:CODE
LOWnetbox/utilities/api.py66 except Exception:CODE
LOWnetbox/utilities/rqworker.py45 except Exception:CODE
MEDIUMnetbox/utilities/rqworker.py32def heartbeat(self, *args, **kwargs):CODE
LOWnetbox/utilities/templatetags/plugins.py45 except Exception as e:CODE
LOWnetbox/extras/jobs.py68 except Exception as e:CODE
LOWnetbox/extras/scripts.py617 except Exception as e:CODE
LOWnetbox/extras/webhooks.py78 except Exception as e:CODE
LOWnetbox/extras/views.py1315 except Exception as e:CODE
LOWnetbox/extras/templatetags/dashboard.py15 except Exception as e:CODE
LOWnetbox/extras/templatetags/custom_links.py69 except Exception as e:STRING
LOWnetbox/extras/templatetags/custom_links.py84 except Exception as e:STRING
LOWnetbox/extras/forms/scripts.py89 except Exception as e:CODE
LOWnetbox/extras/forms/scripts.py98 except Exception as e:CODE
LOWnetbox/extras/models/scripts.py140 except Exception as e:CODE
LOWnetbox/extras/api/mixins.py60 except Exception as e:CODE
MEDIUMnetbox/extras/api/mixins.py57def render_configtemplate(self, request, configtemplate, context):CODE
LOWnetbox/extras/api/serializers_/scripts.py65 except Exception as e:CODE
LOWnetbox/extras/api/serializers_/scripts.py95 except Exception:CODE
LOWnetbox/extras/api/serializers_/scripts.py109 except Exception:CODE
Redundant / Tautological Comments17 hits · 26 pts
SeverityFileLineSnippetContext
LOWnetbox/netbox/configuration_example.py41 # Set this to True to skip TLS certificate verificationCOMMENT
LOWnetbox/netbox/configuration_example.py57 # Set this to True to skip TLS certificate verificationCOMMENT
LOWnetbox/netbox/plugins/urls.py25 # Check if the plugin specifies any base URLsCOMMENT
LOWnetbox/netbox/plugins/urls.py32 # Check if the plugin specifies any API URLsCOMMENT
LOWnetbox/netbox/plugins/views.py55 # Check if the plugin specifies any API URLsCOMMENT
LOWnetbox/netbox/views/generic/bulk_views.py723 # Iterate through data and bind each record to a new model form instance. Object-levelCOMMENT
LOWnetbox/dcim/tests/test_models.py1728 # Assign bay2 to module1 and verify parent is now set to bay1 (module1's bay)COMMENT
LOWnetbox/dcim/models/modules.py383 # Check if there's a component with the same name alreadyCOMMENT
LOWnetbox/dcim/models/modules.py385 # Assign it to the moduleCOMMENT
LOWnetbox/utilities/fields.py106 # Check if the content type actually existsCOMMENT
LOWnetbox/utilities/templatetags/buttons.py42 # Check if this user has already bookmarked the objectCOMMENT
LOWnetbox/utilities/templatetags/buttons.py77 # Check if this user has already subscribed to the objectCOMMENT
LOWnetbox/utilities/templatetags/helpers.py494 # Check if this is a modifier-enhanced fieldCOMMENT
LOWnetbox/utilities/forms/fields/csv.py27 # Check if value is omitted using parent behaviorCOMMENT
LOWnetbox/ipam/forms/model_forms.py554 # Check if we need to create a new IPAddress for the groupCOMMENT
LOWnetbox/ipam/tests/test_filtersets.py2101 # Assign VLANs to device interfacesCOMMENT
LOWnetbox/ipam/tests/test_filtersets.py2109 # Assign VLANs to VM interfacesCOMMENT
Fake / Example Data17 hits · 20 pts
SeverityFileLineSnippetContext
LOWnetbox/netbox/configuration_example.py91 # ('John Doe', 'jdoe@example.com'),COMMENT
LOWnetbox/netbox/tests/test_search.py23 comments='Lorem ipsum etcetera'CODE
LOWnetbox/netbox/tests/test_search.py32 comments='Lorem ipsum etcetera'CODE
LOWnetbox/netbox/tests/test_search.py41 comments='Lorem ipsum etcetera'CODE
LOWnetbox/netbox/tests/test_search.py104 comments='Lorem ipsum etcetera'CODE
LOWnetbox/core/forms/model_forms.py46 'placeholder': '.cache\n*.txt\nsubdir/*'CODE
LOWnetbox/project-static/src/forms/filterModifiers.ts69 valueInput.setAttribute('placeholder', placeholder);CODE
LOWnetbox/project-static/src/forms/filterModifiers.ts72 valueInput.removeAttribute('placeholder');CODE
LOWnetbox/utilities/templatetags/builtins/filters.py31 'placeholder',CODE
LOWnetbox/utilities/forms/fields/fields.py144 self.widget.attrs['placeholder'] = ''CODE
LOWnetbox/utilities/forms/widgets/datetime.py17 self.attrs['placeholder'] = 'YYYY-MM-DD'CODE
LOWnetbox/utilities/forms/widgets/datetime.py27 self.attrs['placeholder'] = 'YYYY-MM-DD hh:mm:ss'CODE
LOWnetbox/utilities/forms/widgets/datetime.py37 self.attrs['placeholder'] = 'hh:mm:ss'CODE
LOWnetbox/ipam/forms/filtersets.py212 'placeholder': 'Prefix',CODE
LOWnetbox/ipam/forms/filtersets.py365 'placeholder': 'Prefix',CODE
LOWnetbox/extras/tests/test_management_commands.py253 email='admin@example.com',CODE
LOWdocs/plugins/development/index.md167 {name = "John Doe", email = "test@netboxlabs.com"},CODE
Structural Annotation Overuse10 hits · 20 pts
SeverityFileLineSnippetContext
LOWnetbox/dcim/models/cables.py894 # Step 1: Record the near-end termination object(s)COMMENT
LOWnetbox/dcim/models/cables.py902 # Step 2: Determine the attached links (Cable or WirelessLink), if anyCOMMENT
LOWnetbox/dcim/models/cables.py918 # Step 3: Record asymmetric paths as splitCOMMENT
LOWnetbox/dcim/models/cables.py924 # Step 4: Record the links, keeping cables in order to allow for SVG renderingCOMMENT
LOWnetbox/dcim/models/cables.py931 # Step 5: Update the path status if a link is not connectedCOMMENT
LOWnetbox/dcim/models/cables.py936 # Step 6: Determine the far-end terminationsCOMMENT
LOWnetbox/dcim/models/cables.py1026 # Step 7: Record the far-end termination object(s)COMMENT
LOWnetbox/dcim/models/cables.py1031 # Step 8: Determine the "next hop" terminations, if applicableCOMMENT
LOWdocs/customization/reports.md8### Step 1: Update Class DefinitionCOMMENT
LOWdocs/customization/reports.md24### Step 2: Update Logging CallsCOMMENT
Verbosity Indicators8 hits · 18 pts
SeverityFileLineSnippetContext
LOWnetbox/dcim/models/cables.py894 # Step 1: Record the near-end termination object(s)COMMENT
LOWnetbox/dcim/models/cables.py902 # Step 2: Determine the attached links (Cable or WirelessLink), if anyCOMMENT
LOWnetbox/dcim/models/cables.py918 # Step 3: Record asymmetric paths as splitCOMMENT
LOWnetbox/dcim/models/cables.py924 # Step 4: Record the links, keeping cables in order to allow for SVG renderingCOMMENT
LOWnetbox/dcim/models/cables.py931 # Step 5: Update the path status if a link is not connectedCOMMENT
LOWnetbox/dcim/models/cables.py936 # Step 6: Determine the far-end terminationsCOMMENT
LOWnetbox/dcim/models/cables.py1026 # Step 7: Record the far-end termination object(s)COMMENT
LOWnetbox/dcim/models/cables.py1031 # Step 8: Determine the "next hop" terminations, if applicableCOMMENT
Over-Commented Block16 hits · 16 pts
SeverityFileLineSnippetContext
LOWbase_requirements.txt21# Django Debug Toolbar extension for GraphiQLCOMMENT
LOWbase_requirements.txt121# Library for manipulating IP prefixes and addressesCOMMENT
LOWbase_requirements.txt141COMMENT
LOWnetbox/netbox/configuration_example.py1#########################COMMENT
LOWnetbox/netbox/configuration_example.py41 # Set this to True to skip TLS certificate verificationCOMMENT
LOWnetbox/netbox/configuration_example.py61 # 'CA_CERT_PATH': '/etc/ssl/certs/ca.crt',COMMENT
LOWnetbox/netbox/configuration_example.py81COMMENT
LOWnetbox/netbox/configuration_example.py141}COMMENT
LOWnetbox/netbox/configuration_example.py181# the default value of this setting is derived from the installed location.COMMENT
LOWnetbox/netbox/configuration_example.py221COMMENT
LOWnetbox/netbox/configuration_example.py241# following configuration is used:COMMENT
LOWnetbox/netbox/authentication/misc.py1# Copyright (c) 2009, Peter SagersonCOMMENT
LOWnetbox/core/signals.py201 objectchange.user = request.userCOMMENT
LOWnetbox/core/signals.py221 continueCOMMENT
LOWnetbox/templates/graphql/graphiql.html61COMMENT
LOWnetbox/ipam/constants.py1from django.db.models import QCOMMENT
AI Slop Vocabulary6 hits · 15 pts
SeverityFileLineSnippetContext
MEDIUMnetbox/netbox/search/backends.py190 # Omit any results pertaining to an object the user does not have permission to viewCOMMENT
MEDIUMnetbox/core/signals.py120 # This will impact changes that utilize clear() however so we may want to give consideration for this branchCOMMENT
MEDIUMnetbox/core/models/data.py356 # TODO: Something more robustCOMMENT
LOWnetbox/core/api/schema.py137 # if not bulk - just return normal idCOMMENT
MEDIUMnetbox/dcim/models/cables.py227 # Query self.terminations.all() to leverage cached resultsCOMMENT
LOWnetbox/utilities/paginator.py48 # When dealing with five or fewer pages, simply return the whole list.COMMENT
Decorative Section Separators4 hits · 12 pts
SeverityFileLineSnippetContext
MEDIUMnetbox/netbox/graphql/filter_lookups.py22# ------------------------------------------------------------------COMMENT
MEDIUMnetbox/netbox/graphql/filter_lookups.py24# ------------------------------------------------------------------COMMENT
MEDIUMnetbox/project-static/styles/custom/_misc.scss100// ── Sticky action bars ──────────────────────────────────────COMMENT
MEDIUMnetbox/project-static/styles/custom/_misc.scss182// ── /Sticky action bars ─────────────────────────────────────COMMENT
AI Structural Patterns9 hits · 9 pts
SeverityFileLineSnippetContext
LOWnetbox/core/models/jobs.py270CODE
LOWnetbox/dcim/svg/racks.py98CODE
LOWnetbox/dcim/models/racks.py600CODE
LOWnetbox/utilities/forms/fields/dynamic.py88CODE
LOWnetbox/users/utils.py76CODE
LOWnetbox/extras/models/mixins.py234CODE
LOWnetbox/extras/dashboard/widgets.py123CODE
LOWnetbox/extras/api/serializers_/tags.py68CODE
LOWnetbox/extras/api/serializers_/scripts.py169CODE
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHnetbox/utilities/templatetags/helpers.py98 Render the action URL node. Args: context: The template context Returns: STRING
Slop Phrases2 hits · 3 pts
SeverityFileLineSnippetContext
LOWupgrade.sh150echo "Upgrade complete! Don't forget to restart the NetBox services:"CODE
MEDIUMnetbox/extras/constants.py122 'This is your personal dashboard. Feel free to customize it by rearranging, resizing, or removing 'CODE
Modern AI Meta-Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMnetbox/netbox/cli.py66 # `setup` owns its own parser (netbox.scaffold); dispatch before the wrapper parser.COMMENT
Modern Structural Boilerplate2 hits · 2 pts
SeverityFileLineSnippetContext
LOWnetbox/netbox/search/backends.py29logger = logging.getLogger(__name__)CODE
LOWnetbox/extras/api/serializers_/scripts.py16logger = logging.getLogger(__name__)CODE
Overly Generic Function Names1 hit · 2 pts
SeverityFileLineSnippetContext
LOWnetbox/netbox/tests/test_model_test_coverage.py278 def helper(self):CODE