SleepEdit Security and Quality Evidence

Detailed scan results. Missing measurements remain visible.

Official SonarQube Cloud quality gate badge

Measured baseline

Coverage

Sonar's retained percentage reflects the coverage report supplied to that analysis. It is not presented as coverage of every source language.

Sonar aggregate coverage

84.8%

The combined percentage of executable lines and decision conditions exercised by tests in the coverage report imported into SonarQube.

Scanner-reported aggregate

Sonar line coverage

86.8%

The percentage of executable source lines run by tests in the coverage report imported into SonarQube.

Scanner-reported lines

Sonar branch coverage

80%

The percentage of decision outcomes, such as both true and false paths, exercised by tests in the coverage report imported into SonarQube.

Scanner-reported branches

OpenCover C# coverage

77.7%

C# test coverage measured by OpenCover. The large value is line coverage; branch coverage appears in the supporting detail.

Newest retained OpenCover report; branch coverage 69.75%

JavaScript and TypeScript coverage

95.47%

JavaScript and TypeScript test coverage measured from the verified first-party LCOV report. The large value is line coverage.

Verified first-party LCOV; branch coverage 85.19%

SonarQube measures

Quality and security

Security rating

A · 1.0

Reflects the most severe open vulnerability: a potentially exploitable weakness in the application code.

Sonar scale: lower is better (1 best, 5 worst)

Reliability rating

A · 1.0

Reflects the most severe open bug: a finding that may cause incorrect behavior, crashes, or data loss.

Sonar scale: lower is better (1 best, 5 worst)

Maintainability rating

A · 1.0

Reflects estimated effort to fix maintainability issues relative to code size; it is not a count of code smells.

Sonar scale: lower is better (1 best, 5 worst)

Vulnerabilities

0

Open findings that SonarQube identifies as potentially exploitable weaknesses in the application code.

Security hotspots

0

Security-sensitive code that requires human review. A hotspot is not automatically a confirmed vulnerability.

100% reviewed

Bugs

0

Open reliability findings that may cause incorrect behavior, crashes, or data corruption.

Code smells

42

Open maintainability findings that make code harder to understand, change, or test but are not necessarily functional defects.

Average cyclomatic complexity

2.08

Average number of linearly independent execution paths per function. Lower values generally mean smaller methods that are easier to test and maintain.

4,547 total across 2,188 functions

Average cognitive complexity

1.14

Average score for how difficult each function's control flow is to understand. Nesting and breaks in linear flow increase the score; lower values are easier to follow and maintain.

2,500 total across 2,188 functions

Duplicated lines

0%

The percentage of analyzed source lines that SonarQube identifies as duplicated code.

Lines of code

23746

The number of analyzed non-comment source lines reported by SonarQube.

System context

Architecture and trust boundaries

These diagrams document the intended system design and provide context for the security results. They are not scanner measurements.
Legacy architecture diagram showing the former Presidio service boundary.

Legacy browser privacy and AI data flow

Historical snapshot retained for comparison; it predates the in-process de-identification integration.

Open full-size diagram
Architecture diagram showing administration, reverse proxy hosting, the SleepEdit container, persistent storage, configuration, logs, and the Vosk artifact source across trust boundaries.

Administration, protocol, persistence, and deployment

Shows administrative traffic, hosting and application boundaries, persistent storage, secret injection, logging, and the Vosk software-supply path.

Open full-size diagram

42 open findings

Issue distribution

By severity

SeverityCount
MAJOR8
MINOR16
INFO18

By type

TypeCount
CODE_SMELL42

By language

LanguageCount
C#17
Docker1
external_roslyn18
JavaScript6

0 retained hotspots

Security hotspots

No matching findings.

No security hotspots were exported.

Retained audits

Dependencies and tests

NuGet vulnerabilities

Total
0
Critical
0
High
0
Moderate
0
Low
0

npm vulnerabilities

Total
0
Critical
0
High
0
Moderate
0
Low
0

.NET tests

Total
8
Passed
8
Failed
0
Skipped
0

First-party automated test source

The physical nonblank source lines in explicitly scoped first-party automated tests. It indicates test investment, not a quality score.

Nonblank source lines
20,084
Test source files
122
Test areaFilesNonblank lines
.NET test project and harness6912,972
Browser unit and boundary tests214,110
End-to-end browser tests and fixtures232,374
Security-report and verification tests9628

Source-level evidence

Detailed SonarQube issues

