Public report of btcpayserver/btcpayserver, published 23 October 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Watchdog signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 23 October 2026, 09:54 UTC · Survey ID cd_1b7353d5c4ef4f478003ddc97ecbd6ca

btcpayserver/btcpayserver

Measured 23 October 2026, 09:48 UTC, at code version a298387

A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.

Code coverage is not measured: Suite not runnable in-image and no committed report.

Test reliability is not measured: No test run produced results.

Boundary Type-Coupling is not measured: Bounded contexts not declared.

CAI score 45out of 100 Weak
CriticalWeakAdequateStrongExemplary
Down 2 since the last survey

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A large codebase: 112,676 lines of product code in 10 projects, tests not counted · Estimated rebuild effort: about 3.5 person-years · Weakest lens: Accessibility, 40

Findings by how serious they are

253 critical 1026 serious 173 minor

3 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
23 October 2026, 09:48 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds Watchdog. It is open to any tool that implements it, and today Watchdog is the only one that does.

The score is deterministic, which means the same code always gets the same score. Watchdog works it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

91of 96 dimensions measured by tools. The other 5 are advisory notes from an AI model, which explain the code but don't count towards the score.
1418of 1452 findings point to an exact file and line, so you can open each one in the code. The other 34 concern the repository as a whole, such as missing documentation.
96dimensions across 8 lenses, read from 112,676 lines of product code in 10 projects.
Chapters

Executive summary

btcpayserver/btcpayserver scores 45 out of 100 and is rated Weak, while five of its eight lenses score higher still: Event-Driven at 82, rated Strong, and Architecture at 74, Security and Compliance at 68, Performance at 63 and Maturity at 60, all rated Adequate.

The score is lower than those five because the weakest lens counts most, and here that is Accessibility, which scores 40 and is rated Weak. Its Keyboard semantics dimension scores 1.3 out of 10, and until that reaches 4, Accessibility can't be rated higher than Adequate. The first actions are to resolve the 3 Leaked secret finding(s) in REDACTED Scanning and to resolve the 1 Inverted test pyramid finding(s) in Test Distribution. The weakest lenses score close to each other, so improving any of them moves the score.

253 findings are critical: 130 in Explicit Debt, 40 in Forms & labels, 24 in Keyboard semantics, 23 in Static Analysis (SAST), seven in Secrets (history), six in ARIA correctness, six in Captive dependencies, four in Project dependency cycles, four in Text alternatives, three in REDACTED Scanning, two in Outbox / dual-write, two in Page structure, one in IaC & Container Security and one in Web-Security Posture.

Watchdog couldn't measure Runtime accessibility in this code, so that dimension is left out of the score. The product code is 112,676 lines, which would take an estimated 3.5 person-years, around €520,000, to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Accessibility 40 · counts for 45%Production Readiness 44 · counts for 25%Code Health 45 · counts for 14%Maturity 60 · counts for 8%Performance 63 · counts for 4%Security and Compliance 68 · counts for 2%Architecture 74 · counts for 1%Event-Driven 82 · counts for 1%

The weakest lenses score close to each other, so improving any of them moves the score.

Code composition: what the lines of code are
Business logic 32%Supporting code 41%Tests 23%Generated by tools 4%
New since the last survey: 254 findings

These 254 critical or serious findings weren't in the previous survey, on 9 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.

  • Cyclomatic Complexity · GreenfieldOfferingController.CreateOfferingPlan (cyclomatic 16) BTCPayServer/Plugins/Subscriptions/Controllers/GreenfieldOfferingController.cs
  • Cognitive Complexity · GreenfieldLightningNodeApiController.PayInvoice (cognitive 20) BTCPayServer/Controllers/GreenField/GreenfieldLightningNodeApiController.cs
  • God Classes · TooManyMethods: PluginManager BTCPayServer/Plugins/PluginManager.cs
  • God Classes · MethodTooLong: PluginManager.AddPlugins BTCPayServer/Plugins/PluginManager.cs
  • God Classes · FileTooLong: Plugins/PluginManager.cs BTCPayServer/Plugins/PluginManager.cs
  • Code Duplication · Duplicated block (17 lines × 2) BTCPayServer/Models/StoreViewModels/GeneralSettingsViewModel.cs
  • Code Duplication · Duplicated block (14 lines × 2) BTCPayServer/Plugins/Crowdfund/Models/UpdateCrowdfundViewModel.cs
  • Code Duplication · Duplicated block (14 lines × 2) REDACTED
  • Code Duplication · Duplicated block (6 lines × 2) BTCPayServer/Plugins/Wallets/Controllers/GreenfieldStoreOnChainWalletsController.cs
  • Code Duplication · Duplicated block (5 lines × 2) BTCPayServer/Plugins/Subscriptions/Controllers/GreenfieldOfferingController.cs
  • REDACTED Scanning · REDACTED
  • REDACTED Scanning · REDACTED
  • Churn × Complexity Hotspots · Hotspot: BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.PSBT.cs BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.PSBT.cs
  • Churn × Complexity Hotspots · Hotspot: REDACTED REDACTED
  • Churn × Complexity Hotspots · Hotspot: BTCPayServer/wwwroot/crowdfund/app.js BTCPayServer/wwwroot/crowdfund/app.js
  • Churn × Complexity Hotspots · Hotspot: BTCPayServer/Plugins/Subscriptions/Controllers/GreenfieldOfferingController.cs BTCPayServer/Plugins/Subscriptions/Controllers/GreenfieldOfferingController.cs
  • Churn × Complexity Hotspots · Hotspot: BTCPayServer/Plugins/PluginManager.cs BTCPayServer/Plugins/PluginManager.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer.Client/JsonConverters/SaneOutpointJsonConverter.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer.Common/Logging/ConsoleLogger.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer.Common/Logging/ConsoleLogger.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/Components/MainNav/MainNav.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/Controllers/UIInvoiceController.UI.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/Data/Payouts/LightningLike/LightningLikePayoutHandler.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/Extensions.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/Extensions.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/Extensions/UserExtensions.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/HostedServices/BackgroundJobSchedulerHostedService.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/HostedServices/InvoiceWatcher.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/HostedServices/NBXplorerWaiter.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/HostedServices/PeriodicTaskLauncherHostedService.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/HostedServices/PeriodicTaskLauncherHostedService.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/Payments/Bitcoin/NBXplorerListener.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/Payments/Bitcoin/NBXplorerListener.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/Payments/Lightning/LightningListener.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/Plugins/Multisig/HostedServices/MultisigEmailTriggerHostedService.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/Plugins/PluginManager.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/Plugins/PluginManager.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/Plugins/Subscriptions/Controllers/UISubscriptionControllerBase.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/Plugins/Wallets/Controllers/GreenfieldStoreOnChainWalletsController.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.PSBT.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/Plugins/Webhooks/TriggerProviders/InvoiceTriggerProvider.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/Plugins/Webhooks/WebhookSender.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/Services/Fees/FallbackFeeProvider.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/Services/ProcessRunner.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/Services/Reporting/InvoicesReportProvider.cs
  • Explicit Debt · EmptyCatchBlock BTCPayServer/Blazor/VaultBridge/VaultBridgeUI.razor
  • Explicit Debt · BarePragmaDisable repeated across 10 files BTCPayServer.Data/Data/AddressInvoiceData.cs
  • Explicit Debt · Dead code: SearchTermRouteKey BTCPayServer/Components/DateRangeSelector/DateRangeSelector.cs
  • Explicit Debt · Dead code: GetPayoutSpecificActions BTCPayServer/Data/Payouts/IPayoutHandler.cs
  • Explicit Debt · Dead code: GetEnabledPaymentMethods REDACTED
  • Explicit Debt · Dead code: IsLightningEnabled REDACTED
  • Explicit Debt · Dead code: IsLNUrlEnabled REDACTED
  • Explicit Debt · Dead code: ParseOutputDescriptor BTCPayServer/DerivationSchemeParser.cs
  • Explicit Debt · Dead code: ItemCombinations BTCPayServer/DerivationSchemeParser.cs
  • Explicit Debt · Dead code: GetSigningAccountKeySettings BTCPayServer/DerivationSchemeSettings.cs
  • Explicit Debt · Dead code: GetSigningAccountKeySettings BTCPayServer/DerivationSchemeSettings.cs
  • Explicit Debt · Dead code: GetSigningAccountKeySettings BTCPayServer/DerivationSchemeSettings.cs
  • Explicit Debt · Dead code: GetSigningAccountKeySettingsOrDefault BTCPayServer/DerivationSchemeSettings.cs
  • Explicit Debt · Dead code: IsFullySetup BTCPayServer/DerivationSchemeSettings.cs
  • Explicit Debt · Dead code: GetAdjustedForegroundForBackground BTCPayServer/Extensions/ColorExtensions.cs
  • Explicit Debt · Dead code: EnsureLocal BTCPayServer/Extensions/UrlHelperExtensions.cs
  • Explicit Debt · Dead code: IndexLink BTCPayServer/Extensions/UrlHelperExtensions.cs
  • Explicit Debt · Dead code: SetLightningUrl BTCPayServer/Payments/Lightning/LightningPaymentMethodConfig.cs
  • Explicit Debt · Dead code: CanRemove BTCPayServer/PayoutProcessors/IPayoutProcessorFactory.cs
  • Explicit Debt · Dead code: CreateFromPackage BTCPayServer/Plugins/Dotnet/LibraryModel/ManagedLibrary.cs
  • Explicit Debt · Dead code: CreateFromPackage BTCPayServer/Plugins/Dotnet/LibraryModel/NativeLibrary.cs
  • Explicit Debt · Dead code: AddManagedLibrary BTCPayServer/Plugins/Dotnet/Loader/AssemblyLoadContextBuilder.cs
  • Explicit Debt · Dead code: AddNativeLibrary BTCPayServer/Plugins/Dotnet/Loader/AssemblyLoadContextBuilder.cs
  • Explicit Debt · Dead code: AddResourceProbingPath BTCPayServer/Plugins/Dotnet/Loader/AssemblyLoadContextBuilder.cs
  • Explicit Debt · Dead code: AddPluginFromAssemblyFile BTCPayServer/Plugins/Dotnet/MvcPluginExtensions.cs
  • Explicit Debt · Dead code: GetStoreEmailRulesLink BTCPayServer/Plugins/Emails/LinkGeneratorExtensions.cs
  • Explicit Debt · Dead code: GetItemsHash BTCPayServer/Plugins/GlobalSearch/Views/GlobalSearchViewModel.cs
  • Explicit Debt · Dead code: RecurringToString BTCPayServer/Plugins/Subscriptions/StringLocalizerExtensions.Subscriptions.cs
  • Explicit Debt · Dead code: GetPermissions BTCPayServer/Security/GreenField/APIKeyExtensions.cs
  • Explicit Debt · Dead code: GetImplicitStoreId BTCPayServer/Security/SecurityExtensions.cs
  • Explicit Debt · Dead code: AddAddressInvoice BTCPayServer/Services/Invoices/InvoiceRepository.cs
  • Explicit Debt · Dead code: FromBytes BTCPayServer/Services/Invoices/InvoiceRepository.cs
  • Explicit Debt · Dead code: ToJsonString BTCPayServer/Services/Invoices/InvoiceRepository.cs
  • Explicit Debt · Dead code: GetBaseNotification BTCPayServer/Services/Notifications/NotificationSender.cs
  • Explicit Debt · Dead code: ShortDisplayName BTCPayServer/Services/ProcessRunner.cs
  • Explicit Debt · Dead code: ToggleUser BTCPayServer/Services/UserService.cs
  • Explicit Debt · Dead code: GetWalletLabelsForObjects BTCPayServer/Services/WalletRepository.cs
  • Explicit Debt · Dead code: GetChangeAddressAsync BTCPayServer/Services/Wallets/BTCPayWallet.cs
  • Explicit Debt · Dead code: BroadcastTransactionsAsync BTCPayServer/Services/Wallets/BTCPayWallet.cs
  • Explicit Debt · Dead code: HasInvitationToken BTCPayServer/UserManagerExtensions.cs
  • Explicit Debt · Dead code: SetBreadcrumbs BTCPayServer/ViewDataDictionaryExtensions.cs
  • Explicit Debt · Dead code: GetPageTimeZone BTCPayServer/ViewDataDictionaryExtensions.cs
  • Explicit Debt · Dead code: CreateEmailRule BTCPayServer.Tests/PMO/EmailRulePMO.cs
  • Explicit Debt · Dead code: SearchTextValue BTCPayServer.Tests/PMO/SearchFiltersPMO.cs
  • Explicit Debt · Dead code: AddManager BTCPayServer.Tests/TestAccount.cs
  • Explicit Debt · Dead code: AddEmployee BTCPayServer.Tests/TestAccount.cs
  • Explicit Debt · Dead code: CanUseAzureBlobStorage BTCPayServer.Tests/ThirdPartyTests.cs
  • Explicit Debt · Dead code: UpdateTranslations BTCPayServer.Tests/UtilitiesTests.cs
  • Explicit Debt · Dead code: GetNumberFormatInfoOrDefault BTCPayServer.Rating/CurrencyNameTable.cs
  • Explicit Debt · Dead code: ToUpdateAdditionalDataJson BTCPayServer.Data/Data/BaseEntityData.cs
  • Explicit Debt · Dead code: GetCssClass BTCPayServer.Data/Data/InvoiceEventData.cs
  • Explicit Debt · Dead code: TradeResultData BTCPayServer.Data/Data/TradeResultData.cs
  • Secrets (history) · REDACTED
  • Secrets (history) · REDACTED

Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 1174 findings

These 1174 critical or serious findings were in the previous survey, on 9 October 2026, and are gone from this one. The first 100 are listed here.

  • Cyclomatic Complexity · UIMaintenanceController.Maintenance (cyclomatic 21) BTCPayServer/Plugins/Maintenance/Controllers/UIMaintenanceController.cs
  • Cognitive Complexity · UIMaintenanceController.Maintenance (cognitive 30) BTCPayServer/Plugins/Maintenance/Controllers/UIMaintenanceController.cs
  • Code Duplication · Duplicated block (17 lines × 2) BTCPayServer/Models/StoreViewModels/GeneralSettingsViewModel.cs
  • Code Duplication · Duplicated block (14 lines × 2) BTCPayServer/Plugins/Crowdfund/Models/UpdateCrowdfundViewModel.cs
  • Code Duplication · Duplicated block (14–15 lines × 2) BTCPayServer/Plugins/Wallets/Controllers/GreenfieldStoreOnChainWalletsController.cs
  • Coupling · Off the main sequence: BTCPayServer.Rating
  • Churn × Complexity Hotspots · Hotspot: BTCPayServer/Plugins/Maintenance/Controllers/UIMaintenanceController.cs BTCPayServer/Plugins/Maintenance/Controllers/UIMaintenanceController.cs
  • Explicit Debt · BarePragmaDisable repeated 15 times in 9 files BTCPayServer.Data/Data/AddressInvoiceData.cs
  • Static Analysis (SAST) · Medium: REDACTED BTCPayServer.Tests/ApiKeysTests.cs
  • Static Analysis (SAST) · Medium: watchdog-controllerbase-missing-or-broken-authorization-csharp BTCPayServer/Controllers/GreenField/GreenfieldApiKeysController.cs
  • Static Analysis (SAST) · Medium: watchdog-controllerbase-missing-or-broken-authorization-csharp BTCPayServer/Controllers/GreenField/GreenfieldFilesController.cs
  • Static Analysis (SAST) · Medium: watchdog-controllerbase-missing-or-broken-authorization-csharp BTCPayServer/Controllers/GreenField/GreenfieldLightningNodeApiController.cs
  • Static Analysis (SAST) · Medium: watchdog-controllerbase-missing-or-broken-authorization-csharp BTCPayServer/Controllers/GreenField/GreenfieldObsoleteController.cs
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED BTCPayServer/Controllers/UIErrorController.cs
  • Static Analysis (SAST) · Medium: REDACTED BTCPayServer/Controllers/UIInvoiceController.cs
  • Static Analysis (SAST) · Medium: REDACTED BTCPayServer/Controllers/UILNURLAuthController.cs
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED BTCPayServer/Controllers/UIManageController.cs
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED BTCPayServer/Controllers/UIReportsController.cs
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED BTCPayServer/Controllers/UIStoresController.cs
  • Static Analysis (SAST) · Medium: REDACTED BTCPayServer/Data/Payouts/LightningLike/UILightningLikePayoutController.cs
  • Static Analysis (SAST) · Medium: REDACTED BTCPayServer/Fido2/UIFido2Controller.cs
  • Static Analysis (SAST) · Medium: watchdog-controllerbase-missing-or-broken-authorization-csharp REDACTED
  • Static Analysis (SAST) · Medium: watchdog-controllerbase-missing-or-broken-authorization-csharp REDACTED
  • Static Analysis (SAST) · Medium: watchdog-controllerbase-missing-or-broken-authorization-csharp BTCPayServer/Plugins/Bitpay/Controllers/BitpayInvoiceController.cs
  • Static Analysis (SAST) · Medium: watchdog-controllerbase-missing-or-broken-authorization-csharp BTCPayServer/Plugins/Bitpay/Controllers/BitpayRateController.cs
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED BTCPayServer/Plugins/DynamicDNS/Controllers/UIDynamicDnsController.cs
  • Static Analysis (SAST) · Medium: REDACTED BTCPayServer/Plugins/Forms/UIFormsController.cs
  • Static Analysis (SAST) · Medium: REDACTED BTCPayServer/Plugins/GlobalSearch/Controllers/UISearchController.cs
  • Static Analysis (SAST) · Medium: REDACTED BTCPayServer/Plugins/Maintenance/Controllers/UIMaintenanceController.cs
  • Static Analysis (SAST) · Medium: REDACTED BTCPayServer/Plugins/Monetization/Controllers/UIServerMonetizationController.cs
  • Static Analysis (SAST) · Medium: REDACTED BTCPayServer/Plugins/Multisig/Controllers/UIMultisigSetupController.cs
  • Static Analysis (SAST) · Medium: REDACTED BTCPayServer/Plugins/Multisig/Controllers/UIMultisigWalletsController.cs
  • Static Analysis (SAST) · Medium: REDACTED BTCPayServer/Plugins/PayButton/Controllers/UIPayButtonController.cs
  • Static Analysis (SAST) · Medium: REDACTED BTCPayServer/Plugins/PluginManager/Controllers/UIPluginManagerController.cs
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: watchdog-controllerbase-missing-or-broken-authorization-csharp BTCPayServer/Plugins/Subscriptions/Controllers/GreenfieldOfferingController.cs
  • Static Analysis (SAST) · Medium: REDACTED BTCPayServer/Plugins/Translations/Controllers/UITranslationController.cs
  • Static Analysis (SAST) · Medium: REDACTED BTCPayServer/Plugins/Translations/Controllers/UITranslationController.cs
  • Static Analysis (SAST) · Medium: watchdog-controllerbase-missing-or-broken-authorization-csharp BTCPayServer/Plugins/Wallets/Controllers/GreenfieldStoreOnChainPaymentMethodsController.cs
  • Static Analysis (SAST) · Medium: REDACTED BTCPayServer/Plugins/Wallets/Controllers/UIStoreOnChainWalletsController.cs
  • Static Analysis (SAST) · Medium: REDACTED BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs
  • Static Analysis (SAST) · Medium: watchdog-controllerbase-missing-or-broken-authorization-csharp BTCPayServer/Plugins/Webhooks/Controllers/GreenfieldStoreWebhooksController.cs
  • Static Analysis (SAST) · Medium: REDACTED BTCPayServer/Plugins/Webhooks/Controllers/UIStoreWebhooksController.cs
  • Cancellation propagation · Async method without CancellationToken: GetLightningClient BTCPayServer/Components/StoreLightningBalance/StoreLightningBalance.cs
  • Cancellation propagation · Async method without CancellationToken: GetInvoice BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs
  • Cancellation propagation · Async method without CancellationToken: ArchiveInvoice BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs
  • Cancellation propagation · Async method without CancellationToken: UpdateInvoice BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs
  • Cancellation propagation · Async method without CancellationToken: CreateInvoice BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs
  • Cancellation propagation · Async method without CancellationToken: MarkInvoiceStatus BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs
  • Cancellation propagation · Async method without CancellationToken: UnarchiveInvoice BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs
  • Cancellation propagation · Async method without CancellationToken: GetInvoicePaymentMethods BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs
  • Cancellation propagation · Async method without CancellationToken: ActivateInvoicePaymentMethod BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs
  • Cancellation propagation · Async method without CancellationToken: CanUseInternalLightning BTCPayServer/Controllers/GreenField/GreenfieldLightningNodeApiController.cs
  • Cancellation propagation · Async method without CancellationToken: GetNotifications BTCPayServer/Controllers/GreenField/GreenfieldNotificationsController.cs
  • Cancellation propagation · Async method without CancellationToken: GetNotification BTCPayServer/Controllers/GreenField/GreenfieldNotificationsController.cs
  • Cancellation propagation · Async method without CancellationToken: UpdateNotification BTCPayServer/Controllers/GreenField/GreenfieldNotificationsController.cs
  • Cancellation propagation · Async method without CancellationToken: DeleteNotification BTCPayServer/Controllers/GreenField/GreenfieldNotificationsController.cs
  • Cancellation propagation · Async method without CancellationToken: GetNotificationSettings BTCPayServer/Controllers/GreenField/GreenfieldNotificationsController.cs
  • Cancellation propagation · Async method without CancellationToken: UpdateNotificationSettings BTCPayServer/Controllers/GreenField/GreenfieldNotificationsController.cs
  • Cancellation propagation · Async method without CancellationToken: GetPaymentRequests BTCPayServer/Controllers/GreenField/GreenfieldPaymentRequestsController.cs
  • Cancellation propagation · Async method without CancellationToken: GetPaymentRequest BTCPayServer/Controllers/GreenField/GreenfieldPaymentRequestsController.cs
  • Cancellation propagation · Async method without CancellationToken: ArchivePaymentRequest BTCPayServer/Controllers/GreenField/GreenfieldPaymentRequestsController.cs
  • Cancellation propagation · Async method without CancellationToken: CreateOrUpdatePaymentRequest BTCPayServer/Controllers/GreenField/GreenfieldPaymentRequestsController.cs
  • Cancellation propagation · Async method without CancellationToken: GetPullPayments REDACTED
  • Cancellation propagation · Async method without CancellationToken: CreatePullPayment REDACTED
  • Cancellation propagation · Async method without CancellationToken: RegisterBoltcard REDACTED
  • Cancellation propagation · Async method without CancellationToken: GetPullPayment REDACTED
  • Cancellation propagation · Async method without CancellationToken: GetPayouts REDACTED
  • Cancellation propagation · Async method without CancellationToken: GetPayout REDACTED
  • Cancellation propagation · Async method without CancellationToken: GetPullPaymentLNURL REDACTED
  • Cancellation propagation · Async method without CancellationToken: CreatePayoutThroughStore REDACTED
  • Cancellation propagation · Async method without CancellationToken: ArchivePullPayment REDACTED
  • Cancellation propagation · Async method without CancellationToken: GetStorePayouts REDACTED
  • Cancellation propagation · Async method without CancellationToken: CancelPayout REDACTED
  • Cancellation propagation · Async method without CancellationToken: MarkPayout REDACTED
  • Cancellation propagation · Async method without CancellationToken: GetStorePayout REDACTED
  • Cancellation propagation · Async method without CancellationToken: ServerEmailSettings BTCPayServer/Controllers/GreenField/GreenfieldServerEmailController.cs
  • Cancellation propagation · Async method without CancellationToken: ServerEmailSettings BTCPayServer/Controllers/GreenField/GreenfieldServerEmailController.cs
  • Cancellation propagation · Async method without CancellationToken: GetServerRoles BTCPayServer/Controllers/GreenField/GreenfieldServerRolesController.cs
  • Cancellation propagation · Async method without CancellationToken: GetStoreLightningAutomatedPayoutProcessors BTCPayServer/Controllers/GreenField/GreenfieldStoreAutomatedLightningPayoutProcessorsController.cs
  • Cancellation propagation · Async method without CancellationToken: UpdateStoreLightningAutomatedPayoutProcessor BTCPayServer/Controllers/GreenField/GreenfieldStoreAutomatedLightningPayoutProcessorsController.cs
  • Cancellation propagation · Async method without CancellationToken: GetStoreOnChainAutomatedPayoutProcessors BTCPayServer/Controllers/GreenField/GreenfieldStoreAutomatedOnChainPayoutProcessorsController.cs
  • Cancellation propagation · Async method without CancellationToken: UpdateStoreOnchainAutomatedPayoutProcessor BTCPayServer/Controllers/GreenField/GreenfieldStoreAutomatedOnChainPayoutProcessorsController.cs
  • Cancellation propagation · Async method without CancellationToken: SendEmailFromStore BTCPayServer/Controllers/GreenField/GreenfieldStoreEmailController.cs
  • Cancellation propagation · Async method without CancellationToken: UpdateStoreEmailSettings BTCPayServer/Controllers/GreenField/GreenfieldStoreEmailController.cs
  • Cancellation propagation · Async method without CancellationToken: GetStoreLightningAddresses BTCPayServer/Controllers/GreenField/GreenfieldStoreLightningAddressesController.cs
  • Cancellation propagation · Async method without CancellationToken: RemoveStoreLightningAddress BTCPayServer/Controllers/GreenField/GreenfieldStoreLightningAddressesController.cs
  • Cancellation propagation · Async method without CancellationToken: GetStoreLightningAddress BTCPayServer/Controllers/GreenField/GreenfieldStoreLightningAddressesController.cs
  • Cancellation propagation · Async method without CancellationToken: AddOrUpdateStoreLightningAddress BTCPayServer/Controllers/GreenField/GreenfieldStoreLightningAddressesController.cs
  • Cancellation propagation · Async method without CancellationToken: GetStorePaymentMethod BTCPayServer/Controllers/GreenField/GreenfieldStorePaymentMethodsController.cs
  • Cancellation propagation · Async method without CancellationToken: RemoveStorePaymentMethod BTCPayServer/Controllers/GreenField/GreenfieldStorePaymentMethodsController.cs
  • Cancellation propagation · Async method without CancellationToken: UpdateStorePaymentMethod BTCPayServer/Controllers/GreenField/GreenfieldStorePaymentMethodsController.cs
  • Cancellation propagation · Async method without CancellationToken: GetStorePaymentMethods BTCPayServer/Controllers/GreenField/GreenfieldStorePaymentMethodsController.cs
  • Cancellation propagation · Async method without CancellationToken: GetStorePayoutProcessors BTCPayServer/Controllers/GreenField/GreenfieldStorePayoutProcessorsController.cs
  • Cancellation propagation · Async method without CancellationToken: RemoveStorePayoutProcessor BTCPayServer/Controllers/GreenField/GreenfieldStorePayoutProcessorsController.cs
Rebuild cost: about €520,000 · Estimate
Cost to rebuild€170,000 to €860,000, for 2,787 to 9,084 hours of work, about 3.5 person-years for 2 to 7 engineers
Difficulty of the problemHigh, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 45. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 112,676 lines of product code

How the estimate is made: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED, REDACTED, REDACTED.
Raises the score by about 3 points · Low effort · REDACTED Scanning
2
Resolve the 1 Inverted test pyramid finding(s) in Test Distribution.
Raises the score by about 3 points · Low effort · Test Distribution
3
Resolve the 7 NoWarnInCsproj finding(s) in Explicit Debt — start with BTCPayServer.Tests.csproj (3), Common.csproj, BTCPayServer.PluginPacker.csproj.
Raises the score by about 2 points · Low effort · Explicit Debt

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €520,000 to build again, about 3.5 person-years of work. Its weakest lens is Accessibility, at 40 (Weak). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
If you do one thing first · First action
Resolve the 3 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 3 points for low effort, because it clears the 3 REDACTED Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways — a layering smell or cycle. A clean layered graph has none.

arch BTCPayServer BTCPayServer BTCPayServer.Abstractions Abstractions BTCPayServer->BTCPayServer.Abstractions BTCPayServer.Client Client BTCPayServer->BTCPayServer.Client BTCPayServer.Common Common BTCPayServer->BTCPayServer.Common BTCPayServer.Data Data BTCPayServer->BTCPayServer.Data BTCPayServer.Rating Rating BTCPayServer->BTCPayServer.Rating BTCPayServer.Abstractions->BTCPayServer.Client BTCPayServer.Data->BTCPayServer.Abstractions BTCPayServer.Data->BTCPayServer.Client BTCPayServer.PluginPacker PluginPacker BTCPayServer.PluginPacker->BTCPayServer Common Common Version Version

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

220 modules, with 898 dependencies between them. 4 loops run through 76 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 180 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 BTCPayServer.Abstractions2 BTCPayServer.Client.Models3 BTCPayServer.Services.Rates4 BTCPayServer.Abstractions.Models5 BTCPayServer.Logging6 BTCPayServer.Payouts7 BTCPayServer.Abstractions.Contracts8 BTCPayServer.Services.Invoices9 BTCPayServer.Events10 BTCPayServer.PaymentRequest11 BTCPayServer.Services.Stores12 BTCPayServer.Plugins.Crowdfund.Controllers13 BTCPayServer.Services.Wallets14 BTCPayServer.Plugins.Wallets.Views.ViewModels15 BTCPayServer.Services.Apps16 BTCPayServer.HostedServices17 BTCPayServer.Services.Reporting18 BTCPayServer.Services19 BTCPayServer.Models20 BTCPayServer.Plugins.Emails.Services21 BTCPayServer.Payments.Bitcoin22 BTCPayServer.Payments.Lightning23 BTCPayServer.Payments24 BTCPayServer.Data25 BTCPayServer.Models.StoreViewModels26 BTCPayServer.PayoutProcessors27 BTCPayServer.Plugins.Emails.Views28 BTCPayServer.Plugins.Webhooks29 BTCPayServer.Plugins.Subscriptions30 BTCPayServer.Plugins.Monetization31 BTCPayServer.Controllers32 BTCPayServer.Configuration33 BTCPayServer.Plugins.PointOfSale.Controllers34 BTCPayServer35 (global)36 BTCPayServer.Hosting37 BTCPayServer.Plugins.Bitpay.Controllers38 BTCPayServer.Data.Payouts.LightningLike39 BTCPayServer.PayoutProcessors.Lightning40 BTCPayServer.Controllers.Greenfield
1 BTCPayServer.Abstractions
2 BTCPayServer.Client.Models
3 BTCPayServer.Services.Rates
4 BTCPayServer.Abstractions.Models3
5 BTCPayServer.Logging2
6 BTCPayServer.Payouts11
7 BTCPayServer.Abstractions.Contracts2
8 BTCPayServer.Services.Invoices111111111138
9 BTCPayServer.Events55114172
10 BTCPayServer.PaymentRequest11214212
11 BTCPayServer.Services.Stores1211131
12 BTCPayServer.Plugins.Crowdfund.Controllers11111111
13 BTCPayServer.Services.Wallets222126138
14 BTCPayServer.Plugins.Wallets.Views.ViewModels2111924
15 BTCPayServer.Services.Apps6114111163
16 BTCPayServer.HostedServices147142611211111226425
17 BTCPayServer.Services.Reporting311121111132
18 BTCPayServer.Services341317311121616526
19 BTCPayServer.Models11121122
20 BTCPayServer.Plugins.Emails.Services142814
21 BTCPayServer.Payments.Bitcoin1111031511913
22 BTCPayServer.Payments.Lightning32113231211271512
23 BTCPayServer.Payments13131191
24 BTCPayServer.Data715272185
25 BTCPayServer.Models.StoreViewModels4111325
26 BTCPayServer.PayoutProcessors1511131154
27 BTCPayServer.Plugins.Emails.Views12
28 BTCPayServer.Plugins.Webhooks411161
29 BTCPayServer.Plugins.Subscriptions2112112223436212
30 BTCPayServer.Plugins.Monetization112196111
31 BTCPayServer.Controllers7102461311371848743311131182118372
32 BTCPayServer.Configuration112
33 BTCPayServer.Plugins.PointOfSale.Controllers11112211
34 BTCPayServer2151181112102431611112
35 (global)2212112311125
36 BTCPayServer.Hosting1221411162535
37 BTCPayServer.Plugins.Bitpay.Controllers1352152311
38 BTCPayServer.Data.Payouts.LightningLike113211211102311
39 BTCPayServer.PayoutProcessors.Lightning51111263133
40 BTCPayServer.Controllers.Greenfield78612912111736301523533201
Uses a module listed above itPart of a loopThe module itself
1 BTCPayServer.Abstractions2 BTCPayServer.Client.Models3 BTCPayServer.Services.Rates4 BTCPayServer.Abstractions.Models5 BTCPayServer.Logging6 BTCPayServer.Payouts7 BTCPayServer.Abstractions.Contracts8 BTCPayServer.Services.Invoices9 BTCPayServer.Events10 BTCPayServer.PaymentRequest11 BTCPayServer.Services.Stores12 BTCPayServer.Plugins.Crowdfund.Controllers13 BTCPayServer.Services.Wallets14 BTCPayServer.Plugins.Wallets.Views.ViewModels15 BTCPayServer.Services.Apps16 BTCPayServer.HostedServices17 BTCPayServer.Services.Reporting18 BTCPayServer.Services19 BTCPayServer.Models20 BTCPayServer.Plugins.Emails.Services21 BTCPayServer.Payments.Bitcoin22 BTCPayServer.Payments.Lightning23 BTCPayServer.Payments24 BTCPayServer.Data25 BTCPayServer.Models.StoreViewModels26 BTCPayServer.PayoutProcessors27 BTCPayServer.Plugins.Emails.Views28 BTCPayServer.Plugins.Webhooks29 BTCPayServer.Plugins.Subscriptions30 BTCPayServer.Plugins.Monetization31 BTCPayServer.Controllers32 BTCPayServer.Configuration33 BTCPayServer.Plugins.PointOfSale.Controllers34 BTCPayServer35 (global)36 BTCPayServer.Hosting37 BTCPayServer.Plugins.Bitpay.Controllers38 BTCPayServer.Data.Payouts.LightningLike39 BTCPayServer.PayoutProcessors.Lightning40 BTCPayServer.Controllers.GreenfieldBTCPayServer.Abstractions1BTCPayServer.Client.Models2BTCPayServer.Services.Rates3BTCPayServer.Abstractions.Models4BTCPayServer.Logging5BTCPayServer.Payouts6BTCPayServer.Abstractions.Contracts7BTCPayServer.Services.Invoices8BTCPayServer.Events9BTCPayServer.PaymentRequest10BTCPayServer.Services.Stores11BTCPayServer.Plugins.Crowdfund.Controllers12BTCPayServer.Services.Wallets13BTCPayServer.Plugins.Wallets.Views.ViewModels14BTCPayServer.Services.Apps15BTCPayServer.HostedServices16BTCPayServer.Services.Reporting17BTCPayServer.Services18BTCPayServer.Models19BTCPayServer.Plugins.Emails.Services20BTCPayServer.Payments.Bitcoin21BTCPayServer.Payments.Lightning22BTCPayServer.Payments23BTCPayServer.Data24BTCPayServer.Models.StoreViewModels25BTCPayServer.PayoutProcessors26BTCPayServer.Plugins.Emails.Views27BTCPayServer.Plugins.Webhooks28BTCPayServer.Plugins.Subscriptions29BTCPayServer.Plugins.Monetization30BTCPayServer.Controllers31BTCPayServer.Configuration32BTCPayServer.Plugins.PointOfSale.Controllers33BTCPayServer34(global)35BTCPayServer.Hosting36BTCPayServer.Plugins.Bitpay.Controllers37BTCPayServer.Data.Payouts.LightningLike38BTCPayServer.PayoutProcessors.Lightning39BTCPayServer.Controllers.Greenfield403211211111111113855114172112142121211131111111112221261382111924611411116314714261121111122642531112111113234131731112161652611121122142814111103151191332113231211271512131311917152721854111325151113115412411161211211222343621211219611171024613113718487433111311821183721121111221121511811121024316111122212112311125122141116253513521523111132112111023115111126313378612912111736301523533201+180 more modules (most-connected shown)

At a glance — Code Health · 45% · Weak · gated by X4, X5 ·

At a glance — Architecture · 74% · Adequate · gated by D27 ·

At a glance — Maturity · 60% · Adequate · gated by M2 ·

At a glance — Readiness · 44% · Weak · gated by D9, D13, P3, P7, P8 ·

At a glance — Security · 68% · Adequate · gated by D28, D29, D36 ·

At a glance — Event-Driven · 82% · Strong ·

At a glance — Accessibility · 40% · Weak · gated by AC4 ·

At a glance — Performance · 63% · Adequate ·

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A05:2025 — Injection136High / Critical
A07:2025 — Authentication Failures11High / Critical
A03:2025 — Software Supply Chain Failures6Medium
A02:2025 — Security Misconfiguration5High / Critical
A01:2025 — Broken Access Control1Medium

Roadmap

First, ensure all custom controls are fully keyboard accessible by adding proper roles, handlers, and valid hrefs to anchors. Next, immediately address the three leaked secrets in REDACTED, REDACTED, and REDACTED to secure sensitive data. Then, correct the inverted test pyramid to improve test reliability and coverage. Finally, reduce explicit technical debt by removing write-only private fields in key files and eliminating unnecessary NoWarn directives in project files.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED, REDACTED, REDACTED.+3.1 ptsLowREDACTED Scanning
Resolve the 1 Inverted test pyramid finding(s) in Test Distribution.+3.0 ptsLowTest Distribution
Resolve the 7 NoWarnInCsproj finding(s) in Explicit Debt — start with BTCPayServer.Tests.csproj (3), Common.csproj, BTCPayServer.PluginPacker.csproj.+2.4 ptsLowExplicit Debt
Resolve the 75 EmptyCatchBlock finding(s) in Explicit Debt — start with Extensions.cs (4), UIWalletsController.PSBT.cs (4), ConsoleLogger.cs (2).+2.4 ptsMediumExplicit Debt
Resolve the 45 WriteOnlyPrivateField finding(s) in Explicit Debt — start with MigrationStartupTask.cs (4), InvoiceWatcher.cs (3), LocalizerFactory.cs (3).+2.4 ptsMediumExplicit Debt
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+3.2 ptsMediumKeyboard semantics
Enforce accessibility in the test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.+2.2 ptsMediumA11y enforcement
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.+1.7 ptsMediumVisual & motion safety

File quality

Per-file score 0–10 — a quality signature. Of 347 files carrying findings, judged against the Production bar: 6% slop · 65% mixed · 29% near-clean.

FileScoreBandWorst signal
REDACTED1.0SlopExplicit Debt: EmptyCatchBlock
BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs1.0SlopExplicit Debt: EmptyCatchBlock
BTCPayServer/Controllers/UIInvoiceController.UI.cs1.0SlopExplicit Debt: EmptyCatchBlock
REDACTED1.0SlopExplicit Debt: EmptyCatchBlock
BTCPayServer/Hosting/MigrationStartupTask.cs1.0SlopExplicit Debt: EmptyCatchBlock
BTCPayServer/Extensions.cs1.0SlopExplicit Debt: EmptyCatchBlock
REDACTED1.0SlopExplicit Debt: EmptyCatchBlock
REDACTED1.1SlopExplicit Debt: WriteOnlyPrivateField
BTCPayServer/Controllers/GreenField/GreenfieldStoresController.cs2.0SlopExplicit Debt: WriteOnlyPrivateField
BTCPayServer/DerivationSchemeParser.cs2.1SlopExplicit Debt: EmptyCatchBlock
BTCPayServer/HostedServices/DbMigrationsHostedService.cs2.1SlopExplicit Debt: EmptyCatchBlock
REDACTED2.5SlopExplicit Debt: FileScopedPragmaDisable
BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.PSBT.cs2.6SlopExplicit Debt: EmptyCatchBlock
BTCPayServer/HostedServices/InvoiceWatcher.cs2.7SlopExplicit Debt: EmptyCatchBlock
REDACTED3.3SlopExplicit Debt: WriteOnlyPrivateField
REDACTED3.3SlopIaC & Container Security: High IaC: REDACTED
BTCPayServer/Services/Invoices/InvoiceEntity.cs3.4SlopExplicit Debt: EmptyCatchBlock
BTCPayServer/Plugins/PluginManager.cs3.4SlopExplicit Debt: EmptyCatchBlock
BTCPayServer/Payments/Bitcoin/NBXplorerListener.cs3.5SlopExplicit Debt: EmptyCatchBlock
BTCPayServer/Payments/Lightning/LightningListener.cs3.6SlopExplicit Debt: EmptyCatchBlock

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 253

A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.

Serious — 1026

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 173

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 3

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 91 of 96 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 5 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.

What we checked — 96 dimensions across the health lenses
D1D2D3D4D5D6D9D10D12D13D14D15D16D17D18D19D20D21D24D26D27D28D29D30D31D32D34D35D36D37D39D44AC1AC2AC3AC4AC5AC6AC7AX1AX10AX2AX3AX5AX6AX8C1C2C3C4ED1ED4ED5GD1IC1M1M2M3M4P1P10P2P3P4P6P7P8PF1PF2PF3S1X1X12X13X14X15X16X17X18X19X2X20X21X22X23X24X25X26X27X28X29X3X30X32X4X5

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1418 of 1452 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Watchdog duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a16829-6ea5-754a-a24f-205556337979.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The test suite couldn't be built/run in-image and no coverage report is committed, so line coverage was not measured — and it is EXCLUDED from the score rather than scored on a LoC-ratio proxy. No coverage collector was found in your CI either, so there is no existing report to hand us. You can widen what we reach: optional: add a coverage collector to your test run and commit (or publish) its Cobertura/OpenCover/lcov output anywhere in the repo, or make the suite runnable in-image, and real coverage will be measured.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT MEASURED: the test run produced no results for any test tier, so no test ever ran and flakiness could not be exercised. The cause could not be attributed, so it is excluded from the score rather than read as an absence of tests.
  • D22 Internal API Consistency — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. The loaded project set declares no packable project and no `.Contracts` project, so there is no intentionally-exposed surface for API consistency to be judged over.
  • D23 Boundary Type-Coupling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Large codebase (106,281 production LoC in the .NET projects) with no declared bounded contexts — cross-boundary type coupling is unassessed Bounded contexts cannot be inferred from a codebase that is not physically organised by them (D-321), so with none declared there are no boundaries for the coupling pass to measure across. You can widen what we reach: name this codebase's bounded contexts (≥2 module groups, e.g. per subsystem) so cross-boundary type coupling can be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D32 Data Compliance (PII/GDPR) — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. `BTCPayServer.Abstractions/Contracts/BasePluginDbContext.cs`, `BTCPayServer.Abstractions/Contracts/VersionCondition.cs`, `BTCPayServer.Abstractions/Models/LayoutModel.cs`, `BTCPayServer.Abstractions/Security/PolicyRequirement.cs`, `BTCPayServer.Abstractions/TagHelpers/PermissionTagHelper.cs`, … (+171 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AC2 Forms & labels — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 126 further occurrence(s) are not listed individually; the score already reflects all 166.
  • AC3 Page structure — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 23 further occurrence(s) are not listed individually; the score already reflects all 63.
  • AC6 Visual & motion safety — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 14 further occurrence(s) are not listed individually; the score already reflects all 54.
  • AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). docker build failed (exit 1) — DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/bui…; runtime evidence skipped.
  • IC1 Incompleteness & stubs — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 13 further occurrence(s) are not listed individually; the score already reflects all 53.
  • X2 Cancellation propagation — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 901 further occurrence(s) are not listed individually; the score already reflects all 941.
  • X3 Exception handling — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 52 further occurrence(s) are not listed individually; the score already reflects all 92.
  • X4 Structured logging — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 24 further occurrence(s) are not listed individually; the score already reflects all 64.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D18 Solution Shape: Build integrity reflects whether the solution compiled in this environment — a build that needs a private feed, a specific SDK, or a generated file absent from the repo can read as broken when it is merely unreproducible here.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D24 Comment Value: Comment value (WHY vs WHAT) is an LLM judgement over a bounded sample — it is advisory and cannot weigh a comment against the precise code change it was written to explain.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D32 Data Compliance (PII/GDPR): PII/GDPR signals are heuristic pattern matches in code — they flag likely handling concerns, not legal compliance, and cannot trace where data actually flows at runtime.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • C3 Audit Trail: This control is scored from in-repo evidence only — a working control configured outside the repository leaves no signal a static scan can credit.
  • C4 Data Retention: This control is scored from in-repo evidence only — its real-world effectiveness, exercised only at runtime, is outside a static scan.
  • ED5 Idempotency: Idempotency is judged from the handler body's visible writes and guards — a guard enforced by a database unique constraint, a broker's exactly-once delivery, or a domain method whose no-op-when-applied logic the scan can't follow may read as at-risk; the at-risk candidates are confirmed by a SAMPLED LLM verdict (advisory, not exhaustive) and degrade to heuristic-only when no model is configured. It flags the at-least-once double-apply SHAPE, not a runtime proof of a duplicate effect.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

The LLM boundary

LLM-set scores this run (5): D19, D21, D24, ED5, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

D1 · Cyclomatic Complexity6.1 / 10Adequate✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

Maturity: Documented → Verified → Prevented · effective 6.1 / 10 · rule-coverage 100% · ceiling Prevented

140 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was initGlobalSearch at 92. A further 7 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being Extensions.IsPublicAddress at 45 — they are counted neither in the figure above nor in this dimension's score. 3 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: BTCPayServer/SearchString.cs (SearchString.GetDateRangeDate at 27), BTCPayServer/wwwroot/payment-request/app.js (app.document.addEventListener("DOMContentLoaded") at 24), BTCPayServer.Common/Shims.cs (AnsiLogConsole.GetForegroundColorEscapeCode at 16). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

(anonymous)::calculation (cyclomatic 24) · ×2REDACTED:33
UISubscriberPortalController.SubscriberPortal (cyclomatic 22) · ×2REDACTED:36
initGlobalSearch (cyclomatic 92)BTCPayServer/wwwroot/plugins/GlobalSearch/global-search.js:6
InvoiceData.TryMigrate (cyclomatic 80)BTCPayServer.Data/Data/InvoiceData.Migration.cs:47
PayJoinEndpointController.Submit (cyclomatic 79)REDACTED:131

+ 127 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 8 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with initGlobalSearch (cyclomatic 92), global-search.initGlobalSearch (cyclomatic 89), InvoiceData.TryMigrate (cyclomatic 80). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 8 together lifts Cyclomatic Complexity from 6.1 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity5.0 / 10Adequate✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

Maturity: Documented → Verified → Prevented · effective 5.0 / 10 · rule-coverage 100% · ceiling Prevented

196 method(s) exceeded the cognitive complexity threshold of 15; the worst was InvoiceData.TryMigrate at 119.

(anonymous)::calculation (cognitive 37) · ×3REDACTED:33
(anonymous) (cognitive 22) · ×2BTCPayServer/wwwroot/js/form-editor.js:1
InvoiceData.TryMigrate (cognitive 119)BTCPayServer.Data/Data/InvoiceData.Migration.cs:47
PayJoinEndpointController.Submit (cognitive 109)REDACTED:131
initGlobalSearch (cognitive 97)BTCPayServer/wwwroot/plugins/GlobalSearch/global-search.js:6

+ 179 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 16 bodies over 60 down to 60 or less in Cognitive Complexity — start with InvoiceData.TryMigrate (cognitive 119), PayJoinEndpointController.Submit (cognitive 109), initGlobalSearch (cognitive 97). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 16 together lifts Cognitive Complexity from 5.0 to about 6.0/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes8.0 / 10Strong✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

Maturity: Documented → Verified → Prevented · effective 8.0 / 10 · rule-coverage 100% · ceiling Prevented

74 god class(es) detected.

MethodTooLong: BTCPayServerServices.AddBTCPayServer · ×20BTCPayServer/Hosting/BTCPayServerServices.cs:87
FileTooLong: Controllers/UIWalletsController.cs · ×20BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs
ClassTooLong: UILNURLController · ×13REDACTED
TooManyMethods: BTCPayServerClient · ×12REDACTED
FunctionTooLong: global-search.initGlobalSearch · ×9BTCPayServer/wwwroot/plugins/GlobalSearch/global-search.js:6

What to do

  1. Resolve the 20 MethodTooLong finding(s) in God Classes — start with UIWalletsController.cs (2), UIInvoiceController.UI.cs (2), UIWalletsController.PSBT.cs (2). — One of this dimension's main actionable groups (20 warning-level).
  2. Resolve the 20 FileTooLong finding(s) in God Classes — start with UIWalletsController.cs, UIInvoiceController.UI.cs, PullPaymentHostedService.cs. — One of this dimension's main actionable groups (20 warning-level).
  3. Resolve the 13 ClassTooLong finding(s) in God Classes — start with REDACTED, MigrationStartupTask.cs, GreenfieldStoreOnChainWalletsController.cs. — One of this dimension's main actionable groups (13 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication9.8 / 10Stronggated by 46 serious findings✓ Tool-verified

What it measures: Copy-pasted code that should be shared instead.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Verified

46 duplicated block group(s) detected.

Duplicated block (10 lines × 2) · ×6BTCPayServer/Data/Payouts/BitcoinLike/BitcoinLikePayoutHandler.cs:220
Duplicated block (7 lines × 2) · ×5REDACTED:437
Duplicated block (6 lines × 2) · ×5BTCPayServer/Plugins/Wallets/Controllers/GreenfieldStoreOnChainWalletsController.cs:781
Duplicated block (5 lines × 2) · ×5BTCPayServer/HostedServices/PendingTransactionService.cs:306
Duplicated block (14 lines × 2) · ×4BTCPayServer/Controllers/GreenField/GreenfieldStoresController.cs:148

+ 13 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 6 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with BitcoinLikePayoutHandler.cs, LnurlAuthService.cs, UIFormsController.cs. — One of this dimension's main actionable groups (6 warning-level).
  2. Resolve the 5 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with REDACTED, StoreRepository.cs, UIStoresController.Roles.cs. — One of this dimension's main actionable groups (5 warning-level).
  3. Resolve the 5 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with GreenfieldStoreOnChainWalletsController.cs (2), UIPluginManagerController.cs, PaymentData.Migration.cs. — One of this dimension's main actionable groups (5 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

D5 · Coupling9.2 / 10Stronggated by 1 serious finding✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 9.2 / 10 · rule-coverage 100% · ceiling Prevented

10 projects, 0 dependency cycle(s), 0 unstable depended-on project(s).

Off the main sequence: BTCPayServer.ClientBTCPayServer.Client/BTCPayServer.Client.csproj:1
Off the main sequence: BTCPayServer.CommonBTCPayServer.Common/BTCPayServer.Common.csproj:1

What to do

  1. Resolve the 1 Off the main sequence finding(s) in Coupling — start with BTCPayServer.Client.csproj. — One of this dimension's main actionable groups (1 warning-level).
  2. Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.

D6 · Cohesion (LCOM4)9.9 / 10Stronggated by 3 serious findings✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Verified

3 of 304 classes have LCOM4 above 3.

Low cohesion: UIStoresController (LCOM4 8) · ×3BTCPayServer/Controllers/UIStoresController.cs:31

What to do

  1. Resolve the 3 Low cohesion finding(s) in Cohesion (LCOM4) — start with UIStoresController.cs, REDACTED, PullPaymentHostedService.cs. — One of this dimension's main actionable groups (3 warning-level).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

D9 · Test Distribution2.0 / 10Critical✓ Tool-verified

What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.

Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.

Maturity: Documented → Verified → Prevented · effective 2.0 / 10 · rule-coverage 100% · ceiling Documented

417 test methods: 0 unit, 0 integration, 0 BDD, 417 e2e.

Inverted test pyramid

What to do

  1. Resolve the 1 Inverted test pyramid finding(s) in Test Distribution. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d9_recommendation.md · top locations in Appendix A, every location in findings.md.

D10 · Test Quality9.9 / 10Stronggated by 5 serious findings✓ Tool-verified

What it measures: Whether the tests truly assert behaviour rather than just running the code.

Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Prevented

1 skipped, 2 zero-assertion, 2 depending on a live external host, no mocking-framework packages referenced (hand-written doubles or no mocking) across 417 tests.

No assertions: CanConcurrentlyModifyWalletObject · ×2BTCPayServer.Tests/DatabaseTests.cs:24
Depends on a live external host: CheckJsContent · ×2BTCPayServer.Tests/ThirdPartyTests.cs:470
Skipped test: CanQueryMempoolFeeProviderBTCPayServer.Tests/ThirdPartyTests.cs:75

What to do

  1. Resolve the 2 No assertions finding(s) in Test Quality — start with DatabaseTests.cs, MultisigTests.cs. — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 2 Depends on a live external host finding(s) in Test Quality — start with ThirdPartyTests.cs, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 1 Skipped test finding(s) in Test Quality — start with ThirdPartyTests.cs. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.

D12 · Dependency Hygiene9.7 / 10Exemplary✓ Tool-verified

What it measures: Whether dependencies are current, secure, and not bloated.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 9.7 / 10 · rule-coverage 100% · ceiling Verified

6 outdated, 0 vulnerable, 0 deprecated packages.

Outdated: Fido2 · ×6

✓ On the Gold path — maintain.

Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · REDACTED Scanning0.0 / 10Critical✓ Tool-verified

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Prevented

3 secret(s) detected.

REDACTED

What to do

  1. Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 issue-level).
  2. Enforce REDACTED Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 257 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 48 direct `PackageReference`(s), and 202 further package(s) were reached beyond them by closing the graph over nuget.org's own nuspec dependency graph — so a banned licence pulled in only by a dependency's OWN dependencies is inside this verdict. A package whose licence nuget.org could not be asked for is not graded, and version ranges are taken at their lower bound, so this is the closure as that graph states it rather than a restored consumer's exact resolution.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.7 / 10Stronggated by 28 serious findings✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

Maturity: Documented → Verified → Prevented · effective 9.7 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: BTCPayServer/Controllers/UIInvoiceController.UI.cs (15×44=660); REDACTED (7×67=469); BTCPayServer/Hosting/BTCPayServerServices.cs (13×19=247)

Hotspot: BTCPayServer/Controllers/UIInvoiceController.UI.cs · ×28BTCPayServer/Controllers/UIInvoiceController.UI.cs:773

What to do

  1. Resolve the 28 Hotspot finding(s) in Churn × Complexity Hotspots — start with UIInvoiceController.UI.cs, REDACTED, BTCPayServerServices.cs. — One of this dimension's main actionable groups (28 warning-level).

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.

D16 · Bus Factor8.2 / 10Strong✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

Maturity: Documented → Verified → Prevented · effective 8.2 / 10 · rule-coverage 100% · ceiling Documented

73 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is BTCPayServer/Extensions.cs. Counted over 410 of the 1177 production source files in this repository: 763 are under the ~2,400-byte size floor this dimension measures over, and the remaining 4 have no attributable history left to measure.

Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)

What to do

  1. Resolve the 1 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.

D17 · Explicit Debt6.3 / 10Adequate✓ Tool-verified

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

Maturity: Documented → Verified → Prevented · effective 6.3 / 10 · rule-coverage 100% · ceiling Prevented

243 deducted debt markers + 76 dead symbols across 106281 LoC in the .NET projects (1.8/KLoC) → score 6.3.

EmptyCatchBlock · ×75BTCPayServer.Client/JsonConverters/SaneOutpointJsonConverter.cs:30
WriteOnlyPrivateField · ×45BTCPayServer.Rating/Providers/HttpClientRequestMaker.cs:95
NoWarnInCsproj — 13 warning codes suppressed in one element · ×7Build/Common.csproj:4
FileScopedPragmaDisable · ×3BTCPayServer.Tests/BitpayTests.cs:129
Dead code: SearchTermRouteKey · ×76BTCPayServer/Components/DateRangeSelector/DateRangeSelector.cs:26

+ 8 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 75 EmptyCatchBlock finding(s) in Explicit Debt — start with Extensions.cs (4), UIWalletsController.PSBT.cs (4), ConsoleLogger.cs (2). — One of this dimension's main actionable groups (75 issue-level).
  2. Resolve the 45 WriteOnlyPrivateField finding(s) in Explicit Debt — start with MigrationStartupTask.cs (4), InvoiceWatcher.cs (3), LocalizerFactory.cs (3). — One of this dimension's main actionable groups (45 issue-level).
  3. Resolve the 7 NoWarnInCsproj finding(s) in Explicit Debt — start with BTCPayServer.Tests.csproj (3), Common.csproj, BTCPayServer.PluginPacker.csproj. — One of this dimension's main actionable groups (7 issue-level).
  4. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.

D18 · Solution Shape10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the solution is laid out in a sensible, conventional structure.

Method: Solution structure: project count, decomposition, shell-project detection, build success (confirmed failures cap the score); traced to actual .sln files and binaries. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

8 projects, 1276 source files, 140474 hand-written lines of code (106281 production / 34193 test — the split is derived per file: test is what its project, its own path, or a compile-guarded region marks as test, and a file carrying no test signal counts as production), plus 6033 generated (machine-written code — designer, scaffolded and tool-emitted files — excluded from quality), 11 inter-project edges.

✓ On the Gold path — maintain.

Detailed fixes: d18_recommendation.md.

D19 · Documentation QualityExemplary◐ Sampled · advisory

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

Maturity: Documented → Verified → Prevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Documented

The repository's README files are clear and complete for the directory they document (self-hosted BTCPay Server), with a strong overview plus links to audience-specific docs. The architecture/Docs markdown set is well-organized and extensive, covering every documented project. XML-doc coverage is low (<3%), reflecting the documentation quality of the source rather than the repository's own structure. The repository's documentation is comprehensive and well-structured: the README files (each directory's own) are excellent at describing what they contain and how to use them, with a strong coding conventions document covering formatting, exception handling, PR-style descriptions, BEM selectors, Razor localization, and a Greenfield API maintenance guide that explains controller placement, authentication scopes, serialization, and OpenAPI. The maintainers/local-development.md guide is an authoritative build/run/run-with-HTTPS/altcoins setup plus testing commands, while the translations guide covers language packs, translation creation, and the host-integration discovery contract. A full architecture/design docs set (23 markdown files) would ideally explain how each of these tiers interacts, but they are not visible in this summary. The visible content is clear, complete, and well-organized. The Greenfield API documentation is clear and complete for its readers — the READMEs cover authentication, endpoint implementation, compatibility rules, examples, and invoice metadata with well-structured headings. The architecture/Docs markdown files (23) provide deeper coverage of the system's design, which would be ideal for an enterprise project but are not shown in this summary. Coverage figures are below 5% for BTCPayServer.Common, Data, Client, and Abstractions namespaces, so those gaps lie outside the visible documentation.

Documentation: no installation or build instructions · ×3docs/README.md
XML-doc coverage: BTCPayServer · ×6BTCPayServer/BTCPayServer.csproj

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs found

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

Maturity: Documented → Verified → Prevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Verified

0 naming inconsistencies across 200 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D24 · Comment ValueExemplary◐ Sampled · advisory

What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).

Method: Judged by language model at low temperature (0.0-0.1) on deterministically sampled inline comments with surrounding code; findings verified back to sampled comments by substring match. Advisory, sampled.

Maturity: Documented → Verified → Prevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Documented

157 valuable / 2 redundant across 200 sampled comments; 2 shown with locations.

redundant comment · ×2BTCPayServer.Abstractions/Contracts/IBTCPayServerPlugin.cs:34

✓ On the Gold path — maintain.

Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.

D26 · Project Cohesion8.0 / 10Strong✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic, LLM-independent.

Maturity: Documented → Verified → Prevented · effective 8.0 / 10 · rule-coverage 100% · ceiling Documented

1 of 10 projects flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.

D27 · Navigability1.0 / 10Critical✓ Tool-verified

What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

Maturity: Documented → Verified → Prevented · effective 1.0 / 10 · rule-coverage 100% · ceiling Documented

79 % of calls cross a namespace and 3 % go through an interface, but 28 % of collaborators are co-located — so following a call takes several hops. Baseline: large — vertical-slice locality expected.

Scattered collaborators
Pass-through layerBTCPayServer/Plugins/PluginServiceCollection.cs:8

What to do

  1. Resolve the 1 Scattered collaborators finding(s) in Navigability. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 Pass-through layer finding(s) in Navigability — start with PluginServiceCollection.cs. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d27_recommendation.md · top locations in Appendix A, every location in findings.md.

D28 · Secrets (history)3.0 / 10Weak✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

Maturity: Documented → Verified → Prevented · effective 3.0 / 10 · rule-coverage 100% · ceiling Documented

7 finding(s): 0 critical, 7 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 5 REDACTED finding(s) in Secrets (history) — start with REDACTED (3), REDACTED, REDACTED. — One of this dimension's main actionable groups (5 issue-level).
  2. Resolve the 2 High secret finding(s) in Secrets (history) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
  3. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.

D29 · Static Analysis (SAST)0.0 / 10Critical✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

136 finding(s): 0 critical, 23 high, 113 medium, 0 low. 18 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 218 file(s) — `.github/scripts/check-btcpay-plugin-compat.sh` (line 193, line 194), `BTCPayServer.Abstractions/Contracts/BasePluginDbContext.cs` (line 13), `BTCPayServer.Abstractions/Contracts/VersionCondition.cs` (lines 6–97, line 138, line 141), `BTCPayServer.Abstractions/Models/LayoutModel.cs` (line 15), `BTCPayServer.Abstractions/Security/PolicyRequirement.cs` (line 8), … (+213 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. In 211 of those file(s) — `BTCPayServer.Abstractions/Contracts/BasePluginDbContext.cs`, `BTCPayServer.Abstractions/Contracts/VersionCondition.cs`, `BTCPayServer.Abstractions/Models/LayoutModel.cs`, `BTCPayServer.Abstractions/Security/PolicyRequirement.cs`, `BTCPayServer.Abstractions/TagHelpers/PermissionTagHelper.cs`, … (+206 more) — the break is a C# primary constructor, which semgrep's grammar cannot parse and which hides the type from every rule scoped to it; those files were re-scanned from a shadow copy with the constructor's parameter list blanked (line and column preserving), which restores the type to the rules, and 16 additional row(s) came from that pass. Only the header's own parameter list is unread in them. In 8 of those file(s) — `BTCPayServer.Tests/LanguageServiceTests.cs`, `BTCPayServer.Tests/MultisigTests.cs`, `BTCPayServer.Tests/POSTests.cs`, `BTCPayServer.Tests/PluginManagerPlaywrightTests.cs`, `BTCPayServer.Tests/SubscriptionTests.cs`, … (+3 more) — the break is at a TYPE DECLARATION (a C# primary constructor semgrep's grammar cannot parse), so the loss is wider than the named lines: rules scoped to that type see no type to scope to and are blind over its whole body, while rules matching statements keep working there. Absence of a type-scoped finding in those types is not evidence of anything.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 10 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. No action in Static Analysis (SAST) — all 18 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (18 issue-level, 0 of them charged here).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No known-vulnerable dependencies in any ecosystem this repository declares.

✓ On the Gold path — maintain.

Detailed fixes: d30_recommendation.md.

D31 · IaC & Container Security9.3 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 9.3 / 10 · rule-coverage 100% · ceiling Documented

5 finding(s): 0 critical, 1 high, 4 medium, 0 low.

REDACTED
REDACTED

What to do

  1. Resolve the 1 High IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 4 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (4). — One of this dimension's main actionable groups (4 warning-level).

Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.

D32 · Data Compliance (PII/GDPR)9.0 / 10Stronggated by 1 serious finding✓ Tool-verified

What it measures: Likely personal-data (PII / GDPR) handling concerns — logging or storing data without safeguards.

Method: Heuristic PII/GDPR LEAK scan via semgrep across the repo, using Watchdog's own ruleset: personal data crossing a boundary it should not — reaching a log/console sink, a URL or query string, or unprotected browser storage. Matches map to severity and a 0-10 wide normalizer. A clean sweep is unscored rather than an unearned 10, and is a statement about the leak paths checked only — this dimension does not inventory the personal data a repository holds (the personal-data map and the C1-C5 compliance cards do that), so it never reports that a repository has no personal-data surface. Reported LOUDLY as a measurement gap if the ruleset is missing from the analyzer image. Exhaustive over the leak paths, advisory-leaning; degrades on parse failure.

Maturity: Documented → Verified → Prevented · effective 9.0 / 10 · rule-coverage 100% · ceiling Documented

1 finding(s): 0 critical, 0 high, 1 medium, 0 low. semgrep could not parse 176 file(s) — `BTCPayServer.Abstractions/Contracts/BasePluginDbContext.cs`, `BTCPayServer.Abstractions/Contracts/VersionCondition.cs`, `BTCPayServer.Abstractions/Models/LayoutModel.cs`, `BTCPayServer.Abstractions/Security/PolicyRequirement.cs`, `BTCPayServer.Abstractions/TagHelpers/PermissionTagHelper.cs`, … (+171 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.

REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Data Compliance (PII/GDPR) — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d32_recommendation.md · top locations in Appendix A, every location in findings.md.

D34 · Knowledge Freshness9.6 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

Maturity: Documented → Verified → Prevented · effective 9.6 / 10 · rule-coverage 100% · ceiling Documented

13 of 414 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is BTCPayServer/Services/Reporting/PaymentRequestsReportProvider.cs. Counted over 414 of the 1177 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×13BTCPayServer/Services/Reporting/PaymentRequestsReportProvider.cs:1
Orphaned files with no living knowledge

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling9.8 / 10Stronggated by 12 serious findings✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: BitcoinLikePaymentData.cs↔LightningLikePaymentData.cs 70%; LightningLikePaymentData.cs↔InvoiceEntity.cs 70%; BitcoinLikePaymentData.cs↔InvoiceEntity.cs 63%

Change coupling: BitcoinLikePaymentData.cs ↔ LightningLikePaymentData.cs · ×11BTCPayServer/Payments/Bitcoin/BitcoinLikePaymentData.cs:1
Change-coupling hub: UIInvoiceController.UI.cs → CheckoutAppearanceViewModel.cs, BitcoinLikePaymentData.cs, BitpayCreateInvoiceRequest.csBTCPayServer/Controllers/UIInvoiceController.UI.cs

What to do

  1. Resolve the 11 Change coupling finding(s) in Change Coupling — start with BitcoinLikePaymentData.cs (2), LightningLikePaymentData.cs, REDACTED. — One of this dimension's main actionable groups (11 warning-level).
  2. Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with UIInvoiceController.UI.cs. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D36 · Supply-chain Provenance & Signing0.0 / 10Critical✓ Tool-verified

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

0/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 1 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

D39 · IL Efficiency9.9 / 10Exemplary✓ Tool-verified

Method: IL instruction count per method, read from the BUILT first-party assemblies via Mono.Cecil (the target is compiled on a deep run); scored on the fraction of methods whose emitted IL body exceeds the size threshold. Sees compiler-generated bloat source can't; not-applicable when the target fails to build. Deterministic.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Verified

35 of 8357 first-party methods have an oversized IL body.

IL efficiency: 35 authored method(s) exceed the IL budgetBTCPayServer.Data/Data/InvoiceData.Migration.cs:49

✓ On the Gold path — maintain.

Detailed fixes: d39_recommendation.md · top locations in Appendix A, every location in findings.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 3 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AC1 · Text alternatives5.8 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.

  • An svg presented as an image needs a name — add a <title> child or an aria-label/aria-labelledby. (×4) — BTCPayServer/Blazor/Icon.razor:0, BTCPayServer/Components/Icon/Default.cshtml:0, BTCPayServer/Components/MainLogo/Default.cshtml:0, …

What to do

  • Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
AC2 · Forms & labels5.6 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×9) — BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:9, BTCPayServer/Plugins/Bitpay/Views/CreateToken.cshtml:43, BTCPayServer/Plugins/Crowdfund/Views/UpdateCrowdfund.cshtml:182, …
  • This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. (×10) — BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:10, BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:19, BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:22, …
  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. (×6) — BTCPayServer/Components/LabelManager/Default.cshtml:39, BTCPayServer/Components/SearchStringInput/Default.cshtml:4, BTCPayServer/Plugins/DynamicDNS/Views/DynamicDnsService.cshtml:35, …
  • A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label. (×6) — BTCPayServer/Components/StoreSelector/Default.cshtml:25, BTCPayServer/Components/StoreSelector/Default.cshtml:29, REDACTED:42, …
  • A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). (×6) — REDACTED:34, BTCPayServer/Plugins/Bitpay/Views/RequestPairing.cshtml:17, BTCPayServer/Plugins/PointOfSale/Views/Public/Cart.cshtml:28, …
  • This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×3) — BTCPayServer/Plugins/Multisig/VaultBridge/Elements/MultisigXPubSelect.razor:12, BTCPayServer/Plugins/PayButton/Views/PayButton.cshtml:264, BTCPayServer/Plugins/PayButton/Views/PayButton.cshtml:275

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure5.3 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. (×27) — BTCPayServer/Plugins/Bitpay/Views/ListTokens.cshtml:44, BTCPayServer/Plugins/Bitpay/Views/ShowToken.cshtml:10, BTCPayServer/Plugins/Crowdfund/Views/Public/ViewCrowdfund.cshtml:90, …
  • A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope). (×2) — BTCPayServer/Plugins/PointOfSale/Views/Public/Cart.cshtml:116, BTCPayServer/Plugins/PointOfSale/Views/Public/Cart.cshtml:185
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×6) — BTCPayServer/Plugins/PointOfSale/Views/Public/_Layout.cshtml:37, BTCPayServer/Plugins/Subscriptions/Views/UIPlanCheckout/PlanCheckout.cshtml:16, BTCPayServer/Plugins/Subscriptions/Views/UIPlanCheckout/PlanCheckoutDefaultRedirect.cshtml:11, …
  • An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative. (×2) — BTCPayServer/Views/Shared/_Footer.cshtml:56, BTCPayServer/Views/UIInvoice/Checkout.cshtml:54
  • The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). (×2) — BTCPayServer/Views/UIHome/SwaggerDocs.cshtml:8, BTCPayServer/Views/UIHome/SwaggerDraftDocs.cshtml:8
  • A document must expose only one main landmark. Multiple visible <main> (or role="main") elements confuse the landmark map and the "skip to content" target. Keep one; remove or hide the rest. — BTCPayServer/Views/UIInvoice/Checkout.cshtml:19

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC4 · Keyboard semantics1.3 / 10Critical✓ Tool-verified

Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".

  • A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler. (×13) — BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:10, BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:19, BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:22, …
  • The repo's own CSS styles .dropdown-toggle with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. (×6) — BTCPayServer/Components/InvoiceStatus/Default.cshtml:19, BTCPayServer/Plugins/Subscriptions/Views/Components/SubscriberStatus/Default.cshtml:25, BTCPayServer/Plugins/Subscriptions/Views/UIOffering/Offering.cshtml:110, …
  • The repo's own CSS styles .btn with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. — BTCPayServer/Plugins/Crowdfund/Views/Public/ContributeForm.cshtml:14
  • This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. — BTCPayServer/Plugins/Maintenance/Components/MaintenanceCommands.razor:61
  • An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action. (×3) — BTCPayServer/Plugins/Subscriptions/Views/UIOffering/ConfigureOffering.cshtml:95, BTCPayServer/Plugins/Subscriptions/Views/UIOffering/CreateOffering.cshtml:15, BTCPayServer/Views/UIFido2/Create.cshtml:49
  • The repo's own CSS styles .form-control with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. — BTCPayServer/Plugins/Subscriptions/Views/UIOffering/Offering.cshtml:427
  • The repo's own CSS styles .cursor-pointer with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. (×3) — REDACTED:30, REDACTED:86, REDACTED:136

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC5 · ARIA correctness7.5 / 10Strong✓ Tool-verified

Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.

Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • A plain <span> has the implicit role "generic", which supports no ARIA states, so this aria-expanded is dropped and assistive tech is never told the state at all. Put aria-expanded on the element that owns the behaviour (the button or control the user operates), or give this <span> a role that supports aria-expanded. (×6) — BTCPayServer/Components/InvoiceStatus/Default.cshtml:19, BTCPayServer/Plugins/Subscriptions/Views/Components/SubscriberStatus/Default.cshtml:25, BTCPayServer/Plugins/Subscriptions/Views/UIOffering/Offering.cshtml:110, …

What to do

  • Use valid, non-abstract roles, supply the ARIA state each role requires, and never put aria-hidden on a focusable element.
AC6 · Visual & motion safety4.8 / 10Weak✓ Tool-verified

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • `.success-icon` moves (`animation: pulse 2s infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — BTCPayServer/Plugins/Subscriptions/Views/UIPlanCheckout/PlanCheckoutDefaultRedirect.cshtml:49
  • `#RecentTransactionsToggle` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — BTCPayServer/wwwroot/pos/cart.css:53
  • `#globalNav .globalSearch-input:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — BTCPayServer/wwwroot/plugins/GlobalSearch/global-search.css:68
  • `#mainMenuHead .mainMenuButton` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — BTCPayServer/wwwroot/main/layout.css:46, BTCPayServer/wwwroot/main/rtl/layout.rtl.css:46
  • `#globalNav .globalNav-btn` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — BTCPayServer/wwwroot/main/layout.css:163, BTCPayServer/wwwroot/main/rtl/layout.rtl.css:163
  • `#mainNav` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — BTCPayServer/wwwroot/main/layout.css:717, BTCPayServer/wwwroot/main/rtl/layout.rtl.css:759
  • `.ts-wrapper.form-control .ts-control` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — BTCPayServer/wwwroot/main/site.css:911, BTCPayServer/wwwroot/main/rtl/site.rtl.css:911
  • `.form-control-plaintext:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — BTCPayServer/wwwroot/main/bootstrap/bootstrap.css:2144, BTCPayServer/wwwroot/main/bootstrap/bootstrap.rtl.css:2142
  • `.form-range:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — BTCPayServer/wwwroot/main/bootstrap/bootstrap.css:2447, BTCPayServer/wwwroot/main/bootstrap/bootstrap.rtl.css:2445
  • `.btn-check:focus-visible + .btn` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — BTCPayServer/wwwroot/main/bootstrap/bootstrap.css:2995, BTCPayServer/wwwroot/main/bootstrap/bootstrap.rtl.css:2993
  • `.modal` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — BTCPayServer/wwwroot/main/bootstrap/bootstrap.css:5543, BTCPayServer/wwwroot/main/bootstrap/bootstrap.rtl.css:5541
  • `.modal-content` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — BTCPayServer/wwwroot/main/bootstrap/bootstrap.css:5596, BTCPayServer/wwwroot/main/bootstrap/bootstrap.rtl.css:5594
  • `.carousel-control-prev:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — BTCPayServer/wwwroot/main/bootstrap/bootstrap.css:6190, BTCPayServer/wwwroot/main/bootstrap/bootstrap.rtl.css:6172
  • `.offcanvas-sm` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — BTCPayServer/wwwroot/main/bootstrap/bootstrap.css:6366, BTCPayServer/wwwroot/main/bootstrap/bootstrap.rtl.css:6348
  • `.offcanvas-md` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — BTCPayServer/wwwroot/main/bootstrap/bootstrap.css:6438, BTCPayServer/wwwroot/main/bootstrap/bootstrap.rtl.css:6420
  • `.offcanvas-lg` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — BTCPayServer/wwwroot/main/bootstrap/bootstrap.css:6510, BTCPayServer/wwwroot/main/bootstrap/bootstrap.rtl.css:6492
  • `.offcanvas-xl` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — BTCPayServer/wwwroot/main/bootstrap/bootstrap.css:6582, BTCPayServer/wwwroot/main/bootstrap/bootstrap.rtl.css:6564
  • `.offcanvas-xxl` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — BTCPayServer/wwwroot/main/bootstrap/bootstrap.css:6654, BTCPayServer/wwwroot/main/bootstrap/bootstrap.rtl.css:6636
  • `.offcanvas` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — BTCPayServer/wwwroot/main/bootstrap/bootstrap.css:6725, BTCPayServer/wwwroot/main/bootstrap/bootstrap.rtl.css:6707
  • `#RecentTransactionsRefresh[disabled] .icon` moves (`animation: 1.25s linear infinite spinner-border`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — BTCPayServer/wwwroot/pos/common.css:28
  • `#globalNav .globalSearch-shell.is-loading .globalSearch-bar::after` moves (`animation: global-search-spin .8s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — BTCPayServer/wwwroot/plugins/GlobalSearch/global-search.css:116
  • `[aria-expanded] > .icon-caret-down` moves (`transition: transform 0.2s ease-in-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. (×2) — BTCPayServer/wwwroot/main/site.css:130, BTCPayServer/wwwroot/main/rtl/site.rtl.css:130
  • `#wizard-navbar a::after` moves (`transition: background-color .2s, transform .2s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — BTCPayServer/wwwroot/main/wizard.css:37

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified

Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.

Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.

Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.

  • No accessibility enforcement found — no automated accessibility check runs over the HTML your app renders. Assert the accessibility invariants over that HTML in the test suite you already have (parse the output and assert, or drive a browser), and gate that test in CI so a regression blocks the merge. What was searched, so you can tell an absence from a miss: the 298 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.

What to do

  • Enforce accessibility in the test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.
AX1 · Captive dependencies7.4 / 10Strong✓ Tool-verified

Other · Architecture — Whether any singleton service captures a scoped/transient dependency — a silent lifetime/threading bug.

Method: Roslyn scan: DI registrations parsed from AddSingleton/Scoped/Transient; each singleton checked for captured shorter-lifetime dependencies. Exhaustive, deterministic.

  • `PaymentRequestService` is registered as a SINGLETON but its constructor takes `DisplayFormatter displayFormatter`, which is registered as Transient. The singleton captures one instance of the transient dependency forever — defeating its lifetime (a per-request DbContext shared across all requests is a classic data-corruption/threading bug). Make the singleton resolve `DisplayFormatter` per-use (inject `IServiceScopeFactory` or a factory func), or align the lifetimes. — BTCPayServer/PaymentRequest/PaymentRequestService.cs:29
  • `PullPaymentHostedService` is registered as a SINGLETON but its constructor takes `DisplayFormatter displayFormatter`, which is registered as Transient. The singleton captures one instance of the transient dependency forever — defeating its lifetime (a per-request DbContext shared across all requests is a classic data-corruption/threading bug). Make the singleton resolve `DisplayFormatter` per-use (inject `IServiceScopeFactory` or a factory func), or align the lifetimes. — BTCPayServer/HostedServices/PullPaymentHostedService.cs:320
  • `CrowdfundAppType` is registered as a SINGLETON but its constructor takes `DisplayFormatter displayFormatter`, which is registered as Transient. The singleton captures one instance of the transient dependency forever — defeating its lifetime (a per-request DbContext shared across all requests is a classic data-corruption/threading bug). Make the singleton resolve `DisplayFormatter` per-use (inject `IServiceScopeFactory` or a factory func), or align the lifetimes. — BTCPayServer/Plugins/Crowdfund/CrowdfundPlugin.cs:63
  • `CrowdfundAppType` is registered as a SINGLETON but its constructor takes `IHttpContextAccessor httpContextAccessor`, which is registered as Scoped. The singleton captures one instance of the scoped dependency forever — defeating its lifetime (a per-request DbContext shared across all requests is a classic data-corruption/threading bug). Make the singleton resolve `IHttpContextAccessor` per-use (inject `IServiceScopeFactory` or a factory func), or align the lifetimes. — BTCPayServer/Plugins/Crowdfund/CrowdfundPlugin.cs:64
  • `EmailsTranslationProvider` is registered as a SINGLETON but its constructor takes `EmailTriggerViewModels viewModels`, which is registered as Transient. The singleton captures one instance of the transient dependency forever — defeating its lifetime (a per-request DbContext shared across all requests is a classic data-corruption/threading bug). Make the singleton resolve `EmailTriggerViewModels` per-use (inject `IServiceScopeFactory` or a factory func), or align the lifetimes. — BTCPayServer/Plugins/Emails/EmailsTranslationProvider.cs:11
  • `PointOfSaleAppType` is registered as a SINGLETON but its constructor takes `DisplayFormatter displayFormatter`, which is registered as Transient. The singleton captures one instance of the transient dependency forever — defeating its lifetime (a per-request DbContext shared across all requests is a classic data-corruption/threading bug). Make the singleton resolve `DisplayFormatter` per-use (inject `IServiceScopeFactory` or a factory func), or align the lifetimes. — BTCPayServer/Plugins/PointOfSale/PointOfSalePlugin.cs:57

What to do

  • Don't inject scoped/transient services into singletons; resolve them per-use via IServiceScopeFactory or a factory delegate, or align the lifetimes.
AX10 · Code composition6.4 / 10Adequate✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
AX2 · Stateful singletons6.0 / 10Adequate✓ Tool-verified

Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.

Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.

  • `SelectedChains` is a singleton (one shared instance) but mutates instance state outside any lock (chains; e.g. `chains` at line 49). — BTCPayServer.Common/SelectedChains.cs:8
  • `Logs` is a singleton (one shared instance) but mutates instance state outside any lock (Configuration, PayServer, Events; e.g. `Configuration` at line 19). — BTCPayServer.Common/Logging/Logs.cs:7
  • `SettingsAccessor` is a singleton (one shared instance) but mutates instance state outside any lock (_settings; e.g. `_settings` at line 30). — BTCPayServer/Services/ISettingsAccessor.cs:17
  • `TorServices` is a singleton (one shared instance) but mutates instance state outside any lock (firstRun, Services; e.g. `firstRun` at line 34). — BTCPayServer/Services/TorServices.cs:15
  • `BTCPayServerOptions` is a singleton (one shared instance) but mutates instance state outside any lock (NetworkType, DockerDeployment, TorrcFile, TorServices, SocksEndpoint, UpdateUrl; e.g. `NetworkType` at line 59). — BTCPayServer/Configuration/BTCPayServerOptions.cs:13
  • `NBXplorerListener` is a singleton (one shared instance) but mutates instance state outside any lock (_PollInterval; e.g. `_PollInterval` at line 75). — BTCPayServer/Payments/Bitcoin/NBXplorerListener.cs:28
  • `LightningListener` is a singleton (one shared instance) but mutates instance state outside any lock (needCheckOfflinePayments, _PollInterval; e.g. `needCheckOfflinePayments` at line 90). — BTCPayServer/Payments/Lightning/LightningListener.cs:31
  • `RatesHostedService` is a singleton (one shared instance) but mutates instance state outside any lock (_lastCacheDate; e.g. `_lastCacheDate` at line 99). — BTCPayServer/HostedServices/RatesHostedService.cs:18
  • `CurrencyNameTable` is a singleton (one shared instance) but mutates instance state outside any lock (_Currencies; e.g. `_Currencies` at line 92). — BTCPayServer.Rating/CurrencyNameTable.cs:64
  • `DelayedTransactionBroadcaster` is a singleton (one shared instance) but mutates instance state outside any lock (disabled; e.g. `disabled` at line 136). — BTCPayServer/Services/DelayedTransactionBroadcaster.cs:15
  • `ResultItemViewModel` is a singleton (one shared instance) but mutates instance state outside any lock (Aliases; e.g. `Aliases` at line 53). — BTCPayServer/Plugins/GlobalSearch/Views/GlobalSearchViewModel.cs:26
  • `ActionResultItemViewModel` is a singleton (one shared instance) but mutates instance state outside any lock (Aliases; e.g. `Aliases` at line 30). — BTCPayServer/Plugins/GlobalSearch/StaticSearchResultProvider.cs:14
  • `CheckHostCommandsHostedService` is a singleton (one shared instance) but mutates instance state outside any lock (_signalRegistration; e.g. `_signalRegistration` at line 31). — BTCPayServer/Plugins/Maintenance/CheckHostCommandsHostedService.cs:14
  • `LocalizerService` is a singleton (one shared instance) but mutates instance state outside any lock (_LoadedTranslations; e.g. `_LoadedTranslations` at line 44). — BTCPayServer/Plugins/Translations/LocalizerService.cs:23

What to do

  • Keep singletons stateless or back their state with thread-safe types (Concurrent*/Immutable*); otherwise concurrent callers race.
AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

  • The namespaces BTCPayServer.Abstractions.Contracts ↔ BTCPayServer.Abstractions.Models depend on each other. The lightest dependency in the cycle is BTCPayServer.Abstractions.Contracts → BTCPayServer.Abstractions.Models (BTCPayServer.Abstractions.Contracts.BaseDbContextFactory → BTCPayServer.Abstractions.Models.DatabaseOptions, 2 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — BTCPayServer.Abstractions/Contracts/BaseDbContextFactory.cs:3
  • The namespaces BTCPayServer.Client ↔ BTCPayServer.Client.Models depend on each other. The lightest dependency in the cycle is BTCPayServer.Client.Models → BTCPayServer.Client (BTCPayServer.Client.Models.ApiKeyData → BTCPayServer.Client.Permission, 2 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — BTCPayServer.Client/Models/ApiKeyData.cs:7
  • The namespaces (global) ↔ BTCPayServer ↔ BTCPayServer.Common ↔ BTCPayServer.Components.AppSales ↔ BTCPayServer.Components.LabelSelector ↔ BTCPayServer.Configuration ↔ BTCPayServer.Controllers ↔ BTCPayServer.Controllers.GreenField ↔ BTCPayServer.Data ↔ BTCPayServer.Data.Subscriptions ↔ BTCPayServer.Events ↔ BTCPayServer.Fido2 ↔ BTCPayServer.Fido2.Models ↔ BTCPayServer.Forms ↔ BTCPayServer.Forms.Models ↔ BTCPayServer.HostedServices ↔ BTCPayServer.Logging ↔ BTCPayServer.Models ↔ BTCPayServer.Models.AccountViewModels ↔ BTCPayServer.Models.AppViewModels ↔ BTCPayServer.Models.InvoicingModels ↔ BTCPayServer.Models.ManageViewModels ↔ BTCPayServer.Models.NotificationViewModels ↔ BTCPayServer.Models.PaymentRequestViewModels ↔ BTCPayServer.Models.ServerViewModels ↔ BTCPayServer.Models.StoreReportsViewModels ↔ BTCPayServer.Models.StoreViewModels ↔ BTCPayServer.PaymentRequest ↔ BTCPayServer.Payments ↔ BTCPayServer.Payments.Bitcoin ↔ BTCPayServer.Payments.Lightning ↔ BTCPayServer.Payments.PayJoin ↔ BTCPayServer.PayoutProcessors ↔ BTCPayServer.Payouts ↔ BTCPayServer.Plugins ↔ BTCPayServer.Plugins.Crowdfund ↔ BTCPayServer.Plugins.Crowdfund.Controllers ↔ BTCPayServer.Plugins.Crowdfund.Models ↔ BTCPayServer.Plugins.Emails ↔ BTCPayServer.Plugins.Emails.HostedServices ↔ BTCPayServer.Plugins.Emails.Services ↔ BTCPayServer.Plugins.Emails.Views ↔ BTCPayServer.Plugins.GlobalSearch ↔ BTCPayServer.Plugins.Impersonation ↔ BTCPayServer.Plugins.Maintenance ↔ BTCPayServer.Plugins.Monetization ↔ BTCPayServer.Plugins.PointOfSale ↔ BTCPayServer.Plugins.Subscriptions ↔ BTCPayServer.Plugins.Translations ↔ BTCPayServer.Plugins.Wallets ↔ BTCPayServer.Plugins.Wallets.Views.ViewModels ↔ BTCPayServer.Plugins.Webhooks ↔ BTCPayServer.Plugins.Webhooks.Views ↔ BTCPayServer.Rating ↔ BTCPayServer.Security ↔ BTCPayServer.Security.Greenfield ↔ BTCPayServer.Services ↔ BTCPayServer.Services.Apps ↔ BTCPayServer.Services.Invoices ↔ BTCPayServer.Services.Labels ↔ BTCPayServer.Services.Notifications ↔ BTCPayServer.Services.PaymentRequests ↔ BTCPayServer.Services.Rates ↔ BTCPayServer.Services.Reporting ↔ BTCPayServer.Services.Stores ↔ BTCPayServer.Services.WalletFileParsing ↔ BTCPayServer.Services.Wallets ↔ BTCPayServer.Storage.Services ↔ BTCPayServer.Storage.Services.Providers ↔ BTCPayServer.Views.UIStoreMembership depend on each other. The lightest dependency in the cycle is (global) → BTCPayServer.Events (BitcoinLikePayoutHandler → BTCPayServer.Events.NewOnChainTransactionEvent, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — BTCPayServer/Data/Payouts/BitcoinLike/BitcoinLikePayoutHandler.cs:11
  • The namespaces BTCPayServer.Data.Payouts.LightningLike ↔ BTCPayServer.PayoutProcessors.Lightning depend on each other. The lightest dependency in the cycle is BTCPayServer.Data.Payouts.LightningLike → BTCPayServer.PayoutProcessors.Lightning (BTCPayServer.Data.Payouts.LightningLike.UILightningLikePayoutController → BTCPayServer.PayoutProcessors.Lightning.LightningAutomatedPayoutSenderFactory, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — BTCPayServer/Data/Payouts/LightningLike/UILightningLikePayoutController.cs:12

What to do

  • Break namespace cycles inside a project by moving the shared type to a namespace both sides can use, or by inverting the back edge behind an interface.
AX5 · Architecture & structure10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.

Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.

AX6 · Interface segregation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.

Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.

C1 · Data Protection6.5 / 10Adequate✓ Tool-verified

Other · Security — Whether sensitive data is encrypted at rest and in transit and keys are vaulted.

Method: Roslyn plus filesystem scan: encryption presence (EF ColumnEncryption, key-vault references, HTTPS enforcement) and key-derivation KDF detection. Deterministic.

  • No in-app HTTPS enforcement, but ForwardedHeaders / 127.0.0.1 binding indicates a reverse-proxy topology — adding UseHttpsRedirection in the app would be wrong in this layout. Verify the reverse proxy enforces TLS. — BTCPayServer/Hosting/Startup.cs:332

What to do

  • Strengthen data-at-rest protection: vault your keys (Azure Key Vault / AWS KMS / IDataProtector key ring) and encrypt the most sensitive columns (EF HasConversion encryption or provider-native column encryption) — partial coverage still leaves gaps.
C2 · Access Controls10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.

Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.

C3 · Audit Trail7.5 / 10Strong✓ Tool-verified

Other · Security — Whether changes to sensitive data are recorded (who, what, when) for compliance + incident response.

Method: Roslyn scan: audit-trail mechanism graded (SaveChanges interceptor/immutable AuditLog/[Audited] strong; bare IAuditable/AddAuditing weak). Deterministic.

  • An audit mechanism is present, but the trail is not yet complete — missing: an immutable audit-log / audit-trail type to write to, [Audited] per-entity coverage.

What to do

  • Back the audit convention with a structural mechanism: an EF SaveChanges interceptor (or equivalent) writing every sensitive change to an immutable audit log, and apply [Audited] to the entities that need a who-changed-what trail.
C4 · Data Retention9.0 / 10Exemplary✓ Tool-verified

Other · Security — Whether data has a defined lifetime — retention periods, TTLs, cleanup jobs (storage limitation).

Method: Roslyn scan: retention/TTL configuration presence in schema; CascadeDelete detected but not scored as retention control. Deterministic, gated by PII presence.

  • A retention mechanism is present, but the data-lifecycle is not yet complete — missing: a documented retention period / data-expiry.

What to do

  • Complete the data-lifecycle story: an expiry limit (a declared maximum age for the stored data — a retention-age setting, or a store-level TTL where your storage offers one), a scheduled purge/cleanup job that enforces it, and a documented retention period covering the personal data.
ED1 · Handler temporal coupling10.0 / 10Exemplary✓ Tool-verified

Other · Event-Driven — Whether event handlers stay asynchronous (no blocking remote HTTP/gRPC calls awaited inside a handler).

Method: Roslyn semantic scan (event-driven gated): event-handler bodies scanned for HTTP/gRPC invocations by resolved symbol type, not substring. Deterministic, semantic-resolved.

ED4 · Outbox / dual-write6.8 / 10Adequate✓ Tool-verified

Other · Event-Driven — Whether state changes and message publishes are atomic (a transactional outbox) rather than a crash-unsafe dual write.

Method: Roslyn semantic scan (event-driven gated): event-handler methods scanned for DB-save plus bus-publish without a transactional outbox reference. Deterministic, semantic-resolved.

  • `BitcoinLikePayoutHandler.UpdatePayoutsInProgress` writes to the database AND publishes to the message bus in the same flow, with no outbox referenced in this path. These two writes aren't atomic — a crash between them either loses the message (DB committed, publish failed) or emits a phantom event (publish succeeded, DB rolled back). Use the transactional outbox pattern — write the message to an outbox table in the SAME transaction as the state change, and dispatch it from there afterwards — or your platform's equivalent (a broker transaction, or an outbox library from your own ecosystem). — BTCPayServer/Data/Payouts/BitcoinLike/BitcoinLikePayoutHandler.cs:330
  • `BitcoinLikePayoutHandler.UpdatePayoutsFromTransaction` writes to the database AND publishes to the message bus in the same flow, with no outbox referenced in this path. These two writes aren't atomic — a crash between them either loses the message (DB committed, publish failed) or emits a phantom event (publish succeeded, DB rolled back). Use the transactional outbox pattern — write the message to an outbox table in the SAME transaction as the state change, and dispatch it from there afterwards — or your platform's equivalent (a broker transaction, or an outbox library from your own ecosystem). — BTCPayServer/Data/Payouts/BitcoinLike/BitcoinLikePayoutHandler.cs:377

What to do

  • Adopt the transactional outbox pattern so DB writes and message publishes commit atomically — no lost or phantom events on a crash.
ED5 · Idempotency10.0 / 10Exemplary◐ Sampled · advisory

Other · Readiness — Whether retry-prone mutations (command handlers + message/event consumers) are idempotent so an at-least-once redelivery or client retry doesn't double-apply the effect — heuristic at-risk detection confirmed by language model, advisory.

Method: Roslyn heuristic (any mutation, ungated): command handlers and message/event consumers that mutate persistent state without a visible idempotency guard (exists/dedup check, upsert, idempotency-key/inbox, conditional/versioned write, fixed-value set) flagged as at-risk; each at-risk candidate then confirmed or cleared by a language model as genuinely non-idempotent versus naturally-idempotent. Advisory without a model (heuristic-only, degraded), per-candidate judged with one.

Coverage: Population: retry-prone mutations — command handlers (CQRS write side) + message/event consumers (IConsumer/I*EventHandler) — that mutate persistent state; runs on any repo with mutations, not only event-driven ones. The at-risk subset (no obvious guard) is a HEURISTIC candidate set, each then LLM-JUDGED non-idempotent vs safe; a handler outside those conventions, or a guard the LLM can't confirm, is bounded by the sample. Degrades to heuristic-only when no model is configured.

GD1 · Unfinished & placeholder code10.0 / 10Exemplary✓ Tool-verified

Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.

  • A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface. (×2) — BTCPayServer/PayoutProcessors/BaseAutomatedPayoutProcessor.cs:96, BTCPayServer/Plugins/Subscriptions/SubscriptionsPlugin.cs:279
  • A placeholder string ("{ "... on every payment": "", "... o…") is still in shipped code — typical of generated boilerplate that was never filled in. — BTCPayServer/Plugins/Translations/Translations.Default.cs:12

What to do

  • Finish or delete NotImplementedException stubs and replace placeholder literals before shipping.
IC1 · Incompleteness & stubs6.8 / 10Adequate✓ Tool-verified

Other · Code Health — Unfinished work detected by code SHAPE, not keywords: members that only throw a "not implemented" exception, methods that take inputs and return a constant, async methods that never await, dead `if (false)` / `#if false` branches, and skeleton types most of whose members are holes. A real, objective slice of technical debt.

Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.

  • `GetInvoice` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs:128
  • `GetPaymentRequest` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — BTCPayServer/Controllers/GreenField/GreenfieldPaymentRequestsController.cs:61
  • `EditPullPayment` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — REDACTED:116
  • `GenerateAsync` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — BTCPayServer/Fido2/Fido2TokenProvider.cs:10
  • `ValidateAsync` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — BTCPayServer/Fido2/Fido2TokenProvider.cs:13
  • The first 2 statements of the `if` and of the `else` are identical, so they run on both paths regardless of the condition. Lift them above the `if` — leaving them duplicated inside makes the branches read as though they handled this differently. (×2) — BTCPayServer/HostedServices/PullPaymentHostedService.cs:765, BTCPayServer/Plugins/Monetization/MonetizationHostedService.cs:104
  • `Match` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — BTCPayServer/Payments/IPaymentFilter.cs:39
  • Both arms of `ChainName == ChainName.Mainnet ? … : …` are `"https://dogechain.info/tx/{0}"`, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition. — BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.Dogecoin.cs:29
  • `Execute` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. (×2) — BTCPayServer/Plugins/PluginManager/PluginService.cs:260, BTCPayServer/Plugins/PluginManager/PluginService.cs:264
  • `SetDefaultSettings` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — BTCPayServer/Plugins/Subscriptions/SubscriptionsPlugin.cs:279
  • `GenerateWalletConfirm` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — BTCPayServer/Plugins/Wallets/Controllers/UIStoreOnChainWalletsController.cs:429
  • `ReplaceWallet` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — BTCPayServer/Plugins/Wallets/Controllers/UIStoreOnChainWalletsController.cs:667
  • `ConfirmReplaceWallet` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — BTCPayServer/Plugins/Wallets/Controllers/UIStoreOnChainWalletsController.cs:686
  • `DeleteWallet` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — BTCPayServer/Plugins/Wallets/Controllers/UIStoreOnChainWalletsController.cs:704
  • `CancelPendingTransaction` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs:101
  • A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers). (×14) — BTCPayServer.Common/Logging/ConsoleLogger.cs:189, BTCPayServer.Data/ApplicationDbContext.cs:83, BTCPayServer.Data/ApplicationDbContext.cs:88, …
  • A test is skipped ("Fail on CI") — coverage that looks present but never runs in any gate. If it's an opt-in suite, document how it runs; otherwise re-enable or delete it. — BTCPayServer.Tests/ThirdPartyTests.cs:75
  • A placeholder e-mail address ("store@example.com") is still in shipped code — its domain is reserved for documentation, so anything sent here is undeliverable by construction. Replace it with the real address, or take it from configuration. (×2) — BTCPayServer/Plugins/Emails/Controllers/UIEmailControllerBase.cs:94, BTCPayServer/Plugins/Emails/Controllers/UIEmailControllerBase.cs:95
  • A placeholder value ("The name of the user (eg. John Doe)") is still in shipped code — sample/mock data that was never replaced with the real thing. (×2) — BTCPayServer/Plugins/Emails/EmailsPlugin.cs:222, BTCPayServer/Plugins/Emails/StoreMailTriggers.cs:25
  • A placeholder value ("The formatted mailbox address to use whe…") is still in shipped code — sample/mock data that was never replaced with the real thing. (×4) — BTCPayServer/Plugins/Emails/EmailsPlugin.cs:224, BTCPayServer/Plugins/Emails/StoreMailTriggers.cs:27, BTCPayServer/Plugins/Multisig/MultisigEmailTriggers.cs:35, …

What to do

  • Finish or delete the unfinished stubs (NotImplementedException / empty / constant-returning bodies) — they are dead surface that looks live.
  • Clear the softer debt: remove commented-out code and dead branches, re-enable or delete skipped tests, and replace blanket warning suppressions with targeted ones.
M1 · Documentation (README)6.4 / 10Adequate✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

What to do

  • Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 7 of 9 project(s) that lack one — worth up to 1.6 pts.
M2 · Architecture documentation2.0 / 10Critical✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure8.0 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

  • Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.

What to do

  • Group production code under src/ (or split deliberately, e.g. backend/ + frontend/) so production and tooling code aren't mixed at the root.
M4 · Documentation accuracy9.9 / 10Exemplary◐ Sampled · advisory

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

  • docs/operators/README.md documents the environment variable `BTCPAY_SSRFEXCEPTIONS`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/operators/README.md:87
  • docs/operators/host-integration.md documents the environment variable `BTCPAY_BTCPAYHOSTEXECUTABLE`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/operators/host-integration.md:11

What to do

  • Reconcile the README with reality: docs/operators/README.md documents the environment variable `BTCPAY_SSRFEXCEPTIONS`, but no code, script or configuration file names it; docs/operators/host-integration.md documents the environment variable `BTCPAY_BTCPAYHOSTEXECUTABLE`, but no code, script or configuration file names it.
P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

P2 · Observability6.4 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • `/root/.nuget/packages/jetbrains.annotations.sources/2026.2.0/contentFiles/cs/any/JetBrains.Annotations/Annotations.Internal.cs` reports through `Console.Write…` at line 106 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — root/.nuget/packages/jetbrains.annotations.sources/2026.2.0/contentFiles/cs/any/JetBrains.Annotations/Annotations.Internal.cs:106
  • `/root/.nuget/packages/jetbrains.annotations.sources/2026.2.0/contentFiles/cs/any/JetBrains.Annotations/Annotations.Internal.cs` reports through `Console.Write…` at line 132 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — root/.nuget/packages/jetbrains.annotations.sources/2026.2.0/contentFiles/cs/any/JetBrains.Annotations/Annotations.Internal.cs:132

What to do

  • Replace `Console.Write…` in service code with the project's injected `ILogger<T>` (message templates with named properties), so delivery outcomes and failures reach the log pipeline with a level and a category.
  • Consider OpenTelemetry tracing/metrics and a health-check endpoint for operability.
P3 · Security & performance tooling3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

  • `REDACTED` run(s) a static-analysis scan, but no workflow that runs one is triggered by a pull request (or a merge queue, or an unfiltered push) — the scan fires on a schedule or a manual dispatch only. A vulnerable change therefore merges clean and is reported on the next scheduled run, by which time it is on the default branch and the only remedy is a follow-up fix. Add the pull-request trigger to the workflow that runs the scan so the finding arrives before the merge rather than after it.

What to do

  • Trigger your SAST workflow on pull requests — a scan that only runs on a cron reports history, it does not gate.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback5.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

  • Deployment automation exists but no readiness/liveness probes, rolling-update strategy, lifecycle hooks or migration job were evidenced — a bad release is harder to detect and reverse.

What to do

  • Add readiness/liveness probes and a rolling-update (or blue/green) strategy so a bad release is caught and rolled back automatically.
  • Add an approval/environment gate (required reviewers / protection rules) before production promotion.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default). (×19) — BTCPayServer.Client/BTCPayServerClient.cs:31, BTCPayServer.Client/BTCPayServerClient.cs:38, BTCPayServer.Client/BTCPayServerClient.cs:47, …
  • `services.AddHttpClient()` registers an outbound HTTP client with no resilience handler, retry policy or timeout of its own in its builder chain. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default). — BTCPayServer/Hosting/BTCPayServerServices.cs:104
  • `services.AddHttpClient(LightningClientFactoryService.NamedClient)` registers an outbound HTTP client with no resilience handler, retry policy or timeout of its own in its builder chain. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default). — BTCPayServer/Hosting/BTCPayServerServices.cs:135
  • `services.AddHttpClient(LightningClientFactoryService.SafeNamedClient)` registers an outbound HTTP client with no resilience handler, retry policy or timeout of its own in its builder chain. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default). — BTCPayServer/Hosting/BTCPayServerServices.cs:137
  • `services.AddHttpClient(LightningClientFactoryService.OnionNamedClient)` registers an outbound HTTP client with no resilience handler, retry policy or timeout of its own in its builder chain. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default). — BTCPayServer/Hosting/BTCPayServerServices.cs:141
  • `services.AddHttpClient(LightningLikePayoutHandler.LightningLikePayoutHandlerO...` registers an outbound HTTP client with no resilience handler, retry policy or timeout of its own in its builder chain. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default). — BTCPayServer/Hosting/BTCPayServerServices.cs:400
  • `services.AddHttpClient(LightningLikePayoutHandler.LightningLikePayoutHandlerC...` registers an outbound HTTP client with no resilience handler, retry policy or timeout of its own in its builder chain. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default). — BTCPayServer/Hosting/BTCPayServerServices.cs:402
  • `services.AddHttpClient(nameof(KrakenExchangeRateProvider))` registers an outbound HTTP client with no resilience handler, retry policy or timeout of its own in its builder chain. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default). — BTCPayServer/Hosting/BTCPayServerServices.cs:768
  • `services.AddHttpClient(PayjoinServerCommunicator.PayjoinOnionNamedClient)` registers an outbound HTTP client with no resilience handler, retry policy or timeout of its own in its builder chain. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default). — BTCPayServer/Payments/PayJoin/PayJoinExtensions.cs:20
  • `services.AddHttpClient(PayjoinServerCommunicator.PayjoinClearnetNamedClient)` registers an outbound HTTP client with no resilience handler, retry policy or timeout of its own in its builder chain. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default). — BTCPayServer/Payments/PayJoin/PayJoinExtensions.cs:22
  • `services.AddHttpClient(BitpayIPNSender.NamedClient)` registers an outbound HTTP client with no resilience handler, retry policy or timeout of its own in its builder chain. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default). — BTCPayServer/Plugins/Bitpay/BitpayPlugin.cs:47
  • `services.AddHttpClient<PluginBuilderClient>((provider, httpClient) => Configu...` registers an outbound HTTP client with no resilience handler, retry policy or timeout of its own in its builder chain. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default). — BTCPayServer/Plugins/PluginManager/PluginManagerPlugin.cs:23
  • `services.AddHttpClient(WebhookSender.OnionNamedClient)` registers an outbound HTTP client with no resilience handler, retry policy or timeout of its own in its builder chain. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default). — BTCPayServer/Plugins/Webhooks/WebhooksPlugin.cs:40
  • `services.AddHttpClient(WebhookSender.ClearnetNamedClient)` registers an outbound HTTP client with no resilience handler, retry policy or timeout of its own in its builder chain. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default). — BTCPayServer/Plugins/Webhooks/WebhooksPlugin.cs:47
  • `services.AddHttpClient(clientName)` registers an outbound HTTP client with no resilience handler, retry policy or timeout of its own in its builder chain. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default). — BTCPayServer/Plugins/Webhooks/WebhooksPlugin.cs:53

What to do

  • Add `AddStandardResilienceHandler()` (or a Polly policy and an explicit timeout) to each client registration flagged here, so a flaky dependency can't take the app down.
P8 · Schema migrations3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether EF Core schema changes go through versioned migrations rather than the un-evolvable EnsureCreated().

Method: Roslyn scan: EF Core DbContext for a versioned migrations directory versus bare EnsureCreated usage; off .NET, a file scan of dependency manifests, migration histories (Flyway, Liquibase, Alembic, Django, Rails, Prisma, TypeORM, Knex/Sequelize, golang-migrate, goose, Laravel, Doctrine, Diesel/sqlx) and schema auto-create in production source or config. Exhaustive, deterministic.

  • This repository evolves its schema with versioned migrations, but `EnsureCreated()` here builds a schema straight from the model instead — with no migrations-history row, so a database it creates can't be upgraded by `Migrate()` afterwards and the two paths can disagree about the shape. Apply the migrations here (`Migrate()` / a migrations bundle) rather than creating the schema. (×2) — BTCPayServer/HostedServices/TransactionLabelMarkerHostedService.cs:167, BTCPayServer/Payments/Bitcoin/BitcoinLikePaymentHandler.cs:107

What to do

  • Replace each EnsureCreated() in production code with the migrations the rest of the repository already uses (`Database.Migrate()` or a migrations bundle), so every database gets its schema from the one versioned path.
PF1 · Benchmark discipline6.0 / 10Adequate✓ Tool-verified

Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.

Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.

  • No benchmark suite was found by the two searches this check runs. FIRST, a BenchmarkDotNet package reference in any project file — every project the workspace loaded, plus a walk of project files on disk that never loaded, because a benchmark suite is exactly the project a partial load drops. SECOND, a script harness: a file whose name contains `benchmark` and ends `.py`, `.sh`, `.ps1`, `.bash`, `.rb`, `.js` or `.mjs`, credited ONLY when this repository's CI text also mentions benchmarks — a harness no pipeline runs is read as a fixture, deliberately. Neither search can see a benchmark suite in another ecosystem's idiom (a Go `testing.B` file, a JMH or criterion project, a pytest-benchmark run), so this is 'no benchmark found by those two searches', not a verdict that the repository has none. Where code is performance-sensitive, a benchmark guards against silent regressions — but it's a bonus here, not a deduction.

What to do

  • Add a benchmarking harness for the hot paths and run it in CI to catch regressions (for .NET, a BenchmarkDotNet project with [MemoryDiagnoser] to track allocations).
PF2 · Allocation hygiene6.1 / 10Adequate✓ Tool-verified

Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.

Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.

What to do

  • Raise allocation-aware density on the hot paths — currently 13 use(s) across 110,123 production line(s) (~0.1/1k). More Span/Memory, pooling (ArrayPool/ObjectPool), stackalloc and ValueTask on the allocation-heavy paths climbs this toward 10.
PF3 · Async & latency hygiene7.0 / 10Strong✓ Tool-verified

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

  • 2 blocking call(s) on async work (.Wait()/.GetAwaiter().GetResult()) — these waste a thread and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). (×2) — BTCPayServer/Plugins/Bitpay/Controllers/BitpayRateController.cs:155, BTCPayServer.Rating/CurrencyPair.cs:16

What to do

  • Make the call chain async end-to-end and await it — never block on a Task with .Wait()/.GetAwaiter().GetResult().
S1 · Web-Security Posture5.5 / 10Adequate✓ Tool-verified

Other · Security — Transport security, security headers, secure cookies, input validation, middleware order and crypto hygiene (presence, not runtime).

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.

  • `ServerCertificateValidationCallback` is assigned a callback that returns `true` unconditionally, so every TLS peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Delete the override and let the platform validate. If a specific self-signed or internally-issued certificate genuinely has to be trusted, pin THAT one — compare the presented certificate's public key or thumbprint against the expected value and return `false` for everything else — and scope it to the single handler that talks to that host rather than to the whole process. If the override exists only to get past a development certificate, gate it on a build configuration or an explicit opt-in setting so it cannot ship. — BTCPayServer/Plugins/Emails/Services/EmailSettings.cs:110
  • Set: Content-Security-Policy, Referrer-Policy, X-Content-Type-Options, X-Frame-Options. Missing: Strict-Transport-Security — the four headers that carry the points of this card's security-headers term (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options), 0.5 each. (−0.5 on this card.) — BTCPayServer/Filters/ContentSecurityPolicyAttribute.cs:114

What to do

  • Stop accepting every TLS certificate: remove the always-true validation callback so the platform verifies the chain, hostname and expiry. If one self-signed certificate must be trusted, pin it by public key or thumbprint on the single handler that needs it and reject all others — never process-wide.
  • Add Strict-Transport-Security beside the headers already set; Content-Security-Policy is the one that pays for itself first, then Strict-Transport-Security, then nosniff and a frame policy.
X1 · Async correctness7.8 / 10Strong✓ Tool-verified

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

  • Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout. (×8) — BTCPayServer/Components/StoreLightningServices/StoreLightningServices.cs:65, BTCPayServer/Controllers/GreenField/GreenfieldStoreRatesConfigurationController.cs:165, BTCPayServer/Controllers/UIStoresController.LightningLike.cs:65, …
  • Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process. — BTCPayServer.Rating/CurrencyPair.cs:16
  • `.Wait(…)` blocks this thread until the task completes or the bound expires — sync-over-async: it can deadlock under a synchronization context and it parks a thread while it waits. `await` the task (with `.WaitAsync(timeout, token)` where the bound matters). — BTCPayServer.Common/Logging/ConsoleLogger.cs:411

What to do

  • Sync-over-async (deadlock risk) through `.Result`
X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X17 · Uncapped recursion over a caller-supplied document2.2 / 10Critical✓ Tool-verified

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

  • `SetValues` is public, takes a document from its caller (line 253) and hands it to `SetValues`, which calls itself at line 269 with a child of the node it was given — and nowhere in `SetValues` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the tree it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A document nested past the stack that remains raises `StackOverflowException`, which .NET neither lets you catch nor unwinds: the process is torn down where it stands, taking every other request in flight with it, and no `try`/`catch` around `SetValues` can intervene. Thread a depth argument through `SetValues` and reject the document past a fixed maximum, or rewrite the descent with an explicit stack. — BTCPayServer/Plugins/Forms/FormDataService.cs:269
  • `GetPaths` is public, takes a document from its caller (line 59) and hands it to `GetAvailablePaths`, which calls itself at line 93 with a child of the node it was given (and at line 105, line 115) — and nowhere in `GetAvailablePaths` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the tree it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A document nested past the stack that remains raises `StackOverflowException`, which .NET neither lets you catch nor unwinds: the process is torn down where it stands, taking every other request in flight with it, and no `try`/`catch` around `GetPaths` can intervene. Thread a depth argument through `GetAvailablePaths` and reject the document past a fixed maximum, or rewrite the descent with an explicit stack. — BTCPayServer.Common/TextTemplate.cs:93
  • `Render` is public, takes a document from its caller (line 29) and hands it to `ToLowerCase`, which calls itself at line 123 with a child of the node it was given (and at line 129, line 138) — and nowhere in `ToLowerCase` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the tree it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A document nested past the stack that remains raises `StackOverflowException`, which .NET neither lets you catch nor unwinds: the process is torn down where it stands, taking every other request in flight with it, and no `try`/`catch` around `Render` can intervene. Thread a depth argument through `ToLowerCase` and reject the document past a fixed maximum, or rewrite the descent with an explicit stack. — BTCPayServer.Common/TextTemplate.cs:123

What to do

  • Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
X18 · Disposal-pattern correctness6.5 / 10Adequate✓ Tool-verified

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

  • `qrCode` is a `PngByteQRCode`, which implements `IDisposable`, and it is created here (line 16). Every use of it in `Invoke` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var qrCode = …;`), which releases it at the end of the scope on every path including a throw. — BTCPayServer/Components/QRCode/QRCode.cs:16
  • `cts` is a `CancellationTokenSource`, which implements `IDisposable`, and it is created here (line 181). Every use of it in `Process` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var cts = …;`), which releases it at the end of the scope on every path including a throw. — BTCPayServer/PayoutProcessors/OnChain/OnChainAutomatedPayoutProcessor.cs:181
  • `ctx` is never created by `SubscriptionContext` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 122). Its declared type `ApplicationDbContext` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — BTCPayServer/Plugins/Subscriptions/SubscriptionContext.cs:122
  • `jsonw` is a `JsonTextWriter`, which implements `IDisposable`, and it is created here (line 60). Every use of it in `ProcessBip329` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var jsonw = …;`), which releases it at the end of the scope on every path including a throw. — BTCPayServer/Services/Wallets/Export/TransactionsExport.cs:60
  • `writer` is a `StreamWriter`, which implements `IDisposable`, and it is created here (line 14). Every use of it in `Zip` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var writer = …;`), which releases it at the end of the scope on every path including a throw. — BTCPayServer.Common/ZipUtils.cs:14
  • `reader` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 25). Every use of it in `Unzip` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var reader = …;`), which releases it at the end of the scope on every path including a throw. — BTCPayServer.Common/ZipUtils.cs:25
  • `reader` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 114). Every use of it in `Unzip` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var reader = …;`), which releases it at the end of the scope on every path including a throw. — BTCPayServer.Data/Data/MigrationExtensions.cs:114

What to do

  • Each finding names the value and the span that decides who owns it — the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X2 · Cancellation propagation5.9 / 10Adequate✓ Tool-verified

Other · Code Health — Whether async methods accept a CancellationToken so work can be cancelled (adoption curve).

Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.

  • Only 450/1385 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up — whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice — judge against your hosting model.
  • No CancellationToken parameter — this work can't be stopped early once started. (×34) — BTCPayServer/BufferizedFormFile.cs:32, BTCPayServer/Components/AppSales/AppSales.cs:24, BTCPayServer/Components/AppTopItems/AppTopItems.cs:19, …
  • No CancellationToken parameter — the body observes an ambient token instead (a field or a context object), so the work does stop on cancellation, but a caller cannot cancel this call independently of the owner that created that token. (×5) — BTCPayServer/Components/MainNav/MainNav.cs:31, BTCPayServer/Components/StoreLightningBalance/StoreLightningBalance.cs:34, BTCPayServer/Components/StoreRecentTransactions/StoreRecentTransactions.cs:39, …

What to do

  • Thread a CancellationToken through async methods so work stops promptly on cancellation.
X20 · Mistyped argument guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `ArgumentNullException` tells the caller a parameter was null when it provably was not.

Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.

X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X22 · Contradicted release guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

X24 · Document value interpolated into markup unescaped4.2 / 10Weak✓ Tool-verified

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

  • `relative` is text this program did not author, and it is written into a quoted attribute value through `new HtmlString(…)` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×3) — BTCPayServer.Abstractions/Extensions/ViewsRazor.cs:178, BTCPayServer.Abstractions/Extensions/ViewsRazor.cs:187, BTCPayServer.Abstractions/Extensions/ViewsRazor.cs:196
  • `_jsonHelper.Serialize(model)` is text this program did not author, and it is written into the text of an element through `Html.Raw` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — BTCPayServer.Abstractions/Services/Safe.cs:42
  • `RawMeta(inputHtml, out _)` is text this program did not author, and it is written into the text of an element through `Html.Raw` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — BTCPayServer.Abstractions/Services/Safe.cs:45
  • `html` is text this program did not author, and it is written into the text of an element through `SetHtmlContent` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — BTCPayServer.Abstractions/TagHelpers/PermissionedFormTagHelper.cs:38
  • `$"var {VarName} = {_safe.Json(Model)};"` is text this program did not author, and it is written into the text of an element through `SetHtmlContent` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — BTCPayServer.Abstractions/TagHelpers/SrvModel.cs:29
  • `stringValue` is text this program did not author, and it is written into the text of an element through `new HtmlString(…)` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — BTCPayServer.Abstractions/TagHelpers/UrlResolutionTagHelper2.cs:169
  • `Html` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — BTCPayServer/Blazor/VaultBridge/Elements/Feedback.razor:12, BTCPayServer/Blazor/VaultBridge/Elements/Warning.razor:9
  • `b64` is text this program did not author, and it is written into a URL attribute through `new HtmlString(…)` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — BTCPayServer/Components/QRCode/QRCode.cs:20
  • `message` is text this program did not author, and it is written into the text of an element through an HTML e-mail body with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — BTCPayServer/Plugins/Emails/Services/EmailSettings.cs:83
  • `encoder.Encode(appUrl)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through a `StringBuilder` building markup with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. (×2) — REDACTED:656, REDACTED:669
  • `c.Code` is text this program did not author, and it is written into a quoted attribute value through `AppendHtml` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — BTCPayServer/TagHelpers/CurrenciesSuggestionsTagHelper.cs:37
  • `_safe.Raw(newContent.Value)` is text this program did not author, and it is written into the text of an element through `SetHtmlContent` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — BTCPayServer/TagHelpers/TranslateTagHelper.cs:58
  • `$"<h{Model.Level + 3} class=\"mb-3 fw-semibold\">"` is text this program did not author, and it is written into the text of an element through Razor's `Html.Raw` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — REDACTED:25, REDACTED:39
  • `$"</h{Model.Level + 3}>"` is text this program did not author, and it is written into the text of an element through Razor's `Html.Raw` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — REDACTED:27, REDACTED:41
  • `el.innerHTML.replace('#actions-copy','#checkmark')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — BTCPayServer/wwwroot/js/copy-to-clipboard.js:8
  • `el.innerHTML.replace('#checkmark','#actions-copy')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — BTCPayServer/wwwroot/js/copy-to-clipboard.js:23
  • `el.dataset.clipboardInitial` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — BTCPayServer/wwwroot/js/copy-to-clipboard.js:25
  • `aHTML.join('')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:253
  • `$a.innerHTML.replace(/#actions-sort-(asc|desc)"/,'#actions-sort"')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — BTCPayServer/wwwroot/js/store-reports.js:22
  • `$button.innerHTML.replace('#actions-show','#actions-hide')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — BTCPayServer/wwwroot/main/site.js:464
  • `$button.innerHTML.replace('#actions-hide','#actions-show')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — BTCPayServer/wwwroot/main/site.js:467
  • `newState` is text this program did not author, and it is written into a quoted attribute value through `outerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — BTCPayServer/wwwroot/main/site.js:484
  • `content.innerHTML` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — BTCPayServer/wwwroot/main/site.js:702
  • `getStyles('template-paybutton-styles')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — BTCPayServer/wwwroot/paybutton/paybutton.js:105
  • `esc(srvModel.urlRoot)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — BTCPayServer/wwwroot/paybutton/paybutton.js:107
  • `snippet` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — BTCPayServer/wwwroot/paybutton/paybutton.js:174
  • `html` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:177

What to do

  • Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `foreach` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is enumerating invalidates the enumerator it is holding, so the next `MoveNext` throws `InvalidOperationException` and the remaining items are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X3 · Exception handling4.8 / 10Weak✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×35) — BTCPayServer/Components/MainNav/MainNav.cs:73, BTCPayServer/Configuration/DefaultConfiguration.cs:97, BTCPayServer/Controllers/Macaroons.cs:45, …
  • `catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. (×3) — BTCPayServer/Components/StoreLightningBalance/StoreLightningBalance.cs:81, BTCPayServer/DerivationSchemeParser.cs:320, BTCPayServer/Extensions.cs:651
  • `catch (Exception)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. (×2) — BTCPayServer/Controllers/UIInvoiceController.UI.cs:186, BTCPayServer/Payments/Lightning/LightningPendingPayoutListener.cs:109

What to do

  • Swallowed exception (empty catch)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X32 · Type resolved by simple name across every loaded assembly10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a plugin lookup names the type it means — searching every assembly loaded into the process for a candidate whose SIMPLE name equals a string supplied at runtime, and taking the first one found, is decided by assembly LOAD ORDER rather than by this source, so the same name can resolve to a different type on the next run.

Method: Roslyn syntax only, no semantic model: every invocation of `First`/`FirstOrDefault`/`Single`/`SingleOrDefault` whose OWN expression subtree contains both a `GetAssemblies()` call and a `GetTypes()`/`GetExportedTypes()` call — a single-element pick out of every type loaded into the process. A nested selector in the same chain sees no `GetAssemblies()` in its own subtree and is outside the population, so one lookup counts once however many links its chain has. A finding additionally needs both remaining halves: the selector must be `First`/`FirstOrDefault` (`Single`/`SingleOrDefault` reports the ambiguity rather than resolving it, and is counted and never reported), and the chain must carry an `==` comparison of `<lambda parameter>.Name` against something that is not a literal. The receiver must be a plain identifier bound by one of the chain’s own lambdas, which places `assembly.GetName().Name == "X"` outside the rule by construction. One exemption: a `.Name` test joined by `&&` to a `FullName`/`AssemblyQualifiedName` test on the same identifier is spared; joined by `||` it is not. Deterministic, provable per finding. Advisory.

X4 · Structured logging3.8 / 10Weak✓ Tool-verified

Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.

Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.

  • Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it. (×40) — BTCPayServer/Configuration/BTCPayServerOptions.cs:61, BTCPayServer/Configuration/BTCPayServerOptions.cs:108, BTCPayServer/Configuration/BTCPayServerOptions.cs:109, …

What to do

  • Interpolated log message defeats structured logging
X5 · Nullable reference types1.9 / 10Critical✓ Tool-verified

Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

  • This method contradicts itself about `approvePayoutRequest`: line 639 writes `approvePayoutRequest?.Revision`, which says `approvePayoutRequest` can be null, but line 642 then dereferences it directly as `approvePayoutRequest.Revision` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `approvePayoutRequest` truly cannot be null here, the `?.` is misleading. Settle it one way — test `approvePayoutRequest` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — REDACTED:642
  • This method contradicts itself about `app`: line 275 writes `app?.StoreData`, which says `app` can be null, but line 285 then dereferences it directly as `app.AppType` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `app` truly cannot be null here, the `?.` is misleading. Settle it one way — test `app` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — REDACTED:285
  • This method contradicts itself about `result`: line 359 writes `result?.GetBlob`, which says `result` can be null, but line 395 then dereferences it directly as `result.SetBlob` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `result` truly cannot be null here, the `?.` is misleading. Settle it one way — test `result` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — REDACTED:395
  • This method contradicts itself about `chosen`: line 426 writes `chosen?.Value`, which says `chosen` can be null, but line 426 then dereferences it directly as `chosen.Value` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `chosen` truly cannot be null here, the `?.` is misleading. Settle it one way — test `chosen` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — BTCPayServer/Controllers/UIStoresController.Settings.cs:426
  • This method contradicts itself about `store`: line 76 writes `store?.GetStoreBlob`, which says `store` can be null, but line 80 then dereferences it directly as `store.SetStoreBlob` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `store` truly cannot be null here, the `?.` is misleading. Settle it one way — test `store` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — BTCPayServer/Plugins/Emails/Controllers/UIStoresEmailController.cs:80
  • This method contradicts itself about `infrastructure`: line 13 assigns it with `as IInfrastructure<IServiceProvider>`, which hands back null rather than throwing when the value is not a `IInfrastructure<IServiceProvider>`, but line 14 then dereferences it directly as `infrastructure.Instance` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `infrastructure` once before the first use and handle the null case, or cast with `(IInfrastructure<IServiceProvider>)` so the failure is reported where it happens — rather than leaving the two readings side by side. — BTCPayServer.Data/ApplicationDbContextExtensions.cs:14
  • 0/7 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
  • ~0.7 `!` suppressions per 1k syntax nodes — 202 suppression(s) across the 295665 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide.

What to do

  • Where a method uses `?.` on a symbol and then dereferences it directly, settle the question once: test it before the first use and handle null, or drop the `?.`.
  • Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.

WCAG coverage — what static analysis assessed

Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 · Keyboard semantics2.1.1, 2.4.3Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only
AC7 · A11y enforcementenforcement — no page criterionEnforcement posture (process)

Not statically assessed — these 40 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health45%Weak — gated by X4, X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture74%Adequate — gated by D27Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity60%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness44%Weak — gated by D9, D13, P3, P7, P8Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security68%Adequate — gated by D28, D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Event-Driven82%StrongStrongest area.
Accessibility40%Weak — gated by AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance63%AdequateAcceptable, with room to improve.
Unscored — 4 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • P12 CI test-gate honesty — 1 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • SC1 Supply-chain hygiene — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X10 Duplicated predicate — 11 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 18 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • C5 Data-Subject Rights — Repo shows no corroborated data-subject-rights mechanism (erasure / export-portability / consent) tied to a subject id or GDPR vocabulary — absence of evidence is not evidence of a working control. Implement erasure, data export/portability and consent tracking over the subject's records.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 23 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AX4 Dependency direction — not applicable to a CQRS architecture (the inward-dependency rule is for layered/clean styles)
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — docker build failed (exit 1) — DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/bui…; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • D11 Test Reliability — Test reliability not measured — no test run produced results
  • D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
  • D23 Boundary Type-Coupling — Cross-context type coupling could not be assessed — this codebase's bounded contexts are neither declared nor inferable.
  • D25 ADR Conformance — no ADRs to check
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D43 Malicious Dependencies — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — not scanned yet).
  • D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (12 value object(s))
  • ED2 Event/command shape — no command-shaped messages detected — single-handler-per-command check not applicable
  • ED3 Event naming — no domain or integration events detected — event-naming check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (Cobertura — `dotnet test --collect:"XPlat Code Coverage"` with a `coverlet.collector` PackageReference) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X8 JS interop contract — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 253 finding(s)
D17 · Explicit Debt · EmptyCatchBlock · ×75
  • EmptyCatchBlock BTCPayServer.Client/JsonConverters/SaneOutpointJsonConverter.cs:30 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock BTCPayServer.Common/Logging/ConsoleLogger.cs:371 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock BTCPayServer.Common/Logging/ConsoleLogger.cs:414 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock BTCPayServer.Common/MultiProcessingQueue.cs:103 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock BTCPayServer.Rating/CurrencyNameTable.cs:158 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock BTCPayServer.Rating/Providers/BackgroundFetcherRateProvider.cs:193 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock BTCPayServer/Components/MainNav/MainNav.cs:73 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock BTCPayServer/Configuration/DefaultConfiguration.cs:97 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock BTCPayServer/Controllers/Macaroons.cs:45 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock BTCPayServer/Controllers/UIInvoiceController.UI.cs:1071 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock BTCPayServer/Controllers/UIInvoiceController.UI.cs:1093 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock BTCPayServer/Controllers/UIPublicLightningNodeInfoController.cs:56 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock REDACTED:675 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock BTCPayServer/Data/Payouts/LightningLike/LightningLikePayoutHandler.cs:97 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock BTCPayServer/Data/Payouts/LightningLike/LightningLikePayoutHandler.cs:173 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock BTCPayServer/DerivationSchemeParser.cs:274 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock BTCPayServer/Extensions.cs:600 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock BTCPayServer/Extensions.cs:601 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock BTCPayServer/Extensions.cs:658 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock BTCPayServer/Extensions.cs:861 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock BTCPayServer/Extensions/UserExtensions.cs:19 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock BTCPayServer/Fido2/Fido2Service.cs:179 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock BTCPayServer/HostedServices/BackgroundJobSchedulerHostedService.cs:118 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock BTCPayServer/HostedServices/DbMigrationsHostedService.cs:155 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock BTCPayServer/HostedServices/InvoiceWatcher.cs:219 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • + 50 more in this group — see findings.md.
D17 · Explicit Debt · WriteOnlyPrivateField · ×45
  • WriteOnlyPrivateField BTCPayServer.Rating/Providers/HttpClientRequestMaker.cs:95 — private CancellationToken _cancellationToken — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField BTCPayServer.Rating/RateRules.cs:592 — private SyntaxNode? _EvaluatedNode — assigned 2 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField BTCPayServer.Rating/Services/RateProviderFactory.cs:64 — private IHttpClientFactory _httpClientFactory — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField BTCPayServer/Storage/Services/FileService.cs:30 — private IHttpClientFactory _httpClientFactory — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField BTCPayServer.Tests/LightningDTester.cs:9 — private ServerTester parent — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField BTCPayServer.Tests/TestAccount.cs:456 — private Client.Models.StoreWebhookData _wh — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField BTCPayServer/Components/StoreNumbers/StoreNumbers.cs:16 — private StoreRepository _storeRepo — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField BTCPayServer/Components/WalletNav/WalletNav.cs:20 — private UIWalletsController _walletsController — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField BTCPayServer/Controllers/GreenField/GreenfieldAppsController.cs:35 — private StoreRepository _storeRepository — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs:43 — private ApplicationDbContextFactory _dbContextFactory — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField BTCPayServer/Controllers/GreenField/GreenfieldStoresController.cs:41 — private PoliciesSettings _policiesSettings — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField BTCPayServer/Controllers/GreenField/GreenfieldStoresController.cs:42 — private IAuthorizationService _authorizationService — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField BTCPayServer/Controllers/LnurlAuthService.cs:28 — private ILogger<LnurlAuthService> _logger — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField REDACTED:62 — private ILogger _logger — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField BTCPayServer/Controllers/UIStorePullPaymentsController.PullPayments.cs:33 — private BTCPayNetworkProvider _btcPayNetworkProvider — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField BTCPayServer/Hosting/BlockExplorerLinkStartupTask.cs:11 — private BTCPayNetworkProvider _btcPayNetworkProvider — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField BTCPayServer/PaymentRequest/PaymentRequestService.cs:18 — private BTCPayNetworkProvider _btcPayNetworkProvider — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField BTCPayServer/Services/InvoiceActivator.cs:17 — private BTCPayNetworkProvider _btcPayNetworkProvider — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField BTCPayServer/Services/Reporting/PaymentsReportProvider.cs:13 — private BTCPayNetworkProvider _btcPayNetworkProvider — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField BTCPayServer/Data/Payouts/LightningLike/UILightningLikePayoutController.cs:36 — private EventAggregator _eventAggregator — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField BTCPayServer/HostedServices/AppInventoryUpdaterHostedService.cs:14 — private EventAggregator _eventAggregator — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField BTCPayServer/HostedServices/GithubVersionFetcher.cs:46 — private ILogger<GithubVersionFetcher> _logger — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField BTCPayServer/HostedServices/InvoiceWatcher.cs:50 — private ExplorerClientProvider _explorerClientProvider — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField BTCPayServer/HostedServices/InvoiceWatcher.cs:52 — private PaymentService _paymentService — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField BTCPayServer/HostedServices/InvoiceWatcher.cs:53 — private PaymentMethodHandlerDictionary _handlers — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • + 20 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <input> without a programmatic label · ×12
  • <input> without a programmatic label BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:9 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label BTCPayServer/Components/LabelManager/Default.cshtml:39 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label BTCPayServer/Components/SearchStringInput/Default.cshtml:4 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label BTCPayServer/Plugins/DynamicDNS/Views/DynamicDnsService.cshtml:35 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label BTCPayServer/Plugins/Multisig/VaultBridge/Elements/MultisigXPubSelect.razor:13 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label BTCPayServer/Plugins/Multisig/Views/SetupMultisigStatus.cshtml:33 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label REDACTED:306 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label BTCPayServer/Plugins/PointOfSale/Views/Public/Cart.cshtml:34 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label BTCPayServer/Plugins/PointOfSale/Views/Public/Cart.cshtml:132 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label BTCPayServer/Plugins/PointOfSale/Views/Public/Cart.cshtml:151 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label BTCPayServer/Plugins/PointOfSale/Views/Public/Cart.cshtml:162 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label BTCPayServer/Plugins/PointOfSale/Views/Public/MinimalLight.cshtml:6 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
AC4 · Keyboard semantics · Click handler on a non-interactive <div> · ×12
  • Click handler on a non-interactive <div> BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:10 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:19 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:22 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:25 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:30 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:33 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:36 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:41 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:44 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:47 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> BTCPayServer/Views/UIInvoice/Checkout.cshtml:116 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> BTCPayServer/Views/UIInvoice/Checkout.cshtml:155 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
AC4 · Keyboard semantics · Clickable element isn't keyboard-operable · ×11
  • Clickable element isn't keyboard-operable BTCPayServer/Components/InvoiceStatus/Default.cshtml:19 — The repo's own CSS styles .dropdown-toggle with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable BTCPayServer/Plugins/Crowdfund/Views/Public/ContributeForm.cshtml:14 — The repo's own CSS styles .btn with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable BTCPayServer/Plugins/Subscriptions/Views/Components/SubscriberStatus/Default.cshtml:25 — The repo's own CSS styles .dropdown-toggle with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable BTCPayServer/Plugins/Subscriptions/Views/UIOffering/Offering.cshtml:110 — The repo's own CSS styles .dropdown-toggle with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable BTCPayServer/Plugins/Subscriptions/Views/UIOffering/Offering.cshtml:234 — The repo's own CSS styles .dropdown-toggle with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable BTCPayServer/Plugins/Subscriptions/Views/UIOffering/Offering.cshtml:255 — The repo's own CSS styles .dropdown-toggle with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable BTCPayServer/Plugins/Subscriptions/Views/UIOffering/Offering.cshtml:427 — The repo's own CSS styles .form-control with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable BTCPayServer/Plugins/Subscriptions/Views/UIOffering/Offering.cshtml:441 — The repo's own CSS styles .dropdown-toggle with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable REDACTED:30 — The repo's own CSS styles .cursor-pointer with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable REDACTED:86 — The repo's own CSS styles .cursor-pointer with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable REDACTED:136 — The repo's own CSS styles .cursor-pointer with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
AC2 · Forms & labels · Custom control with no accessible name on <div> · ×10
  • Custom control with no accessible name on <div> BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:10 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:19 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:22 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:25 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:30 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:33 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:36 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:41 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:44 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> BTCPayServer/Blazor/VaultBridge/Elements/PinInput.razor:47 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
D17 · Explicit Debt · NoWarnInCsproj · ×7
  • NoWarnInCsproj — 13 warning codes suppressed in one element Build/Common.csproj:4 — A single <NoWarn> suppresses 13 warning codes (NU1701;CA1816;CA1308;CA1810;CA2208;CA1303;CA2000;CA2016;CA1835;CA2249;CA9998;CA1704;CS8981) in one stroke — one team-wide decision, not 13 independent debts. Review the set centrally rather than code-by-code; each code you can re-enable is one less blanket suppression. (Every code still counts toward the score and metrics.)
  • NoWarnInCsproj — 6 warning codes suppressed in one element BTCPayServer.PluginPacker/BTCPayServer.PluginPacker.csproj:25 — A single <NoWarn> suppresses 6 warning codes (1591;1573;1572;1584;1570;3021) in one stroke — one team-wide decision, not 6 independent debts. Review the set centrally rather than code-by-code; each code you can re-enable is one less blanket suppression. (Every code still counts toward the score and metrics.)
  • NoWarnInCsproj — 6 warning codes suppressed in one element BTCPayServer.Client/BTCPayServer.Client.csproj:26 — A single <NoWarn> suppresses 6 warning codes (1591;1573;1572;1584;1570;3021) in one stroke — one team-wide decision, not 6 independent debts. Review the set centrally rather than code-by-code; each code you can re-enable is one less blanket suppression. (Every code still counts toward the score and metrics.)
  • NoWarnInCsproj — 6 warning codes suppressed in one element BTCPayServer.Abstractions/BTCPayServer.Abstractions.csproj:21 — A single <NoWarn> suppresses 6 warning codes (1591;1573;1572;1584;1570;3021) in one stroke — one team-wide decision, not 6 independent debts. Review the set centrally rather than code-by-code; each code you can re-enable is one less blanket suppression. (Every code still counts toward the score and metrics.)
  • NoWarnInCsproj BTCPayServer.Tests/BTCPayServer.Tests.csproj:4 — xUnit1031 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
  • NoWarnInCsproj BTCPayServer.Tests/BTCPayServer.Tests.csproj:4 — xUnit1051 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
  • NoWarnInCsproj BTCPayServer.Tests/BTCPayServer.Tests.csproj:4 — xUnit1069 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
AC2 · Forms & labels · Link with no accessible name · ×6
  • Link with no accessible name BTCPayServer/Components/StoreSelector/Default.cshtml:25 — A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
  • Link with no accessible name BTCPayServer/Components/StoreSelector/Default.cshtml:29 — A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
  • Link with no accessible name REDACTED:42 — A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
  • Link with no accessible name REDACTED:48 — A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
  • Link with no accessible name BTCPayServer/Plugins/Multisig/Views/MultisigConfirm.cshtml:7 — A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
  • Link with no accessible name BTCPayServer/Plugins/Multisig/Views/SetupMultisig.cshtml:7 — A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
AC2 · Forms & labels · <button> with no accessible text · ×6
  • <button> with no accessible text REDACTED:34 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text BTCPayServer/Plugins/Bitpay/Views/RequestPairing.cshtml:17 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text BTCPayServer/Plugins/PointOfSale/Views/Public/Cart.cshtml:28 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text BTCPayServer/Plugins/PointOfSale/Views/Public/Cart.cshtml:129 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text BTCPayServer/Plugins/PointOfSale/Views/Public/Cart.cshtml:133 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text BTCPayServer/Plugins/PointOfSale/Views/Public/VueLight.cshtml:100 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC5 · ARIA correctness · aria-expanded on a <span> with no role to carry it · ×6
  • aria-expanded on a <span> with no role to carry it BTCPayServer/Components/InvoiceStatus/Default.cshtml:19 — A plain <span> has the implicit role "generic", which supports no ARIA states, so this aria-expanded is dropped and assistive tech is never told the state at all. Put aria-expanded on the element that owns the behaviour (the button or control the user operates), or give this <span> a role that supports aria-expanded.
  • aria-expanded on a <span> with no role to carry it BTCPayServer/Plugins/Subscriptions/Views/Components/SubscriberStatus/Default.cshtml:25 — A plain <span> has the implicit role "generic", which supports no ARIA states, so this aria-expanded is dropped and assistive tech is never told the state at all. Put aria-expanded on the element that owns the behaviour (the button or control the user operates), or give this <span> a role that supports aria-expanded.
  • aria-expanded on a <span> with no role to carry it BTCPayServer/Plugins/Subscriptions/Views/UIOffering/Offering.cshtml:110 — A plain <span> has the implicit role "generic", which supports no ARIA states, so this aria-expanded is dropped and assistive tech is never told the state at all. Put aria-expanded on the element that owns the behaviour (the button or control the user operates), or give this <span> a role that supports aria-expanded.
  • aria-expanded on a <span> with no role to carry it BTCPayServer/Plugins/Subscriptions/Views/UIOffering/Offering.cshtml:234 — A plain <span> has the implicit role "generic", which supports no ARIA states, so this aria-expanded is dropped and assistive tech is never told the state at all. Put aria-expanded on the element that owns the behaviour (the button or control the user operates), or give this <span> a role that supports aria-expanded.
  • aria-expanded on a <span> with no role to carry it BTCPayServer/Plugins/Subscriptions/Views/UIOffering/Offering.cshtml:255 — A plain <span> has the implicit role "generic", which supports no ARIA states, so this aria-expanded is dropped and assistive tech is never told the state at all. Put aria-expanded on the element that owns the behaviour (the button or control the user operates), or give this <span> a role that supports aria-expanded.
  • aria-expanded on a <span> with no role to carry it BTCPayServer/Plugins/Subscriptions/Views/UIOffering/Offering.cshtml:441 — A plain <span> has the implicit role "generic", which supports no ARIA states, so this aria-expanded is dropped and assistive tech is never told the state at all. Put aria-expanded on the element that owns the behaviour (the button or control the user operates), or give this <span> a role that supports aria-expanded.
AX1 · Captive dependencies · Captive dependency · ×6
  • Captive dependency: singleton PaymentRequestService captures transient DisplayFormatter BTCPayServer/PaymentRequest/PaymentRequestService.cs:29 — `PaymentRequestService` is registered as a SINGLETON but its constructor takes `DisplayFormatter displayFormatter`, which is registered as Transient. The singleton captures one instance of the transient dependency forever — defeating its lifetime (a per-request DbContext shared across all requests is a classic data-corruption/threading bug). Make the singleton resolve `DisplayFormatter` per-use (inject `IServiceScopeFactory` or a factory func), or align the lifetimes.
  • Captive dependency: singleton PullPaymentHostedService captures transient DisplayFormatter BTCPayServer/HostedServices/PullPaymentHostedService.cs:320 — `PullPaymentHostedService` is registered as a SINGLETON but its constructor takes `DisplayFormatter displayFormatter`, which is registered as Transient. The singleton captures one instance of the transient dependency forever — defeating its lifetime (a per-request DbContext shared across all requests is a classic data-corruption/threading bug). Make the singleton resolve `DisplayFormatter` per-use (inject `IServiceScopeFactory` or a factory func), or align the lifetimes.
  • Captive dependency: singleton CrowdfundAppType captures transient DisplayFormatter BTCPayServer/Plugins/Crowdfund/CrowdfundPlugin.cs:63 — `CrowdfundAppType` is registered as a SINGLETON but its constructor takes `DisplayFormatter displayFormatter`, which is registered as Transient. The singleton captures one instance of the transient dependency forever — defeating its lifetime (a per-request DbContext shared across all requests is a classic data-corruption/threading bug). Make the singleton resolve `DisplayFormatter` per-use (inject `IServiceScopeFactory` or a factory func), or align the lifetimes.
  • Captive dependency: singleton CrowdfundAppType captures scoped IHttpContextAccessor BTCPayServer/Plugins/Crowdfund/CrowdfundPlugin.cs:64 — `CrowdfundAppType` is registered as a SINGLETON but its constructor takes `IHttpContextAccessor httpContextAccessor`, which is registered as Scoped. The singleton captures one instance of the scoped dependency forever — defeating its lifetime (a per-request DbContext shared across all requests is a classic data-corruption/threading bug). Make the singleton resolve `IHttpContextAccessor` per-use (inject `IServiceScopeFactory` or a factory func), or align the lifetimes.
  • Captive dependency: singleton EmailsTranslationProvider captures transient EmailTriggerViewModels BTCPayServer/Plugins/Emails/EmailsTranslationProvider.cs:11 — `EmailsTranslationProvider` is registered as a SINGLETON but its constructor takes `EmailTriggerViewModels viewModels`, which is registered as Transient. The singleton captures one instance of the transient dependency forever — defeating its lifetime (a per-request DbContext shared across all requests is a classic data-corruption/threading bug). Make the singleton resolve `EmailTriggerViewModels` per-use (inject `IServiceScopeFactory` or a factory func), or align the lifetimes.
  • Captive dependency: singleton PointOfSaleAppType captures transient DisplayFormatter BTCPayServer/Plugins/PointOfSale/PointOfSalePlugin.cs:57 — `PointOfSaleAppType` is registered as a SINGLETON but its constructor takes `DisplayFormatter displayFormatter`, which is registered as Transient. The singleton captures one instance of the transient dependency forever — defeating its lifetime (a per-request DbContext shared across all requests is a classic data-corruption/threading bug). Make the singleton resolve `DisplayFormatter` per-use (inject `IServiceScopeFactory` or a factory func), or align the lifetimes.
D28 · Secrets (history) · REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC1 · Text alternatives · <svg role="img"> without an accessible name · ×4
  • <svg role="img"> without an accessible name BTCPayServer/Blazor/Icon.razor — An svg presented as an image needs a name — add a <title> child or an aria-label/aria-labelledby.
  • <svg role="img"> without an accessible name BTCPayServer/Components/Icon/Default.cshtml — An svg presented as an image needs a name — add a <title> child or an aria-label/aria-labelledby.
  • <svg role="img"> without an accessible name BTCPayServer/Components/MainLogo/Default.cshtml — An svg presented as an image needs a name — add a <title> child or an aria-label/aria-labelledby.
  • <svg role="img"> without an accessible name BTCPayServer/Views/Shared/_StoreFooterLogo.cshtml — An svg presented as an image needs a name — add a <title> child or an aria-label/aria-labelledby.
AX3 · Project dependency cycles · Namespace dependency cycle · ×4
  • Namespace dependency cycle BTCPayServer.Abstractions/Contracts/BaseDbContextFactory.cs:3 — The namespaces BTCPayServer.Abstractions.Contracts ↔ BTCPayServer.Abstractions.Models depend on each other. The lightest dependency in the cycle is BTCPayServer.Abstractions.Contracts → BTCPayServer.Abstractions.Models (BTCPayServer.Abstractions.Contracts.BaseDbContextFactory → BTCPayServer.Abstractions.Models.DatabaseOptions, 2 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle BTCPayServer.Client/Models/ApiKeyData.cs:7 — The namespaces BTCPayServer.Client ↔ BTCPayServer.Client.Models depend on each other. The lightest dependency in the cycle is BTCPayServer.Client.Models → BTCPayServer.Client (BTCPayServer.Client.Models.ApiKeyData → BTCPayServer.Client.Permission, 2 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle BTCPayServer/Data/Payouts/BitcoinLike/BitcoinLikePayoutHandler.cs:11 — The namespaces (global) ↔ BTCPayServer ↔ BTCPayServer.Common ↔ BTCPayServer.Components.AppSales ↔ BTCPayServer.Components.LabelSelector ↔ BTCPayServer.Configuration ↔ BTCPayServer.Controllers ↔ BTCPayServer.Controllers.GreenField ↔ BTCPayServer.Data ↔ BTCPayServer.Data.Subscriptions ↔ BTCPayServer.Events ↔ BTCPayServer.Fido2 ↔ BTCPayServer.Fido2.Models ↔ BTCPayServer.Forms ↔ BTCPayServer.Forms.Models ↔ BTCPayServer.HostedServices ↔ BTCPayServer.Logging ↔ BTCPayServer.Models ↔ BTCPayServer.Models.AccountViewModels ↔ BTCPayServer.Models.AppViewModels ↔ BTCPayServer.Models.InvoicingModels ↔ BTCPayServer.Models.ManageViewModels ↔ BTCPayServer.Models.NotificationViewModels ↔ BTCPayServer.Models.PaymentRequestViewModels ↔ BTCPayServer.Models.ServerViewModels ↔ BTCPayServer.Models.StoreReportsViewModels ↔ BTCPayServer.Models.StoreViewModels ↔ BTCPayServer.PaymentRequest ↔ BTCPayServer.Payments ↔ BTCPayServer.Payments.Bitcoin ↔ BTCPayServer.Payments.Lightning ↔ BTCPayServer.Payments.PayJoin ↔ BTCPayServer.PayoutProcessors ↔ BTCPayServer.Payouts ↔ BTCPayServer.Plugins ↔ BTCPayServer.Plugins.Crowdfund ↔ BTCPayServer.Plugins.Crowdfund.Controllers ↔ BTCPayServer.Plugins.Crowdfund.Models ↔ BTCPayServer.Plugins.Emails ↔ BTCPayServer.Plugins.Emails.HostedServices ↔ BTCPayServer.Plugins.Emails.Services ↔ BTCPayServer.Plugins.Emails.Views ↔ BTCPayServer.Plugins.GlobalSearch ↔ BTCPayServer.Plugins.Impersonation ↔ BTCPayServer.Plugins.Maintenance ↔ BTCPayServer.Plugins.Monetization ↔ BTCPayServer.Plugins.PointOfSale ↔ BTCPayServer.Plugins.Subscriptions ↔ BTCPayServer.Plugins.Translations ↔ BTCPayServer.Plugins.Wallets ↔ BTCPayServer.Plugins.Wallets.Views.ViewModels ↔ BTCPayServer.Plugins.Webhooks ↔ BTCPayServer.Plugins.Webhooks.Views ↔ BTCPayServer.Rating ↔ BTCPayServer.Security ↔ BTCPayServer.Security.Greenfield ↔ BTCPayServer.Services ↔ BTCPayServer.Services.Apps ↔ BTCPayServer.Services.Invoices ↔ BTCPayServer.Services.Labels ↔ BTCPayServer.Services.Notifications ↔ BTCPayServer.Services.PaymentRequests ↔ BTCPayServer.Services.Rates ↔ BTCPayServer.Services.Reporting ↔ BTCPayServer.Services.Stores ↔ BTCPayServer.Services.WalletFileParsing ↔ BTCPayServer.Services.Wallets ↔ BTCPayServer.Storage.Services ↔ BTCPayServer.Storage.Services.Providers ↔ BTCPayServer.Views.UIStoreMembership depend on each other. The lightest dependency in the cycle is (global) → BTCPayServer.Events (BitcoinLikePayoutHandler → BTCPayServer.Events.NewOnChainTransactionEvent, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle BTCPayServer/Data/Payouts/LightningLike/UILightningLikePayoutController.cs:12 — The namespaces BTCPayServer.Data.Payouts.LightningLike ↔ BTCPayServer.PayoutProcessors.Lightning depend on each other. The lightest dependency in the cycle is BTCPayServer.Data.Payouts.LightningLike → BTCPayServer.PayoutProcessors.Lightning (BTCPayServer.Data.Payouts.LightningLike.UILightningLikePayoutController → BTCPayServer.PayoutProcessors.Lightning.LightningAutomatedPayoutSenderFactory, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
AC2 · Forms & labels · <select> without a programmatic label · ×3
  • <select> without a programmatic label BTCPayServer/Plugins/Bitpay/Views/CreateToken.cshtml:43 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label BTCPayServer/Plugins/Crowdfund/Views/UpdateCrowdfund.cshtml:182 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label BTCPayServer/Plugins/PayButton/Views/PayButton.cshtml:218 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC2 · Forms & labels · <label> that labels no control · ×3
  • <label> that labels no control BTCPayServer/Plugins/Multisig/VaultBridge/Elements/MultisigXPubSelect.razor:12 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control BTCPayServer/Plugins/PayButton/Views/PayButton.cshtml:264 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control BTCPayServer/Plugins/PayButton/Views/PayButton.cshtml:275 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
D13 · REDACTED Scanning · Leaked secret · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D17 · Explicit Debt · FileScopedPragmaDisable · ×3
  • FileScopedPragmaDisable BTCPayServer.Tests/BitpayTests.cs:129 — #pragma warning disable CS0618 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
  • FileScopedPragmaDisable REDACTED:1010 — #pragma warning disable CS0618 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
  • FileScopedPragmaDisable REDACTED:2608 — #pragma warning disable CS0618 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
AC3 · Page structure · <html> without a lang · ×2
  • <html> without a lang BTCPayServer/Views/UIHome/SwaggerDocs.cshtml:8 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang BTCPayServer/Views/UIHome/SwaggerDraftDocs.cshtml:8 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
D28 · Secrets (history) · High secret · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
ED4 · Outbox / dual-write · Dual write (no outbox) · ×2
  • Dual write (no outbox): BitcoinLikePayoutHandler.UpdatePayoutsInProgress BTCPayServer/Data/Payouts/BitcoinLike/BitcoinLikePayoutHandler.cs:330 — `BitcoinLikePayoutHandler.UpdatePayoutsInProgress` writes to the database AND publishes to the message bus in the same flow, with no outbox referenced in this path. These two writes aren't atomic — a crash between them either loses the message (DB committed, publish failed) or emits a phantom event (publish succeeded, DB rolled back). Use the transactional outbox pattern — write the message to an outbox table in the SAME transaction as the state change, and dispatch it from there afterwards — or your platform's equivalent (a broker transaction, or an outbox library from your own ecosystem).
  • Dual write (no outbox): BitcoinLikePayoutHandler.UpdatePayoutsFromTransaction BTCPayServer/Data/Payouts/BitcoinLike/BitcoinLikePayoutHandler.cs:377 — `BitcoinLikePayoutHandler.UpdatePayoutsFromTransaction` writes to the database AND publishes to the message bus in the same flow, with no outbox referenced in this path. These two writes aren't atomic — a crash between them either loses the message (DB committed, publish failed) or emits a phantom event (publish succeeded, DB rolled back). Use the transactional outbox pattern — write the message to an outbox table in the SAME transaction as the state change, and dispatch it from there afterwards — or your platform's equivalent (a broker transaction, or an outbox library from your own ecosystem).
AC4 · Keyboard semantics · Click handler on a non-interactive <li> · ×1
  • Click handler on a non-interactive <li> BTCPayServer/Plugins/Wallets/Views/UIWallets/CoinSelection.cshtml:73 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D31 · IaC & Container Security · High IaC · ×1
  • REDACTED
S1 · Web-Security Posture · TLS certificate validation disabled · ×1
  • TLS certificate validation disabled BTCPayServer/Plugins/Emails/Services/EmailSettings.cs:110 — `ServerCertificateValidationCallback` is assigned a callback that returns `true` unconditionally, so every TLS peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Delete the override and let the platform validate. If a specific self-signed or internally-issued certificate genuinely has to be trusted, pin THAT one — compare the presented certificate's public key or thumbprint against the expected value and return `false` for everything else — and scope it to the single handler that talks to that host rather than to the whole process. If the override exists only to get past a development certificate, gate it on a build configuration or an explicit opt-in setting so it cannot ship.
Serious — 1026 finding(s)
D17 · Explicit Debt · Dead code · ×76
  • Dead code: SearchTermRouteKey BTCPayServer/Components/DateRangeSelector/DateRangeSelector.cs:26 — Field SearchTermRouteKey — Roslyn's SymbolFinder walked every project the solution loads, including BTCPayServer, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: GetPayoutSpecificActions BTCPayServer/Data/Payouts/IPayoutHandler.cs:42 — Method GetPayoutSpecificActions — Roslyn's SymbolFinder walked every project the solution loads, including BTCPayServer, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: GetEnabledPaymentMethods REDACTED:28 — Method GetEnabledPaymentMethods — Roslyn's SymbolFinder walked every project the solution loads, including BTCPayServer, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: IsLightningEnabled REDACTED:143 — Method IsLightningEnabled — Roslyn's SymbolFinder walked every project the solution loads, including BTCPayServer, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: IsLNUrlEnabled REDACTED:148 — Method IsLNUrlEnabled — Roslyn's SymbolFinder walked every project the solution loads, including BTCPayServer, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: ParseOutputDescriptor BTCPayServer/DerivationSchemeParser.cs:25 — Method ParseOutputDescriptor — Roslyn's SymbolFinder walked every project the solution loads, including BTCPayServer, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: ItemCombinations BTCPayServer/DerivationSchemeParser.cs:388 — Method ItemCombinations — Roslyn's SymbolFinder walked every project the solution loads, including BTCPayServer, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: GetSigningAccountKeySettings BTCPayServer/DerivationSchemeSettings.cs:72 — Method GetSigningAccountKeySettings — Roslyn's SymbolFinder walked every project the solution loads, including BTCPayServer, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: GetSigningAccountKeySettings BTCPayServer/DerivationSchemeSettings.cs:87 — Method GetSigningAccountKeySettings — Roslyn's SymbolFinder walked every project the solution loads, including BTCPayServer, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: GetSigningAccountKeySettings BTCPayServer/DerivationSchemeSettings.cs:91 — Method GetSigningAccountKeySettings — Roslyn's SymbolFinder walked every project the solution loads, including BTCPayServer, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: GetSigningAccountKeySettingsOrDefault BTCPayServer/DerivationSchemeSettings.cs:95 — Method GetSigningAccountKeySettingsOrDefault — Roslyn's SymbolFinder walked every project the solution loads, including BTCPayServer, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: IsFullySetup BTCPayServer/DerivationSchemeSettings.cs:158 — Method IsFullySetup — Roslyn's SymbolFinder walked every project the solution loads, including BTCPayServer, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: Private BTCPayServer/Extensions.cs:1083 — Method Private — Roslyn's SymbolFinder walked every project the solution loads, including BTCPayServer, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: Private BTCPayServer/Extensions.cs:1084 — Method Private — Roslyn's SymbolFinder walked every project the solution loads, including BTCPayServer, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: GetAdjustedForegroundForBackground BTCPayServer/Extensions/ColorExtensions.cs:31 — Method GetAdjustedForegroundForBackground — Roslyn's SymbolFinder walked every project the solution loads, including BTCPayServer, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: EnsureLocal BTCPayServer/Extensions/UrlHelperExtensions.cs:22 — Method EnsureLocal — Roslyn's SymbolFinder walked every project the solution loads, including BTCPayServer, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: IndexLink BTCPayServer/Extensions/UrlHelperExtensions.cs:132 — Method IndexLink — Roslyn's SymbolFinder walked every project the solution loads, including BTCPayServer, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: Fido2AuthenticationViewModel BTCPayServer/Fido2/Models/Fido2AuthenticationViewModel.cs:6 — NamedType Fido2AuthenticationViewModel — Roslyn's SymbolFinder walked every project the solution loads, including BTCPayServer, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: GetMigrationState BTCPayServer/Hosting/MigrationStartupTask.cs:399 — Method GetMigrationState — Roslyn's SymbolFinder walked every project the solution loads, including BTCPayServer, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: UpdateSequenceInvoiceSearch BTCPayServer/Hosting/MigrationStartupTask.cs:406 — Method UpdateSequenceInvoiceSearch — Roslyn's SymbolFinder walked every project the solution loads, including BTCPayServer, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: DateTimeMilliJsonConverter BTCPayServer/JsonConverters/DateTimeMilliJsonConverter.cs:7 — NamedType DateTimeMilliJsonConverter — Roslyn's SymbolFinder walked every project the solution loads, including BTCPayServer, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: AuthorizeViewModel BTCPayServer/Models/Authorization/AuthorizeViewModel.cs:7 — NamedType AuthorizeViewModel — Roslyn's SymbolFinder walked every project the solution loads, including BTCPayServer, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: AddressModel BTCPayServer/Models/InvoicingModels/InvoiceDetailsModel.cs:58 — NamedType AddressModel — Roslyn's SymbolFinder walked every project the solution loads, including BTCPayServer, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: RemoveLoginViewModel BTCPayServer/Models/ManageViewModels/RemoveLoginViewModel.cs:3 — NamedType RemoveLoginViewModel — Roslyn's SymbolFinder walked every project the solution loads, including BTCPayServer, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: PaymentViewModel BTCPayServer/Models/StoreViewModels/PaymentViewModel.cs:7 — NamedType PaymentViewModel — Roslyn's SymbolFinder walked every project the solution loads, including BTCPayServer, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • + 51 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED · ×49
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 24 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED · ×37
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 12 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×35
  • Swallowed exception (empty catch) BTCPayServer/Components/MainNav/MainNav.cs:73 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) BTCPayServer/Configuration/DefaultConfiguration.cs:97 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) BTCPayServer/Controllers/Macaroons.cs:45 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) BTCPayServer/Controllers/UIInvoiceController.UI.cs:1071 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) BTCPayServer/Controllers/UIInvoiceController.UI.cs:1093 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) BTCPayServer/Controllers/UIPublicLightningNodeInfoController.cs:56 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:675 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) BTCPayServer/Data/Payouts/LightningLike/LightningLikePayoutHandler.cs:97 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) BTCPayServer/Data/Payouts/LightningLike/LightningLikePayoutHandler.cs:173 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) BTCPayServer/DerivationSchemeParser.cs:274 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) BTCPayServer/Extensions.cs:600 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) BTCPayServer/Extensions.cs:601 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) BTCPayServer/Extensions.cs:658 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) BTCPayServer/Extensions.cs:861 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) BTCPayServer/Extensions/UserExtensions.cs:19 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) BTCPayServer/Fido2/Fido2Service.cs:179 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) BTCPayServer/HostedServices/BackgroundJobSchedulerHostedService.cs:118 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) BTCPayServer/HostedServices/DbMigrationsHostedService.cs:155 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) BTCPayServer/HostedServices/InvoiceWatcher.cs:219 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) BTCPayServer/HostedServices/InvoiceWatcher.cs:332 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) BTCPayServer/HostedServices/NBXplorerWaiter.cs:135 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) BTCPayServer/HostedServices/NBXplorerWaiter.cs:214 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) BTCPayServer/HostedServices/PeriodicTaskLauncherHostedService.cs:61 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) BTCPayServer/HostedServices/PeriodicTaskLauncherHostedService.cs:77 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) BTCPayServer/HostedServices/RatesHostedService.cs:94 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • + 10 more in this group — see findings.md.
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×34
  • Focus outline removed in CSS without a :focus replacement BTCPayServer/wwwroot/pos/cart.css:53 — `#RecentTransactionsToggle` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement BTCPayServer/wwwroot/plugins/GlobalSearch/global-search.css:68 — `#globalNav .globalSearch-input:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement BTCPayServer/wwwroot/main/layout.css:46 — `#mainMenuHead .mainMenuButton` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement BTCPayServer/wwwroot/main/layout.css:163 — `#globalNav .globalNav-btn` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement BTCPayServer/wwwroot/main/layout.css:717 — `#mainNav` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement BTCPayServer/wwwroot/main/site.css:911 — `.ts-wrapper.form-control .ts-control` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement BTCPayServer/wwwroot/main/rtl/layout.rtl.css:46 — `#mainMenuHead .mainMenuButton` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement BTCPayServer/wwwroot/main/rtl/layout.rtl.css:163 — `#globalNav .globalNav-btn` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement BTCPayServer/wwwroot/main/rtl/layout.rtl.css:759 — `#mainNav` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement BTCPayServer/wwwroot/main/rtl/site.rtl.css:911 — `.ts-wrapper.form-control .ts-control` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement BTCPayServer/wwwroot/main/bootstrap/bootstrap.css:2144 — `.form-control-plaintext:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement BTCPayServer/wwwroot/main/bootstrap/bootstrap.css:2447 — `.form-range:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement BTCPayServer/wwwroot/main/bootstrap/bootstrap.css:2995 — `.btn-check:focus-visible + .btn` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement BTCPayServer/wwwroot/main/bootstrap/bootstrap.css:5543 — `.modal` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement BTCPayServer/wwwroot/main/bootstrap/bootstrap.css:5596 — `.modal-content` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement BTCPayServer/wwwroot/main/bootstrap/bootstrap.css:6190 — `.carousel-control-prev:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement BTCPayServer/wwwroot/main/bootstrap/bootstrap.css:6366 — `.offcanvas-sm` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement BTCPayServer/wwwroot/main/bootstrap/bootstrap.css:6438 — `.offcanvas-md` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement BTCPayServer/wwwroot/main/bootstrap/bootstrap.css:6510 — `.offcanvas-lg` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement BTCPayServer/wwwroot/main/bootstrap/bootstrap.css:6582 — `.offcanvas-xl` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement BTCPayServer/wwwroot/main/bootstrap/bootstrap.css:6654 — `.offcanvas-xxl` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement BTCPayServer/wwwroot/main/bootstrap/bootstrap.css:6725 — `.offcanvas` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement BTCPayServer/wwwroot/main/bootstrap/bootstrap.rtl.css:2142 — `.form-control-plaintext:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement BTCPayServer/wwwroot/main/bootstrap/bootstrap.rtl.css:2445 — `.form-range:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement BTCPayServer/wwwroot/main/bootstrap/bootstrap.rtl.css:2993 — `.btn-check:focus-visible + .btn` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • + 9 more in this group — see findings.md.
X2 · Cancellation propagation · Async method without CancellationToken · ×34
  • Async method without CancellationToken: Bufferize BTCPayServer/BufferizedFormFile.cs:32 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: InvokeAsync BTCPayServer/Components/AppSales/AppSales.cs:24 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: InvokeAsync BTCPayServer/Components/AppTopItems/AppTopItems.cs:19 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: InvokeAsync BTCPayServer/Components/GlobalNav/GlobalNav.cs:17 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: InvokeAsync BTCPayServer/Components/StoreLightningServices/StoreLightningServices.cs:28 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: InvokeAsync BTCPayServer/Components/StoreNumbers/StoreNumbers.cs:30 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: InvokeAsync BTCPayServer/Components/StoreRecentInvoices/StoreRecentInvoices.cs:13 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: InvokeAsync BTCPayServer/Components/StoreSelector/StoreSelector.cs:16 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: Expand BTCPayServer/Configuration/ExternalConnectionString.cs:34 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GetLink BTCPayServer/Configuration/ExternalService.cs:118 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GetKey BTCPayServer/Controllers/GreenField/GreenfieldApiKeysController.cs:28 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: CreateUserAPIKey BTCPayServer/Controllers/GreenField/GreenfieldApiKeysController.cs:47 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: RevokeAPIKey BTCPayServer/Controllers/GreenField/GreenfieldApiKeysController.cs:106 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: CreateCrowdfundApp BTCPayServer/Controllers/GreenField/GreenfieldAppsController.cs:60 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: CreatePointOfSaleApp BTCPayServer/Controllers/GreenField/GreenfieldAppsController.cs:91 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: UpdatePointOfSaleApp BTCPayServer/Controllers/GreenField/GreenfieldAppsController.cs:122 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GetAllApps BTCPayServer/Controllers/GreenField/GreenfieldAppsController.cs:162 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GetAllApps BTCPayServer/Controllers/GreenField/GreenfieldAppsController.cs:171 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GetApp BTCPayServer/Controllers/GreenField/GreenfieldAppsController.cs:180 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GetPosApp BTCPayServer/Controllers/GreenField/GreenfieldAppsController.cs:193 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: UpdateCrowdfundApp BTCPayServer/Controllers/GreenField/GreenfieldAppsController.cs:201 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GetCrowdfundApp BTCPayServer/Controllers/GreenField/GreenfieldAppsController.cs:227 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: DeleteApp BTCPayServer/Controllers/GreenField/GreenfieldAppsController.cs:235 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GetAppSales BTCPayServer/Controllers/GreenField/GreenfieldAppsController.cs:247 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GetAppTopItems BTCPayServer/Controllers/GreenField/GreenfieldAppsController.cs:258 — No CancellationToken parameter — this work can't be stopped early once started.
  • + 9 more in this group — see findings.md.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×33
  • Outbound HTTP without resilience BTCPayServer.Client/BTCPayServerClient.cs:31 — `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default).
  • Outbound HTTP without resilience BTCPayServer.Client/BTCPayServerClient.cs:38 — `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default).
  • Outbound HTTP without resilience BTCPayServer.Client/BTCPayServerClient.cs:47 — `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default).
  • Outbound HTTP without resilience BTCPayServer.Rating/Providers/BTCTurkRateProvider.cs:24 — `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default).
  • Outbound HTTP without resilience BTCPayServer.Rating/Providers/BareBitcoinRateProvider.cs:17 — `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default).
  • Outbound HTTP without resilience BTCPayServer.Rating/Providers/BitbankRateProvider.cs:19 — `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default).
  • Outbound HTTP without resilience BTCPayServer.Rating/Providers/BitcoinKenyaRateProvider.cs:18 — `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default).
  • Outbound HTTP without resilience BTCPayServer.Rating/Providers/BitflyerRateProvider.cs:15 — `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default).
  • Outbound HTTP without resilience BTCPayServer.Rating/Providers/BitmyntRateProvider.cs:17 — `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default).
  • Outbound HTTP without resilience BTCPayServer.Rating/Providers/BitnobRateProvider.cs:16 — `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default).
  • Outbound HTTP without resilience BTCPayServer.Rating/Providers/BitpayRateProvider.cs:15 — `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default).
  • Outbound HTTP without resilience BTCPayServer.Rating/Providers/BudaRateProvider.cs:14 — `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default).
  • Outbound HTTP without resilience BTCPayServer.Rating/Providers/ByllsRateProvider.cs:14 — `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default).
  • Outbound HTTP without resilience BTCPayServer.Rating/Providers/CoinmateRateProvider.cs:16 — `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default).
  • Outbound HTTP without resilience BTCPayServer.Rating/Providers/FreeCurrencyRatesRateProvider.cs:16 — `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default).
  • Outbound HTTP without resilience BTCPayServer.Rating/Providers/HitBTCRateProvider.cs:13 — `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default).
  • Outbound HTTP without resilience BTCPayServer.Rating/Providers/NotbankExchangeRateProvider.cs:20 — `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default).
  • Outbound HTTP without resilience BTCPayServer.Rating/Providers/RipioExchangeProvider.cs:17 — `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default).
  • Outbound HTTP without resilience BTCPayServer.Rating/Providers/YadioRateProvider.cs:16 — `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default).
  • Outbound HTTP without resilience BTCPayServer/Hosting/BTCPayServerServices.cs:104 — `services.AddHttpClient()` registers an outbound HTTP client with no resilience handler, retry policy or timeout of its own in its builder chain. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default).
  • Outbound HTTP without resilience BTCPayServer/Hosting/BTCPayServerServices.cs:135 — `services.AddHttpClient(LightningClientFactoryService.NamedClient)` registers an outbound HTTP client with no resilience handler, retry policy or timeout of its own in its builder chain. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default).
  • Outbound HTTP without resilience BTCPayServer/Hosting/BTCPayServerServices.cs:137 — `services.AddHttpClient(LightningClientFactoryService.SafeNamedClient)` registers an outbound HTTP client with no resilience handler, retry policy or timeout of its own in its builder chain. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default).
  • Outbound HTTP without resilience BTCPayServer/Hosting/BTCPayServerServices.cs:141 — `services.AddHttpClient(LightningClientFactoryService.OnionNamedClient)` registers an outbound HTTP client with no resilience handler, retry policy or timeout of its own in its builder chain. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default).
  • Outbound HTTP without resilience BTCPayServer/Hosting/BTCPayServerServices.cs:400 — `services.AddHttpClient(LightningLikePayoutHandler.LightningLikePayoutHandlerO...` registers an outbound HTTP client with no resilience handler, retry policy or timeout of its own in its builder chain. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default).
  • Outbound HTTP without resilience BTCPayServer/Hosting/BTCPayServerServices.cs:402 — `services.AddHttpClient(LightningLikePayoutHandler.LightningLikePayoutHandlerC...` registers an outbound HTTP client with no resilience handler, retry policy or timeout of its own in its builder chain. A slow or failing dependency will hold this service's request, thread or connection — and cascade — until the call gives up on its own (100 s for HttpClient's default).
  • + 8 more in this group — see findings.md.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×33
  • Untrusted text written into markup unescaped BTCPayServer.Abstractions/Extensions/ViewsRazor.cs:178 — `relative` is text this program did not author, and it is written into a quoted attribute value through `new HtmlString(…)` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped BTCPayServer.Abstractions/Extensions/ViewsRazor.cs:187 — `relative` is text this program did not author, and it is written into a quoted attribute value through `new HtmlString(…)` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped BTCPayServer.Abstractions/Extensions/ViewsRazor.cs:196 — `relative` is text this program did not author, and it is written into a quoted attribute value through `new HtmlString(…)` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped BTCPayServer.Abstractions/Services/Safe.cs:42 — `_jsonHelper.Serialize(model)` is text this program did not author, and it is written into the text of an element through `Html.Raw` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped BTCPayServer.Abstractions/Services/Safe.cs:45 — `RawMeta(inputHtml, out _)` is text this program did not author, and it is written into the text of an element through `Html.Raw` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped BTCPayServer.Abstractions/TagHelpers/PermissionedFormTagHelper.cs:38 — `html` is text this program did not author, and it is written into the text of an element through `SetHtmlContent` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped BTCPayServer.Abstractions/TagHelpers/SrvModel.cs:29 — `$"var {VarName} = {_safe.Json(Model)};"` is text this program did not author, and it is written into the text of an element through `SetHtmlContent` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped BTCPayServer.Abstractions/TagHelpers/UrlResolutionTagHelper2.cs:169 — `stringValue` is text this program did not author, and it is written into the text of an element through `new HtmlString(…)` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped BTCPayServer/Blazor/VaultBridge/Elements/Feedback.razor:12 — `Html` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped BTCPayServer/Blazor/VaultBridge/Elements/Warning.razor:9 — `Html` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped BTCPayServer/Components/QRCode/QRCode.cs:20 — `b64` is text this program did not author, and it is written into a URL attribute through `new HtmlString(…)` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped BTCPayServer/Plugins/Emails/Services/EmailSettings.cs:83 — `message` is text this program did not author, and it is written into the text of an element through an HTML e-mail body with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:656 — `encoder.Encode(appUrl)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through a `StringBuilder` building markup with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
  • Untrusted text written into markup unescaped REDACTED:669 — `encoder.Encode(appUrl)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through a `StringBuilder` building markup with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
  • Untrusted text written into markup unescaped BTCPayServer/TagHelpers/CurrenciesSuggestionsTagHelper.cs:37 — `c.Code` is text this program did not author, and it is written into a quoted attribute value through `AppendHtml` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped BTCPayServer/TagHelpers/TranslateTagHelper.cs:58 — `_safe.Raw(newContent.Value)` is text this program did not author, and it is written into the text of an element through `SetHtmlContent` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:25 — `$"<h{Model.Level + 3} class=\"mb-3 fw-semibold\">"` is text this program did not author, and it is written into the text of an element through Razor's `Html.Raw` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:27 — `$"</h{Model.Level + 3}>"` is text this program did not author, and it is written into the text of an element through Razor's `Html.Raw` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:39 — `$"<h{Model.Level + 3} class=\"mb-3 fw-semibold\">"` is text this program did not author, and it is written into the text of an element through Razor's `Html.Raw` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:41 — `$"</h{Model.Level + 3}>"` is text this program did not author, and it is written into the text of an element through Razor's `Html.Raw` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped BTCPayServer/wwwroot/js/copy-to-clipboard.js:8 — `el.innerHTML.replace('#actions-copy','#checkmark')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped BTCPayServer/wwwroot/js/copy-to-clipboard.js:23 — `el.innerHTML.replace('#checkmark','#actions-copy')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped BTCPayServer/wwwroot/js/copy-to-clipboard.js:25 — `el.dataset.clipboardInitial` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:253 — `aHTML.join('')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped BTCPayServer/wwwroot/js/store-reports.js:22 — `$a.innerHTML.replace(/#actions-sort-(asc|desc)"/,'#actions-sort"')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • + 8 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×28
  • Hotspot: BTCPayServer/Controllers/UIInvoiceController.UI.cs BTCPayServer/Controllers/UIInvoiceController.UI.cs:773 — BTCPayServer/Controllers/UIInvoiceController.UI.cs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in UIInvoiceController.GetCheckoutModel at line 773. 1 of those changes was a fix/bug commit, and the other 14 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 12:15:29 +09:00' --until='2026-10-23 12:15:29 +09:00' --full-history --no-merges -- BTCPayServer/Controllers/UIInvoiceController.UI.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:195 — REDACTED changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 67 in UIPointOfSaleController.ViewPointOfSale at line 195. 1 of those changes was a fix/bug commit, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 12:15:29 +09:00' --until='2026-10-23 12:15:29 +09:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: BTCPayServer/Hosting/BTCPayServerServices.cs BTCPayServer/Hosting/BTCPayServerServices.cs:87 — BTCPayServer/Hosting/BTCPayServerServices.cs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in BTCPayServerServices.AddBTCPayServer at line 87. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 12:15:29 +09:00' --until='2026-10-23 12:15:29 +09:00' --full-history --no-merges -- BTCPayServer/Hosting/BTCPayServerServices.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: BTCPayServer/Controllers/GreenField/GreenfieldStoresController.cs BTCPayServer/Controllers/GreenField/GreenfieldStoresController.cs:321 — BTCPayServer/Controllers/GreenField/GreenfieldStoresController.cs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in GreenfieldStoresController.Validate at line 321. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 12:15:29 +09:00' --until='2026-10-23 12:15:29 +09:00' --full-history --no-merges -- BTCPayServer/Controllers/GreenField/GreenfieldStoresController.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs:328 — BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in GreenfieldInvoiceController.RefundInvoice at line 328. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 12:15:29 +09:00' --until='2026-10-23 12:15:29 +09:00' --full-history --no-merges -- BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: BTCPayServer/wwwroot/plugins/GlobalSearch/global-search.js BTCPayServer/wwwroot/plugins/GlobalSearch/global-search.js:6 — BTCPayServer/wwwroot/plugins/GlobalSearch/global-search.js changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 89 in global-search.initGlobalSearch at line 6. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 12:15:29 +09:00' --until='2026-10-23 12:15:29 +09:00' --full-history --no-merges -- BTCPayServer/wwwroot/plugins/GlobalSearch/global-search.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.PSBT.cs BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.PSBT.cs:447 — BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.PSBT.cs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in UIWalletsController.WalletPSBTReady at line 447. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 12:15:29 +09:00' --until='2026-10-23 12:15:29 +09:00' --full-history --no-merges -- BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.PSBT.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:131 — REDACTED changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 79 in PayJoinEndpointController.Submit at line 131. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 12:15:29 +09:00' --until='2026-10-23 12:15:29 +09:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: BTCPayServer/Payments/Lightning/LightningLikePaymentHandler.cs BTCPayServer/Payments/Lightning/LightningLikePaymentHandler.cs:265 — BTCPayServer/Payments/Lightning/LightningLikePaymentHandler.cs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in LightningLikePaymentHandler.ValidatePaymentMethodConfig at line 265. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 12:15:29 +09:00' --until='2026-10-23 12:15:29 +09:00' --full-history --no-merges -- BTCPayServer/Payments/Lightning/LightningLikePaymentHandler.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: BTCPayServer/Controllers/GreenField/GreenfieldUsersController.cs BTCPayServer/Controllers/GreenField/GreenfieldUsersController.cs:155 — BTCPayServer/Controllers/GreenField/GreenfieldUsersController.cs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in GreenfieldUsersController.UpdateCurrentUser at line 155. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 12:15:29 +09:00' --until='2026-10-23 12:15:29 +09:00' --full-history --no-merges -- BTCPayServer/Controllers/GreenField/GreenfieldUsersController.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: BTCPayServer/Extensions.cs BTCPayServer/Extensions.cs:286 — BTCPayServer/Extensions.cs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in Extensions.TryParseLegacy at line 286. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 12:15:29 +09:00' --until='2026-10-23 12:15:29 +09:00' --full-history --no-merges -- BTCPayServer/Extensions.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: BTCPayServer/wwwroot/crowdfund/app.js BTCPayServer/wwwroot/crowdfund/app.js:4 — BTCPayServer/wwwroot/crowdfund/app.js changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in app.document.addEventListener("DOMContentLoaded") at line 4. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 12:15:29 +09:00' --until='2026-10-23 12:15:29 +09:00' --full-history --no-merges -- BTCPayServer/wwwroot/crowdfund/app.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs:182 — BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in UIWalletsController.WalletBumpFee at line 182. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 12:15:29 +09:00' --until='2026-10-23 12:15:29 +09:00' --full-history --no-merges -- BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:517 — REDACTED changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in UIServerController.LndServices at line 517. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 12:15:29 +09:00' --until='2026-10-23 12:15:29 +09:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:53 — REDACTED changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in NFCController.SubmitLNURLWithdrawForInvoice at line 53. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 12:15:29 +09:00' --until='2026-10-23 12:15:29 +09:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: BTCPayServer/Controllers/GreenField/GreenfieldLightningNodeApiController.cs BTCPayServer/Controllers/GreenField/GreenfieldLightningNodeApiController.cs:233 — BTCPayServer/Controllers/GreenField/GreenfieldLightningNodeApiController.cs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in GreenfieldLightningNodeApiController.PayInvoice at line 233. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 12:15:29 +09:00' --until='2026-10-23 12:15:29 +09:00' --full-history --no-merges -- BTCPayServer/Controllers/GreenField/GreenfieldLightningNodeApiController.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: BTCPayServer/Plugins/Monetization/MonetizationHostedService.cs BTCPayServer/Plugins/Monetization/MonetizationHostedService.cs:50 — BTCPayServer/Plugins/Monetization/MonetizationHostedService.cs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in MonetizationHostedService.ProcessEvent at line 50. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 12:15:29 +09:00' --until='2026-10-23 12:15:29 +09:00' --full-history --no-merges -- BTCPayServer/Plugins/Monetization/MonetizationHostedService.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: BTCPayServer/Controllers/UIStoresController.Settings.cs BTCPayServer/Controllers/UIStoresController.Settings.cs:266 — BTCPayServer/Controllers/UIStoresController.Settings.cs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in UIStoresController.CheckoutAppearance at line 266. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 12:15:29 +09:00' --until='2026-10-23 12:15:29 +09:00' --full-history --no-merges -- BTCPayServer/Controllers/UIStoresController.Settings.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: BTCPayServer/Plugins/Subscriptions/Controllers/GreenfieldOfferingController.cs BTCPayServer/Plugins/Subscriptions/Controllers/GreenfieldOfferingController.cs:156 — BTCPayServer/Plugins/Subscriptions/Controllers/GreenfieldOfferingController.cs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in GreenfieldOfferingController.CreateOfferingPlan at line 156. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 12:15:29 +09:00' --until='2026-10-23 12:15:29 +09:00' --full-history --no-merges -- BTCPayServer/Plugins/Subscriptions/Controllers/GreenfieldOfferingController.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: BTCPayServer/Controllers/UIManageController.APIKeys.cs BTCPayServer/Controllers/UIManageController.APIKeys.cs:178 — BTCPayServer/Controllers/UIManageController.APIKeys.cs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in UIManageController.AuthorizeAPIKey at line 178. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 12:15:29 +09:00' --until='2026-10-23 12:15:29 +09:00' --full-history --no-merges -- BTCPayServer/Controllers/UIManageController.APIKeys.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: BTCPayServer/Configuration/BTCPayServerOptions.cs BTCPayServer/Configuration/BTCPayServerOptions.cs:57 — BTCPayServer/Configuration/BTCPayServerOptions.cs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in BTCPayServerOptions.LoadArgs at line 57. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 12:15:29 +09:00' --until='2026-10-23 12:15:29 +09:00' --full-history --no-merges -- BTCPayServer/Configuration/BTCPayServerOptions.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: BTCPayServer/Controllers/UIInvoiceController.cs BTCPayServer/Controllers/UIInvoiceController.cs:207 — BTCPayServer/Controllers/UIInvoiceController.cs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in UIInvoiceController.CreateInvoiceCoreRaw at line 207. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 12:15:29 +09:00' --until='2026-10-23 12:15:29 +09:00' --full-history --no-merges -- BTCPayServer/Controllers/UIInvoiceController.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: BTCPayServer/Services/Labels/LabelService.cs BTCPayServer/Services/Labels/LabelService.cs:25 — BTCPayServer/Services/Labels/LabelService.cs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in LabelService.CreateTransactionTagModels at line 25. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 12:15:29 +09:00' --until='2026-10-23 12:15:29 +09:00' --full-history --no-merges -- BTCPayServer/Services/Labels/LabelService.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: BTCPayServer/Controllers/GreenField/GreenfieldStoreUsersController.cs BTCPayServer/Controllers/GreenField/GreenfieldStoreUsersController.cs:200 — BTCPayServer/Controllers/GreenField/GreenfieldStoreUsersController.cs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in GreenfieldStoreUsersController.GetStoreUserRequest at line 200. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 12:15:29 +09:00' --until='2026-10-23 12:15:29 +09:00' --full-history --no-merges -- BTCPayServer/Controllers/GreenField/GreenfieldStoreUsersController.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: BTCPayServer/Plugins/PluginManager.cs BTCPayServer/Plugins/PluginManager.cs:193 — BTCPayServer/Plugins/PluginManager.cs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in PluginManager.AddPlugins at line 193. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 12:15:29 +09:00' --until='2026-10-23 12:15:29 +09:00' --full-history --no-merges -- BTCPayServer/Plugins/PluginManager.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 3 more in this group — see findings.md.
D17 · Explicit Debt · TodoComment · ×22
  • TodoComment BTCPayServer.Client/Models/WebhookEventType.cs:3 — // TODO: This should be moved to individual Webhook Event Providers — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment BTCPayServer.Tests/BitpayTests.cs:151 — // TODO, we should check that ReceivedPayment is sent after PaidInFull — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment BTCPayServer.Tests/BitpayTests.cs:163 — //TODO: Fix, out of order event mean we can receive invoice_confirmed after invoice_complete — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment BTCPayServer.Tests/PlaywrightTests.cs:2228 — // s.AssertAccessDenied(); // TODO: Playwright equivalent if needed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment BTCPayServer.Tests/ServerTester.cs:80 — // TODO: The fact that we use same conn string as development database can cause huge problems with tests — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment BTCPayServer.Tests/ThirdPartyTests.cs:126 — // TODO: Check once in a while whether or not they are working again — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment BTCPayServer.Tests/WebhooksTests.cs:432 — //TODO: this is a bug, we should not have these props in create request — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment BTCPayServer.Tests/WebhooksTests.cs:442 — //TODO: this is a bug, we should not have these props in create request — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment BTCPayServer/Controllers/UIInvoiceController.UI.cs:298 — // TODO: Having dedicated UI later on — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment BTCPayServer/Controllers/UIInvoiceController.UI.cs:556 — // TODO: Having dedicated UI later on — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment BTCPayServer/Controllers/UIInvoiceController.UI.cs:388 — //TODO: What if fetching rate failed? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment BTCPayServer/Controllers/UIInvoiceController.UI.cs:514 — //TODO: What if fetching rate failed? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment BTCPayServer/Controllers/UIInvoiceController.UI.cs:755 — // TODO: Can happen if the invoice has lazy activation which failed for all payment methods. We should display error instead... — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:298 — //TODO: Allow other apps to define lnurl support — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment BTCPayServer/HostedServices/DbMigrationsHostedService.cs:323 — // TODO: Are there more things to cache? PaymentData? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment BTCPayServer/Plugins/Emails/Controllers/UIEmailRuleControllerBase.cs:153 — // TODO: Do direct db update to avoid race condition — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment BTCPayServer/Plugins/Subscriptions/SubscriberWebhookProvider.cs:36 — // TODO: When the subscriber can customize the email, also check it! — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment BTCPayServer/Security/BuiltInPermissionHandler.cs:23 — //TODO: In the future, we will add these store permissions to actual aspnet roles and remove this class. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment BTCPayServer/Security/SetContextFilter.cs:52 — //TODO: We should probably do this on controller specific filters, this would be better example for plugins — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment BTCPayServer/Services/BTCPayNetworkJsonSerializerSettings.cs:40 — // TODO: Get rid of this serializer — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment BTCPayServer/Services/Fees/FeeProviderFactory.cs:34 — // TODO: Pluginify this — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment BTCPayServer/Services/LightningHistogramService.cs:27 — // TODO: We can't just list all invoices and payments, we need to filter them by date
D3 · God Classes · MethodTooLong · ×20
  • MethodTooLong: BTCPayServerServices.AddBTCPayServer BTCPayServer/Hosting/BTCPayServerServices.cs:87 — MethodTooLong — AddBTCPayServer runs 449 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 349 over it, 4.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PayJoinEndpointController.Submit REDACTED:131 — MethodTooLong — Submit runs 285 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 185 over it, 2.85× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: UIWalletsController.WalletSend BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs:1189 — MethodTooLong — WalletSend runs 213 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 113 over it, 2.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: UIPointOfSaleController.ViewPointOfSale REDACTED:195 — MethodTooLong — ViewPointOfSale runs 191 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 91 over it, 1.91× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GreenfieldStoreOnChainWalletsController.CreateOnChainTransaction BTCPayServer/Plugins/Wallets/Controllers/GreenfieldStoreOnChainWalletsController.cs:344 — MethodTooLong — CreateOnChainTransaction runs 186 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 86 over it, 1.86× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: UIWalletsController.WalletBumpFee BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs:182 — MethodTooLong — WalletBumpFee runs 172 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 72 over it, 1.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: UIInvoiceController.GetCheckoutModel BTCPayServer/Controllers/UIInvoiceController.UI.cs:773 — MethodTooLong — GetCheckoutModel runs 159 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 59 over it, 1.59× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: UIInvoiceController.Refund BTCPayServer/Controllers/UIInvoiceController.UI.cs:334 — MethodTooLong — Refund runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: UIStorePullPaymentsController.PayoutsPost BTCPayServer/Controllers/UIStorePullPaymentsController.PullPayments.cs:297 — MethodTooLong — PayoutsPost runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PluginManager.AddPlugins BTCPayServer/Plugins/PluginManager.cs:193 — MethodTooLong — AddPlugins runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GreenfieldInvoiceController.RefundInvoice BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs:328 — MethodTooLong — RefundInvoice runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: UIServerMonetizationController.Monetization BTCPayServer/Plugins/Monetization/Controllers/UIServerMonetizationController.cs:147 — MethodTooLong — Monetization runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: UIWalletsController.WalletPSBTReady BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.PSBT.cs:447 — MethodTooLong — WalletPSBTReady runs 123 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: UIWalletsController.FetchTransactionDetails BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.PSBT.cs:256 — MethodTooLong — FetchTransactionDetails runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Startup.ConfigureServices BTCPayServer/Hosting/Startup.cs:91 — MethodTooLong — ConfigureServices runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: UILNURLController.GetLNURLForInvoice REDACTED:742 — MethodTooLong — GetLNURLForInvoice runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PaymentData.TryMigrate BTCPayServer.Data/Data/PaymentData.Migration.cs:15 — MethodTooLong — TryMigrate runs 111 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 11 over it, 1.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PullPaymentHostedService.HandleCreatePayout BTCPayServer/HostedServices/PullPaymentHostedService.cs:633 — MethodTooLong — HandleCreatePayout runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DbMigrationsHostedService.MigratedTransactionLabels BTCPayServer/HostedServices/DbMigrationsHostedService.cs:100 — MethodTooLong — MigratedTransactionLabels runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: UICrowdfundController.ContributeToCrowdfund REDACTED:91 — MethodTooLong — ContributeToCrowdfund runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D3 · God Classes · FileTooLong · ×20
  • FileTooLong: Controllers/UIWalletsController.cs BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs — FileTooLong — 1553 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1053 over it, 3.11× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Controllers/UIInvoiceController.UI.cs BTCPayServer/Controllers/UIInvoiceController.UI.cs — FileTooLong — 925 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 425 over it, 1.85× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: HostedServices/PullPaymentHostedService.cs BTCPayServer/HostedServices/PullPaymentHostedService.cs — FileTooLong — 710 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 210 over it, 1.42× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 709 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 209 over it, 1.42× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: BTCPayServer/Extensions.cs BTCPayServer/Extensions.cs — FileTooLong — 684 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 184 over it, 1.37× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Invoices/InvoiceEntity.cs BTCPayServer/Services/Invoices/InvoiceEntity.cs — FileTooLong — 651 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 151 over it, 1.30× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Hosting/MigrationStartupTask.cs BTCPayServer/Hosting/MigrationStartupTask.cs — FileTooLong — 647 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 147 over it, 1.29× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 640 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 140 over it, 1.28× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Invoices/InvoiceRepository.cs BTCPayServer/Services/Invoices/InvoiceRepository.cs — FileTooLong — 639 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 139 over it, 1.28× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Controllers/GreenfieldStoreOnChainWalletsController.cs BTCPayServer/Plugins/Wallets/Controllers/GreenfieldStoreOnChainWalletsController.cs — FileTooLong — 616 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 116 over it, 1.23× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Stores/StoreRepository.cs BTCPayServer/Services/Stores/StoreRepository.cs — FileTooLong — 603 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 103 over it, 1.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 593 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 93 over it, 1.19× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Plugins/PluginManager.cs BTCPayServer/Plugins/PluginManager.cs — FileTooLong — 541 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 41 over it, 1.08× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 526 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 26 over it, 1.05× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: main/site.js BTCPayServer/wwwroot/main/site.js — FileTooLong — 524 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 24 over it, 1.05× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Controllers/UIStoreOnChainWalletsController.cs BTCPayServer/Plugins/Wallets/Controllers/UIStoreOnChainWalletsController.cs — FileTooLong — 522 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 22 over it, 1.04× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Services/WalletRepository.cs BTCPayServer/Services/WalletRepository.cs — FileTooLong — 513 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 13 over it, 1.03× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 510 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 10 over it, 1.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: GreenField/GreenfieldInvoiceController.cs BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs — FileTooLong — 508 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 8 over it, 1.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 507 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 7 over it, 1.01× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
AX2 · Stateful singletons · Stateful singleton · ×14
  • Stateful singleton: SelectedChains BTCPayServer.Common/SelectedChains.cs:8 — `SelectedChains` is a singleton (one shared instance) but mutates instance state outside any lock (chains; e.g. `chains` at line 49).
  • Stateful singleton: Logs BTCPayServer.Common/Logging/Logs.cs:7 — `Logs` is a singleton (one shared instance) but mutates instance state outside any lock (Configuration, PayServer, Events; e.g. `Configuration` at line 19).
  • Stateful singleton: SettingsAccessor BTCPayServer/Services/ISettingsAccessor.cs:17 — `SettingsAccessor` is a singleton (one shared instance) but mutates instance state outside any lock (_settings; e.g. `_settings` at line 30).
  • Stateful singleton: TorServices BTCPayServer/Services/TorServices.cs:15 — `TorServices` is a singleton (one shared instance) but mutates instance state outside any lock (firstRun, Services; e.g. `firstRun` at line 34).
  • Stateful singleton: BTCPayServerOptions BTCPayServer/Configuration/BTCPayServerOptions.cs:13 — `BTCPayServerOptions` is a singleton (one shared instance) but mutates instance state outside any lock (NetworkType, DockerDeployment, TorrcFile, TorServices, SocksEndpoint, UpdateUrl; e.g. `NetworkType` at line 59).
  • Stateful singleton: NBXplorerListener BTCPayServer/Payments/Bitcoin/NBXplorerListener.cs:28 — `NBXplorerListener` is a singleton (one shared instance) but mutates instance state outside any lock (_PollInterval; e.g. `_PollInterval` at line 75).
  • Stateful singleton: LightningListener BTCPayServer/Payments/Lightning/LightningListener.cs:31 — `LightningListener` is a singleton (one shared instance) but mutates instance state outside any lock (needCheckOfflinePayments, _PollInterval; e.g. `needCheckOfflinePayments` at line 90).
  • Stateful singleton: RatesHostedService BTCPayServer/HostedServices/RatesHostedService.cs:18 — `RatesHostedService` is a singleton (one shared instance) but mutates instance state outside any lock (_lastCacheDate; e.g. `_lastCacheDate` at line 99).
  • Stateful singleton: CurrencyNameTable BTCPayServer.Rating/CurrencyNameTable.cs:64 — `CurrencyNameTable` is a singleton (one shared instance) but mutates instance state outside any lock (_Currencies; e.g. `_Currencies` at line 92).
  • Stateful singleton: DelayedTransactionBroadcaster BTCPayServer/Services/DelayedTransactionBroadcaster.cs:15 — `DelayedTransactionBroadcaster` is a singleton (one shared instance) but mutates instance state outside any lock (disabled; e.g. `disabled` at line 136).
  • Stateful singleton: ResultItemViewModel BTCPayServer/Plugins/GlobalSearch/Views/GlobalSearchViewModel.cs:26 — `ResultItemViewModel` is a singleton (one shared instance) but mutates instance state outside any lock (Aliases; e.g. `Aliases` at line 53).
  • Stateful singleton: ActionResultItemViewModel BTCPayServer/Plugins/GlobalSearch/StaticSearchResultProvider.cs:14 — `ActionResultItemViewModel` is a singleton (one shared instance) but mutates instance state outside any lock (Aliases; e.g. `Aliases` at line 30).
  • Stateful singleton: CheckHostCommandsHostedService BTCPayServer/Plugins/Maintenance/CheckHostCommandsHostedService.cs:14 — `CheckHostCommandsHostedService` is a singleton (one shared instance) but mutates instance state outside any lock (_signalRegistration; e.g. `_signalRegistration` at line 31).
  • Stateful singleton: LocalizerService BTCPayServer/Plugins/Translations/LocalizerService.cs:23 — `LocalizerService` is a singleton (one shared instance) but mutates instance state outside any lock (_LoadedTranslations; e.g. `_LoadedTranslations` at line 44).
D3 · God Classes · ClassTooLong · ×13
  • ClassTooLong: UILNURLController REDACTED — ClassTooLong — 643 significant lines (blank, comment-only and punctuation-only lines excluded), 18 methods. The bar is 400 significant lines; this is 243 over it, 1.61× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: MigrationStartupTask BTCPayServer/Hosting/MigrationStartupTask.cs — ClassTooLong — 604 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 204 over it, 1.51× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: GreenfieldStoreOnChainWalletsController BTCPayServer/Plugins/Wallets/Controllers/GreenfieldStoreOnChainWalletsController.cs — ClassTooLong — 584 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 184 over it, 1.46× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: UIPointOfSaleController REDACTED — ClassTooLong — 551 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 151 over it, 1.38× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PullPaymentHostedService BTCPayServer/HostedServices/PullPaymentHostedService.cs — ClassTooLong — 514 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 114 over it, 1.29× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: UIStoreOnChainWalletsController BTCPayServer/Plugins/Wallets/Controllers/UIStoreOnChainWalletsController.cs — ClassTooLong — 488 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 88 over it, 1.22× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: GreenfieldPullPaymentController REDACTED — ClassTooLong — 482 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 82 over it, 1.21× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: GreenfieldInvoiceController BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs — ClassTooLong — 481 significant lines (blank, comment-only and punctuation-only lines excluded), 18 methods. The bar is 400 significant lines; this is 81 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: UIOfferingController REDACTED — ClassTooLong — 476 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 76 over it, 1.19× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: GreenfieldOfferingController BTCPayServer/Plugins/Subscriptions/Controllers/GreenfieldOfferingController.cs — ClassTooLong — 456 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 56 over it, 1.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: UIPluginManagerController BTCPayServer/Plugins/PluginManager/Controllers/UIPluginManagerController.cs — ClassTooLong — 444 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 44 over it, 1.11× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SubscriptionHostedService BTCPayServer/Plugins/Subscriptions/SubscriptionHostedService.cs — ClassTooLong — 416 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 16 over it, 1.04× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: UIStorePullPaymentsController BTCPayServer/Controllers/UIStorePullPaymentsController.PullPayments.cs — ClassTooLong — 413 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. The bar is 400 significant lines; this is 13 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D3 · God Classes · TooManyMethods · ×12
  • TooManyMethods: BTCPayServerClient REDACTED — TooManyMethods — 865 significant lines (blank, comment-only and punctuation-only lines excluded), 220 methods, declared across 30 files: REDACTED (19), BTCPayServer.Client/BTCPayServerClient.cs (17), BTCPayServer.Client/BTCPayServerClient.PullPayments.cs (16), BTCPayServer.Client/BTCPayServerClient.Apps.cs (14), +26 more file(s). The bar is 30 methods; this is 190 over it, 7.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: UIWalletsController BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs — TooManyMethods — 1890 significant lines (blank, comment-only and punctuation-only lines excluded), 66 methods, declared across 2 files: Controllers/UIWalletsController.cs (56), Controllers/UIWalletsController.PSBT.cs (10). The bar is 30 methods; this is 36 over it, 2.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: StoreRepository BTCPayServer/Services/Stores/StoreRepository.cs — TooManyMethods — 627 significant lines (blank, comment-only and punctuation-only lines excluded), 59 methods, declared across 2 files: Stores/StoreRepository.cs (50), Stores/StoreRepository.Invitation.cs (9). The bar is 30 methods; this is 29 over it, 1.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: UIServerController REDACTED — TooManyMethods — 1114 significant lines (blank, comment-only and punctuation-only lines excluded), 57 methods, declared across 4 files: REDACTED (22), Controllers/UIServerController.Users.cs (17), Controllers/UIServerController.Storage.cs (12), Controllers/UIServerController.Roles.cs (6). The bar is 30 methods; this is 27 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: UIStoresController BTCPayServer/Controllers/UIStoresController.LightningLike.cs — TooManyMethods — 1173 significant lines (blank, comment-only and punctuation-only lines excluded), 55 methods, declared across 8 files: Controllers/UIStoresController.LightningLike.cs (11), Controllers/UIStoresController.Users.cs (10), Controllers/UIStoresController.Settings.cs (9), Controllers/UIStoresController.Dashboard.cs (7), +4 more file(s). The bar is 30 methods; this is 25 over it, 1.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: InvoiceRepository BTCPayServer/Services/Invoices/InvoiceRepository.cs — TooManyMethods — 563 significant lines (blank, comment-only and punctuation-only lines excluded), 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WalletRepository BTCPayServer/Services/WalletRepository.cs — TooManyMethods — 455 significant lines (blank, comment-only and punctuation-only lines excluded), 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: UIInvoiceController BTCPayServer/Controllers/UIInvoiceController.UI.cs — TooManyMethods — 1152 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods, declared across 3 files: Controllers/UIInvoiceController.UI.cs (29), Controllers/UIInvoiceController.Testing.cs (5), Controllers/UIInvoiceController.cs (5). The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: UIManageController BTCPayServer/Controllers/UIManageController.APIKeys.cs — TooManyMethods — 644 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods, declared across 4 files: Controllers/UIManageController.APIKeys.cs (16), Controllers/UIManageController.cs (14), Controllers/UIManageController.Authenticator.cs (7), Controllers/UIManageController.Notifications.cs (2). The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PluginManager BTCPayServer/Plugins/PluginManager.cs — TooManyMethods — 472 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: AppService BTCPayServer/Services/Apps/AppService.cs — TooManyMethods — 326 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: UIAccountController REDACTED — TooManyMethods — 467 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D35 · Change Coupling · Change coupling · ×11
  • Change coupling: BitcoinLikePaymentData.cs ↔ LightningLikePaymentData.cs BTCPayServer/Payments/Bitcoin/BitcoinLikePaymentData.cs:1 — `BTCPayServer/Payments/Bitcoin/BitcoinLikePaymentData.cs` and `BTCPayServer/Payments/Lightning/LightningLikePaymentData.cs` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `be429c52` Cleanup useless code; `516efe56` Refactor: Dot not make LNURLPaymentMethodDetails depends on BTCPayInv…; `79b034b5` GreenField: Add properties to Store API (#1573) — run `git show` on any of them.
  • Change coupling: LightningLikePaymentData.cs ↔ InvoiceEntity.cs BTCPayServer/Payments/Lightning/LightningLikePaymentData.cs:1 — `BTCPayServer/Payments/Lightning/LightningLikePaymentData.cs` and `BTCPayServer/Services/Invoices/InvoiceEntity.cs` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `be429c52` Cleanup useless code; `516efe56` Refactor: Dot not make LNURLPaymentMethodDetails depends on BTCPayInv…; `0bc6967d` Greenfield: Add payment hash and preimage to Lightning invoices (#4520) — run `git show` on any of them.
  • Change coupling: BitcoinLikePaymentData.cs ↔ InvoiceEntity.cs BTCPayServer/Payments/Bitcoin/BitcoinLikePaymentData.cs:1 — `BTCPayServer/Payments/Bitcoin/BitcoinLikePaymentData.cs` and `BTCPayServer/Services/Invoices/InvoiceEntity.cs` change together 63% of the time (12 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `be429c52` Cleanup useless code; `516efe56` Refactor: Dot not make LNURLPaymentMethodDetails depends on BTCPayInv…; `79b034b5` GreenField: Add properties to Store API (#1573) — run `git show` on any of them.
  • Change coupling: REDACTED ↔ ServerNavPages.cs REDACTED:1 — `REDACTED` and `BTCPayServer/Views/UIServer/ServerNavPages.cs` change together 62% of the time (10 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `d55770cc` Admin overview of the stores on the instance (#5745); `4ae10465` Server Settings: Customize instance name and add contact URL (#5718); `9b165de5` Remove CoinAverage integration (at that commit the files were still `BTCPayServer/Controllers/ServerController.cs` and `BTCPayServer/Views/Server/ServerNavPages.cs`) — run `git show` on any of them.
  • Change coupling: REDACTED ↔ REDACTED REDACTED:1 — `REDACTED` and `REDACTED` change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `5a025a84` Include configuration for tax on tips (#7298); `8da2cad6` Allows merchants configure tax inclusion or exclusion (#7290); `5f7a6868` Show tax rate in receipt, adjust keypad display (#6739) — run `git show` on any of them.
  • Change coupling: common.js ↔ REDACTED BTCPayServer/wwwroot/pos/common.js:1 — `BTCPayServer/wwwroot/pos/common.js` and `REDACTED` change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). Neither file is a module — they declare no import/export and are loaded together into one shared scope by a script tag or a bundle — so there is no dependency edge that COULD be declared between them, and this pass cannot tell a real relationship from a coincidence of release. Read the pair before acting: if one defines what the other uses through the shared global, that is the coupling, and making it explicit (a module boundary, or one named object they both go through) is what removes it; if they duplicate structure, extract the common part; if neither holds, the co-change is incidental and there is nothing to do. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `5a025a84` Include configuration for tax on tips (#7298); `8da2cad6` Allows merchants configure tax inclusion or exclusion (#7290); `5f7a6868` Show tax rate in receipt, adjust keypad display (#6739) — run `git show` on any of them.
  • Change coupling: UIServerController.Users.cs ↔ UserEventTriggerHostedService.cs BTCPayServer/Controllers/UIServerController.Users.cs:1 — `BTCPayServer/Controllers/UIServerController.Users.cs` and `BTCPayServer/Plugins/Emails/HostedServices/UserEventTriggerHostedService.cs` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `d7fcd557` Add invite and confirmation emails; `f3d485da` Invitation process improvements (#6188) (at that commit the file was still `BTCPayServer/HostedServices/UserEventHostedService.cs`); `e43b4ed5` Onboarding: Invite new users (#5714) (at that commit the file was still `BTCPayServer/HostedServices/UserEventHostedService.cs`) — run `git show` on any of them.
  • Change coupling: GreenfieldStoreOnChainPaymentMethodsController.WalletGeneration.cs ↔ GreenfieldStoreOnChainWalletsController.cs BTCPayServer/Plugins/Wallets/Controllers/GreenfieldStoreOnChainPaymentMethodsController.WalletGeneration.cs:1 — `BTCPayServer/Plugins/Wallets/Controllers/GreenfieldStoreOnChainPaymentMethodsController.WalletGeneration.cs` and `BTCPayServer/Plugins/Wallets/Controllers/GreenfieldStoreOnChainWalletsController.cs` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `74292ad1` Move greenfield wallet controllers; `a2d94a26` Fix: No need to select the Signing Key for signing through multi sig … (at that commit the files were still `BTCPayServer/Controllers/GreenField/GreenfieldStoreOnChainPaymentMethodsController.WalletGeneration.cs` and `BTCPayServer/Controllers/GreenField/GreenfieldStoreOnChainWalletsController.cs`); `c3c6473e` Disable cold wallet creation by default (at that commit the files were still `BTCPayServer/Controllers/GreenField/GreenfieldStoreOnChainPaymentMethodsController.WalletGeneration.cs` and `BTCPayServer/Controllers/GreenField/GreenfieldStoreOnChainWalletsController.cs`) — run `git show` on any of them.
  • Change coupling: BTCPayServerServices.cs ↔ UserEventTriggerHostedService.cs BTCPayServer/Hosting/BTCPayServerServices.cs:1 — `BTCPayServer/Hosting/BTCPayServerServices.cs` and `BTCPayServer/Plugins/Emails/HostedServices/UserEventTriggerHostedService.cs` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `749c7722` Validate scopes of service injections in tests; `46156a5a` Remove the store invitation notification to store owners; `d7fcd557` Add invite and confirmation emails — run `git show` on any of them.
  • Change coupling: PayButtonViewModel.cs ↔ paybutton.js BTCPayServer/Plugins/PayButton/Models/PayButtonViewModel.cs:1 — `BTCPayServer/Plugins/PayButton/Models/PayButtonViewModel.cs` and `BTCPayServer/wwwroot/paybutton/paybutton.js` change together 54% of the time (14 of the 26 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `9433c21d` Remove legacy invoice email notifications (#7672); `f0e013e1` Make Pay Button a plugin (#3862); `8feb60c3` Add ability to set default payment method for pay button (#3606) (at that commit the file was still `BTCPayServer/Models/StoreViewModels/PayButtonViewModel.cs`) — run `git show` on any of them.
  • Change coupling: ViewPointOfSaleViewModel.cs ↔ PointOfSaleSettings.cs BTCPayServer/Plugins/PointOfSale/Models/ViewPointOfSaleViewModel.cs:1 — `BTCPayServer/Plugins/PointOfSale/Models/ViewPointOfSaleViewModel.cs` and `BTCPayServer/Services/Apps/PointOfSaleSettings.cs` change together 53% of the time (8 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `5a025a84` Include configuration for tax on tips (#7298); `8da2cad6` Allows merchants configure tax inclusion or exclusion (#7290); `92a92a7f` Rename and add to greenfield HtmlTags and HtmlMetaTags for apps (#6557) — run `git show` on any of them.
D17 · Explicit Debt · CommentedOutCode · ×9
  • CommentedOutCode BTCPayServer.Tests/GreenfieldAPITests.cs:1113 — 3 consecutive commented-code lines
  • CommentedOutCode BTCPayServer/Hosting/BTCPayServerServices.cs:803 — 3 consecutive commented-code lines
  • CommentedOutCode BTCPayServer.Tests/LightningTests.cs:253 — 9 consecutive commented-code lines
  • CommentedOutCode BTCPayServer.Tests/PayJoinTests.cs:1093 — 11 consecutive commented-code lines
  • CommentedOutCode BTCPayServer.Tests/ThirdPartyTests.cs:519 — 4 consecutive commented-code lines
  • CommentedOutCode BTCPayServer.Tests/ThirdPartyTests.cs:548 — 4 consecutive commented-code lines
  • CommentedOutCode BTCPayServer.Tests/UtilitiesTests.cs:65 — 4 consecutive commented-code lines
  • CommentedOutCode BTCPayServer.Tests/UtilitiesTests.cs:119 — 4 consecutive commented-code lines
  • CommentedOutCode BTCPayServer.Tests/UtilitiesTests.cs:90 — 28 consecutive commented-code lines
D3 · God Classes · FunctionTooLong · ×9
  • FunctionTooLong: global-search.initGlobalSearch BTCPayServer/wwwroot/plugins/GlobalSearch/global-search.js:6 — FunctionTooLong — initGlobalSearch runs 322 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 222 over it, 3.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: checkout.initApp REDACTED:99 — FunctionTooLong — initApp runs 273 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 173 over it, 2.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: template-editor.document.addEventListener("DOMContentLoaded") BTCPayServer/wwwroot/js/template-editor.js:1 — FunctionTooLong — document.addEventListener("DOMContentLoaded") runs 227 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 127 over it, 2.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: site.document.addEventListener("DOMContentLoaded") BTCPayServer/wwwroot/main/site.js:336 — FunctionTooLong — document.addEventListener("DOMContentLoaded") runs 207 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 107 over it, 2.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: form-editor.document.addEventListener("DOMContentLoaded") BTCPayServer/wwwroot/js/form-editor.js:1 — FunctionTooLong — document.addEventListener("DOMContentLoaded") runs 171 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 71 over it, 1.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: site.initLabelManager BTCPayServer/wwwroot/main/site.js:16 — FunctionTooLong — initLabelManager runs 162 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 62 over it, 1.62× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: fireworks.document.addEventListener("DOMContentLoaded") BTCPayServer/wwwroot/crowdfund/services/fireworks.js:1 — FunctionTooLong — document.addEventListener("DOMContentLoaded") runs 148 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 48 over it, 1.48× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: keypad.document.addEventListener("DOMContentLoaded") REDACTED:1 — FunctionTooLong — document.addEventListener("DOMContentLoaded") runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: paybutton.inputChanges BTCPayServer/wwwroot/paybutton/paybutton.js:61 — FunctionTooLong — inputChanges runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
AC3 · Page structure · Heading level jumps from h2 to h5 · ×8
  • Heading level jumps from h2 to h5 BTCPayServer/Plugins/Bitpay/Views/ShowToken.cshtml:10 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h2 to h5 BTCPayServer/Plugins/Monetization/Views/Monetization.cshtml:75 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h2 to h5 BTCPayServer/Plugins/Monetization/Views/Monetization.cshtml:136 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h2 to h5 BTCPayServer/Plugins/Monetization/Views/Monetization.cshtml:166 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h2 to h5 BTCPayServer/Plugins/PayButton/Views/Enable.cshtml:19 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h2 to h5 BTCPayServer/Plugins/PayButton/Views/PayButton.cshtml:191 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h2 to h5 REDACTED:256 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h2 to h5 BTCPayServer/Views/UIHome/Home.cshtml:21 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
D29 · Static Analysis (SAST) · REDACTED · ×8
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
IC1 · Incompleteness & stubs · Fake-async · ×8
  • Fake-async — async method never awaits BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs:128 — `GetInvoice` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits BTCPayServer/Controllers/GreenField/GreenfieldPaymentRequestsController.cs:61 — `GetPaymentRequest` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits REDACTED:116 — `EditPullPayment` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits BTCPayServer/Plugins/Wallets/Controllers/UIStoreOnChainWalletsController.cs:429 — `GenerateWalletConfirm` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits BTCPayServer/Plugins/Wallets/Controllers/UIStoreOnChainWalletsController.cs:667 — `ReplaceWallet` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits BTCPayServer/Plugins/Wallets/Controllers/UIStoreOnChainWalletsController.cs:686 — `ConfirmReplaceWallet` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits BTCPayServer/Plugins/Wallets/Controllers/UIStoreOnChainWalletsController.cs:704 — `DeleteWallet` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs:101 — `CancelPendingTransaction` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
X1 · Async correctness · Sync-over-async (deadlock risk) through `.Result` · ×8
  • Sync-over-async (deadlock risk) through `.Result` BTCPayServer/Components/StoreLightningServices/StoreLightningServices.cs:65 — Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` BTCPayServer/Controllers/GreenField/GreenfieldStoreRatesConfigurationController.cs:165 — Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` BTCPayServer/Controllers/UIStoresController.LightningLike.cs:65 — Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` BTCPayServer/Extensions.cs:678 — Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` REDACTED:347 — Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs:1051 — Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` BTCPayServer/Plugins/Webhooks/Controllers/UIStoreWebhooksController.cs:54 — Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` BTCPayServer/Services/Notifications/NotificationSender.cs:66 — Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
AC3 · Page structure · Heading level jumps from h3 to h5 · ×7
  • Heading level jumps from h3 to h5 BTCPayServer/Plugins/Bitpay/Views/ListTokens.cshtml:44 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h3 to h5 BTCPayServer/Plugins/Crowdfund/Views/Public/ViewCrowdfund.cshtml:139 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h3 to h5 BTCPayServer/Plugins/Crowdfund/Views/Public/ViewCrowdfund.cshtml:151 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h3 to h5 BTCPayServer/Plugins/Crowdfund/Views/Public/ViewCrowdfund.cshtml:159 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h3 to h5 BTCPayServer/Plugins/Crowdfund/Views/Public/ViewCrowdfund.cshtml:169 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h3 to h5 BTCPayServer/Plugins/Crowdfund/Views/Public/ViewCrowdfund.cshtml:176 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h3 to h5 BTCPayServer/Plugins/Subscriptions/Views/UIPlanCheckout/PlanCheckout.cshtml:199 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
D17 · Explicit Debt · ObsoleteWithCallers · ×7
  • ObsoleteWithCallers BTCPayServer.Data/Data/IHasBlob.cs:20 — [Obsolete] Blob
  • ObsoleteWithCallers BTCPayServer.Data/Data/InvoiceData.cs:21 — [Obsolete] Blob
  • ObsoleteWithCallers BTCPayServer.Data/Data/NotificationData.cs:21 — [Obsolete] Blob
  • ObsoleteWithCallers BTCPayServer.Data/Data/PaymentData.cs:25 — [Obsolete] Blob
  • ObsoleteWithCallers BTCPayServer.Data/Data/PaymentRequestData.cs:32 — [Obsolete] Blob
  • ObsoleteWithCallers BTCPayServer.Data/Data/PayoutProcessorData.cs:22 — [Obsolete] Blob
  • ObsoleteWithCallers BTCPayServer.Data/Data/WebhookData.cs:14 — [Obsolete] Blob
AC3 · Page structure · Heading level jumps from h1 to h4 · ×6
  • Heading level jumps from h1 to h4 BTCPayServer/Plugins/Multisig/Views/SetupMultisig.cshtml:40 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h4 BTCPayServer/Plugins/Wallets/Views/UIStoreOnChainWallets/GenerateWalletOptions.cshtml:24 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h4 BTCPayServer/Plugins/Wallets/Views/UIStoreOnChainWallets/ImportWalletOptions.cshtml:36 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h4 BTCPayServer/Plugins/Wallets/Views/UIStoreOnChainWallets/SetupWallet.cshtml:18 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h4 BTCPayServer/Plugins/Wallets/Views/UIWallets/WalletSigningOptions.cshtml:33 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h4 REDACTED:66 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
AC3 · Page structure · Page without a main landmark · ×6
  • Page without a main landmark BTCPayServer/Plugins/PointOfSale/Views/Public/_Layout.cshtml:37 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark BTCPayServer/Plugins/Subscriptions/Views/UIPlanCheckout/PlanCheckout.cshtml:16 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark BTCPayServer/Plugins/Subscriptions/Views/UIPlanCheckout/PlanCheckoutDefaultRedirect.cshtml:11 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark REDACTED:41 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark BTCPayServer/Views/Shared/PostRedirect.cshtml:6 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark BTCPayServer/Views/Shared/_LayoutSimple.cshtml:6 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×6
  • Animation without a prefers-reduced-motion guard BTCPayServer/Plugins/Subscriptions/Views/UIPlanCheckout/PlanCheckoutDefaultRedirect.cshtml:49 — `.success-icon` moves (`animation: pulse 2s infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard BTCPayServer/wwwroot/pos/common.css:28 — `#RecentTransactionsRefresh[disabled] .icon` moves (`animation: 1.25s linear infinite spinner-border`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard BTCPayServer/wwwroot/plugins/GlobalSearch/global-search.css:116 — `#globalNav .globalSearch-shell.is-loading .globalSearch-bar::after` moves (`animation: global-search-spin .8s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard BTCPayServer/wwwroot/main/site.css:130 — `[aria-expanded] > .icon-caret-down` moves (`transition: transform 0.2s ease-in-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard BTCPayServer/wwwroot/main/wizard.css:37 — `#wizard-navbar a::after` moves (`transition: background-color .2s, transform .2s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard BTCPayServer/wwwroot/main/rtl/site.rtl.css:130 — `[aria-expanded] > .icon-caret-down` moves (`transition: transform 0.2s ease-in-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
D17 · Explicit Debt · HackComment · ×6
  • HackComment BTCPayServer.Tests/AltcoinTests/AltcoinTests.cs:693 — // Hack so JPY test pass on linux as well); — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment BTCPayServer.Tests/AltcoinTests/AltcoinTests.cs:696 — // Hack so JPY test pass on linux as well); — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment REDACTED:1097 — // Hack so JPY test pass on linux as well — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment BTCPayServer/Hosting/Startup.cs:313 — // HACK: blazor server js hard code some path, making it works only on root path. This fix it. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs:515 — // Hack necessary when the user enter a empty comment and submit. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment BTCPayServer/Program.cs:33 — // Hack to make dotnet watch work — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×6
  • Duplicated block (10 lines × 2) BTCPayServer/Data/Payouts/BitcoinLike/BitcoinLikePayoutHandler.cs:220 — BTCPayServer/Data/Payouts/BitcoinLike/BitcoinLikePayoutHandler.cs:220-229 | BTCPayServer/Data/Payouts/BitcoinLike/BitcoinLikePayoutHandler.cs:245-254 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTCPayServer/Data/Payouts/BitcoinLike/BitcoinLikePayoutHandler.cs:220` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) BTCPayServer/Controllers/LnurlAuthService.cs:83 — BTCPayServer/Controllers/LnurlAuthService.cs:83-92 | BTCPayServer/Fido2/Fido2Service.cs:119-128 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) BTCPayServer/Plugins/Forms/UIFormsController.cs:143 — BTCPayServer/Plugins/Forms/UIFormsController.cs:143-152 | BTCPayServer/Plugins/Forms/UIFormsController.cs:180-189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) REDACTED:484 — REDACTED:484-493 | REDACTED:529-538 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) BTCPayServer/Services/LightningHistogramService.cs:13 — BTCPayServer/Services/LightningHistogramService.cs:13-22 | BTCPayServer/Services/Wallets/WalletHistogramService.cs:38-47 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) BTCPayServer/Models/ManageViewModels/ChangePasswordViewModel.cs:12 — BTCPayServer/Models/ManageViewModels/ChangePasswordViewModel.cs:12-21 | BTCPayServer/Models/ManageViewModels/SetPasswordViewModel.cs:7-16 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
X18 · Disposal-pattern correctness · Disposable created and abandoned in the method that made it · ×6
  • Disposable created and abandoned in the method that made it BTCPayServer/Components/QRCode/QRCode.cs:16 — `qrCode` is a `PngByteQRCode`, which implements `IDisposable`, and it is created here (line 16). Every use of it in `Invoke` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var qrCode = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it BTCPayServer/PayoutProcessors/OnChain/OnChainAutomatedPayoutProcessor.cs:181 — `cts` is a `CancellationTokenSource`, which implements `IDisposable`, and it is created here (line 181). Every use of it in `Process` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var cts = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it BTCPayServer/Services/Wallets/Export/TransactionsExport.cs:60 — `jsonw` is a `JsonTextWriter`, which implements `IDisposable`, and it is created here (line 60). Every use of it in `ProcessBip329` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var jsonw = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it BTCPayServer.Common/ZipUtils.cs:14 — `writer` is a `StreamWriter`, which implements `IDisposable`, and it is created here (line 14). Every use of it in `Zip` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var writer = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it BTCPayServer.Common/ZipUtils.cs:25 — `reader` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 25). Every use of it in `Unzip` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var reader = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it BTCPayServer.Data/Data/MigrationExtensions.cs:114 — `reader` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 114). Every use of it in `Unzip` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var reader = …;`), which releases it at the end of the scope on every path including a throw.
X5 · Nullable reference types · Symbol treated as nullable, then dereferenced unguarded · ×6
  • Symbol treated as nullable, then dereferenced unguarded REDACTED:642 — This method contradicts itself about `approvePayoutRequest`: line 639 writes `approvePayoutRequest?.Revision`, which says `approvePayoutRequest` can be null, but line 642 then dereferences it directly as `approvePayoutRequest.Revision` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `approvePayoutRequest` truly cannot be null here, the `?.` is misleading. Settle it one way — test `approvePayoutRequest` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded REDACTED:285 — This method contradicts itself about `app`: line 275 writes `app?.StoreData`, which says `app` can be null, but line 285 then dereferences it directly as `app.AppType` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `app` truly cannot be null here, the `?.` is misleading. Settle it one way — test `app` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded REDACTED:395 — This method contradicts itself about `result`: line 359 writes `result?.GetBlob`, which says `result` can be null, but line 395 then dereferences it directly as `result.SetBlob` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `result` truly cannot be null here, the `?.` is misleading. Settle it one way — test `result` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded BTCPayServer/Controllers/UIStoresController.Settings.cs:426 — This method contradicts itself about `chosen`: line 426 writes `chosen?.Value`, which says `chosen` can be null, but line 426 then dereferences it directly as `chosen.Value` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `chosen` truly cannot be null here, the `?.` is misleading. Settle it one way — test `chosen` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded BTCPayServer/Plugins/Emails/Controllers/UIStoresEmailController.cs:80 — This method contradicts itself about `store`: line 76 writes `store?.GetStoreBlob`, which says `store` can be null, but line 80 then dereferences it directly as `store.SetStoreBlob` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `store` truly cannot be null here, the `?.` is misleading. Settle it one way — test `store` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded BTCPayServer.Data/ApplicationDbContextExtensions.cs:14 — This method contradicts itself about `infrastructure`: line 13 assigns it with `as IInfrastructure<IServiceProvider>`, which hands back null rather than throwing when the value is not a `IInfrastructure<IServiceProvider>`, but line 14 then dereferences it directly as `infrastructure.Instance` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `infrastructure` once before the first use and handle the null case, or cast with `(IInfrastructure<IServiceProvider>)` so the failure is reported where it happens — rather than leaving the two readings side by side.
D17 · Explicit Debt · BarePragmaDisable · ×5
  • BarePragmaDisable BTCPayServer.Data/Data/InvoiceData.Migration.cs:46 — #pragma warning disable CS0618 // Type or member is obsolete — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable BTCPayServer.Data/Data/PaymentData.Migration.cs:17 — #pragma warning disable CS0618 // Type or member is obsolete — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable BTCPayServer/HostedServices/DbMigrationsHostedService.cs:60 — #pragma warning disable CS0612 // Type or member is obsolete — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable BTCPayServer/Payments/Bitcoin/BitcoinPaymentMethodBitpayAPIExtension.cs:55 — #pragma warning disable 618 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable BTCPayServer/Components/StoreSelector/Default.cshtml:6 — #pragma warning disable 1998 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
D29 · Static Analysis (SAST) · REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×5
  • Duplicated block (7 lines × 2) REDACTED:437 — REDACTED:437-443 | REDACTED:500-506 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) BTCPayServer/Services/Stores/StoreRepository.cs:647 — BTCPayServer/Services/Stores/StoreRepository.cs:647-653 | BTCPayServer/Services/Stores/StoreRepository.cs:663-669 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) BTCPayServer/Controllers/UIStoresController.Roles.cs:126 — BTCPayServer/Controllers/UIStoresController.Roles.cs:126-132 | BTCPayServer/Controllers/UIStoresController.Roles.cs:150-156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) REDACTED:65 — REDACTED:65-71 | REDACTED:100-106 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) REDACTED:573 — REDACTED:573-579 | REDACTED:629-636 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `null` to `string? planId =` in one and `int? removeIndex =` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×5
  • Duplicated block (6 lines × 2) BTCPayServer/Plugins/Wallets/Controllers/GreenfieldStoreOnChainWalletsController.cs:781 — BTCPayServer/Plugins/Wallets/Controllers/GreenfieldStoreOnChainWalletsController.cs:781-786 | BTCPayServer/Plugins/Wallets/Controllers/GreenfieldStoreOnChainWalletsController.cs:817-822 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `request` to `AddOnChainWalletObjectRequest` in one and `AddOnChainWalletObjectLinkRequest` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 2) BTCPayServer/Plugins/PluginManager/Controllers/UIPluginManagerController.cs:664 — BTCPayServer/Plugins/PluginManager/Controllers/UIPluginManagerController.cs:664-669 | BTCPayServer/Plugins/PluginManager/Controllers/UIPluginManagerController.cs:685-690 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `BTCPayServer/Plugins/PluginManager/Controllers/UIPluginManagerController.cs:691` calls `IsNullOrEmpty`, `Add` and `BTCPayServer/Plugins/PluginManager/Controllers/UIPluginManagerController.cs:670` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) BTCPayServer/Plugins/Wallets/Controllers/GreenfieldStoreOnChainWalletsController.cs:319 — BTCPayServer/Plugins/Wallets/Controllers/GreenfieldStoreOnChainWalletsController.cs:319-324 | BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs:1236-1241 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTCPayServer/Plugins/Wallets/Controllers/GreenfieldStoreOnChainWalletsController.cs:319` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) BTCPayServer.Data/Data/PaymentData.Migration.cs:196 — BTCPayServer.Data/Data/PaymentData.Migration.cs:196-201 | BTCPayServer/JsonConverters/DateTimeMilliJsonConverter.cs:38-43 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) BTCPayServer.Common/ZipUtils.cs:23 — BTCPayServer.Common/ZipUtils.cs:23-28 | BTCPayServer.Data/Data/MigrationExtensions.cs:112-117 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×5
  • Duplicated block (5 lines × 2) BTCPayServer/HostedServices/PendingTransactionService.cs:306 — BTCPayServer/HostedServices/PendingTransactionService.cs:306-310 | BTCPayServer/HostedServices/PendingTransactionService.cs:323-327 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) BTCPayServer/Plugins/Subscriptions/Controllers/GreenfieldOfferingController.cs:168 — BTCPayServer/Plugins/Subscriptions/Controllers/GreenfieldOfferingController.cs:168-172 | BTCPayServer/Plugins/Subscriptions/Controllers/GreenfieldOfferingController.cs:241-245 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) BTCPayServer/Plugins/PointOfSale/Views/Public/Static.cshtml:11 — BTCPayServer/Plugins/PointOfSale/Views/Public/Static.cshtml:11-15 | BTCPayServer/Plugins/PointOfSale/Views/Public/VueLight.cshtml:11-15 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (5 lines × 2) BTCPayServer.Abstractions/Extensions/ViewsRazor.cs:183 — BTCPayServer.Abstractions/Extensions/ViewsRazor.cs:183-187 | BTCPayServer.Abstractions/Extensions/ViewsRazor.cs:192-196 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind `date` to `this DateTimeOffset` in one and `this DateTime` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (5 lines × 2) BTCPayServer/Plugins/Subscriptions/SubscriptionsPlugin.cs:266 — BTCPayServer/Plugins/Subscriptions/SubscriptionsPlugin.cs:266-270 | BTCPayServer/Plugins/Subscriptions/SubscriptionsPlugin.cs:273-277 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×5
  • Swallowed exception (caught, then discarded) BTCPayServer/Components/StoreLightningBalance/StoreLightningBalance.cs:81 — `catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) BTCPayServer/Controllers/UIInvoiceController.UI.cs:186 — `catch (Exception)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) BTCPayServer/DerivationSchemeParser.cs:320 — `catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) BTCPayServer/Extensions.cs:651 — `catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) BTCPayServer/Payments/Lightning/LightningPendingPayoutListener.cs:109 — `catch (Exception)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
D31 · IaC & Container Security · Medium IaC · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×4
  • Duplicated block (14 lines × 2) BTCPayServer/Controllers/GreenField/GreenfieldStoresController.cs:148 — BTCPayServer/Controllers/GreenField/GreenfieldStoresController.cs:148-161 | BTCPayServer/Controllers/GreenField/GreenfieldUsersController.cs:273-286 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTCPayServer/Controllers/GreenField/GreenfieldStoresController.cs:148` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `file` to `IFormFile` in one and `IFormFile?` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (14 lines × 2) BTCPayServer/Plugins/Crowdfund/Models/UpdateCrowdfundViewModel.cs:15 — BTCPayServer/Plugins/Crowdfund/Models/UpdateCrowdfundViewModel.cs:15-28 | BTCPayServer/Plugins/PointOfSale/Models/UpdatePointOfSaleViewModel.cs:11-24 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (14 lines × 2) BTCPayServer/DerivationSchemeParser.cs:161 — BTCPayServer/DerivationSchemeParser.cs:161-174 | BTCPayServer/DerivationSchemeParser.cs:178-191 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTCPayServer/DerivationSchemeParser.cs:161` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) REDACTED:168 — REDACTED:168-181 | REDACTED:360-373 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×4
  • Duplicated block (9 lines × 2) BTCPayServer/Controllers/UIServerController.Users.cs:501 — BTCPayServer/Controllers/UIServerController.Users.cs:501-509 | BTCPayServer/Models/AccountViewModels/RegisterViewModel.cs:16-24 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) BTCPayServer/Plugins/Translations/Controllers/UITranslationController.cs:269 — BTCPayServer/Plugins/Translations/Controllers/UITranslationController.cs:269-277 | BTCPayServer/Plugins/Translations/Controllers/UITranslationController.cs:286-294 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTCPayServer/Plugins/Translations/Controllers/UITranslationController.cs:269` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) BTCPayServer.Data/Data/MigrationExtensions.cs:134 — BTCPayServer.Data/Data/MigrationExtensions.cs:134-142 | BTCPayServer.Data/Data/MigrationExtensions.cs:153-161 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTCPayServer.Data/Data/MigrationExtensions.cs:134` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) BTCPayServer/Plugins/DynamicDNS/Controllers/UIDynamicDnsController.cs:66 — BTCPayServer/Plugins/DynamicDNS/Controllers/UIDynamicDnsController.cs:66-74 | BTCPayServer/Plugins/DynamicDNS/Controllers/UIDynamicDnsController.cs:101-109 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
AC3 · Page structure · Heading level jumps from h4 to h6 · ×3
  • Heading level jumps from h4 to h6 REDACTED:302 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h4 to h6 BTCPayServer/Plugins/Subscriptions/Views/UIOffering/Offering.cshtml:49 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h4 to h6 REDACTED:400 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
AC4 · Keyboard semantics · Anchor without href · ×3
  • Anchor without href BTCPayServer/Plugins/Subscriptions/Views/UIOffering/ConfigureOffering.cshtml:95 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href BTCPayServer/Plugins/Subscriptions/Views/UIOffering/CreateOffering.cshtml:15 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href BTCPayServer/Views/UIFido2/Create.cshtml:49 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
D2 · Cognitive Complexity · (anonymous) · ×3
  • (anonymous)::calculation (cognitive 37) REDACTED:33 — (anonymous)::calculation has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 9, ternaries 1 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous)::updateComputed (cognitive 29) BTCPayServer/wwwroot/crowdfund/app.js:147 — (anonymous)::updateComputed has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 9 (17 pts), if/else 8, boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous)::keyPressed (cognitive 22) REDACTED:106 — (anonymous)::keyPressed has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×3
  • Duplicated block (13 lines × 2) BTCPayServer/PayoutProcessors/Lightning/UILightningAutomatedPayoutProcessorsController.cs:85 — BTCPayServer/PayoutProcessors/Lightning/UILightningAutomatedPayoutProcessorsController.cs:85-97 | BTCPayServer/PayoutProcessors/OnChain/UIOnChainAutomatedPayoutProcessorsController.cs:98-110 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (13 lines × 2) BTCPayServer/Controllers/UIManageController.cs:191 — BTCPayServer/Controllers/UIManageController.cs:191-203 | BTCPayServer/Controllers/UIServerController.Users.cs:157-169 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTCPayServer/Controllers/UIManageController.cs:191` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) BTCPayServer/Controllers/GreenField/GreenfieldStoreAutomatedLightningPayoutProcessorsController.cs:78 — BTCPayServer/Controllers/GreenField/GreenfieldStoreAutomatedLightningPayoutProcessorsController.cs:78-90 | BTCPayServer/Controllers/GreenField/GreenfieldStoreAutomatedOnChainPayoutProcessorsController.cs:87-99 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×3
  • Duplicated block (11 lines × 2) BTCPayServer.Abstractions/Contracts/VersionCondition.cs:16 — BTCPayServer.Abstractions/Contracts/VersionCondition.cs:16-26 | BTCPayServer.Abstractions/Contracts/VersionCondition.cs:42-52 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTCPayServer.Abstractions/Contracts/VersionCondition.cs:16` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) BTCPayServer/Controllers/UIUserStoresController.cs:194 — BTCPayServer/Controllers/UIUserStoresController.cs:194-204 | BTCPayServer/Controllers/UIUserStoresController.cs:222-232 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTCPayServer/Controllers/UIUserStoresController.cs:222` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (11 lines × 2) BTCPayServer/Controllers/GreenField/GreenfieldStoreAutomatedLightningPayoutProcessorsController.cs:41 — BTCPayServer/Controllers/GreenField/GreenfieldStoreAutomatedLightningPayoutProcessorsController.cs:41-51 | BTCPayServer/Controllers/GreenField/GreenfieldStoreAutomatedOnChainPayoutProcessorsController.cs:41-51 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTCPayServer/Controllers/GreenField/GreenfieldStoreAutomatedLightningPayoutProcessorsController.cs:41` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D6 · Cohesion (LCOM4) · Low cohesion · ×3
  • Low cohesion: UIStoresController (LCOM4 8) BTCPayServer/Controllers/UIStoresController.cs:31 — UIStoresController's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: UIHomeController (LCOM4 4) REDACTED:29 — UIHomeController's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: PullPaymentHostedService (LCOM4 4) BTCPayServer/HostedServices/PullPaymentHostedService.cs:34 — PullPaymentHostedService's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
IC1 · Incompleteness & stubs · Hollow method · ×3
  • Hollow method — returns a constant without doing the work BTCPayServer/Fido2/Fido2TokenProvider.cs:10 — `GenerateAsync` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
  • Hollow method — returns a constant without doing the work BTCPayServer/Fido2/Fido2TokenProvider.cs:13 — `ValidateAsync` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
  • Hollow method — returns a constant without doing the work BTCPayServer/Payments/IPaymentFilter.cs:39 — `Match` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×3
  • Sync-over-async blocking — 2 blocking call(s) on async work (.Wait()/.GetAwaiter().GetResult()) — these waste a thread and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking BTCPayServer/Plugins/Bitpay/Controllers/BitpayRateController.cs:155 — `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking BTCPayServer.Rating/CurrencyPair.cs:16 — `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×3
  • Recursive walk over a caller-supplied document has no depth cap BTCPayServer/Plugins/Forms/FormDataService.cs:269 — `SetValues` is public, takes a document from its caller (line 253) and hands it to `SetValues`, which calls itself at line 269 with a child of the node it was given — and nowhere in `SetValues` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the tree it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A document nested past the stack that remains raises `StackOverflowException`, which .NET neither lets you catch nor unwinds: the process is torn down where it stands, taking every other request in flight with it, and no `try`/`catch` around `SetValues` can intervene. Thread a depth argument through `SetValues` and reject the document past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap BTCPayServer.Common/TextTemplate.cs:93 — `GetPaths` is public, takes a document from its caller (line 59) and hands it to `GetAvailablePaths`, which calls itself at line 93 with a child of the node it was given (and at line 105, line 115) — and nowhere in `GetAvailablePaths` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the tree it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A document nested past the stack that remains raises `StackOverflowException`, which .NET neither lets you catch nor unwinds: the process is torn down where it stands, taking every other request in flight with it, and no `try`/`catch` around `GetPaths` can intervene. Thread a depth argument through `GetAvailablePaths` and reject the document past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap BTCPayServer.Common/TextTemplate.cs:123 — `Render` is public, takes a document from its caller (line 29) and hands it to `ToLowerCase`, which calls itself at line 123 with a child of the node it was given (and at line 129, line 138) — and nowhere in `ToLowerCase` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the tree it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A document nested past the stack that remains raises `StackOverflowException`, which .NET neither lets you catch nor unwinds: the process is torn down where it stands, taking every other request in flight with it, and no `try`/`catch` around `Render` can intervene. Thread a depth argument through `ToLowerCase` and reject the document past a fixed maximum, or rewrite the descent with an explicit stack.
AC3 · Page structure · Data table has no header cells · ×2
  • Data table has no header cells BTCPayServer/Plugins/PointOfSale/Views/Public/Cart.cshtml:116 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells BTCPayServer/Plugins/PointOfSale/Views/Public/Cart.cshtml:185 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
D1 · Cyclomatic Complexity · (anonymous) · ×2
  • (anonymous)::calculation (cyclomatic 24) REDACTED:33 — (anonymous)::calculation has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • (anonymous)::updateComputed (cyclomatic 18) BTCPayServer/wwwroot/crowdfund/app.js:147 — (anonymous)::updateComputed has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UISubscriberPortalController.SubscriberPortal (cyclomatic 22) · ×2
  • UISubscriberPortalController.SubscriberPortal (cyclomatic 22) REDACTED:36 — UISubscriberPortalController.SubscriberPortal has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • UISubscriberPortalController.SubscriberPortal (cyclomatic 22) REDACTED:168 — UISubscriberPortalController.SubscriberPortal has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D10 · Test Quality · No assertions · ×2
  • No assertions: CanConcurrentlyModifyWalletObject BTCPayServer.Tests/DatabaseTests.cs:24 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: SignTestPSBT BTCPayServer.Tests/MultisigTests.cs:34 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D10 · Test Quality · Depends on a live external host · ×2
  • Depends on a live external host: CheckJsContent BTCPayServer.Tests/ThirdPartyTests.cs:470 — This test fetches `https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.8/clipboard.js` while it runs, so it passes only while cdnjs.cloudflare.com is up, reachable from the build machine, and still serving what this test expects — none of which this repository controls. It goes red on an aeroplane, behind a corporate proxy, in a sealed CI network, and on the day the third party edits that document. Serve the payload from the repository instead (a checked-in fixture file), or stub the transport; if the point really is to check the remote contract, move it out of the unit suite into a separately-scheduled integration job that is allowed to fail for someone else's reasons.
  • Depends on a live external host: CanUseTorClient REDACTED:330 — This test fetches `https://check.torproject.org/` while it runs, so it passes only while check.torproject.org is up, reachable from the build machine, and still serving what this test expects — none of which this repository controls. It goes red on an aeroplane, behind a corporate proxy, in a sealed CI network, and on the day the third party edits that document. Serve the payload from the repository instead (a checked-in fixture file), or stub the transport; if the point really is to check the remote contract, move it out of the unit suite into a separately-scheduled integration job that is allowed to fail for someone else's reasons.
D2 · Cognitive Complexity · (anonymous) (cognitive 22) · ×2
  • (anonymous) (cognitive 22) BTCPayServer/wwwroot/js/form-editor.js:1 — (anonymous) has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6, loops 2, error handling 1, ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 27 function items inside it that branch (allFields::getFields, getFieldsForPath, showOffcanvas, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • (anonymous) (cognitive 22) BTCPayServer/wwwroot/crowdfund/services/fireworks.js:1 — (anonymous) has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 4, loops 3, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to 19 function items inside it that branch (fireworks, extend, draw, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×2
  • Duplicated block (8 lines × 2) REDACTED:272 — REDACTED:272-279 | REDACTED:311-318 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:272` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) REDACTED:456 — REDACTED:456-463 | REDACTED:529-536 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:456` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
GD1 · Unfinished & placeholder code · Unfinished stub · ×2
  • Unfinished stub — throws NotImplementedException BTCPayServer/PayoutProcessors/BaseAutomatedPayoutProcessor.cs:96 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException BTCPayServer/Plugins/Subscriptions/SubscriptionsPlugin.cs:279 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
IC1 · Incompleteness & stubs · Both branches open with the same statements · ×2
  • Both branches open with the same statements — the condition does not decide them BTCPayServer/HostedServices/PullPaymentHostedService.cs:765 — The first 2 statements of the `if` and of the `else` are identical, so they run on both paths regardless of the condition. Lift them above the `if` — leaving them duplicated inside makes the branches read as though they handled this differently.
  • Both branches open with the same statements — the condition does not decide them BTCPayServer/Plugins/Monetization/MonetizationHostedService.cs:104 — The first 2 statements of the `if` and of the `else` are identical, so they run on both paths regardless of the condition. Lift them above the `if` — leaving them duplicated inside makes the branches read as though they handled this differently.
IC1 · Incompleteness & stubs · Empty method body · ×2
  • Empty method body — does nothing with its inputs BTCPayServer/Plugins/PluginManager/PluginService.cs:260 — `Execute` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
  • Empty method body — does nothing with its inputs BTCPayServer/Plugins/PluginManager/PluginService.cs:264 — `Execute` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
P8 · Schema migrations · Schema created with EnsureCreated() outside the migrations · ×2
  • Schema created with EnsureCreated() outside the migrations BTCPayServer/HostedServices/TransactionLabelMarkerHostedService.cs:167 — This repository evolves its schema with versioned migrations, but `EnsureCreated()` here builds a schema straight from the model instead — with no migrations-history row, so a database it creates can't be upgraded by `Migrate()` afterwards and the two paths can disagree about the shape. Apply the migrations here (`Migrate()` / a migrations bundle) rather than creating the schema.
  • Schema created with EnsureCreated() outside the migrations BTCPayServer/Payments/Bitcoin/BitcoinLikePaymentHandler.cs:107 — This repository evolves its schema with versioned migrations, but `EnsureCreated()` here builds a schema straight from the model instead — with no migrations-history row, so a database it creates can't be upgraded by `Migrate()` afterwards and the two paths can disagree about the shape. Apply the migrations here (`Migrate()` / a migrations bundle) rather than creating the schema.
AC3 · Page structure · Heading level jumps from h3 to h6 · ×1
  • Heading level jumps from h3 to h6 BTCPayServer/Plugins/Crowdfund/Views/Public/ViewCrowdfund.cshtml:90 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
AC3 · Page structure · Heading level jumps from h1 to h6 · ×1
  • Heading level jumps from h1 to h6 BTCPayServer/Plugins/PointOfSale/Views/Public/Cart.cshtml:120 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
AC3 · Page structure · Empty <h6> heading · ×1
  • Empty <h6> heading BTCPayServer/Views/Shared/_Footer.cshtml:56 — An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
AC3 · Page structure · More than one main landmark · ×1
  • More than one main landmark BTCPayServer/Views/UIInvoice/Checkout.cshtml:19 — A document must expose only one main landmark. Multiple visible <main> (or role="main") elements confuse the landmark map and the "skip to content" target. Keep one; remove or hide the rest.
AC3 · Page structure · Empty <h2> heading · ×1
  • Empty <h2> heading BTCPayServer/Views/UIInvoice/Checkout.cshtml:54 — An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
AC3 · Page structure · Heading level jumps from h2 to h6 · ×1
  • Heading level jumps from h2 to h6 BTCPayServer/Views/UIInvoice/Checkout.cshtml:89 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
AC4 · Keyboard semantics · Modal dialog does not manage focus · ×1
  • Modal dialog does not manage focus BTCPayServer/Plugins/Maintenance/Components/MaintenanceCommands.razor:61 — This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — no automated accessibility check runs over the HTML your app renders. Assert the accessibility invariants over that HTML in the test suite you already have (parse the output and assert, or drive a browser), and gate that test in CI so a regression blocks the merge. What was searched, so you can tell an absence from a miss: the 298 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
D1 · Cyclomatic Complexity · initGlobalSearch (cyclomatic 92) · ×1
  • initGlobalSearch (cyclomatic 92) BTCPayServer/wwwroot/plugins/GlobalSearch/global-search.js:6 — initGlobalSearch has cyclomatic complexity 92 (threshold 15). Most of this is not in the body itself: 6 of the 92 points are its own statements and the rest belongs to 43 function items inside it that branch (normalizeResult, a function literal at line 411, a function literal at line 206, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · InvoiceData.TryMigrate (cyclomatic 80) · ×1
  • InvoiceData.TryMigrate (cyclomatic 80) BTCPayServer.Data/Data/InvoiceData.Migration.cs:47 — InvoiceData.TryMigrate has cyclomatic complexity 80 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PayJoinEndpointController.Submit (cyclomatic 79) · ×1
  • PayJoinEndpointController.Submit (cyclomatic 79) REDACTED:131 — PayJoinEndpointController.Submit has cyclomatic complexity 79 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UIPointOfSaleController.ViewPointOfSale (cyclomatic 67) · ×1
  • UIPointOfSaleController.ViewPointOfSale (cyclomatic 67) REDACTED:195 — UIPointOfSaleController.ViewPointOfSale has cyclomatic complexity 67 (threshold 15). Of this number, 66 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · initApp (cyclomatic 67) · ×1
  • initApp (cyclomatic 67) REDACTED:99 — initApp has cyclomatic complexity 67 (threshold 15). Most of this is not in the body itself: 1 of the 67 points is its own statement and the rest belongs to 63 function items inside it that branch (isSettled, mounted, listenIn, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · UIWalletsController.WalletSend (cyclomatic 64) · ×1
  • UIWalletsController.WalletSend (cyclomatic 64) BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs:1189 — UIWalletsController.WalletSend has cyclomatic complexity 64 (threshold 15). Of this number, 63 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GreenfieldStoreOnChainWalletsController.CreateOnChainTransaction (cyclomatic 54) · ×1
  • GreenfieldStoreOnChainWalletsController.CreateOnChainTransaction (cyclomatic 54) BTCPayServer/Plugins/Wallets/Controllers/GreenfieldStoreOnChainWalletsController.cs:344 — GreenfieldStoreOnChainWalletsController.CreateOnChainTransaction has cyclomatic complexity 54 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · keypad.document.addEventListener("DOMContentLoaded") (cyclomatic 50) · ×1
  • keypad.document.addEventListener("DOMContentLoaded") (cyclomatic 50) REDACTED:1 — keypad.document.addEventListener("DOMContentLoaded") has cyclomatic complexity 50 (threshold 15). Of this number, 46 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · paybutton.inputChanges (cyclomatic 49) · ×1
  • paybutton.inputChanges (cyclomatic 49) BTCPayServer/wwwroot/paybutton/paybutton.js:61 — paybutton.inputChanges has cyclomatic complexity 49 (threshold 15). Of this number, 45 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app.document.addEventListener("DOMContentLoaded") (cyclomatic 48) · ×1
  • app.document.addEventListener("DOMContentLoaded") (cyclomatic 48) BTCPayServer/wwwroot/crowdfund/app.js:4 — app.document.addEventListener("DOMContentLoaded") has cyclomatic complexity 48 (threshold 15). Most of this is not in the body itself: 10 of the 48 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 147, 37, 30, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · GreenfieldInvoiceController.RefundInvoice (cyclomatic 46) · ×1
  • GreenfieldInvoiceController.RefundInvoice (cyclomatic 46) BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs:328 — GreenfieldInvoiceController.RefundInvoice has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UIWalletsController.WalletBumpFee (cyclomatic 46) · ×1
  • UIWalletsController.WalletBumpFee (cyclomatic 46) BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs:182 — UIWalletsController.WalletBumpFee has cyclomatic complexity 46 (threshold 15). Of this number, 43 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · site.document.addEventListener("DOMContentLoaded") (cyclomatic 45) · ×1
  • site.document.addEventListener("DOMContentLoaded") (cyclomatic 45) BTCPayServer/wwwroot/main/site.js:336 — site.document.addEventListener("DOMContentLoaded") has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 7 of the 45 points are its own statements and the rest belongs to 15 function items inside it that branch (a function literal at line 355, a function literal at line 562, a function literal at line 457, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 45) · ×1
  • (anonymous) (cyclomatic 45) BTCPayServer/wwwroot/main/site.js:336 — (anonymous) has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 7 of the 45 points are its own statements and the rest belongs to 31 function items inside it that branch (a function literal at line 355, a function literal at line 562, a function literal at line 457, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · UIInvoiceController.GetCheckoutModel (cyclomatic 44) · ×1
  • UIInvoiceController.GetCheckoutModel (cyclomatic 44) BTCPayServer/Controllers/UIInvoiceController.UI.cs:773 — UIInvoiceController.GetCheckoutModel has cyclomatic complexity 44 (threshold 15). Of this number, 40 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GreenfieldStoresController.Validate (cyclomatic 43) · ×1
  • GreenfieldStoresController.Validate (cyclomatic 43) BTCPayServer/Controllers/GreenField/GreenfieldStoresController.cs:321 — GreenfieldStoresController.Validate has cyclomatic complexity 43 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · getLostPoint (cyclomatic 42) · ×1
  • getLostPoint (cyclomatic 42) REDACTED:124 — getLostPoint has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GreenfieldUsersController.UpdateCurrentUser (cyclomatic 38) · ×1
  • GreenfieldUsersController.UpdateCurrentUser (cyclomatic 38) BTCPayServer/Controllers/GreenField/GreenfieldUsersController.cs:155 — GreenfieldUsersController.UpdateCurrentUser has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GreenfieldUsersController.CreateUser (cyclomatic 36) · ×1
  • GreenfieldUsersController.CreateUser (cyclomatic 36) BTCPayServer/Controllers/GreenField/GreenfieldUsersController.cs:326 — GreenfieldUsersController.CreateUser has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · template-editor.document.addEventListener("DOMContentLoaded") (cyclomatic 36) · ×1
  • template-editor.document.addEventListener("DOMContentLoaded") (cyclomatic 36) BTCPayServer/wwwroot/js/template-editor.js:1 — template-editor.document.addEventListener("DOMContentLoaded") has cyclomatic complexity 36 (threshold 15). Of this number, 33 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 36) · ×1
  • (anonymous) (cyclomatic 36) BTCPayServer/wwwroot/js/template-editor.js:1 — (anonymous) has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 2 of the 36 points are its own statements and the rest belongs to 36 function items inside it that branch (onIdChange, upload, onTitleChange, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · UIReportsController.GenerateData (cyclomatic 35) · ×1
  • UIReportsController.GenerateData (cyclomatic 35) BTCPayServer/Controllers/UIReportsController.CheatMode.cs:32 — UIReportsController.GenerateData has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UILNURLController.GetLNURLForInvoice (cyclomatic 34) · ×1
  • UILNURLController.GetLNURLForInvoice (cyclomatic 34) REDACTED:742 — UILNURLController.GetLNURLForInvoice has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NFCController.SubmitLNURLWithdrawForInvoice (cyclomatic 34) · ×1
  • NFCController.SubmitLNURLWithdrawForInvoice (cyclomatic 34) REDACTED:53 — NFCController.SubmitLNURLWithdrawForInvoice has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UIWalletsController.FetchTransactionDetails (cyclomatic 33) · ×1
  • UIWalletsController.FetchTransactionDetails (cyclomatic 33) BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.PSBT.cs:256 — UIWalletsController.FetchTransactionDetails has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LabelService.CreateTransactionTagModels (cyclomatic 33) · ×1
  • LabelService.CreateTransactionTagModels (cyclomatic 33) BTCPayServer/Services/Labels/LabelService.cs:25 — LabelService.CreateTransactionTagModels has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UIInvoiceController.Refund (cyclomatic 32) · ×1
  • UIInvoiceController.Refund (cyclomatic 32) BTCPayServer/Controllers/UIInvoiceController.UI.cs:334 — UIInvoiceController.Refund has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UIWalletsController.WalletPSBTReady (cyclomatic 32) · ×1
  • UIWalletsController.WalletPSBTReady (cyclomatic 32) BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.PSBT.cs:447 — UIWalletsController.WalletPSBTReady has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UIServerController.Branding (cyclomatic 31) · ×1
  • UIServerController.Branding (cyclomatic 31) REDACTED:743 — UIServerController.Branding has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UIServerController.User (cyclomatic 31) · ×1
  • UIServerController.User (cyclomatic 31) BTCPayServer/Controllers/UIServerController.Users.cs:112 — UIServerController.User has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UIOfferingController.SubscriberSuspend (cyclomatic 31) · ×1
  • UIOfferingController.SubscriberSuspend (cyclomatic 31) REDACTED:107 — UIOfferingController.SubscriberSuspend has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · InvoiceRepository.GetInvoiceQuery (cyclomatic 31) · ×1
  • InvoiceRepository.GetInvoiceQuery (cyclomatic 31) BTCPayServer/Services/Invoices/InvoiceRepository.cs:718 — InvoiceRepository.GetInvoiceQuery has cyclomatic complexity 31 (threshold 15). Of this number, 30 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UIStoresController.CheckoutAppearance (cyclomatic 30) · ×1
  • UIStoresController.CheckoutAppearance (cyclomatic 30) BTCPayServer/Controllers/UIStoresController.Settings.cs:266 — UIStoresController.CheckoutAppearance has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NBXplorerListener.UpdatePaymentStates (cyclomatic 30) · ×1
  • NBXplorerListener.UpdatePaymentStates (cyclomatic 30) BTCPayServer/Payments/Bitcoin/NBXplorerListener.cs:243 — NBXplorerListener.UpdatePaymentStates has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UICrowdfundController.ContributeToCrowdfund (cyclomatic 30) · ×1
  • UICrowdfundController.ContributeToCrowdfund (cyclomatic 30) REDACTED:91 — UICrowdfundController.ContributeToCrowdfund has cyclomatic complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MonetizationHostedService.ProcessEvent (cyclomatic 30) · ×1
  • MonetizationHostedService.ProcessEvent (cyclomatic 30) BTCPayServer/Plugins/Monetization/MonetizationHostedService.cs:50 — MonetizationHostedService.ProcessEvent has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · initLabelManager (cyclomatic 30) · ×1
  • initLabelManager (cyclomatic 30) BTCPayServer/wwwroot/main/site.js:16 — initLabelManager has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 4 of the 30 points are its own statements and the rest belongs to 21 function items inside it that branch (onChange, item, fetchWalletLabels, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · UILNURLController.GetLNURLForPullPayment (cyclomatic 28) · ×1
  • UILNURLController.GetLNURLForPullPayment (cyclomatic 28) REDACTED:110 — UILNURLController.GetLNURLForPullPayment has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · InvoiceWatcher.UpdateInvoice (cyclomatic 28) · ×1
  • InvoiceWatcher.UpdateInvoice (cyclomatic 28) BTCPayServer/HostedServices/InvoiceWatcher.cs:78 — InvoiceWatcher.UpdateInvoice has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TransactionLabelMarkerHostedService.ProcessEvent (cyclomatic 28) · ×1
  • TransactionLabelMarkerHostedService.ProcessEvent (cyclomatic 28) BTCPayServer/HostedServices/TransactionLabelMarkerHostedService.cs:38 — TransactionLabelMarkerHostedService.ProcessEvent has cyclomatic complexity 28 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · BitpayEndpointSelectorPolicy.IsBitpayAPI (cyclomatic 28) · ×1
  • BitpayEndpointSelectorPolicy.IsBitpayAPI (cyclomatic 28) BTCPayServer/Plugins/Bitpay/BitpayEndpointSelectorPolicy.cs:31 — BitpayEndpointSelectorPolicy.IsBitpayAPI has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · UICrowdfundController.UpdateCrowdfund (cyclomatic 28) · ×1
  • UICrowdfundController.UpdateCrowdfund (cyclomatic 28) REDACTED:410 — UICrowdfundController.UpdateCrowdfund has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UIWalletsController.WalletTransactions (cyclomatic 28) · ×1
  • UIWalletsController.WalletTransactions (cyclomatic 28) BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs:713 — UIWalletsController.WalletTransactions has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExternalConnectionString.Expand (cyclomatic 27) · ×1
  • ExternalConnectionString.Expand (cyclomatic 27) BTCPayServer/Configuration/ExternalConnectionString.cs:34 — ExternalConnectionString.Expand has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PullPaymentHostedService.HandleCreatePayout (cyclomatic 27) · ×1
  • PullPaymentHostedService.HandleCreatePayout (cyclomatic 27) BTCPayServer/HostedServices/PullPaymentHostedService.cs:633 — PullPaymentHostedService.HandleCreatePayout has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MigrationStartupTask.ExecuteAsync (cyclomatic 27) · ×1
  • MigrationStartupTask.ExecuteAsync (cyclomatic 27) BTCPayServer/Hosting/MigrationStartupTask.cs:86 — MigrationStartupTask.ExecuteAsync has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UIStoreOnChainWalletsController.UpdateWalletSettings (cyclomatic 27) · ×1
  • UIStoreOnChainWalletsController.UpdateWalletSettings (cyclomatic 27) BTCPayServer/Plugins/Wallets/Controllers/UIStoreOnChainWalletsController.cs:515 — UIStoreOnChainWalletsController.UpdateWalletSettings has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PluginManager.AddPlugins (cyclomatic 26) · ×1
  • PluginManager.AddPlugins (cyclomatic 26) BTCPayServer/Plugins/PluginManager.cs:193 — PluginManager.AddPlugins has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SubscriptionHostedService.ProcessEvent (cyclomatic 25) · ×1
  • SubscriptionHostedService.ProcessEvent (cyclomatic 25) BTCPayServer/Plugins/Subscriptions/SubscriptionHostedService.cs:53 — SubscriptionHostedService.ProcessEvent has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WalletRepository.GetWalletObjects (cyclomatic 25) · ×1
  • WalletRepository.GetWalletObjects (cyclomatic 25) BTCPayServer/Services/WalletRepository.cs:87 — WalletRepository.GetWalletObjects has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GreenfieldLightningNodeApiController.PayInvoice (cyclomatic 24) · ×1
  • GreenfieldLightningNodeApiController.PayInvoice (cyclomatic 24) BTCPayServer/Controllers/GreenField/GreenfieldLightningNodeApiController.cs:233 — GreenfieldLightningNodeApiController.PayInvoice has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GreenfieldPullPaymentController.RegisterBoltcard (cyclomatic 24) · ×1
  • GreenfieldPullPaymentController.RegisterBoltcard (cyclomatic 24) REDACTED:182 — GreenfieldPullPaymentController.RegisterBoltcard has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UIStorePullPaymentsController.PayoutsPost (cyclomatic 24) · ×1
  • UIStorePullPaymentsController.PayoutsPost (cyclomatic 24) BTCPayServer/Controllers/UIStorePullPaymentsController.PullPayments.cs:297 — UIStorePullPaymentsController.PayoutsPost has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DbMigrationsHostedService.MigratedTransactionLabels (cyclomatic 24) · ×1
  • DbMigrationsHostedService.MigratedTransactionLabels (cyclomatic 24) BTCPayServer/HostedServices/DbMigrationsHostedService.cs:100 — DbMigrationsHostedService.MigratedTransactionLabels has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MigrationStartupTask.ParsePOSYML (cyclomatic 24) · ×1
  • MigrationStartupTask.ParsePOSYML (cyclomatic 24) BTCPayServer/Hosting/MigrationStartupTask.cs:442 — MigrationStartupTask.ParsePOSYML has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SubscriptionHostedService.ProcessSubscriptionPayment (cyclomatic 24) · ×1
  • SubscriptionHostedService.ProcessSubscriptionPayment (cyclomatic 24) BTCPayServer/Plugins/Subscriptions/SubscriptionHostedService.cs:445 — SubscriptionHostedService.ProcessSubscriptionPayment has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PaymentRequestRepository.FindPaymentRequests (cyclomatic 24) · ×1
  • PaymentRequestRepository.FindPaymentRequests (cyclomatic 24) BTCPayServer/Services/PaymentRequests/PaymentRequestRepository.cs:142 — PaymentRequestRepository.FindPaymentRequests has cyclomatic complexity 24 (threshold 15). Of this number, 17 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PaymentData.TryMigrate (cyclomatic 24) · ×1
  • PaymentData.TryMigrate (cyclomatic 24) BTCPayServer.Data/Data/PaymentData.Migration.cs:15 — PaymentData.TryMigrate has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 24) · ×1
  • (anonymous) (cyclomatic 24) BTCPayServer/wwwroot/payment-request/app.js:4 — (anonymous) has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 27 function items inside it that branch (updateComputed, statusClass, submitCustomAmountForm, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · UIStoresController.GeneralSettings (cyclomatic 23) · ×1
  • UIStoresController.GeneralSettings (cyclomatic 23) BTCPayServer/Controllers/UIStoresController.Settings.cs:56 — UIStoresController.GeneralSettings has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UIOfferingController.Offering (cyclomatic 23) · ×1
  • UIOfferingController.Offering (cyclomatic 23) REDACTED:324 — UIOfferingController.Offering has cyclomatic complexity 23 (threshold 15). Of this number, 16 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UIPullPaymentController.ClaimPullPayment (cyclomatic 22) · ×1
  • UIPullPaymentController.ClaimPullPayment (cyclomatic 22) REDACTED:169 — UIPullPaymentController.ClaimPullPayment has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LightningLikePaymentHandler.ValidatePaymentMethodConfig (cyclomatic 22) · ×1
  • LightningLikePaymentHandler.ValidatePaymentMethodConfig (cyclomatic 22) BTCPayServer/Payments/Lightning/LightningLikePaymentHandler.cs:265 — LightningLikePaymentHandler.ValidatePaymentMethodConfig has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LightningPendingPayoutListener.Act (cyclomatic 22) · ×1
  • LightningPendingPayoutListener.Act (cyclomatic 22) BTCPayServer/Payments/Lightning/LightningPendingPayoutListener.cs:53 — LightningPendingPayoutListener.Act has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LightningAutomatedPayoutProcessor.TrypayBolt (cyclomatic 22) · ×1
  • LightningAutomatedPayoutProcessor.TrypayBolt (cyclomatic 22) BTCPayServer/PayoutProcessors/Lightning/LightningAutomatedPayoutProcessor.cs:188 — LightningAutomatedPayoutProcessor.TrypayBolt has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GreenfieldOfferingController.CreatePlanCheckout (cyclomatic 22) · ×1
  • GreenfieldOfferingController.CreatePlanCheckout (cyclomatic 22) BTCPayServer/Plugins/Subscriptions/Controllers/GreenfieldOfferingController.cs:492 — GreenfieldOfferingController.CreatePlanCheckout has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GreenfieldPullPaymentController.CreatePullPayment (cyclomatic 21) · ×1
  • GreenfieldPullPaymentController.CreatePullPayment (cyclomatic 21) REDACTED:80 — GreenfieldPullPaymentController.CreatePullPayment has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GreenfieldReportsController.StoreReports (cyclomatic 21) · ×1
  • GreenfieldReportsController.StoreReports (cyclomatic 21) BTCPayServer/Controllers/GreenField/GreenfieldReportsController.cs:40 — GreenfieldReportsController.StoreReports has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · UIAccountController.Login (cyclomatic 21) · ×1
  • UIAccountController.Login (cyclomatic 21) REDACTED:135 — UIAccountController.Login has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UIServerController.Service (cyclomatic 21) · ×1
  • UIServerController.Service (cyclomatic 21) REDACTED:374 — UIServerController.Service has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NBXplorerListener.Listen (cyclomatic 21) · ×1
  • NBXplorerListener.Listen (cyclomatic 21) BTCPayServer/Payments/Bitcoin/NBXplorerListener.cs:113 — NBXplorerListener.Listen has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UIServerMonetizationController.Monetization (cyclomatic 21) · ×1
  • UIServerMonetizationController.Monetization (cyclomatic 21) BTCPayServer/Plugins/Monetization/Controllers/UIServerMonetizationController.cs:147 — UIServerMonetizationController.Monetization has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SubscriptionHostedService.UpdateSubscriptionStates (cyclomatic 21) · ×1
  • SubscriptionHostedService.UpdateSubscriptionStates (cyclomatic 21) BTCPayServer/Plugins/Subscriptions/SubscriptionHostedService.cs:274 — SubscriptionHostedService.UpdateSubscriptionStates has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UIStoreOnChainWalletsController.UpdateWalletCore (cyclomatic 21) · ×1
  • UIStoreOnChainWalletsController.UpdateWalletCore (cyclomatic 21) BTCPayServer/Plugins/Wallets/Controllers/UIStoreOnChainWalletsController.cs:135 — UIStoreOnChainWalletsController.UpdateWalletCore has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SetContextFilter.OnActionExecutionAsync (cyclomatic 21) · ×1
  • SetContextFilter.OnActionExecutionAsync (cyclomatic 21) BTCPayServer/Security/SetContextFilter.cs:25 — SetContextFilter.OnActionExecutionAsync has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · form-editor.document.addEventListener("DOMContentLoaded") (cyclomatic 21) · ×1
  • form-editor.document.addEventListener("DOMContentLoaded") (cyclomatic 21) BTCPayServer/wwwroot/js/form-editor.js:1 — form-editor.document.addEventListener("DOMContentLoaded") has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 21) · ×1
  • (anonymous) (cyclomatic 21) BTCPayServer/wwwroot/js/form-editor.js:1 — (anonymous) has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 27 function items inside it that branch (allFields::getFields, getFieldsForPath, showOffcanvas, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · GreenfieldInvoiceController.CreateInvoice (cyclomatic 20) · ×1
  • GreenfieldInvoiceController.CreateInvoice (cyclomatic 20) BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs:169 — GreenfieldInvoiceController.CreateInvoice has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GreenfieldPaymentRequestsController.CreateOrUpdatePaymentRequest (cyclomatic 20) · ×1
  • GreenfieldPaymentRequestsController.CreateOrUpdatePaymentRequest (cyclomatic 20) BTCPayServer/Controllers/GreenField/GreenfieldPaymentRequestsController.cs:147 — GreenfieldPaymentRequestsController.CreateOrUpdatePaymentRequest has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UIManageController.Index (cyclomatic 20) · ×1
  • UIManageController.Index (cyclomatic 20) BTCPayServer/Controllers/UIManageController.cs:137 — UIManageController.Index has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ContentSecurityPolicyAttribute.OnActionExecuting (cyclomatic 20) · ×1
  • ContentSecurityPolicyAttribute.OnActionExecuting (cyclomatic 20) BTCPayServer/Filters/ContentSecurityPolicyAttribute.cs:46 — ContentSecurityPolicyAttribute.OnActionExecuting has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NBXplorerWaiter.StepAsync (cyclomatic 20) · ×1
  • NBXplorerWaiter.StepAsync (cyclomatic 20) BTCPayServer/HostedServices/NBXplorerWaiter.cs:138 — NBXplorerWaiter.StepAsync has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BitcoinCheckoutModelExtension.ModifyCheckoutModel (cyclomatic 20) · ×1
  • BitcoinCheckoutModelExtension.ModifyCheckoutModel (cyclomatic 20) BTCPayServer/Payments/Bitcoin/BitcoinCheckoutModelExtension.cs:44 — BitcoinCheckoutModelExtension.ModifyCheckoutModel has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 20) · ×1
  • (anonymous) (cyclomatic 20) REDACTED:273 — (anonymous) has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 11 function items inside it that branch (_safeSetDataURI, drawImage, draw, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · HWIController.Run (cyclomatic 19) · ×1
  • HWIController.Run (cyclomatic 19) BTCPayServer/Blazor/VaultBridge/HWIController.cs:37 — HWIController.Run has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BTCPayServerServices.AddBTCPayServer (cyclomatic 19) · ×1
  • BTCPayServerServices.AddBTCPayServer (cyclomatic 19) BTCPayServer/Hosting/BTCPayServerServices.cs:87 — BTCPayServerServices.AddBTCPayServer has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 222, 274, 325, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · OnChainAutomatedPayoutProcessor.Process (cyclomatic 19) · ×1
  • OnChainAutomatedPayoutProcessor.Process (cyclomatic 19) BTCPayServer/PayoutProcessors/OnChain/OnChainAutomatedPayoutProcessor.cs:72 — OnChainAutomatedPayoutProcessor.Process has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UIOfferingController.AddPlan (cyclomatic 19) · ×1
  • UIOfferingController.AddPlan (cyclomatic 19) REDACTED:621 — UIOfferingController.AddPlan has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SqlStoreScopeProvider.GetStoreId (cyclomatic 19) · ×1
  • SqlStoreScopeProvider.GetStoreId (cyclomatic 19) BTCPayServer/Security/BuiltInPermissionScopeProvider.cs:39 — SqlStoreScopeProvider.GetStoreId has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SSRFAllowedDestination.Parse (cyclomatic 19) · ×1
  • SSRFAllowedDestination.Parse (cyclomatic 19) BTCPayServer/SSRFAllowedDestination.cs:28 — SSRFAllowedDestination.Parse has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · fireworks.document.addEventListener("DOMContentLoaded") (cyclomatic 19) · ×1
  • fireworks.document.addEventListener("DOMContentLoaded") (cyclomatic 19) BTCPayServer/wwwroot/crowdfund/services/fireworks.js:1 — fireworks.document.addEventListener("DOMContentLoaded") has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 170, handleEvent, extend, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · setupPositionProbePattern (cyclomatic 19) · ×1
  • setupPositionProbePattern (cyclomatic 19) REDACTED:91 — setupPositionProbePattern has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 19) · ×1
  • (anonymous) (cyclomatic 19) BTCPayServer/wwwroot/crowdfund/services/fireworks.js:1 — (anonymous) has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 19 function items inside it that branch (fireworks, draw, handleEvent, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · GreenfieldPullPaymentController.CreatePayoutThroughStore (cyclomatic 18) · ×1
  • GreenfieldPullPaymentController.CreatePayoutThroughStore (cyclomatic 18) REDACTED:480 — GreenfieldPullPaymentController.CreatePayoutThroughStore has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UILNURLController.GetLNURLForApp (cyclomatic 18) · ×1
  • UILNURLController.GetLNURLForApp (cyclomatic 18) REDACTED:270 — UILNURLController.GetLNURLForApp has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UIManageController.AuthorizeAPIKey (cyclomatic 18) · ×1
  • UIManageController.AuthorizeAPIKey (cyclomatic 18) BTCPayServer/Controllers/UIManageController.APIKeys.cs:178 — UIManageController.AuthorizeAPIKey has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UIPaymentRequestController.EditPaymentRequest (cyclomatic 18) · ×1
  • UIPaymentRequestController.EditPaymentRequest (cyclomatic 18) REDACTED:235 — UIPaymentRequestController.EditPaymentRequest has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UIPaymentRequestController.PayPaymentRequest (cyclomatic 18) · ×1
  • UIPaymentRequestController.PayPaymentRequest (cyclomatic 18) REDACTED:413 — UIPaymentRequestController.PayPaymentRequest has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Extensions.TryParseLegacy (cyclomatic 18) · ×1
  • Extensions.TryParseLegacy (cyclomatic 18) BTCPayServer/Extensions.cs:286 — Extensions.TryParseLegacy has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Extensions.IsPublicAddress (cyclomatic 45) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · PullPaymentHostedService.GetPayouts (cyclomatic 18) · ×1
  • PullPaymentHostedService.GetPayouts (cyclomatic 18) BTCPayServer/HostedServices/PullPaymentHostedService.cs:190 — PullPaymentHostedService.GetPayouts has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: ClaimRequest.GetClaimedAmount (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · UIWalletsController.WalletActions (cyclomatic 18) · ×1
  • UIWalletsController.WalletActions (cyclomatic 18) BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs:1995 — UIWalletsController.WalletActions has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BuiltInPermissionHandler.HandleAsync (cyclomatic 18) · ×1
  • BuiltInPermissionHandler.HandleAsync (cyclomatic 18) BTCPayServer/Security/BuiltInPermissionHandler.cs:27 — BuiltInPermissionHandler.HandleAsync has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BTCPayWallet.FetchTransactionHistory (cyclomatic 18) · ×1
  • BTCPayWallet.FetchTransactionHistory (cyclomatic 18) BTCPayServer/Services/Wallets/BTCPayWallet.cs:254 — BTCPayWallet.FetchTransactionHistory has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BTCPayWallet.GetBumpableTransactions (cyclomatic 18) · ×1
  • BTCPayWallet.GetBumpableTransactions (cyclomatic 18) BTCPayServer/Services/Wallets/BTCPayWallet.cs:324 — BTCPayWallet.GetBumpableTransactions has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NumericStringJsonConverter.ReadJson (cyclomatic 18) · ×1
  • NumericStringJsonConverter.ReadJson (cyclomatic 18) BTCPayServer.Client/JsonConverters/NumericStringJsonConverter.cs:18 — NumericStringJsonConverter.ReadJson has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BTCPayServerOptions.LoadArgs (cyclomatic 17) · ×1
  • BTCPayServerOptions.LoadArgs (cyclomatic 17) BTCPayServer/Configuration/BTCPayServerOptions.cs:57 — BTCPayServerOptions.LoadArgs has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GreenfieldAppsController.ValidateCrowdfundAppRequest (cyclomatic 17) · ×1
  • GreenfieldAppsController.ValidateCrowdfundAppRequest (cyclomatic 17) BTCPayServer/Controllers/GreenField/GreenfieldAppsController.cs:537 — GreenfieldAppsController.ValidateCrowdfundAppRequest has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UIInvoiceController.CreateInvoiceCoreRaw (cyclomatic 17) · ×1
  • UIInvoiceController.CreateInvoiceCoreRaw (cyclomatic 17) BTCPayServer/Controllers/UIInvoiceController.cs:207 — UIInvoiceController.CreateInvoiceCoreRaw has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UIServerController.LndServices (cyclomatic 17) · ×1
  • UIServerController.LndServices (cyclomatic 17) REDACTED:517 — UIServerController.LndServices has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UIStoresController.Rates (cyclomatic 17) · ×1
  • UIStoresController.Rates (cyclomatic 17) BTCPayServer/Controllers/UIStoresController.Rates.cs:30 — UIStoresController.Rates has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UIStoresController.StoreUsers (cyclomatic 17) · ×1
  • UIStoresController.StoreUsers (cyclomatic 17) BTCPayServer/Controllers/UIStoresController.Users.cs:32 — UIStoresController.StoreUsers has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BitcoinLikePaymentHandler.ConfigurePrompt (cyclomatic 17) · ×1
  • BitcoinLikePaymentHandler.ConfigurePrompt (cyclomatic 17) BTCPayServer/Payments/Bitcoin/BitcoinLikePaymentHandler.cs:134 — BitcoinLikePaymentHandler.ConfigurePrompt has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UIStoreOnChainWalletsController.GenerateWallet (cyclomatic 17) · ×1
  • UIStoreOnChainWalletsController.GenerateWallet (cyclomatic 17) BTCPayServer/Plugins/Wallets/Controllers/UIStoreOnChainWalletsController.cs:306 — UIStoreOnChainWalletsController.GenerateWallet has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · getLengthInBits (cyclomatic 17) · ×1
  • getLengthInBits (cyclomatic 17) REDACTED:124 — getLengthInBits has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ExternalConnectionString.TryParse (cyclomatic 16) · ×1
  • ExternalConnectionString.TryParse (cyclomatic 16) BTCPayServer/Configuration/ExternalConnectionString.cs:153 — ExternalConnectionString.TryParse has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GreenfieldStoreUsersController.GetStoreUserRequest (cyclomatic 16) · ×1
  • GreenfieldStoreUsersController.GetStoreUserRequest (cyclomatic 16) BTCPayServer/Controllers/GreenField/GreenfieldStoreUsersController.cs:200 — GreenfieldStoreUsersController.GetStoreUserRequest has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UIManageController.CheckForMatchingApiKey (cyclomatic 16) · ×1
  • UIManageController.CheckForMatchingApiKey (cyclomatic 16) BTCPayServer/Controllers/UIManageController.APIKeys.cs:315 — UIManageController.CheckForMatchingApiKey has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UIManageController.AdjustVMForAuthorization (cyclomatic 16) · ×1
  • UIManageController.AdjustVMForAuthorization (cyclomatic 16) BTCPayServer/Controllers/UIManageController.APIKeys.cs:374 — UIManageController.AdjustVMForAuthorization has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Extensions.TryParseXpub (cyclomatic 16) · ×1
  • Extensions.TryParseXpub (cyclomatic 16) BTCPayServer/Extensions.cs:153 — Extensions.TryParseXpub has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Extensions.IsPublicAddress (cyclomatic 45) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Extensions.IsSafeLightningConnectionString (cyclomatic 16) · ×1
  • Extensions.IsSafeLightningConnectionString (cyclomatic 16) BTCPayServer/Extensions.cs:401 — Extensions.IsSafeLightningConnectionString has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: Extensions.IsPublicAddress (cyclomatic 45) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · FileTypeDetector.IsFileType (cyclomatic 16) · ×1
  • FileTypeDetector.IsFileType (cyclomatic 16) BTCPayServer/FileTypeDetector.cs:73 — FileTypeDetector.IsFileType has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CrowdfundAppType.GetInfo (cyclomatic 16) · ×1
  • CrowdfundAppType.GetInfo (cyclomatic 16) BTCPayServer/Plugins/Crowdfund/CrowdfundPlugin.cs:121 — CrowdfundAppType.GetInfo has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · PluginManager.ExecuteCommand (cyclomatic 16) · ×1
  • PluginManager.ExecuteCommand (cyclomatic 16) BTCPayServer/Plugins/PluginManager.cs:530 — PluginManager.ExecuteCommand has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GreenfieldOfferingController.CreateOfferingPlan (cyclomatic 16) · ×1
  • GreenfieldOfferingController.CreateOfferingPlan (cyclomatic 16) BTCPayServer/Plugins/Subscriptions/Controllers/GreenfieldOfferingController.cs:156 — GreenfieldOfferingController.CreateOfferingPlan has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UIWalletsController.MatchesWalletTransactionFilter (cyclomatic 16) · ×1
  • UIWalletsController.MatchesWalletTransactionFilter (cyclomatic 16) BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs:649 — UIWalletsController.MatchesWalletTransactionFilter has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · UIWalletsController.SignWithSeed (cyclomatic 16) · ×1
  • UIWalletsController.SignWithSeed (cyclomatic 16) BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs:1740 — UIWalletsController.SignWithSeed has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · InvoicesReportProvider.FlattenFields (cyclomatic 16) · ×1
  • InvoicesReportProvider.FlattenFields (cyclomatic 16) BTCPayServer/Services/Reporting/InvoicesReportProvider.cs:232 — InvoicesReportProvider.FlattenFields has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OnChainWalletReportProvider.Query (cyclomatic 16) · ×1
  • OnChainWalletReportProvider.Query (cyclomatic 16) BTCPayServer/Services/Reporting/OnChainWalletReportProvider.cs:60 — OnChainWalletReportProvider.Query has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · wallet-transactions-columns.wire (cyclomatic 16) · ×1
  • wallet-transactions-columns.wire (cyclomatic 16) REDACTED:193 — wallet-transactions-columns.wire has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 232, 196, 212, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · site.initGlobalNavTooltips (cyclomatic 16) · ×1
  • site.initGlobalNavTooltips (cyclomatic 16) BTCPayServer/wwwroot/main/site.js:261 — site.initGlobalNavTooltips has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 296, a function literal at line 327, getTooltipLabel, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D10 · Test Quality · Skipped test · ×1
  • Skipped test: CanQueryMempoolFeeProvider BTCPayServer.Tests/ThirdPartyTests.cs:75 — Skipped — Fail on CI
D17 · Explicit Debt · BarePragmaDisable repeated across 10 files · ×1
  • BarePragmaDisable repeated across 10 files BTCPayServer.Data/Data/AddressInvoiceData.cs:19 — The identical BarePragmaDisable (`#pragma warning disable CS0618`) appears in 10 files (16 occurrences) — a single repo-wide policy (e.g. a Directory.Build.props decision or an idiomatic suppression), not 16 independent debts. Decide it once centrally rather than file-by-file. (Every occurrence still counts toward the score and metrics.)
D17 · Explicit Debt · BareSuppressMessage · ×1
  • BareSuppressMessage BTCPayServer/Controllers/GreenField/GreenfieldStoresController.cs:252 — SuppressMessage — the suppression records no reason: either it carries no justification argument at all, or one that states nothing a reader can weigh ("OK", "By design"). A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited. Write what makes this site legitimately different — the invariant that holds, the framework contract that forces the shape — or remove the suppression and fix what it hides.
D2 · Cognitive Complexity · InvoiceData.TryMigrate (cognitive 119) · ×1
  • InvoiceData.TryMigrate (cognitive 119) BTCPayServer.Data/Data/InvoiceData.Migration.cs:47 — InvoiceData.TryMigrate has cognitive complexity 119 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PayJoinEndpointController.Submit (cognitive 109) · ×1
  • PayJoinEndpointController.Submit (cognitive 109) REDACTED:131 — PayJoinEndpointController.Submit has cognitive complexity 109 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · initGlobalSearch (cognitive 97) · ×1
  • initGlobalSearch (cognitive 97) BTCPayServer/wwwroot/plugins/GlobalSearch/global-search.js:6 — initGlobalSearch has cognitive complexity 97 (threshold 15). Drivers by points: if/else 53 (56 pts), boolean chains 32, error handling 2 (3 pts), loops 2 (3 pts), other 2, ternaries 1 (nesting depth added 5). Most of this is not in the body itself: 4 of the 97 points are its own statements and the rest belongs to 43 function items inside it that branch (normalizeResult, a function literal at line 411, createResultItem, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · UIWalletsController.WalletSend (cognitive 94) · ×1
  • UIWalletsController.WalletSend (cognitive 94) BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs:1189 — UIWalletsController.WalletSend has cognitive complexity 94 (threshold 15). Of this number, 92 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getLostPoint (cognitive 84) · ×1
  • getLostPoint (cognitive 84) REDACTED:124 — getLostPoint has cognitive complexity 84 (threshold 15). Drivers by points: if/else 13 (46 pts), loops 12 (22 pts), boolean chains 16 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIPointOfSaleController.ViewPointOfSale (cognitive 74) · ×1
  • UIPointOfSaleController.ViewPointOfSale (cognitive 74) REDACTED:195 — UIPointOfSaleController.ViewPointOfSale has cognitive complexity 74 (threshold 15). Of this number, 73 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · initApp (cognitive 74) · ×1
  • initApp (cognitive 74) REDACTED:99 — initApp has cognitive complexity 74 (threshold 15). Drivers by points: if/else 33 (39 pts), boolean chains 21, ternaries 7, error handling 3 (4 pts), match/switch 1 (2 pts), other 1 (nesting depth added 8). None of this is in the body itself: all 74 points belong to 63 function items inside it that branch (isSettled, listenIn, mounted, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · DbMigrationsHostedService.MigratedTransactionLabels (cognitive 73) · ×1
  • DbMigrationsHostedService.MigratedTransactionLabels (cognitive 73) BTCPayServer/HostedServices/DbMigrationsHostedService.cs:100 — DbMigrationsHostedService.MigratedTransactionLabels has cognitive complexity 73 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · inputChanges (cognitive 72) · ×1
  • inputChanges (cognitive 72) BTCPayServer/wwwroot/paybutton/paybutton.js:61 — inputChanges has cognitive complexity 72 (threshold 15). Drivers by points: if/else 34 (53 pts), ternaries 11 (16 pts), boolean chains 3 (nesting depth added 24). Of this number, 70 points are the body's own statements and 2 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · keypad.document.addEventListener("DOMContentLoaded") (cognitive 69) · ×1
  • keypad.document.addEventListener("DOMContentLoaded") (cognitive 69) REDACTED:1 — keypad.document.addEventListener("DOMContentLoaded") has cognitive complexity 69 (threshold 15). Drivers by points: if/else 32 (46 pts), boolean chains 15, ternaries 2 (7 pts), match/switch 1 (nesting depth added 19). Of this number, 65 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GreenfieldStoreOnChainWalletsController.CreateOnChainTransaction (cognitive 68) · ×1
  • GreenfieldStoreOnChainWalletsController.CreateOnChainTransaction (cognitive 68) BTCPayServer/Plugins/Wallets/Controllers/GreenfieldStoreOnChainWalletsController.cs:344 — GreenfieldStoreOnChainWalletsController.CreateOnChainTransaction has cognitive complexity 68 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · TransactionLabelMarkerHostedService.ProcessEvent (cognitive 66) · ×1
  • TransactionLabelMarkerHostedService.ProcessEvent (cognitive 66) BTCPayServer/HostedServices/TransactionLabelMarkerHostedService.cs:38 — TransactionLabelMarkerHostedService.ProcessEvent has cognitive complexity 66 (threshold 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · UILNURLController.GetLNURLForInvoice (cognitive 62) · ×1
  • UILNURLController.GetLNURLForInvoice (cognitive 62) REDACTED:742 — UILNURLController.GetLNURLForInvoice has cognitive complexity 62 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · site.document.addEventListener("DOMContentLoaded") (cognitive 60) · ×1
  • site.document.addEventListener("DOMContentLoaded") (cognitive 60) BTCPayServer/wwwroot/main/site.js:336 — site.document.addEventListener("DOMContentLoaded") has cognitive complexity 60 (threshold 15). Drivers by points: if/else 37 (47 pts), boolean chains 7, ternaries 3 (5 pts), loops 1 (nesting depth added 12). Most of this is not in the body itself: 6 of the 60 points are its own statements and the rest belongs to 15 function items inside it that branch (a function literal at line 355, a function literal at line 457, a function literal at line 562, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · (anonymous) (cognitive 60) · ×1
  • (anonymous) (cognitive 60) BTCPayServer/wwwroot/main/site.js:336 — (anonymous) has cognitive complexity 60 (threshold 15). Drivers by points: if/else 37 (47 pts), boolean chains 7, ternaries 3 (5 pts), loops 1 (nesting depth added 12). Most of this is not in the body itself: 6 of the 60 points are its own statements and the rest belongs to 31 function items inside it that branch (a function literal at line 355, a function literal at line 457, a function literal at line 562, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · UIWalletsController.WalletBumpFee (cognitive 55) · ×1
  • UIWalletsController.WalletBumpFee (cognitive 55) BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs:182 — UIWalletsController.WalletBumpFee has cognitive complexity 55 (threshold 15). Of this number, 51 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MonetizationHostedService.ProcessEvent (cognitive 54) · ×1
  • MonetizationHostedService.ProcessEvent (cognitive 54) BTCPayServer/Plugins/Monetization/MonetizationHostedService.cs:50 — MonetizationHostedService.ProcessEvent has cognitive complexity 54 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · UIWalletsController.FetchTransactionDetails (cognitive 54) · ×1
  • UIWalletsController.FetchTransactionDetails (cognitive 54) BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.PSBT.cs:256 — UIWalletsController.FetchTransactionDetails has cognitive complexity 54 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GreenfieldInvoiceController.RefundInvoice (cognitive 53) · ×1
  • GreenfieldInvoiceController.RefundInvoice (cognitive 53) BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs:328 — GreenfieldInvoiceController.RefundInvoice has cognitive complexity 53 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LabelService.CreateTransactionTagModels (cognitive 53) · ×1
  • LabelService.CreateTransactionTagModels (cognitive 53) BTCPayServer/Services/Labels/LabelService.cs:25 — LabelService.CreateTransactionTagModels has cognitive complexity 53 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NBXplorerListener.UpdatePaymentStates (cognitive 52) · ×1
  • NBXplorerListener.UpdatePaymentStates (cognitive 52) BTCPayServer/Payments/Bitcoin/NBXplorerListener.cs:243 — NBXplorerListener.UpdatePaymentStates has cognitive complexity 52 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LightningPendingPayoutListener.Act (cognitive 52) · ×1
  • LightningPendingPayoutListener.Act (cognitive 52) BTCPayServer/Payments/Lightning/LightningPendingPayoutListener.cs:53 — LightningPendingPayoutListener.Act has cognitive complexity 52 (threshold 15). Of this number, 51 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIWalletsController.WalletTransactions (cognitive 52) · ×1
  • UIWalletsController.WalletTransactions (cognitive 52) BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs:713 — UIWalletsController.WalletTransactions has cognitive complexity 52 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NBXplorerListener.Listen (cognitive 51) · ×1
  • NBXplorerListener.Listen (cognitive 51) BTCPayServer/Payments/Bitcoin/NBXplorerListener.cs:113 — NBXplorerListener.Listen has cognitive complexity 51 (threshold 15). Of this number, 50 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · GreenfieldUsersController.UpdateCurrentUser (cognitive 49) · ×1
  • GreenfieldUsersController.UpdateCurrentUser (cognitive 49) BTCPayServer/Controllers/GreenField/GreenfieldUsersController.cs:155 — GreenfieldUsersController.UpdateCurrentUser has cognitive complexity 49 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIServerController.Branding (cognitive 49) · ×1
  • UIServerController.Branding (cognitive 49) REDACTED:743 — UIServerController.Branding has cognitive complexity 49 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · GreenfieldStoresController.Validate (cognitive 48) · ×1
  • GreenfieldStoresController.Validate (cognitive 48) BTCPayServer/Controllers/GreenField/GreenfieldStoresController.cs:321 — GreenfieldStoresController.Validate has cognitive complexity 48 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · UIInvoiceController.Refund (cognitive 48) · ×1
  • UIInvoiceController.Refund (cognitive 48) BTCPayServer/Controllers/UIInvoiceController.UI.cs:334 — UIInvoiceController.Refund has cognitive complexity 48 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NFCController.SubmitLNURLWithdrawForInvoice (cognitive 48) · ×1
  • NFCController.SubmitLNURLWithdrawForInvoice (cognitive 48) REDACTED:53 — NFCController.SubmitLNURLWithdrawForInvoice has cognitive complexity 48 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExternalConnectionString.Expand (cognitive 47) · ×1
  • ExternalConnectionString.Expand (cognitive 47) BTCPayServer/Configuration/ExternalConnectionString.cs:34 — ExternalConnectionString.Expand has cognitive complexity 47 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · UIStoresController.CheckoutAppearance (cognitive 47) · ×1
  • UIStoresController.CheckoutAppearance (cognitive 47) BTCPayServer/Controllers/UIStoresController.Settings.cs:266 — UIStoresController.CheckoutAppearance has cognitive complexity 47 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SubscriptionHostedService.ProcessEvent (cognitive 47) · ×1
  • SubscriptionHostedService.ProcessEvent (cognitive 47) BTCPayServer/Plugins/Subscriptions/SubscriptionHostedService.cs:53 — SubscriptionHostedService.ProcessEvent has cognitive complexity 47 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · GreenfieldUsersController.CreateUser (cognitive 45) · ×1
  • GreenfieldUsersController.CreateUser (cognitive 45) BTCPayServer/Controllers/GreenField/GreenfieldUsersController.cs:326 — GreenfieldUsersController.CreateUser has cognitive complexity 45 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InvoiceWatcher.UpdateInvoice (cognitive 45) · ×1
  • InvoiceWatcher.UpdateInvoice (cognitive 45) BTCPayServer/HostedServices/InvoiceWatcher.cs:78 — InvoiceWatcher.UpdateInvoice has cognitive complexity 45 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · UICrowdfundController.ContributeToCrowdfund (cognitive 44) · ×1
  • UICrowdfundController.ContributeToCrowdfund (cognitive 44) REDACTED:91 — UICrowdfundController.ContributeToCrowdfund has cognitive complexity 44 (threshold 15). Of this number, 43 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIInvoiceController.GetCheckoutModel (cognitive 43) · ×1
  • UIInvoiceController.GetCheckoutModel (cognitive 43) BTCPayServer/Controllers/UIInvoiceController.UI.cs:773 — UIInvoiceController.GetCheckoutModel has cognitive complexity 43 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MigrationStartupTask.ParsePOSYML (cognitive 43) · ×1
  • MigrationStartupTask.ParsePOSYML (cognitive 43) BTCPayServer/Hosting/MigrationStartupTask.cs:442 — MigrationStartupTask.ParsePOSYML has cognitive complexity 43 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 43) · ×1
  • (anonymous) (cognitive 43) BTCPayServer/wwwroot/js/template-editor.js:1 — (anonymous) has cognitive complexity 43 (threshold 15). Drivers by points: if/else 26 (29 pts), boolean chains 11, error handling 2, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 1 of the 43 points is its own statement and the rest belongs to 36 function items inside it that branch (onIdChange, upload, onTitleChange, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · UIStoresController.StoreUsers (cognitive 42) · ×1
  • UIStoresController.StoreUsers (cognitive 42) BTCPayServer/Controllers/UIStoresController.Users.cs:32 — UIStoresController.StoreUsers has cognitive complexity 42 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PluginManager.AddPlugins (cognitive 42) · ×1
  • PluginManager.AddPlugins (cognitive 42) BTCPayServer/Plugins/PluginManager.cs:193 — PluginManager.AddPlugins has cognitive complexity 42 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SubscriptionHostedService.UpdateSubscriptionStates (cognitive 42) · ×1
  • SubscriptionHostedService.UpdateSubscriptionStates (cognitive 42) BTCPayServer/Plugins/Subscriptions/SubscriptionHostedService.cs:274 — SubscriptionHostedService.UpdateSubscriptionStates has cognitive complexity 42 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · UIStoreOnChainWalletsController.UpdateWalletSettings (cognitive 42) · ×1
  • UIStoreOnChainWalletsController.UpdateWalletSettings (cognitive 42) BTCPayServer/Plugins/Wallets/Controllers/UIStoreOnChainWalletsController.cs:515 — UIStoreOnChainWalletsController.UpdateWalletSettings has cognitive complexity 42 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SqlStoreScopeProvider.GetStoreId (cognitive 42) · ×1
  • SqlStoreScopeProvider.GetStoreId (cognitive 42) BTCPayServer/Security/BuiltInPermissionScopeProvider.cs:39 — SqlStoreScopeProvider.GetStoreId has cognitive complexity 42 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · template-editor.document.addEventListener("DOMContentLoaded") (cognitive 42) · ×1
  • template-editor.document.addEventListener("DOMContentLoaded") (cognitive 42) BTCPayServer/wwwroot/js/template-editor.js:1 — template-editor.document.addEventListener("DOMContentLoaded") has cognitive complexity 42 (threshold 15). Drivers by points: if/else 26 (29 pts), boolean chains 10, error handling 2, ternaries 1 (nesting depth added 3). Of this number, 39 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · UIWalletsController.WalletPSBTReady (cognitive 41) · ×1
  • UIWalletsController.WalletPSBTReady (cognitive 41) BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.PSBT.cs:447 — UIWalletsController.WalletPSBTReady has cognitive complexity 41 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIOfferingController.SubscriberSuspend (cognitive 40) · ×1
  • UIOfferingController.SubscriberSuspend (cognitive 40) REDACTED:107 — UIOfferingController.SubscriberSuspend has cognitive complexity 40 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MigrationStartupTask.TransitionInternalNodeConnectionString (cognitive 39) · ×1
  • MigrationStartupTask.TransitionInternalNodeConnectionString (cognitive 39) BTCPayServer/Hosting/MigrationStartupTask.cs:821 — MigrationStartupTask.TransitionInternalNodeConnectionString has cognitive complexity 39 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InvoiceRepository.GetInvoiceQuery (cognitive 37) · ×1
  • InvoiceRepository.GetInvoiceQuery (cognitive 37) BTCPayServer/Services/Invoices/InvoiceRepository.cs:718 — InvoiceRepository.GetInvoiceQuery has cognitive complexity 37 (threshold 15). Of this number, 36 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · WalletRepository.GetWalletObjects (cognitive 37) · ×1
  • WalletRepository.GetWalletObjects (cognitive 37) BTCPayServer/Services/WalletRepository.cs:87 — WalletRepository.GetWalletObjects has cognitive complexity 37 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIStoresController.Rates (cognitive 36) · ×1
  • UIStoresController.Rates (cognitive 36) BTCPayServer/Controllers/UIStoresController.Rates.cs:30 — UIStoresController.Rates has cognitive complexity 36 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIServerMonetizationController.Monetization (cognitive 36) · ×1
  • UIServerMonetizationController.Monetization (cognitive 36) BTCPayServer/Plugins/Monetization/Controllers/UIServerMonetizationController.cs:147 — UIServerMonetizationController.Monetization has cognitive complexity 36 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SetContextFilter.OnActionExecutionAsync (cognitive 36) · ×1
  • SetContextFilter.OnActionExecutionAsync (cognitive 36) BTCPayServer/Security/SetContextFilter.cs:25 — SetContextFilter.OnActionExecutionAsync has cognitive complexity 36 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIStorePullPaymentsController.PayoutsPost (cognitive 35) · ×1
  • UIStorePullPaymentsController.PayoutsPost (cognitive 35) BTCPayServer/Controllers/UIStorePullPaymentsController.PullPayments.cs:297 — UIStorePullPaymentsController.PayoutsPost has cognitive complexity 35 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileTypeDetector.IsFileType (cognitive 35) · ×1
  • FileTypeDetector.IsFileType (cognitive 35) BTCPayServer/FileTypeDetector.cs:73 — FileTypeDetector.IsFileType has cognitive complexity 35 (threshold 15). Of this number, 34 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIStoreOnChainWalletsController.UpdateWalletCore (cognitive 35) · ×1
  • UIStoreOnChainWalletsController.UpdateWalletCore (cognitive 35) BTCPayServer/Plugins/Wallets/Controllers/UIStoreOnChainWalletsController.cs:135 — UIStoreOnChainWalletsController.UpdateWalletCore has cognitive complexity 35 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · BTCPayWallet.FetchTransactionHistory (cognitive 35) · ×1
  • BTCPayWallet.FetchTransactionHistory (cognitive 35) BTCPayServer/Services/Wallets/BTCPayWallet.cs:254 — BTCPayWallet.FetchTransactionHistory has cognitive complexity 35 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIServerController.User (cognitive 34) · ×1
  • UIServerController.User (cognitive 34) BTCPayServer/Controllers/UIServerController.Users.cs:112 — UIServerController.User has cognitive complexity 34 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · OnChainWalletReportProvider.Query (cognitive 34) · ×1
  • OnChainWalletReportProvider.Query (cognitive 34) BTCPayServer/Services/Reporting/OnChainWalletReportProvider.cs:60 — OnChainWalletReportProvider.Query has cognitive complexity 34 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · initLabelManager (cognitive 34) · ×1
  • initLabelManager (cognitive 34) BTCPayServer/wwwroot/main/site.js:16 — initLabelManager has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 7, ternaries 6, error handling 2, loops 1 (2 pts) (nesting depth added 4). Most of this is not in the body itself: 3 of the 34 points are its own statements and the rest belongs to 21 function items inside it that branch (onChange, item, fetchWalletLabels, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · PullPaymentHostedService.HandleCreatePayout (cognitive 33) · ×1
  • PullPaymentHostedService.HandleCreatePayout (cognitive 33) BTCPayServer/HostedServices/PullPaymentHostedService.cs:633 — PullPaymentHostedService.HandleCreatePayout has cognitive complexity 33 (threshold 15). Of this number, 32 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LightningListener.CreateNewLNInvoiceForBTCPayInvoice (cognitive 33) · ×1
  • LightningListener.CreateNewLNInvoiceForBTCPayInvoice (cognitive 33) BTCPayServer/Payments/Lightning/LightningListener.cs:290 — LightningListener.CreateNewLNInvoiceForBTCPayInvoice has cognitive complexity 33 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PaymentData.TryMigrate (cognitive 32) · ×1
  • PaymentData.TryMigrate (cognitive 32) BTCPayServer.Data/Data/PaymentData.Migration.cs:15 — PaymentData.TryMigrate has cognitive complexity 32 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · GreenfieldPaymentRequestsController.CreateOrUpdatePaymentRequest (cognitive 31) · ×1
  • GreenfieldPaymentRequestsController.CreateOrUpdatePaymentRequest (cognitive 31) BTCPayServer/Controllers/GreenField/GreenfieldPaymentRequestsController.cs:147 — GreenfieldPaymentRequestsController.CreateOrUpdatePaymentRequest has cognitive complexity 31 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · GreenfieldPullPaymentController.RegisterBoltcard (cognitive 31) · ×1
  • GreenfieldPullPaymentController.RegisterBoltcard (cognitive 31) REDACTED:182 — GreenfieldPullPaymentController.RegisterBoltcard has cognitive complexity 31 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · UIReportsController.GenerateData (cognitive 31) · ×1
  • UIReportsController.GenerateData (cognitive 31) BTCPayServer/Controllers/UIReportsController.CheatMode.cs:32 — UIReportsController.GenerateData has cognitive complexity 31 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BTCPayServerServices.AddBTCPayServer (cognitive 31) · ×1
  • BTCPayServerServices.AddBTCPayServer (cognitive 31) BTCPayServer/Hosting/BTCPayServerServices.cs:87 — BTCPayServerServices.AddBTCPayServer has cognitive complexity 31 (threshold 15). Most of this is not in the body itself: 2 of the 31 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 222, 274, 312, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · LightningListener.CheckingInvoice (cognitive 31) · ×1
  • LightningListener.CheckingInvoice (cognitive 31) BTCPayServer/Payments/Lightning/LightningListener.cs:72 — LightningListener.CheckingInvoice has cognitive complexity 31 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OnChainAutomatedPayoutProcessor.Process (cognitive 31) · ×1
  • OnChainAutomatedPayoutProcessor.Process (cognitive 31) BTCPayServer/PayoutProcessors/OnChain/OnChainAutomatedPayoutProcessor.cs:72 — OnChainAutomatedPayoutProcessor.Process has cognitive complexity 31 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginManager.ExecuteCommand (cognitive 31) · ×1
  • PluginManager.ExecuteCommand (cognitive 31) BTCPayServer/Plugins/PluginManager.cs:530 — PluginManager.ExecuteCommand has cognitive complexity 31 (threshold 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · datatable.groupBy (cognitive 31) · ×1
  • datatable.groupBy (cognitive 31) REDACTED:3 — datatable.groupBy has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 4 (9 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mapData (cognitive 31) · ×1
  • mapData (cognitive 31) REDACTED:100 — mapData has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (24 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIStoresController.GeneralSettings (cognitive 30) · ×1
  • UIStoresController.GeneralSettings (cognitive 30) BTCPayServer/Controllers/UIStoresController.Settings.cs:56 — UIStoresController.GeneralSettings has cognitive complexity 30 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LightningLikePaymentHandler.ValidatePaymentMethodConfig (cognitive 30) · ×1
  • LightningLikePaymentHandler.ValidatePaymentMethodConfig (cognitive 30) BTCPayServer/Payments/Lightning/LightningLikePaymentHandler.cs:265 — LightningLikePaymentHandler.ValidatePaymentMethodConfig has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SubscriptionHostedService.ProcessSubscriptionPayment (cognitive 30) · ×1
  • SubscriptionHostedService.ProcessSubscriptionPayment (cognitive 30) BTCPayServer/Plugins/Subscriptions/SubscriptionHostedService.cs:445 — SubscriptionHostedService.ProcessSubscriptionPayment has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 30) · ×1
  • (anonymous) (cognitive 30) BTCPayServer/wwwroot/payment-request/app.js:4 — (anonymous) has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12, ternaries 5 (9 pts), boolean chains 6, match/switch 2 (3 pts) (nesting depth added 5). None of this is in the body itself: all 30 points belong to 27 function items inside it that branch (updateComputed, submitCustomAmountForm, statusClass, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · BitcoinCheckoutModelExtension.ModifyCheckoutModel (cognitive 29) · ×1
  • BitcoinCheckoutModelExtension.ModifyCheckoutModel (cognitive 29) BTCPayServer/Payments/Bitcoin/BitcoinCheckoutModelExtension.cs:44 — BitcoinCheckoutModelExtension.ModifyCheckoutModel has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIOfferingController.Offering (cognitive 29) · ×1
  • UIOfferingController.Offering (cognitive 29) REDACTED:324 — UIOfferingController.Offering has cognitive complexity 29 (threshold 15). Of this number, 24 points are the body's own statements and 5 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UISubscriberPortalController.SubscriberPortal (cognitive 29) · ×1
  • UISubscriberPortalController.SubscriberPortal (cognitive 29) REDACTED:168 — UISubscriberPortalController.SubscriberPortal has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InvoicesReportProvider.FlattenFields (cognitive 29) · ×1
  • InvoicesReportProvider.FlattenFields (cognitive 29) BTCPayServer/Services/Reporting/InvoicesReportProvider.cs:232 — InvoicesReportProvider.FlattenFields has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SSRFAllowedDestination.Parse (cognitive 29) · ×1
  • SSRFAllowedDestination.Parse (cognitive 29) BTCPayServer/SSRFAllowedDestination.cs:28 — SSRFAllowedDestination.Parse has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 29) · ×1
  • (anonymous) (cognitive 29) REDACTED:273 — (anonymous) has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 3 (6 pts), ternaries 2 (6 pts), boolean chains 4 (nesting depth added 10). Most of this is not in the body itself: 2 of the 29 points are its own statements and the rest belongs to 11 function items inside it that branch (draw, drawImage, _safeSetDataURI, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · GreenfieldPullPaymentController.CreatePullPayment (cognitive 28) · ×1
  • GreenfieldPullPaymentController.CreatePullPayment (cognitive 28) REDACTED:80 — GreenfieldPullPaymentController.CreatePullPayment has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MigrationStartupTask.ExecuteAsync (cognitive 28) · ×1
  • MigrationStartupTask.ExecuteAsync (cognitive 28) BTCPayServer/Hosting/MigrationStartupTask.cs:86 — MigrationStartupTask.ExecuteAsync has cognitive complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · UICrowdfundController.UpdateCrowdfund (cognitive 28) · ×1
  • UICrowdfundController.UpdateCrowdfund (cognitive 28) REDACTED:410 — UICrowdfundController.UpdateCrowdfund has cognitive complexity 28 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · BuiltInPermissionHandler.HandleAsync (cognitive 28) · ×1
  • BuiltInPermissionHandler.HandleAsync (cognitive 28) BTCPayServer/Security/BuiltInPermissionHandler.cs:27 — BuiltInPermissionHandler.HandleAsync has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BTCPayServerOptions.LoadArgs (cognitive 27) · ×1
  • BTCPayServerOptions.LoadArgs (cognitive 27) BTCPayServer/Configuration/BTCPayServerOptions.cs:57 — BTCPayServerOptions.LoadArgs has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UILNURLController.EditLightningAddress (cognitive 27) · ×1
  • UILNURLController.EditLightningAddress (cognitive 27) REDACTED:952 — UILNURLController.EditLightningAddress has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIManageController.Index (cognitive 27) · ×1
  • UIManageController.Index (cognitive 27) BTCPayServer/Controllers/UIManageController.cs:137 — UIManageController.Index has cognitive complexity 27 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · UILNURLController.GetLNURLForPullPayment (cognitive 26) · ×1
  • UILNURLController.GetLNURLForPullPayment (cognitive 26) REDACTED:110 — UILNURLController.GetLNURLForPullPayment has cognitive complexity 26 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · UIManageController.CheckForMatchingApiKey (cognitive 26) · ×1
  • UIManageController.CheckForMatchingApiKey (cognitive 26) BTCPayServer/Controllers/UIManageController.APIKeys.cs:315 — UIManageController.CheckForMatchingApiKey has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NBXplorerWaiter.StepAsync (cognitive 26) · ×1
  • NBXplorerWaiter.StepAsync (cognitive 26) BTCPayServer/HostedServices/NBXplorerWaiter.cs:138 — NBXplorerWaiter.StepAsync has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GreenfieldPullPaymentController.CreatePayoutThroughStore (cognitive 25) · ×1
  • GreenfieldPullPaymentController.CreatePayoutThroughStore (cognitive 25) REDACTED:480 — GreenfieldPullPaymentController.CreatePayoutThroughStore has cognitive complexity 25 (threshold 15). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIManageController.AuthorizeAPIKey (cognitive 25) · ×1
  • UIManageController.AuthorizeAPIKey (cognitive 25) BTCPayServer/Controllers/UIManageController.APIKeys.cs:178 — UIManageController.AuthorizeAPIKey has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIManageController.AdjustVMForAuthorization (cognitive 25) · ×1
  • UIManageController.AdjustVMForAuthorization (cognitive 25) BTCPayServer/Controllers/UIManageController.APIKeys.cs:374 — UIManageController.AdjustVMForAuthorization has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIPullPaymentController.ClaimPullPayment (cognitive 25) · ×1
  • UIPullPaymentController.ClaimPullPayment (cognitive 25) REDACTED:169 — UIPullPaymentController.ClaimPullPayment has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIServerController.Policies (cognitive 25) · ×1
  • UIServerController.Policies (cognitive 25) REDACTED:179 — UIServerController.Policies has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PullPaymentHostedService.GetPayouts (cognitive 25) · ×1
  • PullPaymentHostedService.GetPayouts (cognitive 25) BTCPayServer/HostedServices/PullPaymentHostedService.cs:190 — PullPaymentHostedService.GetPayouts has cognitive complexity 25 (threshold 15). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · GreenfieldStoreOnChainWalletsController.ShowOnChainWalletTransactions (cognitive 25) · ×1
  • GreenfieldStoreOnChainWalletsController.ShowOnChainWalletTransactions (cognitive 25) BTCPayServer/Plugins/Wallets/Controllers/GreenfieldStoreOnChainWalletsController.cs:167 — GreenfieldStoreOnChainWalletsController.ShowOnChainWalletTransactions has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIInvoiceController.CreateInvoiceCoreRaw (cognitive 24) · ×1
  • UIInvoiceController.CreateInvoiceCoreRaw (cognitive 24) BTCPayServer/Controllers/UIInvoiceController.cs:207 — UIInvoiceController.CreateInvoiceCoreRaw has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DerivationSchemeParser.Parse (cognitive 24) · ×1
  • DerivationSchemeParser.Parse (cognitive 24) BTCPayServer/DerivationSchemeParser.cs:258 — DerivationSchemeParser.Parse has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PaymentRequestRepository.FindPaymentRequests (cognitive 24) · ×1
  • PaymentRequestRepository.FindPaymentRequests (cognitive 24) BTCPayServer/Services/PaymentRequests/PaymentRequestRepository.cs:142 — PaymentRequestRepository.FindPaymentRequests has cognitive complexity 24 (threshold 15). Of this number, 21 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · GreenfieldInvoiceController.CreateInvoice (cognitive 23) · ×1
  • GreenfieldInvoiceController.CreateInvoice (cognitive 23) BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs:169 — GreenfieldInvoiceController.CreateInvoice has cognitive complexity 23 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · UIAccountController.Login (cognitive 23) · ×1
  • UIAccountController.Login (cognitive 23) REDACTED:135 — UIAccountController.Login has cognitive complexity 23 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ContentSecurityPolicyAttribute.OnActionExecuting (cognitive 23) · ×1
  • ContentSecurityPolicyAttribute.OnActionExecuting (cognitive 23) BTCPayServer/Filters/ContentSecurityPolicyAttribute.cs:46 — ContentSecurityPolicyAttribute.OnActionExecuting has cognitive complexity 23 (threshold 15). Of this number, 14 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · LightningAutomatedPayoutProcessor.TrypayBolt (cognitive 23) · ×1
  • LightningAutomatedPayoutProcessor.TrypayBolt (cognitive 23) BTCPayServer/PayoutProcessors/Lightning/LightningAutomatedPayoutProcessor.cs:188 — LightningAutomatedPayoutProcessor.TrypayBolt has cognitive complexity 23 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · UIPlanCheckoutController.PlanCheckout (cognitive 23) · ×1
  • UIPlanCheckoutController.PlanCheckout (cognitive 23) REDACTED:75 — UIPlanCheckoutController.PlanCheckout has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlattenExpressionRewriter.VisitIdentifierName (cognitive 23) · ×1
  • FlattenExpressionRewriter.VisitIdentifierName (cognitive 23) BTCPayServer.Rating/RateRules.cs:462 — FlattenExpressionRewriter.VisitIdentifierName has cognitive complexity 23 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · UIPaymentRequestController.PayPaymentRequest (cognitive 22) · ×1
  • UIPaymentRequestController.PayPaymentRequest (cognitive 22) REDACTED:413 — UIPaymentRequestController.PayPaymentRequest has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Extensions.TryParseLegacy (cognitive 22) · ×1
  • Extensions.TryParseLegacy (cognitive 22) BTCPayServer/Extensions.cs:286 — Extensions.TryParseLegacy has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EventHostedServiceBase.ProcessEvents (cognitive 22) · ×1
  • EventHostedServiceBase.ProcessEvents (cognitive 22) BTCPayServer/HostedServices/EventHostedServiceBase.cs:37 — EventHostedServiceBase.ProcessEvents has cognitive complexity 22 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · InvoiceWatcher.StartLoop (cognitive 22) · ×1
  • InvoiceWatcher.StartLoop (cognitive 22) BTCPayServer/HostedServices/InvoiceWatcher.cs:275 — InvoiceWatcher.StartLoop has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NBXplorerListener.FindPaymentViaPolling (cognitive 22) · ×1
  • NBXplorerListener.FindPaymentViaPolling (cognitive 22) BTCPayServer/Payments/Bitcoin/NBXplorerListener.cs:381 — NBXplorerListener.FindPaymentViaPolling has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BitpayEndpointSelectorPolicy.IsBitpayAPI (cognitive 22) · ×1
  • BitpayEndpointSelectorPolicy.IsBitpayAPI (cognitive 22) BTCPayServer/Plugins/Bitpay/BitpayEndpointSelectorPolicy.cs:31 — BitpayEndpointSelectorPolicy.IsBitpayAPI has cognitive complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · StoreEmailRuleProcessorSender.ProcessEvent (cognitive 22) · ×1
  • StoreEmailRuleProcessorSender.ProcessEvent (cognitive 22) REDACTED:61 — StoreEmailRuleProcessorSender.ProcessEvent has cognitive complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormDataService.GenerateInvoiceParametersFromForm (cognitive 22) · ×1
  • FormDataService.GenerateInvoiceParametersFromForm (cognitive 22) BTCPayServer/Plugins/Forms/FormDataService.cs:167 — FormDataService.GenerateInvoiceParametersFromForm has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NumericStringJsonConverter.ReadJson (cognitive 22) · ×1
  • NumericStringJsonConverter.ReadJson (cognitive 22) BTCPayServer.Client/JsonConverters/NumericStringJsonConverter.cs:18 — NumericStringJsonConverter.ReadJson has cognitive complexity 22 (threshold 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · PermissionTagHelper.ProcessAsync (cognitive 22) · ×1
  • PermissionTagHelper.ProcessAsync (cognitive 22) BTCPayServer.Abstractions/TagHelpers/PermissionTagHelper.cs:20 — PermissionTagHelper.ProcessAsync has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UrlResolutionTagHelper2.ProcessUrlAttribute (cognitive 22) · ×1
  • UrlResolutionTagHelper2.ProcessUrlAttribute (cognitive 22) BTCPayServer.Abstractions/TagHelpers/UrlResolutionTagHelper2.cs:114 — UrlResolutionTagHelper2.ProcessUrlAttribute has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · form-editor.document.addEventListener("DOMContentLoaded") (cognitive 22) · ×1
  • form-editor.document.addEventListener("DOMContentLoaded") (cognitive 22) BTCPayServer/wwwroot/js/form-editor.js:1 — form-editor.document.addEventListener("DOMContentLoaded") has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6, loops 2, error handling 1, ternaries 1 (nesting depth added 2). Of this number, 16 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · UIInvoiceController.InvoiceReceipt (cognitive 21) · ×1
  • UIInvoiceController.InvoiceReceipt (cognitive 21) BTCPayServer/Controllers/UIInvoiceController.UI.cs:197 — UIInvoiceController.InvoiceReceipt has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Extensions.TryParseXpub (cognitive 21) · ×1
  • Extensions.TryParseXpub (cognitive 21) BTCPayServer/Extensions.cs:153 — Extensions.TryParseXpub has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InvoiceCreationContext.FetchingRates (cognitive 21) · ×1
  • InvoiceCreationContext.FetchingRates (cognitive 21) BTCPayServer/Payments/IPaymentMethodHandler.cs:200 — InvoiceCreationContext.FetchingRates has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GreenfieldOfferingController.CreatePlanCheckout (cognitive 21) · ×1
  • GreenfieldOfferingController.CreatePlanCheckout (cognitive 21) BTCPayServer/Plugins/Subscriptions/Controllers/GreenfieldOfferingController.cs:492 — GreenfieldOfferingController.CreatePlanCheckout has cognitive complexity 21 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · BTCPayWallet.GetBumpableTransactions (cognitive 21) · ×1
  • BTCPayWallet.GetBumpableTransactions (cognitive 21) BTCPayServer/Services/Wallets/BTCPayWallet.cs:324 — BTCPayWallet.GetBumpableTransactions has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · site.initGlobalNavTooltips (cognitive 21) · ×1
  • site.initGlobalNavTooltips (cognitive 21) BTCPayServer/wwwroot/main/site.js:261 — site.initGlobalNavTooltips has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 2, ternaries 2 (nesting depth added 6). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 296, a function literal at line 327, getTooltipLabel, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · setupPositionAdjustPattern (cognitive 21) · ×1
  • setupPositionAdjustPattern (cognitive 21) REDACTED:96 — setupPositionAdjustPattern has cognitive complexity 21 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (9 pts), boolean chains 2 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · createBytes (cognitive 21) · ×1
  • createBytes (cognitive 21) REDACTED:115 — createBytes has cognitive complexity 21 (threshold 15). Drivers by points: loops 8 (12 pts), if/else 2 (6 pts), ternaries 1 (3 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · GreenfieldLightningNodeApiController.PayInvoice (cognitive 20) · ×1
  • GreenfieldLightningNodeApiController.PayInvoice (cognitive 20) BTCPayServer/Controllers/GreenField/GreenfieldLightningNodeApiController.cs:233 — GreenfieldLightningNodeApiController.PayInvoice has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GreenfieldStoreUsersController.GetStoreUserRequest (cognitive 20) · ×1
  • GreenfieldStoreUsersController.GetStoreUserRequest (cognitive 20) BTCPayServer/Controllers/GreenField/GreenfieldStoreUsersController.cs:200 — GreenfieldStoreUsersController.GetStoreUserRequest has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIInvoiceController.MassAction (cognitive 20) · ×1
  • UIInvoiceController.MassAction (cognitive 20) BTCPayServer/Controllers/UIInvoiceController.UI.cs:651 — UIInvoiceController.MassAction has cognitive complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PendingTransactionService.ProcessEvent (cognitive 20) · ×1
  • PendingTransactionService.ProcessEvent (cognitive 20) BTCPayServer/HostedServices/PendingTransactionService.cs:37 — PendingTransactionService.ProcessEvent has cognitive complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BitcoinLikePaymentHandler.ConfigurePrompt (cognitive 20) · ×1
  • BitcoinLikePaymentHandler.ConfigurePrompt (cognitive 20) BTCPayServer/Payments/Bitcoin/BitcoinLikePaymentHandler.cs:134 — BitcoinLikePaymentHandler.ConfigurePrompt has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PosReceiptData.UpdateTotals (cognitive 20) · ×1
  • PosReceiptData.UpdateTotals (cognitive 20) BTCPayServer/Services/Invoices/PosReceiptData.cs:23 — PosReceiptData.UpdateTotals has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HWIController.Run (cognitive 19) · ×1
  • HWIController.Run (cognitive 19) BTCPayServer/Blazor/VaultBridge/HWIController.cs:37 — HWIController.Run has cognitive complexity 19 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · GreenfieldAppsController.ValidateCrowdfundAppRequest (cognitive 19) · ×1
  • GreenfieldAppsController.ValidateCrowdfundAppRequest (cognitive 19) BTCPayServer/Controllers/GreenField/GreenfieldAppsController.cs:537 — GreenfieldAppsController.ValidateCrowdfundAppRequest has cognitive complexity 19 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · GreenfieldReportsController.StoreReports (cognitive 19) · ×1
  • GreenfieldReportsController.StoreReports (cognitive 19) BTCPayServer/Controllers/GreenField/GreenfieldReportsController.cs:40 — GreenfieldReportsController.StoreReports has cognitive complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · GreenfieldStoreRateConfigurationController.ValidateAndSanitizeConfiguration (cognitive 19) · ×1
  • GreenfieldStoreRateConfigurationController.ValidateAndSanitizeConfiguration (cognitive 19) BTCPayServer/Controllers/GreenField/GreenfieldStoreRatesConfigurationController.cs:178 — GreenfieldStoreRateConfigurationController.ValidateAndSanitizeConfiguration has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIEmailControllerBase.EmailSettingsCore (cognitive 19) · ×1
  • UIEmailControllerBase.EmailSettingsCore (cognitive 19) BTCPayServer/Plugins/Emails/Controllers/UIEmailControllerBase.cs:41 — UIEmailControllerBase.EmailSettingsCore has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GreenfieldOfferingController.CreateOfferingPlan (cognitive 19) · ×1
  • GreenfieldOfferingController.CreateOfferingPlan (cognitive 19) BTCPayServer/Plugins/Subscriptions/Controllers/GreenfieldOfferingController.cs:156 — GreenfieldOfferingController.CreateOfferingPlan has cognitive complexity 19 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · WalletSearchResultProvider.ProvideAsync (cognitive 19) · ×1
  • WalletSearchResultProvider.ProvideAsync (cognitive 19) BTCPayServer/Plugins/Wallets/WalletSearchResultProvider.cs:25 — WalletSearchResultProvider.ProvideAsync has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · setupPositionProbePattern (cognitive 19) · ×1
  • setupPositionProbePattern (cognitive 19) REDACTED:91 — setupPositionProbePattern has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIPaymentRequestController.EditPaymentRequest (cognitive 18) · ×1
  • UIPaymentRequestController.EditPaymentRequest (cognitive 18) REDACTED:235 — UIPaymentRequestController.EditPaymentRequest has cognitive complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · WalletTransactionInfo.LegacyLabels.get (cognitive 18) · ×1
  • WalletTransactionInfo.LegacyLabels.get (cognitive 18) BTCPayServer/Data/WalletTransactionInfo.cs:36 — WalletTransactionInfo.LegacyLabels.get has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GreenfieldOfferingController.UpdateOfferingPlan (cognitive 18) · ×1
  • GreenfieldOfferingController.UpdateOfferingPlan (cognitive 18) BTCPayServer/Plugins/Subscriptions/Controllers/GreenfieldOfferingController.cs:226 — GreenfieldOfferingController.UpdateOfferingPlan has cognitive complexity 18 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LoadTranslationsStartupTask.ExecuteAsync (cognitive 18) · ×1
  • LoadTranslationsStartupTask.ExecuteAsync (cognitive 18) BTCPayServer/Plugins/Translations/LoadTranslationsStartupTask.cs:33 — LoadTranslationsStartupTask.ExecuteAsync has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIStoreOnChainWalletsController.GenerateWallet (cognitive 18) · ×1
  • UIStoreOnChainWalletsController.GenerateWallet (cognitive 18) BTCPayServer/Plugins/Wallets/Controllers/UIStoreOnChainWalletsController.cs:306 — UIStoreOnChainWalletsController.GenerateWallet has cognitive complexity 18 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PaymentRequestsReportProvider.Query (cognitive 18) · ×1
  • PaymentRequestsReportProvider.Query (cognitive 18) BTCPayServer/Services/Reporting/PaymentRequestsReportProvider.cs:67 — PaymentRequestsReportProvider.Query has cognitive complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextTemplate.GetAvailablePaths (cognitive 18) · ×1
  • TextTemplate.GetAvailablePaths (cognitive 18) BTCPayServer.Common/TextTemplate.cs:84 — TextTemplate.GetAvailablePaths has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MigrationExtensions.GetProperty (cognitive 18) · ×1
  • MigrationExtensions.GetProperty (cognitive 18) BTCPayServer.Data/Data/MigrationExtensions.cs:44 — MigrationExtensions.GetProperty has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BTCPayServerClient.HandleResponse (cognitive 18) · ×1
  • BTCPayServerClient.HandleResponse (cognitive 18) BTCPayServer.Client/BTCPayServerClient.cs:50 — BTCPayServerClient.HandleResponse has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.document.addEventListener("DOMContentLoaded") (cognitive 18) · ×1
  • app.document.addEventListener("DOMContentLoaded") (cognitive 18) BTCPayServer/wwwroot/crowdfund/app.js:4 — app.document.addEventListener("DOMContentLoaded") has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 8. Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 37, 30, 57, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · datatable.makeTree (cognitive 18) · ×1
  • datatable.makeTree (cognitive 18) REDACTED:118 — datatable.makeTree has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainNav.InvokeAsync (cognitive 17) · ×1
  • MainNav.InvokeAsync (cognitive 17) BTCPayServer/Components/MainNav/MainNav.cs:31 — MainNav.InvokeAsync has cognitive complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ConfigurationExtensions.GetOrDefault (cognitive 17) · ×1
  • ConfigurationExtensions.GetOrDefault (cognitive 17) BTCPayServer/Configuration/ConfigurationExtensions.cs:11 — ConfigurationExtensions.GetOrDefault has cognitive complexity 17 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ExternalConnectionString.TryParse (cognitive 17) · ×1
  • ExternalConnectionString.TryParse (cognitive 17) BTCPayServer/Configuration/ExternalConnectionString.cs:153 — ExternalConnectionString.TryParse has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIPaymentRequestController.ViewPaymentRequestForm (cognitive 17) · ×1
  • UIPaymentRequestController.ViewPaymentRequestForm (cognitive 17) REDACTED:352 — UIPaymentRequestController.ViewPaymentRequestForm has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIStorePullPaymentsController.Payouts (cognitive 17) · ×1
  • UIStorePullPaymentsController.Payouts (cognitive 17) BTCPayServer/Controllers/UIStorePullPaymentsController.PullPayments.cs:521 — UIStorePullPaymentsController.Payouts has cognitive complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Extensions.IsPublicAddress (cognitive 17) · ×1
  • Extensions.IsPublicAddress (cognitive 17) BTCPayServer/Extensions.cs:734 — Extensions.IsPublicAddress has cognitive complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · DbMigrationsHostedService.GetBlobInfo (cognitive 17) · ×1
  • DbMigrationsHostedService.GetBlobInfo (cognitive 17) BTCPayServer/HostedServices/DbMigrationsHostedService.cs:68 — DbMigrationsHostedService.GetBlobInfo has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InvoiceBlobMigratorHostedService.ProcessEntities (cognitive 17) · ×1
  • InvoiceBlobMigratorHostedService.ProcessEntities (cognitive 17) BTCPayServer/HostedServices/InvoiceBlobMigratorHostedService.cs:42 — InvoiceBlobMigratorHostedService.ProcessEntities has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LightningAutomatedPayoutProcessor.HandlePayout (cognitive 17) · ×1
  • LightningAutomatedPayoutProcessor.HandlePayout (cognitive 17) BTCPayServer/PayoutProcessors/Lightning/LightningAutomatedPayoutProcessor.cs:66 — LightningAutomatedPayoutProcessor.HandlePayout has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BitpayAccessTokenController.Tokens (cognitive 17) · ×1
  • BitpayAccessTokenController.Tokens (cognitive 17) REDACTED:28 — BitpayAccessTokenController.Tokens has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MonetizationLoginExtension.Check (cognitive 17) · ×1
  • MonetizationLoginExtension.Check (cognitive 17) BTCPayServer/Plugins/Monetization/MonetizationLoginExtension.cs:16 — MonetizationLoginExtension.Check has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIPluginManagerController.CreateInstalledPluginCardViewModel (cognitive 17) · ×1
  • UIPluginManagerController.CreateInstalledPluginCardViewModel (cognitive 17) BTCPayServer/Plugins/PluginManager/Controllers/UIPluginManagerController.cs:460 — UIPluginManagerController.CreateInstalledPluginCardViewModel has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UISubscriberPortalController.SubscriberPortal (cognitive 17) · ×1
  • UISubscriberPortalController.SubscriberPortal (cognitive 17) REDACTED:36 — UISubscriberPortalController.SubscriberPortal has cognitive complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIWalletsController.SignWithSeed (cognitive 17) · ×1
  • UIWalletsController.SignWithSeed (cognitive 17) BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs:1740 — UIWalletsController.SignWithSeed has cognitive complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · UIWalletsController.WalletActions (cognitive 17) · ×1
  • UIWalletsController.WalletActions (cognitive 17) BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs:1995 — UIWalletsController.WalletActions has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BasicAuthenticationHandler.HandleAuthenticateAsync (cognitive 17) · ×1
  • BasicAuthenticationHandler.HandleAuthenticateAsync (cognitive 17) BTCPayServer/Security/GreenField/BasicAuthenticationHandler.cs:34 — BasicAuthenticationHandler.HandleAuthenticateAsync has cognitive complexity 17 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · InvoiceActivator.ActivateInvoicePaymentMethod (cognitive 17) · ×1
  • InvoiceActivator.ActivateInvoicePaymentMethod (cognitive 17) BTCPayServer/Services/InvoiceActivator.cs:37 — InvoiceActivator.ActivateInvoicePaymentMethod has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProductsReportProvider.Query (cognitive 17) · ×1
  • ProductsReportProvider.Query (cognitive 17) BTCPayServer/Services/Reporting/ProductsReportProvider.cs:27 — ProductsReportProvider.Query has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wallet-transactions-columns.wire (cognitive 17) · ×1
  • wallet-transactions-columns.wire (cognitive 17) REDACTED:193 — wallet-transactions-columns.wire has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2, error handling 1 (nesting depth added 2). None of this is in the body itself: all 17 points belong to 5 function literals inside it that branch (lines 232, 196, 212, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · UIInvoiceController.Invoice (cognitive 16) · ×1
  • UIInvoiceController.Invoice (cognitive 16) BTCPayServer/Controllers/UIInvoiceController.UI.cs:100 — UIInvoiceController.Invoice has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIServerController.CreateUser (cognitive 16) · ×1
  • UIServerController.CreateUser (cognitive 16) BTCPayServer/Controllers/UIServerController.Users.cs:269 — UIServerController.CreateUser has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PullPaymentHostedService.Loop (cognitive 16) · ×1
  • PullPaymentHostedService.Loop (cognitive 16) BTCPayServer/HostedServices/PullPaymentHostedService.cs:383 — PullPaymentHostedService.Loop has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PullPaymentHostedService.HandleCancel (cognitive 16) · ×1
  • PullPaymentHostedService.HandleCancel (cognitive 16) BTCPayServer/HostedServices/PullPaymentHostedService.cs:806 — PullPaymentHostedService.HandleCancel has cognitive complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PayJoinEndpointController.SelectUTXO (cognitive 16) · ×1
  • PayJoinEndpointController.SelectUTXO (cognitive 16) REDACTED:622 — PayJoinEndpointController.SelectUTXO has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BitpayAuthorizationHandler.HandleRequirementAsync (cognitive 16) · ×1
  • BitpayAuthorizationHandler.HandleRequirementAsync (cognitive 16) BTCPayServer/Plugins/Bitpay/Security/BitpayAuthorizationHandler.cs:19 — BitpayAuthorizationHandler.HandleRequirementAsync has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIPluginManagerController.GetRequiredPluginIdentifiers (cognitive 16) · ×1
  • UIPluginManagerController.GetRequiredPluginIdentifiers (cognitive 16) BTCPayServer/Plugins/PluginManager/Controllers/UIPluginManagerController.cs:352 — UIPluginManagerController.GetRequiredPluginIdentifiers has cognitive complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · UIOfferingController.AddPlan (cognitive 16) · ×1
  • UIOfferingController.AddPlan (cognitive 16) REDACTED:621 — UIOfferingController.AddPlan has cognitive complexity 16 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · UISubscriberPortalController.MoveTime (cognitive 16) · ×1
  • UISubscriberPortalController.MoveTime (cognitive 16) REDACTED:264 — UISubscriberPortalController.MoveTime has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UITranslationController.EditTranslation (cognitive 16) · ×1
  • UITranslationController.EditTranslation (cognitive 16) BTCPayServer/Plugins/Translations/Controllers/UITranslationController.cs:146 — UITranslationController.EditTranslation has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PaymentsReportProvider.Query (cognitive 16) · ×1
  • PaymentsReportProvider.Query (cognitive 16) BTCPayServer/Services/Reporting/PaymentsReportProvider.cs:93 — PaymentsReportProvider.Query has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D32 · Data Compliance (PII/GDPR) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Change-coupling hub · ×1
  • Change-coupling hub: UIInvoiceController.UI.cs → CheckoutAppearanceViewModel.cs, BitcoinLikePaymentData.cs, BitpayCreateInvoiceRequest.cs BTCPayServer/Controllers/UIInvoiceController.UI.cs — `BTCPayServer/Controllers/UIInvoiceController.UI.cs` changes together with 3 other files — `BTCPayServer/Models/StoreViewModels/CheckoutAppearanceViewModel.cs`, `BTCPayServer/Payments/Bitcoin/BitcoinLikePaymentData.cs`, `BTCPayServer/Plugins/Bitpay/Models/BitpayCreateInvoiceRequest.cs` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) BTCPayServer/PayoutProcessors/Lightning/UILightningAutomatedPayoutProcessorsController.cs:41 — BTCPayServer/PayoutProcessors/Lightning/UILightningAutomatedPayoutProcessorsController.cs:41-62 | BTCPayServer/PayoutProcessors/Lightning/UILightningAutomatedPayoutProcessorsController.cs:75-96 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×1
  • Duplicated block (17 lines × 2) BTCPayServer/Models/StoreViewModels/GeneralSettingsViewModel.cs:42 — BTCPayServer/Models/StoreViewModels/GeneralSettingsViewModel.cs:42-58 | BTCPayServer/Models/StoreViewModels/PaymentViewModel.cs:11-27 — before extracting anything, compare `BTCPayServer/Models/StoreViewModels/GeneralSettingsViewModel.cs` and `BTCPayServer/Models/StoreViewModels/PaymentViewModel.cs` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×1
  • Duplicated block (18 lines × 2) BTCPayServer/Controllers/GreenField/GreenfieldStoreRatesConfigurationController.cs:131 — BTCPayServer/Controllers/GreenField/GreenfieldStoreRatesConfigurationController.cs:131-148 | BTCPayServer/Controllers/GreenField/GreenfieldStoreRatesController.cs:41-58 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTCPayServer/Controllers/GreenField/GreenfieldStoreRatesConfigurationController.cs:131` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `BTCPayServer/Controllers/GreenField/GreenfieldStoreRatesConfigurationController.cs:130` calls `GetOrCreateRateSettings` and `BTCPayServer/Controllers/GreenField/GreenfieldStoreRatesController.cs:40` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×1
  • Duplicated block (19 lines × 2) BTCPayServer/Controllers/UIServerController.Roles.cs:24 — BTCPayServer/Controllers/UIServerController.Roles.cs:24-42 | BTCPayServer/Controllers/UIStoresController.Roles.cs:27-45 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTCPayServer/Controllers/UIServerController.Roles.cs:24` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) BTCPayServer/Models/AccountViewModels/RegisterViewModel.cs:6 — BTCPayServer/Models/AccountViewModels/RegisterViewModel.cs:6-20 | BTCPayServer/Models/AccountViewModels/SetPasswordViewModel.cs:6-19 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTCPayServer/Models/AccountViewModels/RegisterViewModel.cs:6` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–13 lines × 2) · ×1
  • Duplicated block (11–13 lines × 2) BTCPayServer/Controllers/UIInvoiceController.UI.cs:384 — BTCPayServer/Controllers/UIInvoiceController.UI.cs:384-396 | BTCPayServer/Controllers/UIInvoiceController.UI.cs:443-453 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×1
  • Duplicated block (12 lines × 2) BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs:509 — BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs:509-520 | BTCPayServer/Controllers/UIInvoiceController.UI.cs:534-545 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs:509` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) BTCPayServer.Data/Data/InvoiceData.Migration.cs:48 — BTCPayServer.Data/Data/InvoiceData.Migration.cs:48-58 | BTCPayServer.Data/Data/PaymentData.Migration.cs:16-27 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTCPayServer.Data/Data/InvoiceData.Migration.cs:48` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×1
  • Duplicated block (9 lines × 3) BTCPayServer/Controllers/UIServerController.Users.cs:480 — BTCPayServer/Controllers/UIServerController.Users.cs:480-488 | BTCPayServer/Models/AccountViewModels/RegisterViewModel.cs:13-21 | BTCPayServer/Models/AccountViewModels/SetPasswordViewModel.cs:12-20 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
D5 · Coupling · Off the main sequence · ×1
  • Off the main sequence: BTCPayServer.Client BTCPayServer.Client/BTCPayServer.Client.csproj:1 — BTCPayServer.Client: abstractness 0.03, instability 0.00, distance 0.97 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
IC1 · Incompleteness & stubs · Both branches are identical · ×1
  • Both branches are identical — the condition decides nothing BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.Dogecoin.cs:29 — Both arms of `ChainName == ChainName.Mainnet ? … : …` are `"https://dogechain.info/tx/{0}"`, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
IC1 · Incompleteness & stubs · Unfinished stub · ×1
  • Unfinished stub — throws NotImplementedException BTCPayServer/Plugins/Subscriptions/SubscriptionsPlugin.cs:279 — `SetDefaultSettings` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
P3 · Security & performance tooling · SAST runs, but gates no merge · ×1
  • SAST runs, but gates no merge — `REDACTED` run(s) a static-analysis scan, but no workflow that runs one is triggered by a pull request (or a merge queue, or an unfiltered push) — the scan fires on a schedule or a manual dispatch only. A vulnerable change therefore merges clean and is reported on the next scheduled run, by which time it is on the default branch and the only remedy is a follow-up fix. Add the pull-request trigger to the workflow that runs the scan so the finding arrives before the merge rather than after it.
SC1 · Supply-chain hygiene · NuGet dependencies are not locked · ×1
  • NuGet dependencies are not locked — No packages.lock.json and no central package management — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
X1 · Async correctness · Sync-over-async (deadlock risk) · ×1
  • Sync-over-async (deadlock risk) BTCPayServer.Rating/CurrencyPair.cs:16 — Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
X1 · Async correctness · Sync-over-async (deadlock risk) through `.Wait(…)` · ×1
  • Sync-over-async (deadlock risk) through `.Wait(…)` BTCPayServer.Common/Logging/ConsoleLogger.cs:411 — `.Wait(…)` blocks this thread until the task completes or the bound expires — sync-over-async: it can deadlock under a synchronization context and it parks a thread while it waits. `await` the task (with `.WaitAsync(timeout, token)` where the bound matters).
X18 · Disposal-pattern correctness · Disposes a dependency it does not own · ×1
  • Disposes a dependency it does not own BTCPayServer/Plugins/Subscriptions/SubscriptionContext.cs:122 — `ctx` is never created by `SubscriptionContext` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 122). Its declared type `ApplicationDbContext` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Minor — 160 finding(s)
X4 · Structured logging · Interpolated log message defeats structured logging · ×40
  • Interpolated log message defeats structured logging BTCPayServer/Configuration/BTCPayServerOptions.cs:61 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging BTCPayServer/Configuration/BTCPayServerOptions.cs:108 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging BTCPayServer/Configuration/BTCPayServerOptions.cs:109 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging BTCPayServer/ExplorerClientProvider.cs:50 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging BTCPayServer/ExplorerClientProvider.cs:51 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging BTCPayServer/ExplorerClientProvider.cs:69 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging BTCPayServer/ExplorerClientProvider.cs:75 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging BTCPayServer/HostedServices/BaseAsyncService.cs:36 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging BTCPayServer/HostedServices/BaseAsyncService.cs:62 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging BTCPayServer/HostedServices/BaseAsyncService.cs:81 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging BTCPayServer/HostedServices/BlobMigratorHostedService.cs:55 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging BTCPayServer/HostedServices/DbMigrationsHostedService.cs:126 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging BTCPayServer/HostedServices/DbMigrationsHostedService.cs:295 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging BTCPayServer/HostedServices/DbMigrationsHostedService.cs:298 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging BTCPayServer/HostedServices/DbPeriodicTask.cs:49 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging BTCPayServer/HostedServices/DbPeriodicTask.cs:54 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging BTCPayServer/HostedServices/EventHostedServiceBase.cs:75 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging BTCPayServer/HostedServices/InvoiceWatcher.cs:187 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging BTCPayServer/HostedServices/InvoiceWatcher.cs:313 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging BTCPayServer/HostedServices/NBXplorerWaiter.cs:115 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging BTCPayServer/HostedServices/NBXplorerWaiter.cs:130 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging BTCPayServer/HostedServices/NBXplorerWaiter.cs:206 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging BTCPayServer/HostedServices/PeriodicTaskLauncherHostedService.cs:55 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging BTCPayServer/Hosting/BTCPayServerServices.cs:242 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging BTCPayServer/Hosting/BTCPayServerServices.cs:265 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • + 15 more in this group — see findings.md.
D17 · Explicit Debt · ObsoleteWithoutCallers · ×20
  • ObsoleteWithoutCallers BTCPayServer.Data/Data/PairingCodeData.cs:9 — [Obsolete] Facade
  • ObsoleteWithoutCallers REDACTED:2300 — [Obsolete] CanDoLabelMigrations
  • ObsoleteWithoutCallers BTCPayServer/DerivationSchemeParser.cs:25 — [Obsolete] ParseOutputDescriptor
  • ObsoleteWithoutCallers BTCPayServer/DerivationSchemeSettings.cs:50 — [Obsolete] SigningKey
  • ObsoleteWithoutCallers BTCPayServer/DerivationSchemeSettings.cs:72 — [Obsolete] GetSigningAccountKeySettings
  • ObsoleteWithoutCallers BTCPayServer/DerivationSchemeSettings.cs:87 — [Obsolete] GetSigningAccountKeySettings
  • ObsoleteWithoutCallers BTCPayServer/DerivationSchemeSettings.cs:91 — [Obsolete] GetSigningAccountKeySettings
  • ObsoleteWithoutCallers BTCPayServer/DerivationSchemeSettings.cs:95 — [Obsolete] GetSigningAccountKeySettingsOrDefault
  • ObsoleteWithoutCallers BTCPayServer/Extensions.cs:398 — [Obsolete] IsSafe
  • ObsoleteWithoutCallers BTCPayServer/Filters/XFrameOptionsAttribute.cs:13 — [Obsolete] .ctor
  • ObsoleteWithoutCallers BTCPayServer/Hosting/BTCPayServerServices.cs:914 — [Obsolete] AddTransactionLinkProvider
  • ObsoleteWithoutCallers BTCPayServer/Plugins/GlobalSearch/StaticSearchResultProvider.cs:25 — [Obsolete] Keywords
  • ObsoleteWithoutCallers BTCPayServer/Plugins/GlobalSearch/Views/GlobalSearchViewModel.cs:48 — [Obsolete] Keywords
  • ObsoleteWithoutCallers BTCPayServer/SearchString.cs:62 — [Obsolete] TextCombined
  • ObsoleteWithoutCallers BTCPayServer/SearchString.cs:87 — [Obsolete] WithoutSearchText
  • ObsoleteWithoutCallers BTCPayServer/Security/SecurityExtensions.cs:9 — [Obsolete] GetImplicitStoreId
  • ObsoleteWithoutCallers BTCPayServer/Services/Invoices/InvoiceRepository.cs:536 — [Obsolete] UpdateInvoiceMetadata
  • ObsoleteWithoutCallers BTCPayServer/Services/Invoices/InvoiceRepository.cs:685 — [Obsolete] GetInvoices
  • ObsoleteWithoutCallers BTCPayServer/Services/UserService.cs:241 — [Obsolete] ToggleUser
  • ObsoleteWithoutCallers BTCPayServer/Views/UIStores/StoreNavPages.cs:27 — [Obsolete] Integrations
IC1 · Incompleteness & stubs · Commented-out code · ×14
  • Commented-out code BTCPayServer.Common/Logging/ConsoleLogger.cs:189 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code BTCPayServer.Data/ApplicationDbContext.cs:83 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code BTCPayServer.Data/ApplicationDbContext.cs:88 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code BTCPayServer.Data/ApplicationDbContext.cs:91 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code BTCPayServer.Data/ApplicationDbContext.cs:95 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code BTCPayServer.Data/ApplicationDbContext.cs:107 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code BTCPayServer/Fido2/Fido2Service.cs:69 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code BTCPayServer/Hosting/BTCPayServerServices.cs:803 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code BTCPayServer/Hosting/BTCPayServerServices.cs:804 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code BTCPayServer/Hosting/BTCPayServerServices.cs:805 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code BTCPayServer/JsonConverters/PaymentMethodIdJsonConverter.cs:20 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code BTCPayServer/JsonConverters/PayoutMethodIdJsonConverter.cs:20 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code BTCPayServer/Plugins/Subscriptions/SubscriptionHostedService.cs:518 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code BTCPayServer/Plugins/Subscriptions/SubscriptionHostedService.cs:519 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
X7 · Silent fallback defaults · Silent fallback default in catch · ×14
  • Silent fallback default in catch BTCPayServer/Controllers/LnurlAuthService.cs:75 — `CompleteCreation` swallows every exception into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch BTCPayServer/IHasAdditionalData.cs:25 — `GetAdditionalData` swallows every exception into `return default;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch BTCPayServer/Payments/LNURLPay/LNURLPayPaymentLinkExtension.cs:45 — `GetPaymentLink` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch BTCPayServer/Plugins/Dotnet/Loader/RuntimeConfigExtensions.cs:125 — `TryReadConfig` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch REDACTED:136 — `ParseEmailAddresses` swallows `FormatException` into `return Array.Empty<MailboxAddress>();` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch BTCPayServer/Plugins/PluginManager.cs:837 — `TryReadPluginManifest` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch BTCPayServer/Plugins/Translations/LanguagePackUpdateService.cs:150 — `CheckForLanguagePackUpdate` swallows `Exception` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs:1975 — `GetBalanceAsMoney` swallows every exception into `return Money.Zero;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs:1989 — `GetBalanceString` swallows every exception into `return "--";` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch BTCPayServer/Security/GreenField/APIKeyRepository.cs:48 — `GetHash` swallows every exception into `return "???";` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch BTCPayServer/Security/GreenField/APIKeyRepository.cs:60 — `GetId` swallows every exception into `return "???";` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch BTCPayServer/Services/Stores/StoreRepository.cs:349 — `AddStoreUser` swallows `DbUpdateException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch BTCPayServer/SSRFAllowedDestination.cs:101 — `MatchesHostname` swallows `FormatException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch BTCPayServer/wwwroot/plugins/GlobalSearch/global-search.js:465 — `loadGlobalSearchRecents` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
D34 · Knowledge Freshness · Orphaned file · ×13
  • Orphaned file BTCPayServer/Services/Reporting/PaymentRequestsReportProvider.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file BTCPayServer.Client/BTCPayServerClient.Lightning.Store.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file BTCPayServer.Client/BTCPayServerClient.Lightning.Internal.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file BTCPayServer.Client/BTCPayServerClient.Apps.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file BTCPayServer/Services/Wallets/Export/TransactionsExport.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file BTCPayServer/Components/StoreLightningBalance/StoreLightningBalance.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file BTCPayServer.Abstractions/Extensions/HttpRequestExtensions.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file BTCPayServer/Extensions/ColorExtensions.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file BTCPayServer/Components/StoreLightningServices/StoreLightningServices.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file BTCPayServer.Client/BTCPayServerClient.OnChainWallet.Objects.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file BTCPayServer.Client/BTCPayServerClient.Users.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file BTCPayServer/Controllers/GreenField/GreenfieldFilesController.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file BTCPayServer/Services/DisplayFormatter.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
X10 · Duplicated predicate · Duplicated predicate · ×11
  • Duplicated predicate BTCPayServer/Controllers/UIStoresController.Labels.cs:30 — `!excludeTypes || !WalletObjectData.Types.AllTypes.Contains(l.Label)` appears character-identically in 2 files — BTCPayServer/Controllers/UIStoresController.Labels.cs, BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate BTCPayServer/Plugins/Webhooks/TriggerProviders/PaymentRequestTriggerProvider.cs:55 — `!string.IsNullOrEmpty(id) && id.Length > 15` appears character-identically in 2 files — BTCPayServer/Plugins/Webhooks/TriggerProviders/PaymentRequestTriggerProvider.cs, BTCPayServer/Plugins/Webhooks/TriggerProviders/PendingTransactionTriggerProvider.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:837 — `!string.IsNullOrEmpty(returnUrl) && Url.IsLocalUrl(returnUrl)` appears character-identically in 2 files — REDACTED, BTCPayServer/Controllers/UIInvoiceController.UI.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate BTCPayServer/Controllers/GreenField/GreenfieldServerEmailController.cs:50 — `!string.IsNullOrWhiteSpace(request.From) && !MailboxAddressValidator.IsMailboxAddress(request.From)` appears character-identically in 2 files — BTCPayServer/Controllers/GreenField/GreenfieldServerEmailController.cs, BTCPayServer/Controllers/GreenField/GreenfieldStoreEmailController.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate BTCPayServer/ModelBinders/DateTimeOffsetModelBinder.cs:13 — `!typeof(DateTimeOffset).GetTypeInfo().IsAssignableFrom(bindingContext.ModelType) && !typeof(DateTimeOffset?).GetTypeInfo().IsAssignableFrom(…` appears character-identically in 2 files — BTCPayServer/ModelBinders/DateTimeOffsetModelBinder.cs, BTCPayServer/Plugins/Bitpay/BitpayDateTimeOffsetModelBinder.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate BTCPayServer/Plugins/Wallets/Views/ViewModels/TransactionTagModel.cs:25 — `((object)a == null) || ((object)b == null)` appears character-identically in 5 files — BTCPayServer.Abstractions/Security/ContentSecurityPolicies.cs, BTCPayServer.Client/Permissions.cs, BTCPayServer.Rating/CurrencyPair.cs, BTCPayServer.Rating/ExchangeRates.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate BTCPayServer/Controllers/UIManageController.cs:208 — `RemoveImageFile && !string.IsNullOrEmpty(blob.ImageUrl)` appears character-identically in 2 files — BTCPayServer/Controllers/UIManageController.cs, BTCPayServer/Controllers/UIServerController.Users.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate BTCPayServer/Plugins/Webhooks/TriggerProviders/PaymentRequestTriggerProvider.cs:71 — `blob.RequestBaseUrl is not null && RequestBaseUrl.TryFromUrl(blob.RequestBaseUrl, out var v)` appears character-identically in 2 files — BTCPayServer/Plugins/Webhooks/TriggerProviders/PaymentRequestTriggerProvider.cs, BTCPayServer/Plugins/Webhooks/TriggerProviders/PendingTransactionTriggerProvider.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate BTCPayServer/Controllers/LnurlAuthService.cs:85 — `device == null || !device.ApplicationUserId.Equals(userId, StringComparison.InvariantCulture)` appears character-identically in 2 files — BTCPayServer/Controllers/LnurlAuthService.cs, BTCPayServer/Fido2/Fido2Service.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate BTCPayServer/wwwroot/js/form-editor.js:225 — `this.editorOffcanvas && window.getComputedStyle(this.$refs.editorOffcanvas).visibility === 'hidden'` appears character-identically in 2 files — BTCPayServer/wwwroot/js/form-editor.js, BTCPayServer/wwwroot/js/template-editor.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate BTCPayServer/Plugins/Wallets/Controllers/GreenfieldStoreOnChainWalletsController.cs:580 — `rootedKeyPath is null || signingKeySettings is null` appears character-identically in 2 files — BTCPayServer/Plugins/Wallets/Controllers/GreenfieldStoreOnChainWalletsController.cs, BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
IC1 · Incompleteness & stubs · Placeholder data left in code · ×8
  • Placeholder data left in code BTCPayServer/Plugins/Emails/Controllers/UIEmailControllerBase.cs:94 — A placeholder e-mail address ("store@example.com") is still in shipped code — its domain is reserved for documentation, so anything sent here is undeliverable by construction. Replace it with the real address, or take it from configuration.
  • Placeholder data left in code BTCPayServer/Plugins/Emails/Controllers/UIEmailControllerBase.cs:95 — A placeholder e-mail address ("store@example.com") is still in shipped code — its domain is reserved for documentation, so anything sent here is undeliverable by construction. Replace it with the real address, or take it from configuration.
  • Placeholder data left in code BTCPayServer/Plugins/Emails/EmailsPlugin.cs:222 — A placeholder value ("The name of the user (eg. John Doe)") is still in shipped code — sample/mock data that was never replaced with the real thing.
  • Placeholder data left in code BTCPayServer/Plugins/Emails/EmailsPlugin.cs:224 — A placeholder value ("The formatted mailbox address to use whe…") is still in shipped code — sample/mock data that was never replaced with the real thing.
  • Placeholder data left in code BTCPayServer/Plugins/Emails/StoreMailTriggers.cs:25 — A placeholder value ("The name of the user (eg. John Doe)") is still in shipped code — sample/mock data that was never replaced with the real thing.
  • Placeholder data left in code BTCPayServer/Plugins/Emails/StoreMailTriggers.cs:27 — A placeholder value ("The formatted mailbox address to use whe…") is still in shipped code — sample/mock data that was never replaced with the real thing.
  • Placeholder data left in code BTCPayServer/Plugins/Multisig/MultisigEmailTriggers.cs:35 — A placeholder value ("The formatted mailbox address to use whe…") is still in shipped code — sample/mock data that was never replaced with the real thing.
  • Placeholder data left in code BTCPayServer/Plugins/Multisig/MultisigEmailTriggers.cs:42 — A placeholder value ("The formatted mailbox address to use whe…") is still in shipped code — sample/mock data that was never replaced with the real thing.
D19 · Documentation Quality · Documentation · ×3
  • Documentation: no installation or build instructions docs/README.md — The docs directory's README does not describe any tooling or local development setup, which is needed for readers who cannot visit the repository. Add a short 'How to manually test payments' section and link to the Docker documentation.
  • Documentation: no usage examples docs/README.md — The docs directory's README does not show how to run or use any of its documented tooling. Add a 'How to manually test payments' section and link to the Docker documentation.
  • Documentation: written for insiders docs/maintainers/local-development.md — The document refers to an untagged fenced shell block containing commands such as `dotnet dev-certs https --trust` without explaining what it leaves out. Quote the command and explain what each option does, or tag the block so readers can find it.
X7 · Silent fallback defaults · Silent fallback default on unknown code · ×3
  • Silent fallback default on unknown code BTCPayServer/Plugins/Multisig/Models/MultisigSetupData.cs:38 — `GetDiredivationSchemeSettings` maps every unrecognised code to `string.Empty`, one of the real values, with no log or throw — a malformed or new code silently reads as a known one. Throw on the unknown code, or log it. If that member is the correct answer for any other code, say so in a comment on the member and the row stops firing.
  • Silent fallback default on unknown code REDACTED:120 — `SubscriberSuspend` maps every unrecognised code to `SubscriptionsPolicies.CanManageSubscribers`, one of the real values, with no log or throw — a malformed or new code silently reads as a known one. Throw on the unknown code, or log it. If that member is the correct answer for any other code, say so in a comment on the member and the row stops firing.
  • Silent fallback default on unknown code BTCPayServer/Plugins/Wallets/Controllers/UIWalletsController.PSBT.cs:158 — `WalletPSBT` maps every unrecognised code to `WalletPolicies.CanViewWallet`, one of the real values, with no log or throw — a malformed or new code silently reads as a known one. Throw on the unknown code, or log it. If that member is the correct answer for any other code, say so in a comment on the member and the row stops firing.
D24 · Comment Value · redundant comment · ×2
  • redundant comment BTCPayServer.Abstractions/Contracts/IBTCPayServerPlugin.cs:34 — "Format it" — delete - restates ToString; only explain WHY it formats
  • redundant comment BTCPayServer/Storage/Services/FileService.cs:154 — "Replace multiple underscores with just one" — weak keep - notes the regex; could be weakly linked to Sanitize's purpose but not as strong as the original comment
M4 · Documentation accuracy · README/code drift · ×2
  • README/code drift docs/operators/README.md:87 — docs/operators/README.md documents the environment variable `BTCPAY_SSRFEXCEPTIONS`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/operators/host-integration.md:11 — docs/operators/host-integration.md documents the environment variable `BTCPAY_BTCPAYHOSTEXECUTABLE`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
P2 · Observability · Console output used as the logging channel · ×2
  • Console output used as the logging channel root/.nuget/packages/jetbrains.annotations.sources/2026.2.0/contentFiles/cs/any/JetBrains.Annotations/Annotations.Internal.cs:106 — `/root/.nuget/packages/jetbrains.annotations.sources/2026.2.0/contentFiles/cs/any/JetBrains.Annotations/Annotations.Internal.cs` reports through `Console.Write…` at line 106 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel root/.nuget/packages/jetbrains.annotations.sources/2026.2.0/contentFiles/cs/any/JetBrains.Annotations/Annotations.Internal.cs:132 — `/root/.nuget/packages/jetbrains.annotations.sources/2026.2.0/contentFiles/cs/any/JetBrains.Annotations/Annotations.Internal.cs` reports through `Console.Write…` at line 132 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
C3 · Audit Trail · Partial audit-trail evidence · ×1
  • Partial audit-trail evidence — An audit mechanism is present, but the trail is not yet complete — missing: an immutable audit-log / audit-trail type to write to, [Audited] per-entity coverage.
C4 · Data Retention · Partial data-retention evidence · ×1
  • Partial data-retention evidence — A retention mechanism is present, but the data-lifecycle is not yet complete — missing: a documented retention period / data-expiry.
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 65 significant file(s) lose their only recent owner: BTCPayServer/Extensions.cs, BTCPayServer/Hosting/MigrationStartupTask.cs, BTCPayServer/Payments/Bitcoin/NBXplorerListener.cs, BTCPayServer/Data/Payouts/BitcoinLike/BitcoinLikePayoutHandler.cs, BTCPayServer/Plugins/Monetization/Controllers/UIServerMonetizationController.cs, BTCPayServer/DerivationSchemeParser.cs, BTCPayServer.Data/Data/InvoiceData.Migration.cs, BTCPayServer/Blazor/VaultBridge/HWIController.cs (+57 more). Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 7 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (73 single-owned of 410 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 410 of the 1177 production source files in this repository met that bar). They are anonymized user #2 (2 file(s)), anonymized user #3 (1 file(s)), anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)), anonymized user #7 (1 file(s)) (+1 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: BTCPayServer.Rating/Providers/BackgroundFetcherRateProvider.cs, BTCPayServer/ExplorerClientProvider.cs, BTCPayServer/HostedServices/PendingTransactionService.cs, BTCPayServer/Plugins/Subscriptions/SubscriptionsReportProvider.cs, BTCPayServer/Plugins/PluginManager/PluginUpdateFetcher.cs, BTCPayServer/Plugins/Emails/Services/EmailSettings.cs, BTCPayServer/Services/InvoiceActivator.cs, BTCPayServer/Services/Wallets/Import/Bip329Import.cs.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 10 project(s) overshoot their size bounds, lowering Project Cohesion to 8.0/10. The most over is `BTCPayServer` (89767 LoC, 1286 public types across 181 namespaces). Review these for cohesion — split a project that spans unrelated responsibilities.
D27 · Navigability · Scattered collaborators · ×1
  • Scattered collaborators — 79 % of calls cross a namespace and only 28 % of collaborators are co-located — group each feature's code into a vertical slice so a call's collaborators sit together.
D27 · Navigability · Pass-through layer · ×1
  • Pass-through layer BTCPayServer/Plugins/PluginServiceCollection.cs:8 — PluginServiceCollection: all 10 public methods forward their arguments unchanged to Inner and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call Inner directly, or give the layer a job.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 13 of 414 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 414 of the 1177 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: BTCPayServer/Services/Reporting/PaymentRequestsReportProvider.cs, BTCPayServer.Client/BTCPayServerClient.Lightning.Store.cs, BTCPayServer.Client/BTCPayServerClient.Lightning.Internal.cs, BTCPayServer.Client/BTCPayServerClient.Apps.cs, BTCPayServer/Services/Wallets/Export/TransactionsExport.cs, BTCPayServer/Components/StoreLightningBalance/StoreLightningBalance.cs, BTCPayServer.Abstractions/Extensions/HttpRequestExtensions.cs, BTCPayServer/Extensions/ColorExtensions.cs (and 5 more). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D39 · IL Efficiency · IL efficiency · ×1
  • IL efficiency: 35 authored method(s) exceed the IL budget BTCPayServer.Data/Data/InvoiceData.Migration.cs:49 — 35 of 8357 first-party methods compile to oversized IL bodies (> 250 instructions); worst: BTCPayServer.Data.InvoiceData.TryMigrate @ BTCPayServer.Data/Data/InvoiceData.Migration.cs:49, 1955 IL instructions; that pulled this dimension to 9.9/10. These bodies are far past the JIT's inline budget, so splitting them does not make them inlinable — what moves the number is emitting less: collapsing LINQ chains and closures on hot paths, and interpolation built eagerly where it is only sometimes used.
D9 · Test Distribution · Inverted test pyramid · ×1
  • Inverted test pyramid — Most tests are end-to-end, which tends to be brittle and slow.
GD1 · Unfinished & placeholder code · Placeholder literal left in code · ×1
  • Placeholder literal left in code BTCPayServer/Plugins/Translations/Translations.Default.cs:12 — A placeholder string ("{ "... on every payment": "", "... o…") is still in shipped code — typical of generated boilerplate that was never filled in.
IC1 · Incompleteness & stubs · Disabled test · ×1
  • Disabled test BTCPayServer.Tests/ThirdPartyTests.cs:75 — A test is skipped ("Fail on CI") — coverage that looks present but never runs in any gate. If it's an opt-in suite, document how it runs; otherwise re-enable or delete it.
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M3 · Folder & project structure · No src/ separation · ×1
  • No src/ separation — Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
P12 · CI test-gate honesty · Sleep-based test synchronization · ×1
  • Sleep-based test synchronization — 20 Task.Delay/Thread.Sleep call(s) in test code synchronize with background work by sleeping — a known flakiness precursor on slow runners. Prefer polling with a deadline or completion signals.
P4 · Deployment & Rollback · No rollback/health safety · ×1
  • No rollback/health safety — Deployment automation exists but no readiness/liveness probes, rolling-update strategy, lifecycle hooks or migration job were evidenced — a bad release is harder to detect and reverse.
PF1 · Benchmark discipline · No performance benchmarks · ×1
  • No performance benchmarks — No benchmark suite was found by the two searches this check runs. FIRST, a BenchmarkDotNet package reference in any project file — every project the workspace loaded, plus a walk of project files on disk that never loaded, because a benchmark suite is exactly the project a partial load drops. SECOND, a script harness: a file whose name contains `benchmark` and ends `.py`, `.sh`, `.ps1`, `.bash`, `.rb`, `.js` or `.mjs`, credited ONLY when this repository's CI text also mentions benchmarks — a harness no pipeline runs is read as a fixture, deliberately. Neither search can see a benchmark suite in another ecosystem's idiom (a Go `testing.B` file, a JMH or criterion project, a pytest-benchmark run), so this is 'no benchmark found by those two searches', not a verdict that the repository has none. Where code is performance-sensitive, a benchmark guards against silent regressions — but it's a bonus here, not a deduction.
S1 · Web-Security Posture · Security headers incomplete · ×1
  • Security headers incomplete BTCPayServer/Filters/ContentSecurityPolicyAttribute.cs:114 — Set: Content-Security-Policy, Referrer-Policy, X-Content-Type-Options, X-Frame-Options. Missing: Strict-Transport-Security — the four headers that carry the points of this card's security-headers term (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options), 0.5 each. (−0.5 on this card.)
X2 · Cancellation propagation · Not all async methods take a CancellationToken · ×1
  • Not all async methods take a CancellationToken — Only 450/1385 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up — whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice — judge against your hosting model.
X5 · Nullable reference types · Nullable reference types not enabled everywhere · ×1
  • Nullable reference types not enabled everywhere — 0/7 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
X5 · Nullable reference types · Null-forgiving operator (`!`) suppressions reduce the NRT score · ×1
  • Null-forgiving operator (`!`) suppressions reduce the NRT score — ~0.7 `!` suppressions per 1k syntax nodes — 202 suppression(s) across the 295665 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide.
X7 · Silent fallback defaults · Silent fallback default on parse failure · ×1
  • Silent fallback default on parse failure BTCPayServer/DefaultRules.cs:72 — `GetRecommendedExchange` falls back to `"kraken"` when `RecommendedExchanges.TryGetValue(currency, out var ex)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Minor — 13 finding(s)
D12 · Dependency Hygiene · Outdated · ×6
  • Outdated: Fido2 — Fido2 4.2.0 → 4.3.1 available (referenced by BTCPayServer).
  • Outdated: Fido2.AspNet — Fido2.AspNet 4.2.0 → 4.3.1 available (referenced by BTCPayServer).
  • Outdated: QRCoder — QRCoder 1.8.0 → 1.8.1 available (referenced by BTCPayServer).
  • Outdated: Microsoft.Playwright — Microsoft.Playwright 1.63.0 → 1.64.1 available (referenced by BTCPayServer.Tests).
  • Outdated: Microsoft.Testing.Extensions.GitHubActionsReport — Microsoft.Testing.Extensions.GitHubActionsReport 2.4.1 → 2.5.1 available (referenced by BTCPayServer.Tests).
  • Outdated: xunit.v3 — xunit.v3 4.0.1 → 4.0.2 available (referenced by BTCPayServer.Tests).
D19 · Documentation Quality · XML-doc coverage · ×6
  • XML-doc coverage: BTCPayServer BTCPayServer/BTCPayServer.csproj — BTCPayServer: 3 % XML-doc coverage (217/7952).
  • XML-doc coverage: BTCPayServer.Rating BTCPayServer.Rating/BTCPayServer.Rating.csproj — BTCPayServer.Rating: 11 % XML-doc coverage (41/360).
  • XML-doc coverage: BTCPayServer.Common BTCPayServer.Common/BTCPayServer.Common.csproj — BTCPayServer.Common: 4 % XML-doc coverage (6/146).
  • XML-doc coverage: BTCPayServer.Data BTCPayServer.Data/BTCPayServer.Data.csproj — BTCPayServer.Data: 2 % XML-doc coverage (17/900).
  • XML-doc coverage: BTCPayServer.Client BTCPayServer.Client/BTCPayServer.Client.csproj — BTCPayServer.Client: 3 % XML-doc coverage (40/1383).
  • XML-doc coverage: BTCPayServer.Abstractions BTCPayServer.Abstractions/BTCPayServer.Abstractions.csproj — BTCPayServer.Abstractions: 5 % XML-doc coverage (17/344).
D5 · Coupling · Off the main sequence · ×1
  • Off the main sequence: BTCPayServer.Common BTCPayServer.Common/BTCPayServer.Common.csproj:1 — BTCPayServer.Common: abstractness 0.16, instability 0.00, distance 0.84 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-285e94c61fa346ada61918ec69012b74/history.json --exit-code 0 --source .7artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-285e94c61fa346ada61918ec69012b74/tree.json --exit-code 0 --source .1artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .136artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesdotnet—dotnet list btcpayserver.sln package --vulnerable --include-transitive --format json0artifacts/raw/dotnet-vulnerable.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .5artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep --config /opt/semgrep-rules/gdpr.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .1artifacts/raw/semgrep-gdpr.json
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesnone (no readable dependency manifest)—none (no readable dependency manifest): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — not scanned yet).0—

Run 01a16829-6ea5-754a-a24f-205556337979 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Appendix C — Personal-data map

Every field, property and record parameter whose name is conventional personal data — 56 field(s) across 2 categories, each with an exact repo-relative file:line. This is the data inventory a compliance review starts from — right-to-erasure, retention, minimisation. Detected by NAME, from the C# syntax tree, with a deliberately specific identifier classifier — the same one the C1–C5 compliance cards use to decide whether personal data is present, so CardDefinition or FileName don't trip. Two caveats stated rather than glossed: those cards additionally require corroboration (a persistence/account signal, or two distinct PII categories) that this inventory deliberately does not, so it lists more than they gate on; and D32 Data Compliance shares nothing with it — that dimension is a separate semgrep ruleset for personal data leaking into logs, URLs and browser storage, and a clean D32 result says nothing about this list. Informational — it feeds no score.

Email — 53 field(s)
  • ApplicationUserData.Email BTCPayServer.Client/Models/ApplicationUserData.cs:18
  • CreateApplicationUserRequest.Email BTCPayServer.Client/Models/CreateApplicationUserRequest.cs:18
  • PaymentRequestBaseData.Email BTCPayServer.Client/Models/PaymentRequestBaseData.cs:39
  • SendEmailRequest.Email BTCPayServer.Client/Models/SendEmailRequest.cs:6
  • StoreUserData.Email BTCPayServer.Client/Models/StoreData.cs:19
  • StoreInvitationData.UserEmail BTCPayServer.Client/Models/StoreData.cs:56
  • CreatePlanCheckoutRequest.NewSubscriberEmail BTCPayServer.Client/Models/Subscriptions/CreatePlanCheckoutRequest.cs:32
  • UpdateApplicationUserRequest.Email BTCPayServer.Client/Models/UpdateApplicationUserRequest.cs:18
  • ApplicationDbContext.EmailRules BTCPayServer.Data/ApplicationDbContext.cs:67
  • CustomerData.Email BTCPayServer.Data/Data/CustomerData.cs:67
  • CustomerData.NotificationEmail BTCPayServer.Data/Data/CustomerData.cs:70
  • StoreInvitationExtendedRow.UserEmail BTCPayServer.Data/Data/StoreInvitation.cs:27
  • PlanCheckoutData.NewSubscriberEmail BTCPayServer.Data/Data/Subscriptions/PlanCheckoutData.cs:56
  • ResetUserPasswordFromAdmin.Email BTCPayServer/Controllers/UIServerController.Users.cs:478
  • RegisterFromAdminViewModel.Email BTCPayServer/Controllers/UIServerController.Users.cs:496
  • PaymentRequestBlob.Email BTCPayServer/Data/PaymentRequestBlob.cs:8
  • PullPaymentView.Email BTCPayServer/Data/PullPayments/PullPaymentBlob.cs:34
  • StoreBlob.EmailSettings BTCPayServer/Data/StoreBlob.cs:206
  • Registered.ConfirmationEmailLink BTCPayServer/Events/UserEvent.cs:31
  • ForgotPasswordViewModel.Email BTCPayServer/Models/AccountViewModels/ForgotPasswordViewModel.cs:10
  • LoginViewModel.Email BTCPayServer/Models/AccountViewModels/LoginViewModel.cs:9
  • RegisterViewModel.Email BTCPayServer/Models/AccountViewModels/RegisterViewModel.cs:10
  • SetPasswordViewModel.Email BTCPayServer/Models/AccountViewModels/SetPasswordViewModel.cs:10
  • CreateInvoiceModel.BuyerEmail BTCPayServer/Models/InvoicingModels/CreateInvoiceModel.cs:52
  • IndexViewModel.Email BTCPayServer/Models/ManageViewModels/IndexViewModel.cs:12
  • UpdatePaymentRequestViewModel.Email BTCPayServer/Models/PaymentRequestViewModels/ListPaymentRequestsViewModel.cs:92
  • ViewPaymentRequestViewModel.Email BTCPayServer/Models/PaymentRequestViewModels/ListPaymentRequestsViewModel.cs:145
  • UserViewModel.Email BTCPayServer/Models/ServerViewModels/UsersViewModel.cs:17
  • StoreInvitationSentViewModel.Email BTCPayServer/Models/StoreViewModels/StoreInvitationSentViewModel.cs:8
  • StoreInvitationViewModel.InvitedEmail BTCPayServer/Models/StoreViewModels/StoreInvitationViewModel.cs:18
  • StoreUserViewModel.Email BTCPayServer/Models/StoreViewModels/StoreUsersViewModel.cs:13
  • StoreUsersViewModel.Email BTCPayServer/Models/StoreViewModels/StoreUsersViewModel.cs:37
  • WalletSettingsAccountKeyViewModel.SignerEmail BTCPayServer/Models/StoreViewModels/WalletSettingsViewModel.cs:55
  • ViewPullPaymentModel.Email BTCPayServer/Models/ViewPullPaymentModel.cs:76
  • BitpayCreateInvoiceRequest.BuyerEmail BTCPayServer/Plugins/Bitpay/Models/BitpayCreateInvoiceRequest.cs:14
  • ContributeToCrowdfund.Email BTCPayServer/Plugins/Crowdfund/Models/ViewCrowdfundViewModel.cs:78
  • EmailsRuleControllerContext.EmailSettingsLink BTCPayServer/Plugins/Emails/Controllers/UIEmailRuleControllerBase.cs:30
  • EmailTriggerViewModel.DefaultEmail BTCPayServer/Plugins/Emails/Views/EmailTriggerViewModel.cs:28
  • EmailsViewModel.TestEmail BTCPayServer/Plugins/Emails/Views/EmailsViewModel.cs:20
  • MultisigSignerInfo.Email BTCPayServer/Plugins/Multisig/Events/MultisigEvents.cs:8
  • + 13 more field(s) in this category.
Phone — 3 field(s)
  • BitpayCreateInvoiceRequest.BuyerPhone BTCPayServer/Plugins/Bitpay/Models/BitpayCreateInvoiceRequest.cs:42
  • InvoiceMetadata.BuyerPhone BTCPayServer/Services/Invoices/InvoiceEntity.cs:120
  • BuyerInformation.BuyerPhone BTCPayServer/Services/Invoices/InvoiceEntity.cs:262

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md