Repository Analysis

Flagsmith/flagsmith

Flagsmith is an open source feature flagging and remote config service. Self-host or use our hosted version at https://app.flagsmith.com.

10.5 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of Flagsmith/flagsmith, a Python project with 6,445 GitHub stars. SynthScan v2.0 examined 390,386 lines of code across 2768 source files, recording 3850 pattern matches distributed across 20 syntactic categories. The overall adjusted score of 10.5 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).

10.5
Adjusted Score
10.5
Raw Score
100%
Time Factor
2026-07-14
Last Push
6.4K
Stars
Python
Language
390.4K
Lines of Code
2.8K
Files
3.9K
Pattern Hits
2026-07-14
Scan Date
0.02
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 19HIGH 27MEDIUM 41LOW 3763

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 3850 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 Identifiers3228 hits · 3063 pts
SeverityFileLineSnippetContext
LOWfrontend/web/components/modals/base/Modal.tsx78function getOrCreateRoot(CODE
LOW…end/web/components/pages/CreateReleasePipelinePage.tsx3export default function CreateReleasePipelinePage() {CODE
LOW…end/web/components/pages/ReleasePipelineDetailPage.tsx3export default function ReleasePipelineDetailPage() {CODE
LOWfrontend/.claude/scripts/sync-types-helper.py55def find_types_using_serializer(CODE
LOWfrontend/common/utils/metadataValidation.ts10export function getGlobalMetadataValidationState(CODE
LOWfrontend/common/utils/metadataValidation.ts25export function useGlobalMetadataValidation(CODE
LOWfrontend/common/hooks/useFeatureExperimentFreeze.ts12export function useFeatureExperimentFreeze(CODE
LOWfrontend/common/services/useVersionFeatureState.ts81export async function createVersionFeatureState(CODE
LOWfrontend/common/services/useVersionFeatureState.ts95export async function updateVersionFeatureState(CODE
LOWfrontend/common/services/useVersionFeatureState.ts109export async function deleteVersionFeatureState(CODE
LOWfrontend/common/services/useRolePermission.ts105export async function getRoleOrganisationPermissions(CODE
LOWfrontend/common/services/useRolePermission.ts140export async function getRoleProjectPermissions(CODE
LOWfrontend/common/services/useRolePermission.ts155export async function getRoleEnvironmentPermissions(CODE
LOWfrontend/common/services/useFlagsmithProjectImport.ts31export async function createFlagsmithProjectImport(CODE
LOW…common/services/useMasterAPIKeyWithMasterAPIKeyRole.ts58export async function getMasterAPIKeyWithMasterAPIKeyRoles(CODE
LOW…common/services/useMasterAPIKeyWithMasterAPIKeyRole.ts73export async function getRolesMasterAPIKeyWithMasterAPIKeyRoles(CODE
LOW…common/services/useMasterAPIKeyWithMasterAPIKeyRole.ts88export async function deleteMasterAPIKeyWithMasterAPIKeyRoles(CODE
LOW…common/services/useMasterAPIKeyWithMasterAPIKeyRole.ts102export async function updateMasterAPIKeyWithMasterAPIKeyRoles(CODE
LOWfrontend/common/services/useRolesUser.ts43export async function createPermissionRolesUsers(CODE
LOWfrontend/common/services/useRolesUser.ts57export async function deletePermissionRolesUsers(CODE
LOWfrontend/common/services/useServersideEnvironmentKey.ts44export async function createServersideEnvironmentKeys(CODE
LOWfrontend/common/services/useServersideEnvironmentKey.ts58export async function deleteServersideEnvironmentKeys(CODE
LOWfrontend/common/services/useServersideEnvironmentKey.ts72export async function getServersideEnvironmentKeys(CODE
LOWfrontend/common/services/useReleasePipelines.ts169export async function removeFeatureFromReleasePipeline(CODE
LOWfrontend/common/services/useFeatureVersion.ts304export async function createAndSetFeatureVersion(CODE
LOWfrontend/common/services/useOnboardingSupportOptIn.ts24export async function createOnboardingSupportOptIn(CODE
LOWfrontend/common/services/useMetadataField.ts276export async function getProjectMetadataFieldList(CODE
LOWfrontend/common/services/useSamlConfiguration.ts147export async function getSamlConfigurationMetadata(CODE
LOW…ontend/common/services/useLaunchDarklyProjectImport.ts42export async function createLaunchDarklyProjectImport(CODE
LOW…ontend/common/services/useLaunchDarklyProjectImport.ts56export async function getLaunchDarklyProjectImport(CODE
LOW…ontend/common/services/useLaunchDarklyProjectImport.ts70export async function getLaunchDarklyProjectsImport(CODE
LOWfrontend/common/services/useMetadataModelField.ts108export async function getMetadataModelFieldList(CODE
LOWfrontend/common/services/useProjectChangeRequest.ts9export function stripIdsAndDeletedFromRulesAndConditions(CODE
LOWfrontend/common/services/useProjectChangeRequest.ts140export async function createProjectChangeRequest(CODE
LOWfrontend/common/services/useProjectChangeRequest.ts155export async function updateProjectChangeRequest(CODE
LOWfrontend/common/services/useIdentityFeatureState.ts44export async function getIdentityFeatureStateAll(CODE
LOWfrontend/common/services/useIdentityFeatureState.ts59export async function createIdentityFeatureStates(CODE
LOWfrontend/common/services/useOrganisationLicensing.ts28export async function uploadOrganisationLicence(CODE
LOWfrontend/common/services/useSamlAttributeMapping.ts54export async function createSamlAttributeMapping(CODE
LOWfrontend/common/services/useSamlAttributeMapping.ts68export async function deleteSamlAttributeMapping(CODE
LOWfrontend/common/services/useSamlAttributeMapping.ts96export async function updateSamlAttributeMapping(CODE
LOWfrontend/common/services/useRolePermissionGroup.ts60export async function createRolePermissionGroup(CODE
LOWfrontend/common/services/useRolePermissionGroup.ts77export async function deleteRolePermissionGroup(CODE
LOWfrontend/common/services/useRolePermissionGroup.ts111export async function updateRolePermissionGroup(CODE
LOWfrontend/e2e/helpers/visual-regression.ts63export function isVisualRegressionEnabled(): boolean {CODE
LOWmcp/tests/unit/test_event_logging.py7def test_get_client_info__outside_request_context__returns_none() -> None:CODE
LOWmcp/tests/unit/test_event_logging.py13def test_get_client_info__no_client_params__returns_none(CODE
LOWmcp/tests/unit/test_event_logging.py24async def test_event_logging_middleware__no_client_info__empty_client_identity(CODE
LOWmcp/tests/unit/test_auth.py8def test_flagsmith_auth__header_in_http_request__forwards_to_upstream() -> None:CODE
LOWmcp/tests/unit/test_auth.py24def test_flagsmith_auth__no_http_request__leaves_upstream_unchanged() -> None:CODE
LOWmcp/tests/unit/test_auth.py35def test_flagsmith_auth__static_token_no_http_request__uses_api_key() -> None:CODE
LOWmcp/tests/unit/test_auth.py46def test_flagsmith_auth__forwarded_header__wins_over_static_token() -> None:CODE
LOWmcp/tests/unit/test_auth.py61def test_flagsmith_auth__upstream_already_authorized__does_not_override() -> None:CODE
LOWmcp/tests/unit/test_server.py68async def test_create_server__mcp_route__annotates_tool_per_method(CODE
LOWmcp/tests/unit/test_server.py94async def test_create_server__untagged_route__excluded_from_tools(CODE
LOWmcp/tests/unit/test_server.py127def test_run__configured_transport__runs_server_with_it(CODE
LOWmcp/tests/unit/test_server.py149def test_run__metrics_port_unset__metrics_server_not_started(CODE
LOWmcp/tests/unit/test_server.py167def test_run__metrics_port_set__metrics_server_started_with_it(CODE
LOWmcp/tests/unit/test_server.py185def test_run__http_transport__banner_off_uvicorn_logs_propagated(CODE
LOWmcp/tests/unit/test_config.py7def test_settings__unset__uses_saas_defaults(monkeypatch: pytest.MonkeyPatch) -> None:CODE
3168 more matches not shown…
Unused Imports295 hits · 284 pts
SeverityFileLineSnippetContext
LOWapi/platform_hub/mappers.py1CODE
LOWapi/edge_api/identities/apps.py10CODE
LOWapi/edge_api/identities/utils.py6CODE
LOWapi/edge_api/identities/utils.py6CODE
LOWapi/api_keys/user.py18CODE
LOWapi/api_keys/user.py19CODE
LOWapi/custom_auth/apps.py8CODE
LOWapi/custom_auth/mfa/trench/urls/__init__.py1CODE
LOWapi/custom_auth/mfa/trench/views/__init__.py1CODE
LOWapi/sse/__init__.py1CODE
LOWapi/sse/__init__.py1CODE
LOWapi/core/models.py21CODE
LOWapi/core/models.py22CODE
LOWapi/core/models.py23CODE
LOWapi/core/constants.py1CODE
LOWapi/core/throttling.py10CODE
LOWapi/core/throttling.py11CODE
LOWapi/core/dataclasses.py5CODE
LOWapi/core/dataclasses.py7CODE
LOWapi/core/workflows_services.py14CODE
LOWapi/core/workflows_services.py15CODE
LOWapi/app/settings/local.py3CODE
LOWapi/app/settings/test.py1CODE
LOWapi/app/settings/develop.py1CODE
LOWapi/app/settings/production.py1CODE
LOWapi/experimentation/services.py1CODE
LOWapi/experimentation/models.py17CODE
LOWapi/experimentation/ingestion_sync_service.py1CODE
LOWapi/experimentation/views.py6CODE
LOWapi/experimentation/views.py27CODE
LOWapi/app_analytics/types.py6CODE
LOWapi/util/engine_models/context/mappers.py26CODE
LOWapi/util/mappers/sdk.py10CODE
LOWapi/util/mappers/dynamodb.py11CODE
LOWapi/util/mappers/dynamodb.py33CODE
LOWapi/util/mappers/dynamodb.py34CODE
LOWapi/util/mappers/dynamodb.py34CODE
LOWapi/util/mappers/dynamodb.py35CODE
LOWapi/util/mappers/__init__.py1CODE
LOWapi/util/mappers/__init__.py1CODE
LOWapi/util/mappers/__init__.py1CODE
LOWapi/util/mappers/__init__.py1CODE
LOWapi/util/mappers/__init__.py1CODE
LOWapi/util/mappers/__init__.py1CODE
LOWapi/util/mappers/__init__.py1CODE
LOWapi/util/mappers/__init__.py1CODE
LOWapi/util/mappers/__init__.py1CODE
LOWapi/util/mappers/__init__.py1CODE
LOWapi/util/mappers/__init__.py13CODE
LOWapi/util/mappers/__init__.py13CODE
LOWapi/util/mappers/__init__.py13CODE
LOWapi/util/mappers/__init__.py13CODE
LOWapi/util/mappers/__init__.py19CODE
LOWapi/util/mappers/engine.py37CODE
LOWapi/util/mappers/engine.py37CODE
LOWapi/util/mappers/engine.py41CODE
LOWapi/util/mappers/engine.py41CODE
LOWapi/util/mappers/engine.py42CODE
LOWapi/util/mappers/engine.py42CODE
LOWapi/util/mappers/engine.py42CODE
235 more matches not shown…
Hallucination Indicators19 hits · 190 pts
SeverityFileLineSnippetContext
CRITICALapi/app_analytics/models.py3from django.core.exceptions import ValidationErrorCODE
CRITICALapi/features/models.py449 and self.feature.project.organisation.github_config.exists()CODE
CRITICALapi/features/serializers.py704 and feature_state.environment.project.organisation.github_config.exists() # type: ignore[union-attr]CODE
CRITICALapi/features/multivariate/serializers.py3from django.core.exceptions import ValidationErrorCODE
CRITICALapi/features/versioning/serializers.py49 and feature_state.environment.project.organisation.github_config.exists()CODE
CRITICALapi/tests/unit/app_analytics/test_models.py2from django.core.exceptions import ValidationErrorCODE
CRITICAL…namodb/wrappers/test_unit_dynamodb_identity_wrapper.py274 mocked_dynamo_table.batch_writer.return_value.__enter__.return_value.put_item.assert_not_called()CODE
CRITICALapi/tests/unit/features/test_unit_features_models.py6from django.core.exceptions import ValidationErrorCODE
CRITICAL…ions/lead_tracking/hubspot/test_unit_hubspot_client.py164 hubspot_client.client.crm.companies.search_api.do_search.assert_called_once()CODE
CRITICAL…ions/lead_tracking/hubspot/test_unit_hubspot_client.py210 hubspot_client.client.crm.companies.basic_api.create.assert_called_once()CODE
CRITICALapi/tests/unit/oauth2_metadata/test_services.py2from django.core.exceptions import ValidationErrorCODE
CRITICALapi/tests/unit/segments/test_unit_segments_models.py5from django.core.exceptions import ValidationErrorCODE
CRITICALapi/integrations/lead_tracking/hubspot/client.py41 response = self.client.crm.contacts.batch_api.read(CODE
CRITICALapi/integrations/lead_tracking/hubspot/client.py133 response = self.client.crm.companies.search_api.do_search(CODE
CRITICALapi/integrations/lead_tracking/hubspot/client.py166 response = self.client.crm.companies.basic_api.create(CODE
CRITICALapi/integrations/lead_tracking/hubspot/client.py189 response = self.client.crm.companies.basic_api.update(CODE
CRITICALapi/oauth2_metadata/services.py4from django.core.exceptions import ValidationErrorCODE
CRITICALapi/oauth2_metadata/serializers.py3from django.core.exceptions import ValidationError as DjangoValidationErrorCODE
CRITICALapi/segments/models.py8from django.core.exceptions import ValidationErrorCODE
Modern Structural Boilerplate101 hits · 104 pts
SeverityFileLineSnippetContext
LOWfrontend/.claude/scripts/sync-types-helper.py72def update_metadata(stats: Dict) -> None:CODE
LOWapi/metrics/metrics_service.py14logger = logging.getLogger(__name__)CODE
LOWapi/edge_api/management/commands/migrate_to_edge_v2.py9logger = logging.getLogger(__name__)CODE
LOWapi/edge_api/identities/tasks.py29logger = logging.getLogger(__name__)CODE
LOWapi/edge_api/identities/export.py16logger = logging.getLogger(__name__)CODE
LOWapi/custom_auth/oauth/github.py18logger = logging.getLogger(__name__)CODE
LOWapi/custom_auth/oauth/views.py20logger = logging.getLogger(__name__)CODE
LOWapi/custom_auth/oauth/helpers/github_helpers.py5logger = logging.getLogger(__name__)CODE
LOWapi/custom_auth/mfa/trench/urls/base.py3__all__ = [CODE
LOWapi/sse/tasks.py19logger = logging.getLogger(__name__)CODE
LOWapi/sse/sse_service.py16logger = logging.getLogger(__name__)CODE
LOWapi/import_export/export.py52logger = logging.getLogger(__name__)CODE
LOWapi/import_export/import_.py7logger = logging.getLogger(__name__)CODE
LOW…xport/management/commands/dumporganisationtolocalfs.py9logger = logging.getLogger(__name__)CODE
LOW…export/management/commands/importorganisationfroms3.py7logger = logging.getLogger(__name__)CODE
LOW…ort_export/management/commands/dumporganisationtos3.py7logger = logging.getLogger(__name__)CODE
LOWapi/core/signals.py13logger = logging.getLogger(__name__)CODE
LOWapi/core/models.py26logger = logging.getLogger(__name__)CODE
LOWapi/core/middleware/admin.py8logger = logging.getLogger(__name__)CODE
LOWapi/core/management/commands/waitfordb.py10logger = logging.getLogger(__name__)CODE
LOWapi/app/views.py10logger = logging.getLogger(__name__)CODE
LOWapi/experimentation/services.py608def _update_rollout_in_place(experiment: Experiment, change_set: FlagChangeSet) -> None:CODE
LOWapi/experimentation/views.py72logger = logging.getLogger(__name__)CODE
LOWapi/app_analytics/influxdb_wrapper.py27logger = logging.getLogger(__name__)CODE
LOWapi/app_analytics/track.py16logger = logging.getLogger(__name__)CODE
LOWapi/app_analytics/views.py33logger = logging.getLogger(__name__)CODE
LOWapi/util/engine_models/features/models.py80 def set_value(self, value: typing.Any) -> None:CODE
LOWapi/environments/models.py67logger = logging.getLogger(__name__)CODE
LOWapi/environments/models.py180 def update_environment_document_cache(self) -> None:CODE
LOWapi/environments/models.py497 def set_bad_key(environment_key: str) -> None:CODE
LOWapi/environments/views.py67logger = logging.getLogger(__name__)CODE
LOWapi/environments/dynamodb/services.py20logger = logging.getLogger(__name__)CODE
LOWapi/environments/dynamodb/wrappers/identity_wrapper.py34logger = logging.getLogger(__name__)CODE
LOWapi/environments/identities/traits/fields.py13logger = logging.getLogger(__name__)CODE
LOW…i/projects/management/commands/createinitialproject.py11logger = logging.getLogger(__name__)CODE
LOWapi/features/signals.py5logger = logging.getLogger(__name__)CODE
LOWapi/features/tasks.py20logger = logging.getLogger(__name__)CODE
LOWapi/features/models.py85logger = logging.getLogger(__name__)CODE
LOWapi/features/views.py116logger = logging.getLogger(__name__)CODE
LOWapi/features/release_pipelines/core/models.py269 def set_initial_split(self) -> None:CODE
LOWapi/features/feature_external_resources/models.py22logger = logging.getLogger(__name__)CODE
LOWapi/features/workflows/core/models.py54logger = logging.getLogger(__name__)CODE
LOWapi/features/feature_health/services.py95def update_feature_unhealthy_tag(feature: "Feature") -> None:CODE
LOWapi/features/feature_health/tasks.py10def update_feature_unhealthy_tag(feature_id: int) -> None:CODE
LOWapi/features/feature_states/models.py46 def set_value(self, value: str, type_: FeatureValueType) -> None:CODE
LOWapi/features/versioning/tasks.py38logger = logging.getLogger(__name__)CODE
LOWapi/features/versioning/versioning_service.py327def _update_segment_priority(feature_state: FeatureState, priority: int) -> None:CODE
LOWapi/features/feature_segments/views.py25logger = logging.getLogger(__name__)CODE
LOWapi/tests/conftest.py1298def set_github_webhook_secret() -> None:CODE
LOW…/integrations/github/test_unit_github_cleanup_issue.py30def set_github_pat(settings: SettingsWrapper) -> None:CODE
LOWapi/integrations/webhook/webhook.py16logger = logging.getLogger(__name__)CODE
LOWapi/integrations/dynatrace/dynatrace.py13logger = logging.getLogger(__name__)CODE
LOWapi/integrations/dynatrace/models.py8logger = logging.getLogger(__name__)CODE
LOWapi/integrations/gitlab/views/__init__.py9__all__ = [CODE
LOWapi/integrations/gitlab/client/__init__.py22__all__ = [CODE
LOWapi/integrations/gitlab/services/__init__.py31__all__ = [CODE
LOWapi/integrations/gitlab/services/tagging.py23def set_gitlab_tag(feature: Feature, new_label: GitLabTagLabel) -> None:CODE
LOWapi/integrations/lead_tracking/hubspot/services.py18logger = logging.getLogger(__name__)CODE
LOWapi/integrations/lead_tracking/hubspot/client.py26logger = logging.getLogger(__name__)CODE
LOWapi/integrations/lead_tracking/hubspot/lead_tracker.py14logger = logging.getLogger(__name__)CODE
41 more matches not shown…
Self-Referential Comments33 hits · 104 pts
SeverityFileLineSnippetContext
MEDIUMapi/app/settings/common.py1271# Define the cooldown duration, in seconds, for password reset emailsCOMMENT
MEDIUMapi/app/settings/common.py1273# Define the threshold, in minutes, for updating the last login timestampCOMMENT
MEDIUMapi/tests/unit/core/test_unit_core_migration_helpers.py39 # Create a temporary fileCOMMENT
MEDIUMapi/tests/unit/features/test_unit_features_views.py3916 # Create a secondary feature state that will be versioned in the past.COMMENT
MEDIUM…mport_export/test_unit_features_import_export_views.py230 # Create a FeatureImport that's processing already.COMMENT
MEDIUM…mport_export/test_unit_features_import_export_views.py428 # Create a FeatureImport that will be filtered out.COMMENT
MEDIUM…mport_export/test_unit_features_import_export_views.py435 # Create a FeatureImport that will be includedCOMMENT
MEDIUM…mport_export/test_unit_features_import_export_tasks.py154 # Create the receiving organisation, project, etc.COMMENT
MEDIUM…mport_export/test_unit_features_import_export_tasks.py301 # Create the receiving organisation, project, etc.COMMENT
MEDIUM…tures/feature_states/test_unit_feature_states_views.py656 # Create the segment override manuallyCOMMENT
MEDIUM…tures/feature_states/test_unit_feature_states_views.py718 # Create the segment override manuallyCOMMENT
MEDIUM…ts/unit/organisations/test_unit_organisations_views.py2080 # Create a notification in the past which should not be shown.COMMENT
MEDIUM…s/unit/organisations/test_unit_organisations_models.py619 # Create a notification which should be deleted shortly.COMMENT
MEDIUM…ts/unit/organisations/test_unit_organisations_tasks.py452 # Create an OrganisationApiUsageNotification object for another organisationCOMMENT
MEDIUMapi/tests/unit/audit/test_unit_audit_signals.py469 # Create an AuditLog as if it was created for a FeatureStateValue updateCOMMENT
MEDIUMapi/tests/unit/audit/test_unit_audit_signals.py583 # Create an audit log for a Feature (not FeatureState)COMMENT
MEDIUMapi/tests/unit/users/test_unit_users_views.py261 # Create a groupCOMMENT
MEDIUMapi/tests/unit/api/test_unit_openapi.py28 # Create an extension instance targeting the ResponseModelCOMMENT
MEDIUMapi/tests/unit/api/test_unit_openapi.py33 # Create a mock AutoSchema with a registryCOMMENT
MEDIUMapi/tests/unit/segments/test_unit_segments_views.py231 # Create the first segment (at the limit)COMMENT
MEDIUMapi/tests/unit/segments/test_unit_segments_views.py1705 # Create the whitelist to stop the validation.COMMENT
MEDIUM…ion/sentry/test_change_tracking_webhook_integration.py188 # Create a new EFV draftCOMMENT
MEDIUMapi/integrations/lead_tracking/hubspot/lead_tracker.py62 # Create the contact. HubSpot handles company creation and associationCOMMENT
MEDIUMapi/integrations/launch_darkly/services.py325 # Create a negated child if it doesn't exist.COMMENT
MEDIUMapi/integrations/launch_darkly/services.py333 # Create a new child rule if it doesn't exist. Each child rule is "AND"ed together becauseCOMMENT
MEDIUMapi/integrations/launch_darkly/services.py341 # Create a condition for each value. Each condition is "OR"ed together.COMMENT
MEDIUMapi/integrations/launch_darkly/services.py407 # Create a feature specific segment for the rule.COMMENT
MEDIUMapi/integrations/launch_darkly/services.py412 # Create a targeting rule for the new feature-specific segment.COMMENT
MEDIUMapi/integrations/launch_darkly/services.py457 # Create a segment override for those identities. This is a work-around to support individualCOMMENT
MEDIUMapi/integrations/launch_darkly/services.py639 # Create the feature segment for the given rule and get the feature state objects from thoseCOMMENT
MEDIUMapi/integrations/launch_darkly/services.py970 # Create a condition to match against those identities via "key" trait.COMMENT
MEDIUMapi/integrations/launch_darkly/services.py1027 # Create the segment rule for the segment.COMMENT
MEDIUMapi/integrations/launch_darkly/services.py1073 # Create an empty rule if there are no rules. This is required to create an "SegmentRule" object.COMMENT
Cross-Language Confusion (JS/TS)9 hits · 60 pts
SeverityFileLineSnippetContext
HIGH…settings/tabs/warehouse-tab/WarehouseEventCodeHelp.tsx21print('Hello, Flagsmith Warehouse!');`,CODE
HIGH…settings/tabs/warehouse-tab/WarehouseEventCodeHelp.tsx108print("Hello, Flagsmith Warehouse!")`,CODE
HIGHfrontend/common/code-help/init/init-ios.js18 print(result)CODE
HIGHfrontend/common/code-help/init/init-ios.js26 print(value ?? "nil")CODE
HIGHfrontend/common/code-help/init/init-ios.js28 print(error)CODE
HIGHfrontend/common/code-help/traits/traits-ios.js5 print(error)CODE
HIGH…ontend/common/code-help/create-user/create-user-ios.js24 print(result)CODE
HIGH…ontend/common/code-help/create-user/create-user-ios.js34 print(value ?? "nil")CODE
HIGH…ontend/common/code-help/create-user/create-user-ios.js36 print(error)CODE
Structural Annotation Overuse31 hits · 49 pts
SeverityFileLineSnippetContext
LOWfrontend/.claude/context/api-integration.md13### Step 1: Find Backend EndpointCOMMENT
LOWfrontend/.claude/context/api-integration.md19### Step 2: Add Request TypeCOMMENT
LOWfrontend/.claude/context/api-integration.md32### Step 3: Add RTK Query EndpointCOMMENT
LOWfrontend/.claude/context/api-integration.md63### Step 4: Use in ComponentCOMMENT
LOWfrontend/.claude/context/api-integration.md88### Step 5: Run LinterCOMMENT
LOWfrontend/.claude/context/patterns/index.md11### Step 1: Check Backend APICOMMENT
LOWfrontend/.claude/context/patterns/index.md20### Step 2: Add Request TypeCOMMENT
LOWfrontend/.claude/context/patterns/index.md33### Step 3: Extend RTK Query ServiceCOMMENT
LOWfrontend/.claude/context/patterns/index.md63### Step 4: Create Table ComponentCOMMENT
LOWfrontend/.claude/context/patterns/index.md93### Step 5: Add Tabs to PageCOMMENT
LOWfrontend/.claude/context/patterns/index.md122### Step 6: Run LinterCOMMENT
LOWfrontend/common/services/useFeatureVersion.ts95 // Step 1: Create a new feature versionCOMMENT
LOW…ing-with-flagsmith/sdks/client-side-sdks/javascript.md371### Step 1: Initialise your Datadog RUM SDK with the feature_flags experimental featureCOMMENT
LOW…ing-with-flagsmith/sdks/client-side-sdks/javascript.md386### Step 2: Initialise the Flagsmith SDK with configuringCOMMENT
LOW…ing-with-flagsmith/sdks/client-side-sdks/javascript.md404### Step 3: What happens nextCOMMENT
LOW…ing-with-flagsmith/sdks/client-side-sdks/javascript.md432### Step 1: Pass `enableDynatrace` into `flagsmith.init()`COMMENT
LOW…ing-with-flagsmith/sdks/client-side-sdks/javascript.md458### Step 2: Add the session properties to your Dynatrace application settingsCOMMENT
LOW…egrating-with-flagsmith/sdks/client-side-sdks/react.md43### Step 1: Wrapping your application with Flagsmith ProviderCOMMENT
LOW…egrating-with-flagsmith/sdks/client-side-sdks/react.md72### Step 2: Using useFlags to access feature values and enabled stateCOMMENT
LOW…egrating-with-flagsmith/sdks/client-side-sdks/react.md108### Step 3: Using useFlagsmith to access the Flagsmith instanceCOMMENT
LOWdocs/docs/third-party-integrations/analytics/heap.md55### Step 1 - Create a Custom Event DefinitionCOMMENT
LOWdocs/docs/third-party-integrations/analytics/heap.md61### Step 2 - Create a Segment based on this new Custom Event PropertyCOMMENT
LOWdocs/docs/third-party-integrations/analytics/heap.md67### Step 3 - Create your ReportCOMMENT
LOW…ministration-and-maintenance/upgrades-and-rollbacks.md45### Step 1: Generate Rollback CommandsCOMMENT
LOW…ministration-and-maintenance/upgrades-and-rollbacks.md80### Step 2: Execute the Rollback CommandsCOMMENT
LOWdocs/docs/performance/edge-api.md64### Step 1 - Prepare your applicationsCOMMENT
LOWdocs/docs/performance/edge-api.md68### Step 2 - Migrate your dataCOMMENT
LOWdocs/docs/performance/edge-api.md84### Step 3 - Deploy your applicationsCOMMENT
LOWdocs/docs/managing-flags/release-pipeline.md26### Step 1: Navigate to Release PipelinesCOMMENT
LOWdocs/docs/managing-flags/release-pipeline.md34### Step 2: Configure Pipeline SettingsCOMMENT
LOWapi/telemetry/middleware.py31 # NOTE: The following W3C Baggage items are added by downstream processorCOMMENT
Cross-File Repetition8 hits · 40 pts
SeverityFileLineSnippetContext
HIGHapi/edge_api/identities/views.py0get environment object from url parameters in request.STRING
HIGHapi/environments/identities/views.py0get environment object from url parameters in request.STRING
HIGHapi/features/views.py0get environment object from url parameters in request.STRING
HIGH…sions/permission_service/test_is_user_project_admin.py0specific test to verify that a user no longer has permission to access resources via a group, if they no longer belong tSTRING
HIGH…on_service/test_get_permitted_environments_for_user.py0specific test to verify that a user no longer has permission to access resources via a group, if they no longer belong tSTRING
HIGH…s/permission_service/test_is_user_environment_admin.py0specific test to verify that a user no longer has permission to access resources via a group, if they no longer belong tSTRING
HIGH…ission_service/test_get_permitted_projects_for_user.py0specific test to verify that a user no longer has permission to access resources via a group, if they no longer belong tSTRING
HIGH…sion_service/test_user_has_organisation_permissions.py0specific test to verify that a user no longer has permission to access resources via a group, if they no longer belong tSTRING
Fake / Example Data38 hits · 36 pts
SeverityFileLineSnippetContext
LOWREADME.md47Superuser "admin@example.com" created successfully.CODE
LOWfrontend/README.md15Superuser "admin@example.com" created successfully.CODE
LOW…documentation/pages/onboarding/InlineInput.stories.tsx45 render: () => <Controlled label='Organisation' initial='Acme Inc' />,CODE
LOW…entation/pages/onboarding/OnboardingHeader.stories.tsx9 organisationName: 'Acme Inc',CODE
LOW…es/onboarding/hooks/__tests__/useSmartDefaults.test.ts7 ${'alice@acme-corp.com'} | ${'Alice'} | ${'Acme Corp'}CODE
LOWfrontend/common/utils/__tests__/format.test.ts114 ${{ email: 'john@email.com', firstName: 'John', lastName: 'Doe' }} | ${'John Doe'}CODE
LOW…rating-with-flagsmith/sdks/client-side-sdks/android.md129flagsmith.setTrait(Trait(key = "set-from-client", value = "12345"), identity = "test@test.com") { result ->CODE
LOW…rating-with-flagsmith/sdks/client-side-sdks/android.md147flagsmith.getTraits(identity = "test@test.com") { result ->CODE
LOW…ocs/administration-and-security/access-control/scim.md161API supports filtering (e.g. `filter=userName eq "user@example.com"`) and pagination (`startIndex`, `count`) on listCODE
LOWapi/app/settings/common.py536ADMIN_EMAIL = env("ADMIN_EMAIL", default="admin@example.com")CODE
LOW…/features/workflows/core/test_unit_workflows_models.py343 user = django_user_model.objects.create(email="user@example.com")CODE
LOW…/features/workflows/core/test_unit_workflows_models.py362 user = django_user_model.objects.create(email="user@example.com")CODE
LOW…ad_tracking/hubspot/test_unit_hubspot_lead_tracking.py310 email="user@example.com",CODE
LOW…ad_tracking/hubspot/test_unit_hubspot_lead_tracking.py352 email="user@example.com",CODE
LOW…ad_tracking/hubspot/test_unit_hubspot_lead_tracking.py427 email="user@example.com",CODE
LOW…ch_darkly/example_api_responses/getFeatureFlags_2.json36 "email": "test@test.com",CODE
LOW…ch_darkly/example_api_responses/getFeatureFlags_1.json36 "email": "test@test.com",CODE
LOW…ch_darkly/example_api_responses/getFeatureFlags_1.json163 "email": "test@test.com",CODE
LOW…ch_darkly/example_api_responses/getFeatureFlags_1.json290 "email": "test@test.com",CODE
LOW…ch_darkly/example_api_responses/getFeatureFlags_1.json421 "email": "test@test.com",CODE
LOW…grations/launch_darkly/client_responses/get_flags.json21 "email": "test@test.com",CODE
LOW…grations/launch_darkly/client_responses/get_flags.json149 "email": "test@test.com",CODE
LOW…grations/launch_darkly/client_responses/get_flags.json277 "email": "test@test.com",CODE
LOW…grations/launch_darkly/client_responses/get_flags.json409 "email": "test@test.com",CODE
LOW…grations/launch_darkly/client_responses/get_flags.json548 "email": "test@test.com",CODE
LOW…grations/launch_darkly/client_responses/get_flags.json679 "email": "test@test.com",CODE
LOW…grations/launch_darkly/client_responses/get_flags.json1005 "email": "test@test.com",CODE
LOW…grations/launch_darkly/client_responses/get_flags.json1207 "email": "test@test.com",CODE
LOW…grations/launch_darkly/client_responses/get_flags.json1433 "email": "test@test.com",CODE
LOW…ts/unit/organisations/test_unit_organisations_views.py829 settings.ORG_SUBSCRIPTION_CANCELLED_ALERT_RECIPIENT_LIST = ["foo@bar.com"]CODE
LOW…ts/unit/organisations/test_unit_organisations_views.py867 settings.ORG_SUBSCRIPTION_CANCELLED_ALERT_RECIPIENT_LIST = ["foo@bar.com"]CODE
LOW…ts/unit/organisations/test_unit_organisations_views.py906 settings.ORG_SUBSCRIPTION_CANCELLED_ALERT_RECIPIENT_LIST = ["foo@bar.com"]CODE
LOW…ts/unit/organisations/test_unit_organisations_tasks.py273 recipient = "foo@bar.com"CODE
LOW…ts/unit/organisations/test_unit_organisations_tasks.py502 assert email.to == ["admin@example.com"]CODE
LOW…ts/unit/organisations/test_unit_organisations_tasks.py646 assert email.to == ["admin@example.com", "staff@example.com"]CODE
LOW…ts/unit/organisations/test_unit_organisations_tasks.py792 assert email.to == ["admin@example.com", "staff@example.com"]CODE
LOW…ts/unit/organisations/test_unit_organisations_tasks.py1787 assert email2.to == ["admin@example.com", "staff@example.com"]CODE
LOW…ts/unit/organisations/test_unit_organisations_tasks.py1805 assert email3.to == ["admin@example.com", "staff@example.com"]CODE
Magic Placeholder Names7 hits · 35 pts
SeverityFileLineSnippetContext
HIGHfrontend/web/components/integrations/MCPIntegration.tsx132 <InlineCode>&lt;your-api-key&gt;</InlineCode>.CODE
HIGH…ontend/web/components/integrations/mcp/mcpSnippets.tsx15export const API_KEY_PLACEHOLDER = '<your-api-key>'CODE
HIGH…nd-security/governance-and-compliance/custom-fields.md76 -H "Authorization: Api-Key YOUR_API_KEY"CODE
HIGH…nd-security/governance-and-compliance/custom-fields.md105 -H "Authorization: Api-Key YOUR_API_KEY"CODE
HIGHdocs/docs/deployment-self-hosting/mcp-server.md76FLAGSMITH_API_TOKEN=<your-api-key> \CODE
HIGHdocs/docs/deployment-self-hosting/mcp-server.md94 "FLAGSMITH_API_TOKEN": "<your-api-key>"CODE
HIGHdocs/docs/deployment-self-hosting/mcp-server.md144Authorization: Api-Key <your-api-key>CODE
Decorative Section Separators6 hits · 21 pts
SeverityFileLineSnippetContext
MEDIUMapi/tests/conftest.py1440# ---------------------------------------------------------------------------COMMENT
MEDIUMapi/tests/conftest.py1442# ---------------------------------------------------------------------------COMMENT
MEDIUMapi/tests/conftest.py136# ---------------------------------------------------------------------------COMMENT
MEDIUMapi/tests/conftest.py138# ---------------------------------------------------------------------------COMMENT
MEDIUMapi/tests/conftest.py165# ---------------------------------------------------------------------------COMMENT
MEDIUMapi/tests/conftest.py167# ---------------------------------------------------------------------------COMMENT
Excessive Try-Catch Wrapping18 hits · 19 pts
SeverityFileLineSnippetContext
LOWmcp/src/flagsmith_mcp/metrics.py43 except Exception:CODE
LOWmcp/src/flagsmith_mcp/events.py49 except Exception:CODE
LOWapi/edge_api/management/commands/migrate_to_edge_v2.py23 except Exception: # pragma: no coverCODE
LOW…mport_export/json_serializers_with_metadata_support.py35 except Exception as exc:CODE
LOWapi/core/redis_cluster.py134 except Exception as e:CODE
LOWapi/experimentation/services.py764 except Exception:CODE
LOWapi/experimentation/tasks.py98 except Exception as exc:CODE
LOWapi/experimentation/tasks.py133 except Exception as exc:CODE
LOWapi/features/import_export/tasks.py127 except Exception:CODE
LOWapi/features/import_export/tasks.py139 except Exception:CODE
LOWapi/segment_membership/tasks.py113 except Exception:CODE
LOWapi/segment_membership/tasks.py237 except Exception:CODE
LOWapi/integrations/launch_darkly/services.py90 except Exception as exc:CODE
LOWapi/integrations/launch_darkly/tasks.py32 except Exception:CODE
LOWapi/organisations/tasks.py151 except Exception:CODE
LOWapi/organisations/tasks.py277 except Exception:CODE
LOWapi/organisations/usage_reporting/services.py74 except Exception:CODE
LOWapi/telemetry/apps.py17 except Exception as e:CODE
Cross-Language Confusion3 hits · 18 pts
SeverityFileLineSnippetContext
HIGHapi/environments/identities/serializers.py89 help_text="One of: null, 'SEGMENT', 'IDENTITY'."CODE
HIGHapi/features/models.py550 # identity is the highest priority so we can always return trueCOMMENT
HIGH…unit/environments/dynamodb/test_unit_dynamodb_utils.py58 '{"outer":{"inner":"value","list":[1,2]},"flag":true,"empty":null}'.encode()CODE
Deep Nesting20 hits · 16 pts
SeverityFileLineSnippetContext
LOWapi/edge_api/identities/export.py19CODE
LOWapi/app_analytics/mappers.py65CODE
LOWapi/features/models.py532CODE
LOWapi/features/permissions.py89CODE
LOWapi/features/features_service.py47CODE
LOWapi/features/feature_health/services.py59CODE
LOWapi/features/versioning/models.py327CODE
LOWapi/segment_membership/tasks.py58CODE
LOWapi/integrations/gitlab/mappers.py93CODE
LOWapi/integrations/launch_darkly/services.py293CODE
LOWapi/integrations/launch_darkly/services.py437CODE
LOWapi/integrations/launch_darkly/services.py545CODE
LOWapi/integrations/launch_darkly/services.py699CODE
LOWapi/integrations/launch_darkly/services.py762CODE
LOWapi/integrations/launch_darkly/services.py1106CODE
LOWapi/organisations/views.py77CODE
LOWapi/api/openapi.py289CODE
LOWapi/webhooks/permissions.py8CODE
LOWapi/metadata/serializers.py130CODE
LOWapi/metadata/permissions.py11CODE
AI Slop Vocabulary7 hits · 14 pts
SeverityFileLineSnippetContext
MEDIUMfrontend/web/components/modals/CreateSegment.tsx536 // Need to fix this to be more robust and handle post saveCOMMENT
LOWapi/edge_api/identities/export.py72 # dynamo object, we just create a default object with a value of null.COMMENT
LOWapi/core/models.py91 # and fall back to just return an empty list.COMMENT
LOWapi/app_analytics/influxdb_wrapper.py134 # Influx throws an error for an empty range, so just return a list.COMMENT
LOWapi/features/models.py834 # the identity, then we just return the default feature state value (or NoneCOMMENT
MEDIUMapi/audit/tasks.py66 # NOTE: This NEEDS to leverage btree indexes on AuditLogCOMMENT
LOWapi/users/serializers.py151 # TODO: remove users from here and just add a summary of number of usersCOMMENT
AI Structural Patterns11 hits · 11 pts
SeverityFileLineSnippetContext
LOWapi/core/middleware/axes.py15CODE
LOWapi/app_analytics/middleware.py24CODE
LOWapi/app_analytics/middleware.py45CODE
LOWapi/features/views.py423CODE
LOWapi/features/views.py441CODE
LOW…sts/unit/integrations/github/test_unit_github_views.py488CODE
LOW…sts/unit/integrations/github/test_unit_github_views.py496CODE
LOWapi/tests/unit/telemetry/helpers.py1CODE
LOWapi/tests/integration/helpers.py83CODE
LOWapi/integrations/webhook/webhook.py54CODE
LOWapi/webhooks/webhooks.py336CODE
Over-Commented Block9 hits · 9 pts
SeverityFileLineSnippetContext
LOWdocker-compose.yml21COMMENT
LOWfrontend/web/styles/_primitives.scss1// =============================================================================COMMENT
LOWfrontend/web/styles/3rdParty/_bootstrap.scss81COMMENT
LOW…-settings/tabs/warehouse-tab/sendWarehouseTestEvent.ts1import { createFlagsmithInstance } from '@flagsmith/flagsmith/isomorphic'COMMENT
LOW…ts/pages/onboarding/OnboardingFlow/OnboardingFlow.scss1// Reading-column width for the onboarding flow - a focused, single-task flowCOMMENT
LOW…pages/onboarding/OnboardingConnectPanel/sdkSnippets.ts1// Snippets for every SDK we support, sourced from the maintainedCOMMENT
LOWfrontend/common/services/useMultivariateOption.ts21 // No invalidatesTags: every save chain already ends with a broadCOMMENT
LOWapi/tests/unit/util/test_util.py141 # Given an iterable whose length isn't a multiple of the batch sizeCOMMENT
LOW…sions/permission_service/test_is_user_project_admin.py141 # Should take only 4 queries:COMMENT
Redundant / Tautological Comments5 hits · 8 pts
SeverityFileLineSnippetContext
LOWapi/sse/sse_service.py70 # Check if timeout has been reached before processing each fileCOMMENT
LOWapi/app/settings/common.py1047# Set this to enable create organisation for only superusersCOMMENT
LOWapi/app/settings/common.py1352 # Set this to add newly created users to an organisationCOMMENT
LOWapi/environments/identities/traits/views.py155 # Check if trait value was provided with request data. If so, we need to figure out value_type fromCOMMENT
LOWapi/features/views.py755 # Check if feature state value was provided with request data. If so, create / updateCOMMENT
Verbosity Indicators1 hit · 2 pts
SeverityFileLineSnippetContext
LOWfrontend/common/services/useFeatureVersion.ts95 // Step 1: Create a new feature versionCOMMENT
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
LOWapi/app_analytics/constants.py18# We make sure to only track known SDK versionsCOMMENT