FileLineSeverityTypeLanguageRuleStatusMessage
SleepEdit.Shared/wwwroot/js/sleep-note/medication-tool.js228MAJORCODE_SMELLJavaScriptjavascript:S7721OPENMove function 'describeMatchCount' to the outer scope.
Dockerfile52MINORCODE_SMELLDockerdocker:S7020OPENLine is too long. Split it into multiple lines using backslash continuations.
SleepEdit.Desktop/WindowsTitleBar.cs40INFOCODE_SMELLexternal_roslynexternal_roslyn:SYSLIB1054OPENMark the method 'DwmSetWindowAttribute' with 'LibraryImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
SleepEdit.Shared/Components/Admin/Theme/ThemeAdminPanel.razor.cs156INFOCODE_SMELLexternal_roslynexternal_roslyn:CA1816OPENChange ThemeAdminPanel.DisposeAsync() to call GC.SuppressFinalize(object). This will prevent derived types that introduce a finalizer from needing to re-implement 'IDisposable' to call it.
SleepEdit.Shared/Components/Admin/Theme/ThemeAdminPanel.razor.cs164MAJORCODE_SMELLC#csharpsquid:S108OPENEither remove or fill this block of code.
SleepEdit.Shared/Components/Admin/Theme/ThemeAdminPanel.razor.cs168MAJORCODE_SMELLC#csharpsquid:S4144OPENUpdate this method so that its implementation is not identical to 'OnInitialized'.
SleepEdit.Shared/Components/AiAssistant/AiAssistantPanel.razor118MINORCODE_SMELLC#csharpsquid:S8970OPENRemove this null-forgiving operator; nullable warnings are disabled here.
SleepEdit.Shared/Components/Layout/SharedLayout.razor45MAJORCODE_SMELLC#csharpsquid:S108OPENEither remove or fill this block of code.
SleepEdit.Shared/Components/SleepNoteEditor/SleepNoteEditorShell.razor261MAJORCODE_SMELLC#csharpsquid:S108OPENEither remove or fill this block of code.
SleepEdit.Shared/Infrastructure/Theme/UnavailableThemeConfigurationRepository.cs12MAJORCODE_SMELLC#csharpsquid:S108OPENEither remove or fill this block of code.
SleepEdit.Shared/Infrastructure/Theme/UnavailableThemeConfigurationRepository.cs13MAJORCODE_SMELLC#csharpsquid:S108OPENEither remove or fill this block of code.
SleepEdit.Shared/Services/AiAssistant/AiAssistantRequestSession.cs11MAJORCODE_SMELLC#csharpsquid:S6966OPENAwait CancelAsync instead.
SleepEdit.Shared/Services/AiAssistant/AiAssistantServiceCollectionExtensions.cs15MINORCODE_SMELLC#csharpsquid:S1075OPENRefactor your code not to use hardcoded absolute paths or URIs.
SleepEdit.Shared/Services/ProtocolStarterService.cs17INFOCODE_SMELLexternal_roslynexternal_roslyn:CA1859OPENChange type of field 'SeedDeserializer' from 'SleepEditWeb.Infrastructure.ProtocolXml.IProtocolXmlDeserializer' to 'SleepEditWeb.Infrastructure.ProtocolXml.ProtocolXmlDeserializer' for improved performance
SleepEdit.Shared/Services/ThemeConfigurationValidator.cs95INFOCODE_SMELLexternal_roslynexternal_roslyn:CA1859OPENChange type of parameter 'errors' from 'System.Collections.Generic.ICollection<string>' to 'System.Collections.Generic.List<string>' for improved performance
SleepEdit.Shared/Components/ProtocolEditor/ProtocolEditorShell.razor.cs403INFOCODE_SMELLexternal_roslynexternal_roslyn:CA1816OPENChange ProtocolEditorShell.DisposeAsync() to call GC.SuppressFinalize(object). This will prevent derived types that introduce a finalizer from needing to re-implement 'IDisposable' to call it.
SleepEditWeb/Components/Admin/Medications/MedicationStatistics.razor38MINORCODE_SMELLC#csharpsquid:S8970OPENRemove this null-forgiving operator; nullable warnings are disabled here.
SleepEdit.Shared/Components/Admin/Theme/ThemeEditorState.cs9INFOCODE_SMELLexternal_roslynexternal_roslyn:CA1859OPENChange type of field 'ColorProperties' from 'System.Collections.Generic.IReadOnlyDictionary<string, System.Reflection.PropertyInfo>' to 'System.Collections.Generic.Dictionary<string, System.Reflection.PropertyInfo>' for improved performance
SleepEdit.Shared/Components/Admin/Theme/ThemePaletteEditor.razor.cs9INFOCODE_SMELLexternal_roslynexternal_roslyn:CA1859OPENChange type of field 'ColorProperties' from 'System.Collections.Generic.IReadOnlyDictionary<string, System.Reflection.PropertyInfo>' to 'System.Collections.Generic.Dictionary<string, System.Reflection.PropertyInfo>' for improved performance
SleepEdit.Shared/Components/Admin/Theme/ThemePreview.razor.cs35INFOCODE_SMELLexternal_roslynexternal_roslyn:CA1816OPENChange ThemePreview.DisposeAsync() to call GC.SuppressFinalize(object). This will prevent derived types that introduce a finalizer from needing to re-implement 'IDisposable' to call it.
SleepEdit.Shared/wwwroot/js/sleep-note/editor.js217MINORCODE_SMELLJavaScriptjavascript:S1874OPENThe signature '(commandId: string, showUI?: boolean, value?: string): boolean' of 'document.execCommand' is deprecated.
SleepEdit.Shared/wwwroot/js/sleep-note/printing.js14MINORCODE_SMELLJavaScriptjavascript:S1874OPENThe signature '(...text: string[]): void' of 'printableWindow.document.write' is deprecated.
SleepEdit.Shared/wwwroot/js/protocol-dnd.js19MINORCODE_SMELLJavaScriptjavascript:S7773OPENPrefer `Number.parseInt` over `parseInt`.
SleepEdit.Shared/Services/ThemeConfigurationValidator.cs72INFOCODE_SMELLexternal_roslynexternal_roslyn:CA1859OPENChange type of parameter 'errors' from 'System.Collections.Generic.ICollection<string>' to 'System.Collections.Generic.List<string>' for improved performance
SleepEditWeb/Controllers/ThemeAdminController.cs128INFOCODE_SMELLexternal_roslynexternal_roslyn:CA1859OPENChange return type of method 'InvalidThemeRequest' from 'Microsoft.AspNetCore.Mvc.IActionResult' to 'Microsoft.AspNetCore.Mvc.RedirectToActionResult' for improved performance
SleepEdit.Shared/Components/ProtocolViewer/ProtocolViewerPanel.razor.cs181INFOCODE_SMELLexternal_roslynexternal_roslyn:CA1826OPENDo not use Enumerable methods on indexable collections. Instead use the collection directly.
SleepEdit.Shared/Protocol/Viewer/ProtocolViewerComposer.cs22INFOCODE_SMELLexternal_roslynexternal_roslyn:CA1859OPENChange type of parameter 'lines' from 'System.Collections.Generic.ICollection<string>' to 'System.Collections.Generic.List<string>' for improved performance
SleepEdit.Shared/Protocol/Viewer/ProtocolViewerState.cs63MINORCODE_SMELLC#csharpsquid:S3267OPENLoops should be simplified using the "Where" LINQ method
SleepEditWeb/Program.cs157INFOCODE_SMELLexternal_roslynexternal_roslyn:ASP0015OPENThe header 'Cache-Control' can be accessed using the CacheControl property
SleepEdit.Shared/wwwroot/js/protocol-dnd.js42MINORCODE_SMELLJavaScriptjavascript:S7773OPENPrefer `Number.parseInt` over `parseInt`.
SleepEdit.Shared/wwwroot/js/protocol-dnd.js43MINORCODE_SMELLJavaScriptjavascript:S7773OPENPrefer `Number.parseInt` over `parseInt`.
SleepEdit.Shared/Services/ProtocolXmlService.cs66MINORCODE_SMELLC#csharpsquid:S6667OPENLogging in a catch clause should pass the caught exception as a parameter.
SleepEditWeb/Controllers/ProtocolEditorController.cs95MINORCODE_SMELLC#csharpsquid:S1192OPENDefine a constant instead of using this literal 'Request payload is required.' 6 times.
SleepEdit.Shared/Services/SleepNoteEditorOrchestrator.cs67INFOCODE_SMELLexternal_roslynexternal_roslyn:CA1859OPENChange type of parameter 'knownMedicationNames' from 'System.Collections.Generic.IReadOnlySet<string>' to 'System.Collections.Generic.HashSet<string>' for improved performance
SleepEditWeb/Controllers/MedListController.cs31MINORCODE_SMELLC#csharpsquid:S1192OPENDefine a constant instead of using this literal 'SelectedMeds' 5 times.
SleepEdit.Shared/Services/DrugInfoService.cs41MINORCODE_SMELLC#csharpsquid:S1075OPENRefactor your code not to use hardcoded absolute paths or URIs.
SleepEdit.Shared/Data/LiteDbMedicationRepository.cs282INFOCODE_SMELLexternal_roslynexternal_roslyn:CA1862OPENPrefer using 'string.Equals(string, StringComparison)' to perform a case-insensitive comparison, but keep in mind that this might cause subtle changes in behavior, so make sure to conduct thorough testing after applying the suggestion, or if culturally sensitive comparison is not required, consider using 'StringComparison.OrdinalIgnoreCase'
SleepEdit.Shared/Data/LiteDbMedicationRepository.cs329INFOCODE_SMELLexternal_roslynexternal_roslyn:CA1862OPENPrefer using 'string.Equals(string, StringComparison)' to perform a case-insensitive comparison, but keep in mind that this might cause subtle changes in behavior, so make sure to conduct thorough testing after applying the suggestion, or if culturally sensitive comparison is not required, consider using 'StringComparison.OrdinalIgnoreCase'
SleepEditWeb/Controllers/MedListController.cs58MINORCODE_SMELLC#csharpsquid:S6610OPEN"StartsWith" overloads that take a "char" should be used
SleepEditWeb/Controllers/MedListController.cs58INFOCODE_SMELLexternal_roslynexternal_roslyn:CA1866OPENUse 'string.StartsWith(char)' instead of 'string.StartsWith(string)' when you have a string with a single char
SleepEditWeb/Controllers/MedListController.cs59MINORCODE_SMELLC#csharpsquid:S6610OPEN"StartsWith" overloads that take a "char" should be used
SleepEditWeb/Controllers/MedListController.cs59INFOCODE_SMELLexternal_roslynexternal_roslyn:CA1866OPENUse 'string.StartsWith(char)' instead of 'string.StartsWith(string)' when you have a string with a single char