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.8 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,406 GitHub stars. SynthScan v2.0 examined 280,798 lines of code across 1783 source files, recording 3394 pattern matches distributed across 20 syntactic categories. The overall adjusted score of 14.8 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.8
Adjusted Score
14.8
Raw Score
100%
Time Factor
2026-08-28
Last Push
21.4K
Stars
Python
Language
280.8K
Lines of Code
1.8K
Files
3.4K
Pattern Hits
2026-08-29
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 64HIGH 12MEDIUM 150LOW 3168

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 3394 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 Identifiers2016 hits · 1864 pts
SeverityFileLineSnippetContext
LOWnetbox/netbox/denormalized.py31def update_denormalized_fields(sender, instance, created, raw, using=None, **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.py162 def _get_custom_field_ordering_columns(self, order_by):CODE
LOWnetbox/netbox/tables/tables.py180 def _apply_ordering_annotations(self, ordering_columns):CODE
LOWnetbox/netbox/tables/tables.py197 def _apply_ordering_tie_breaker(self):CODE
LOWnetbox/netbox/tables/tables.py361 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.py36 def test_empty_string_to_none_nullable_charfield(self):CODE
LOWnetbox/netbox/tests/test_forms.py49 def test_empty_string_to_none_nullable_integerfield(self):CODE
LOWnetbox/netbox/tests/test_forms.py62 def test_empty_string_to_none_nullable_smallintegerfield(self):CODE
LOWnetbox/netbox/tests/test_forms.py75 def test_empty_string_to_none_nullable_decimalfield(self):CODE
LOWnetbox/netbox/tests/test_forms.py90 def test_empty_string_to_none_nullable_foreignkey(self):CODE
LOWnetbox/netbox/tests/test_forms.py109 def test_empty_string_preserved_non_nullable_charfield(self):CODE
LOWnetbox/netbox/tests/test_forms.py125 def test_empty_string_not_converted_for_required_fields(self):CODE
LOWnetbox/netbox/tests/test_forms.py139 def test_non_string_none_value_preserved(self):CODE
LOWnetbox/netbox/tests/test_forms.py154 def test_non_string_numeric_values_preserved(self):CODE
LOWnetbox/netbox/tests/test_forms.py169 def test_manytomany_fields_skipped(self):CODE
LOWnetbox/netbox/tests/test_forms.py182 def test_fields_not_in_cleaned_data_skipped(self):CODE
LOWnetbox/netbox/tests/test_forms.py196 def test_valid_string_values_preserved(self):CODE
LOWnetbox/netbox/tests/test_forms.py214 def test_multiple_nullable_fields_with_empty_strings(self):CODE
LOWnetbox/netbox/tests/test_forms.py238 def test_mixed_nullable_and_non_nullable_empty_strings(self):CODE
LOWnetbox/netbox/tests/test_forms.py259 def test_wireless_fields_nullable(self):CODE
LOWnetbox/netbox/tests/test_forms.py306 def test_missing_field_validation_error_becomes_non_field_error(self):CODE
LOWnetbox/netbox/tests/test_forms.py325 def test_non_field_error_not_overwritten_by_remapped_missing_field_error(self):CODE
LOWnetbox/netbox/tests/test_forms.py344 def test_remapped_error_preserves_code_and_params(self):CODE
LOWnetbox/netbox/tests/test_forms.py373 def test_remapped_error_preserves_pluralized_message(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.py250 def test_wheel_mode_suggests_console_command(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py253 def test_checkout_mode_suggests_generate_secret_key_script(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py261 def test_loads_sibling_ldap_config(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py270 def test_repeated_calls_reuse_the_sibling_module(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py280 def test_legacy_fallback_loads_historical_module_with_warning(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py288 def test_legacy_fallback_prefers_sibling_file(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py298 def test_legacy_fallback_disabled_raises(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py305 def test_legacy_fallback_missing_module_raises(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py314 def test_legacy_fallback_reraises_broken_dependency(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py323 def test_none_config_dir_raises(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py332 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_import_from_path_reuses_module_loaded_from_same_path(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py149 def test_import_from_path_replaces_module_loaded_from_another_path(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py164 def test_import_from_path_restores_previous_module_on_failure(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py181 def test_wheel_both_configs_present_warns_and_prefers_conf(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py203 def test_returns_directory_of_module_file(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py208 def test_returns_none_without_file(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py227 def test_wheel_roots_default_netbox_root(self):CODE
LOWnetbox/netbox/tests/test_settings_utils.py239 def test_netbox_root_env_override_is_abspathed(self):CODE
1956 more matches not shown…
Unused Imports928 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.py18CODE
LOWnetbox/netbox/tables/tables.py28CODE
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.py6CODE
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
868 more matches not shown…
Hallucination Indicators64 hits · 645 pts
SeverityFileLineSnippetContext
CRITICALnetbox/netbox/tests/test_forms.py4from django.core.exceptions import ValidationError as DjangoValidationErrorCODE
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.py4from 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/jinja2.py6from 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
4 more matches not shown…
Self-Referential Comments133 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.py331 # 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.py120 # Create a unique key for this relationCOMMENT
MEDIUMnetbox/netbox/api/viewsets/mixins.py109 # Creating a single objectCOMMENT
MEDIUMnetbox/netbox/views/generic/object_views.py607 # 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.py714 # Create a child interfaceCOMMENT
MEDIUMnetbox/virtualization/tests/test_models.py113 # Create the first VMCOMMENT
MEDIUMnetbox/virtualization/tests/test_models.py122 # Create the second VMCOMMENT
MEDIUMnetbox/virtualization/tests/test_models.py159 # Create the cluster typeCOMMENT
MEDIUMnetbox/virtualization/tests/test_models.py698 # Create a VM pinned to device_in_clusterCOMMENT
MEDIUMnetbox/virtualization/tests/test_models.py716 # Create a VM pinned to a deviceCOMMENT
MEDIUMnetbox/virtualization/tests/test_api.py739 # Create a child interfaceCOMMENT
MEDIUMnetbox/tenancy/tests/test_models.py108 # 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.py1246 # Create a 2-connector trunk cable with both A-side connectorsCOMMENT
MEDIUMnetbox/dcim/tests/test_cablepaths2.py2345 # Create a PortMapping between frontport1 and rearport1COMMENT
MEDIUMnetbox/dcim/tests/test_signals.py908 # Creating a PortMapping connecting the front and rear ports should retrace pathsCOMMENT
MEDIUMnetbox/dcim/tests/test_views.py2787 # Create a module *without* replicating componentsSTRING
MEDIUMnetbox/dcim/tests/test_views.py2796 # 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.py1557 # Create the manufacturerSTRING
MEDIUMnetbox/dcim/tests/test_views.py2824 # Create a module *without* replicating componentsSTRING
MEDIUMnetbox/dcim/tests/test_views.py2845 # Create a second module (in the next bay) with replicated componentsSTRING
MEDIUMnetbox/dcim/tests/test_views.py2883 # Create an interface to be adoptedSTRING
MEDIUMnetbox/dcim/tests/test_views.py2890 # Create a module with adopted componentsSTRING
MEDIUMnetbox/dcim/tests/test_views.py2927 # Create an interface to be adoptedSTRING
MEDIUMnetbox/dcim/tests/test_views.py2934 # Create a module with adopted componentsSTRING
MEDIUMnetbox/dcim/tests/test_views.py3454 # Create a child interfaceSTRING
MEDIUMnetbox/dcim/tests/test_models.py1800 # Create a module type with a rear port templateCOMMENT
MEDIUMnetbox/dcim/tests/test_models.py1806 # Create a rear port template with 12 positions (splice)COMMENT
MEDIUMnetbox/dcim/tests/test_models.py1885 # Create a module type without any port template mappingsCOMMENT
MEDIUMnetbox/dcim/tests/test_models.py1891 # Create a rear port templateCOMMENT
MEDIUMnetbox/dcim/tests/test_models.py501 # Create a CustomField with a default value & assign it to all component modelsCOMMENT
MEDIUMnetbox/dcim/tests/test_models.py953 # Create a disabled device bay with a device being installedCOMMENT
MEDIUMnetbox/dcim/tests/test_models.py994 # Create an enabled device bay with a device installedCOMMENT
MEDIUMnetbox/dcim/tests/test_models.py1023 # Create a CustomField with a default value & assign it to all component modelsCOMMENT
MEDIUMnetbox/dcim/tests/test_models.py1935 # Create a disabled module bayCOMMENT
MEDIUMnetbox/dcim/tests/test_models.py2399 # Create a VirtualChassis with two member devicesCOMMENT
MEDIUMnetbox/dcim/tests/test_models.py2497 # Create a VirtualChassisCOMMENT
73 more matches not shown…
Deep Nesting106 hits · 102 pts
SeverityFileLineSnippetContext
LOWnetbox/netbox/filtersets.py104CODE
LOWnetbox/netbox/filtersets.py185CODE
LOWnetbox/netbox/filtersets.py395CODE
LOWnetbox/netbox/jobs.py99CODE
LOWnetbox/netbox/settings_utils.py100CODE
LOWnetbox/netbox/tables/tables.py120CODE
LOWnetbox/netbox/forms/bulk_import.py74CODE
LOWnetbox/netbox/models/__init__.py83CODE
LOWnetbox/netbox/models/features.py140CODE
LOWnetbox/netbox/models/deletion.py82CODE
LOWnetbox/netbox/search/backends.py118CODE
LOWnetbox/netbox/search/backends.py199CODE
LOWnetbox/netbox/graphql/pagination.py84CODE
LOWnetbox/netbox/api/fields.py64CODE
LOWnetbox/netbox/api/pagination.py115CODE
LOWnetbox/netbox/views/generic/object_views.py275CODE
LOWnetbox/netbox/views/generic/object_views.py572CODE
LOWnetbox/netbox/views/generic/bulk_views.py397CODE
LOWnetbox/netbox/views/generic/bulk_views.py490CODE
LOWnetbox/netbox/views/generic/bulk_views.py555CODE
LOWnetbox/netbox/views/generic/bulk_views.py703CODE
LOWnetbox/netbox/views/generic/bulk_views.py793CODE
LOWnetbox/netbox/views/generic/bulk_views.py888CODE
LOWnetbox/netbox/views/generic/bulk_views.py1022CODE
LOWnetbox/netbox/views/generic/bulk_views.py1056CODE
LOWnetbox/netbox/views/generic/bulk_views.py1159CODE
LOWnetbox/netbox/views/generic/bulk_views.py1284CODE
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/common.py74CODE
LOWnetbox/dcim/forms/bulk_edit.py1625CODE
LOWnetbox/dcim/models/mixins.py108CODE
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.py849CODE
LOWnetbox/dcim/models/cables.py1174CODE
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
46 more matches not shown…
Cross-Language Confusion11 hits · 66 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.py1643 # Query for VLANs assigned to the same site and VLANs with no site assigned (null).COMMENT
HIGHnetbox/dcim/models/cables.py902 # 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/filters.py60 # `<key>__isnull` matches only a missing key and `<key>=None` only a JSON null, so togetherCOMMENT
HIGHnetbox/extras/tests/test_customfields.py860 # Site A holds a value, Site B an explicit null, Site C no key whatsoeverCOMMENT
HIGHnetbox/extras/tests/test_customfields.py2350 # do an object holding an explicit null; see MissingKeyAwareFilterMixin.COMMENT
HIGHnetbox/extras/tests/test_customfields.py2127 null, which CustomField.validate() rejects for a required field.STRING
HIGHnetbox/extras/tests/test_models.py1677 clean() should accept a JSON object (or null) as action_data.STRING
HIGHnetbox/extras/models/models.py153 # action_data must be a JSON object (or null)COMMENT
Excessive Try-Catch Wrapping38 hits · 42 pts
SeverityFileLineSnippetContext
LOWnetbox/netbox/jobs.py117 except Exception as e:CODE
LOWnetbox/netbox/settings_utils.py125 except Exception:CODE
LOWnetbox/netbox/tables/columns.py661 except Exception as e:STRING
LOWnetbox/netbox/tables/columns.py672 except Exception:STRING
MEDIUMnetbox/netbox/tables/columns.py657def render(self, record, table, **kwargs):CODE
MEDIUMnetbox/netbox/tables/columns.py668def value(self, record, table, **kwargs):CODE
LOWnetbox/netbox/api/viewsets/mixins.py55 except Exception:CODE
LOWnetbox/netbox/views/misc.py52 except Exception:CODE
LOWnetbox/netbox/views/misc.py64 except Exception:CODE
LOWnetbox/netbox/views/generic/bulk_views.py138 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.py67 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.py1324 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.py164 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.py724 # Iterate through data and bind each record to a new model form instance. Object-levelCOMMENT
LOWnetbox/dcim/tests/test_models.py1777 # Assign bay2 to module1 and verify parent is now set to bay1 (module1's bay)COMMENT
LOWnetbox/dcim/models/modules.py387 # Check if there's a component with the same name alreadyCOMMENT
LOWnetbox/dcim/models/modules.py389 # 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.py562 # Check if we need to create a new IPAddress for the groupCOMMENT
LOWnetbox/ipam/tests/test_filtersets.py2185 # Assign VLANs to device interfacesCOMMENT
LOWnetbox/ipam/tests/test_filtersets.py2193 # Assign VLANs to VM interfacesCOMMENT
AI Slop Vocabulary8 hits · 24 pts
SeverityFileLineSnippetContext
MEDIUMnetbox/netbox/tests/test_views.py331 # super().delete(). Note what this detects: every test here runs inside the harness'COMMENT
MEDIUMnetbox/netbox/tests/test_views.py334 # escapes the collector's atomic(savepoint=False) and marks the harness' transaction asCOMMENT
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
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.py255 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.py898 # Step 1: Record the near-end termination object(s)COMMENT
LOWnetbox/dcim/models/cables.py906 # Step 2: Determine the attached links (Cable or WirelessLink), if anyCOMMENT
LOWnetbox/dcim/models/cables.py922 # Step 3: Record asymmetric paths as splitCOMMENT
LOWnetbox/dcim/models/cables.py928 # Step 4: Record the links, keeping cables in order to allow for SVG renderingCOMMENT
LOWnetbox/dcim/models/cables.py935 # Step 5: Update the path status if a link is not connectedCOMMENT
LOWnetbox/dcim/models/cables.py940 # Step 6: Determine the far-end terminationsCOMMENT
LOWnetbox/dcim/models/cables.py1030 # Step 7: Record the far-end termination object(s)COMMENT
LOWnetbox/dcim/models/cables.py1035 # 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
Over-Commented Block18 hits · 18 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/graphql/pagination.py101 # and force ordering by primary key to ensure consistent pagination across all records.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/dcim/signals.py501 # and therefore require their cached scope fields to be recomputed.COMMENT
LOWnetbox/templates/graphql/graphiql.html61COMMENT
LOWnetbox/ipam/constants.py1from django.db.models import QCOMMENT
Verbosity Indicators8 hits · 18 pts
SeverityFileLineSnippetContext
LOWnetbox/dcim/models/cables.py898 # Step 1: Record the near-end termination object(s)COMMENT
LOWnetbox/dcim/models/cables.py906 # Step 2: Determine the attached links (Cable or WirelessLink), if anyCOMMENT
LOWnetbox/dcim/models/cables.py922 # Step 3: Record asymmetric paths as splitCOMMENT
LOWnetbox/dcim/models/cables.py928 # Step 4: Record the links, keeping cables in order to allow for SVG renderingCOMMENT
LOWnetbox/dcim/models/cables.py935 # Step 5: Update the path status if a link is not connectedCOMMENT
LOWnetbox/dcim/models/cables.py940 # Step 6: Determine the far-end terminationsCOMMENT
LOWnetbox/dcim/models/cables.py1030 # Step 7: Record the far-end termination object(s)COMMENT
LOWnetbox/dcim/models/cables.py1035 # Step 8: Determine the "next hop" terminations, if applicableCOMMENT
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.py235CODE
LOWnetbox/extras/dashboard/widgets.py125CODE
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