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

85.2%

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

87.2%

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

Scanner-reported lines

Sonar branch coverage

80.4%

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

81.01%

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 72.96%

JavaScript and TypeScript coverage

92.86%

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 81.88%

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.10

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

3,576 total across 1,704 functions

Average cognitive complexity

1.15

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.

1,967 total across 1,704 functions

Duplicated lines

0.1%

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

Lines of code

18510

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.
Architecture diagram showing clinical users, browser-only storage and dictation, the SleepEdit server, Presidio services, OpenAI, and OpenFDA across trust boundaries.

Clinical note, browser privacy, and AI data flow

Shows browser-only note state, local dictation, server-side PHI screening and image redaction, and external provider boundaries.

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
MINOR25
INFO17

By type

TypeCount
CODE_SMELL42

By language

LanguageCount
C#20
external_roslyn17
JavaScript5

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
689
Passed
689
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
18,357
Test source files
109
Test areaFilesNonblank lines
.NET test project and harness5611,761
Browser unit and boundary tests213,630
End-to-end browser tests and fixtures232,340
Security-report and verification tests9626

Source-level evidence

Detailed SonarQube issues

FileLineSeverityTypeLanguageRuleStatusMessage
SleepEditWeb/Components/SleepNote/SleepNoteForm.razor35MINORCODE_SMELLC#csharpsquid:S8970OPENRemove this null-forgiving operator; nullable warnings are disabled here.
SleepEditWeb/Components/ProtocolEditor/ProtocolEditorShell.razor.cs369INFOCODE_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.
SleepEditWeb/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
SleepEditWeb/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
SleepEditWeb/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.
SleepEditWeb/Components/SleepNote/SleepNoteForm.razor461MINORCODE_SMELLC#csharpsquid:S3267OPENLoops should be simplified using the "Where" LINQ method
SleepEditWeb/Components/SleepNote/SleepNoteForm.razor733MINORCODE_SMELLC#csharpsquid:S3267OPENLoops should be simplified using the "Where" LINQ method
SleepEditWeb/wwwroot/js/sleep-note/editor.js205MINORCODE_SMELLJavaScriptjavascript:S1874OPENThe signature '(commandId: string, showUI?: boolean, value?: string): boolean' of 'document.execCommand' is deprecated.
SleepEditWeb/wwwroot/js/sleep-note/printing.js14MINORCODE_SMELLJavaScriptjavascript:S1874OPENThe signature '(...text: string[]): void' of 'printableWindow.document.write' is deprecated.
SleepEditWeb/wwwroot/js/protocol-dnd.js19MINORCODE_SMELLJavaScriptjavascript:S7773OPENPrefer `Number.parseInt` over `parseInt`.
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
SleepEditWeb/Services/ThemeConfigurationValidator.cs62INFOCODE_SMELLexternal_roslynexternal_roslyn:CA1859OPENChange type of parameter 'errors' from 'System.Collections.Generic.ICollection<string>' to 'System.Collections.Generic.List<string>' for improved performance
SleepEditWeb/Services/SleepNoteNarrativeGenerator.cs154INFOCODE_SMELLexternal_roslynexternal_roslyn:CA1859OPENChange return type of method 'BuildEquipmentChanges' from 'System.Collections.Generic.IReadOnlyList<string>' to 'System.Collections.Generic.List<string>' for improved performance
SleepEditWeb/Components/ProtocolViewer/ProtocolViewerPanel.razor.cs178INFOCODE_SMELLexternal_roslynexternal_roslyn:CA1826OPENDo not use Enumerable methods on indexable collections. Instead use the collection directly.
SleepEditWeb/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
SleepEditWeb/Protocol/Viewer/ProtocolViewerState.cs63MINORCODE_SMELLC#csharpsquid:S3267OPENLoops should be simplified using the "Where" LINQ method
SleepEditWeb/Data/LiteDbMedicationRepository.cs264INFOCODE_SMELLexternal_roslynexternal_roslyn:CA1862OPENPrefer the string comparison method overload of 'string.StartsWith(string)' that takes a 'StringComparison' enum value 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/Components/SleepNote/SleepNoteForm.razor919MINORCODE_SMELLC#csharpsquid:S8970OPENRemove this null-forgiving operator; nullable warnings are disabled here.
SleepEditWeb/Components/SleepNote/SleepNoteForm.razor.cs69MINORCODE_SMELLC#csharpsquid:S1192OPENDefine a constant instead of using this literal 'Other' 5 times.
SleepEditWeb/Services/SleepNoteNarrativeGenerator.cs120INFOCODE_SMELLexternal_roslynexternal_roslyn:CA1859OPENChange return type of method 'GenerateMaskCourse' from 'System.Collections.Generic.IReadOnlyList<string>' to 'System.Collections.Generic.List<string>' for improved performance
SleepEditWeb/Components/SleepNote/SleepNoteForm.razor754MINORCODE_SMELLC#csharpsquid:S8970OPENRemove this null-forgiving operator; nullable warnings are disabled here.
SleepEditWeb/Components/SleepNote/SleepNoteForm.razor161MINORCODE_SMELLC#csharpsquid:S8970OPENRemove this null-forgiving operator; nullable warnings are disabled here.
SleepEditWeb/Program.cs191INFOCODE_SMELLexternal_roslynexternal_roslyn:ASP0015OPENThe header 'Cache-Control' can be accessed using the CacheControl property
SleepEditWeb/Components/SleepNote/SleepNoteForm.razor104MINORCODE_SMELLC#csharpsquid:S8970OPENRemove this null-forgiving operator; nullable warnings are disabled here.
SleepEditWeb/Components/SleepNote/SleepNoteForm.razor120MINORCODE_SMELLC#csharpsquid:S8970OPENRemove this null-forgiving operator; nullable warnings are disabled here.
SleepEditWeb/Components/SleepNote/SleepNoteForm.razor136MINORCODE_SMELLC#csharpsquid:S8970OPENRemove this null-forgiving operator; nullable warnings are disabled here.
SleepEditWeb/Components/SleepNote/SleepNoteForm.razor187MINORCODE_SMELLC#csharpsquid:S8970OPENRemove this null-forgiving operator; nullable warnings are disabled here.
SleepEditWeb/Components/SleepNote/SleepNoteForm.razor203MINORCODE_SMELLC#csharpsquid:S8970OPENRemove this null-forgiving operator; nullable warnings are disabled here.
SleepEditWeb/wwwroot/js/protocol-dnd.js42MINORCODE_SMELLJavaScriptjavascript:S7773OPENPrefer `Number.parseInt` over `parseInt`.
SleepEditWeb/wwwroot/js/protocol-dnd.js43MINORCODE_SMELLJavaScriptjavascript:S7773OPENPrefer `Number.parseInt` over `parseInt`.
SleepEditWeb/Services/ProtocolXmlService.cs65MINORCODE_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.
SleepEditWeb/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.
SleepEditWeb/Services/DrugInfoService.cs41MINORCODE_SMELLC#csharpsquid:S1075OPENRefactor your code not to use hardcoded absolute paths or URIs.
SleepEditWeb/Data/LiteDbMedicationRepository.cs276INFOCODE_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/Data/LiteDbMedicationRepository.cs322INFOCODE_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