Executive summary
ale206/ModularNet falls short of our standard for production because three passwords or keys sit in the current code and we found no automated security scanning of the code, its secrets or its dependencies. It scores 55 out of 100 and is rated Adequate, and all seven of its critical findings are security problems.
Production Readiness, at 40, is the weakest lens and counts most in the score. The best first step is replacing the three exposed passwords or keys and switching the old ones off, worth about 13 points. Adding automated security scanning comes next, worth about 9 points. Raising Production Readiness to 70 would lift the score to about 66.
Three passwords or keys in the code and one in the code's history are open to anyone who can read the repository. Two pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Replacing each exposed password or key and pinning each tool to an exact version would close both risks. Updating the vulnerable packages would fix the package with a known security hole.
The product code is 3,645 lines, about €6,800 to rebuild.
If Production Readiness rose from 40 to 70, the lowest score rated Strong, the score would rise from 55 to about 66.
New since the last survey: 6 findings
- Cognitive Complexity · top-level statements (cognitive 16) src/ModularNet.Api/Program.cs
- Static Analysis (SAST) · REDACTED
- Static Analysis (SAST) · REDACTED
- Dependency Vulnerabilities · High CVE: REDACTED
- Dependency Vulnerabilities · REDACTED
- Supply-chain Provenance & Signing · REDACTED
Fixed since the last survey: 66 findings
- Explicit Debt · WriteOnlyPrivateField src/ModularNet.IntegrationTests/Tests/AppSettingsManagerTests.cs
- Dependency Vulnerabilities · High CVE: System.Security.Cryptography.Pkcs 9.0.4 src/ModularNet.Api/ModularNet.Api.csproj
- CI/CD gates · No CI pipeline
- Cancellation propagation · Async method without CancellationToken: RemoveExpiredItems src/ModularNet.Business/Implementations/CacheManager.cs
- Cancellation propagation · Async method without CancellationToken: VerifyEmail src/ModularNet.Business/Implementations/EmailVerifierManager.cs
- Cancellation propagation · Async method without CancellationToken: Encrypt src/ModularNet.Business/Implementations/EncryptManager.cs
- Cancellation propagation · Async method without CancellationToken: Decrypt src/ModularNet.Business/Implementations/EncryptManager.cs
- Cancellation propagation · Async method without CancellationToken: GenerateEmailVerificationCode src/ModularNet.Business/Implementations/EncryptManager.cs
- Cancellation propagation · Async method without CancellationToken: DecryptOneAccessCode src/ModularNet.Business/Implementations/EncryptManager.cs
- Cancellation propagation · Async method without CancellationToken: DecryptAsync src/ModularNet.Business/Implementations/EncryptManager.cs
- Cancellation propagation · Async method without CancellationToken: IsAccessCodeValid src/ModularNet.Business/Implementations/EncryptManager.cs
- Cancellation propagation · Async method without CancellationToken: CheckDbConnection src/ModularNet.Business/Implementations/HealthChecksManager.cs
- Cancellation propagation · Async method without CancellationToken: GetLocalIp src/ModularNet.Business/Implementations/HealthChecksManager.cs
- Cancellation propagation · Async method without CancellationToken: WriteLogToDb src/ModularNet.Business/Implementations/LogsManager.cs
- Cancellation propagation · Async method without CancellationToken: GetSecretAndCacheIt src/ModularNet.Business/Implementations/SecretsManager.cs
- Cancellation propagation · Async method without CancellationToken: RegisterUserInModularNet src/ModularNet.Business/Implementations/UsersManager.cs
- Cancellation propagation · Async method without CancellationToken: LoginUser src/ModularNet.Business/Implementations/UsersManager.cs
- Cancellation propagation · Async method without CancellationToken: GetUserByEmail src/ModularNet.Business/Implementations/UsersManager.cs
- Cancellation propagation · Async method without CancellationToken: GetUserById src/ModularNet.Business/Implementations/UsersManager.cs
- Cancellation propagation · Async method without CancellationToken: SetUserEmailAsVerified src/ModularNet.Business/Implementations/UsersManager.cs
- Cancellation propagation · Async method without CancellationToken: SetTermsAndConditionsAsAccepted src/ModularNet.Business/Implementations/UsersManager.cs
- Cancellation propagation · Async method without CancellationToken: DeactivateAccount src/ModularNet.Business/Implementations/UsersManager.cs
- Cancellation propagation · Async method without CancellationToken: EnableUser src/ModularNet.Business/Implementations/UsersManager.cs
- Cancellation propagation · Async method without CancellationToken: RegisterUserInFirebase src/ModularNet.Business/Implementations/UsersManager.cs
- Cancellation propagation · Async method without CancellationToken: LoginUserInFirebase src/ModularNet.Business/Implementations/UsersManager.cs
- Cancellation propagation · Async method without CancellationToken: UpdateUserOid src/ModularNet.Business/Implementations/UsersManager.cs
- Cancellation propagation · Async method without CancellationToken: GetUserIdByEmail src/ModularNet.Business/Implementations/UsersManager.cs
- Cancellation propagation · Async method without CancellationToken: GetUserSettingsByUserId src/ModularNet.Business/Implementations/UsersSettingsManager.cs
- Cancellation propagation · Async method without CancellationToken: CreateOrUpdateUserSettings src/ModularNet.Business/Implementations/UsersSettingsManager.cs
- Cancellation propagation · Async method without CancellationToken: GetWebAppConfigs src/ModularNet.Business/Implementations/WebAppConfigsManager.cs
- Cancellation propagation · Async method without CancellationToken: WriteAuditToDb src/ModularNet.Infrastructure/Implementations/AuditsRepository.cs
- Cancellation propagation · Async method without CancellationToken: RegisterAsync src/ModularNet.Infrastructure/Implementations/AuthenticationService.cs
- Cancellation propagation · Async method without CancellationToken: GetJwtTokenFromFirebaseAsync src/ModularNet.Infrastructure/Implementations/AuthenticationService.cs
- Cancellation propagation · Async method without CancellationToken: VerifyAuthenticationInFirebase src/ModularNet.Infrastructure/Implementations/AuthenticationService.cs
- Cancellation propagation · Async method without CancellationToken: LogoutAsync src/ModularNet.Infrastructure/Implementations/AuthenticationService.cs
- Cancellation propagation · Async method without CancellationToken: GetProviders src/ModularNet.Infrastructure/Implementations/AuthenticationService.cs
- Cancellation propagation · Async method without CancellationToken: GetDbConnectionString src/ModularNet.Infrastructure/Implementations/DbConnectionFactory.cs
- Cancellation propagation · Async method without CancellationToken: SaveEmail src/ModularNet.Infrastructure/Implementations/EmailServiceRepository.cs
- Cancellation propagation · Async method without CancellationToken: UpdateEmailWithMessageId src/ModularNet.Infrastructure/Implementations/EmailServiceRepository.cs
- Cancellation propagation · Async method without CancellationToken: UpdateEmailStatus src/ModularNet.Infrastructure/Implementations/EmailServiceRepository.cs
- Cancellation propagation · Async method without CancellationToken: CheckDbConnection src/ModularNet.Infrastructure/Implementations/HealthChecksRepository.cs
- Cancellation propagation · Async method without CancellationToken: SaveToInMemoryCache src/ModularNet.Infrastructure/Implementations/InMemoryCacheRepository.cs
- Cancellation propagation · Async method without CancellationToken: GetFromInMemoryCache src/ModularNet.Infrastructure/Implementations/InMemoryCacheRepository.cs
- Cancellation propagation · Async method without CancellationToken: GetJwtTokenFromFirebase src/ModularNet.Infrastructure/Implementations/JwtProvider.cs
- Cancellation propagation · Async method without CancellationToken: WriteLogToDb src/ModularNet.Infrastructure/Implementations/LogsRepository.cs
- Cancellation propagation · Async method without CancellationToken: GetRedisConnectionString src/ModularNet.Infrastructure/Implementations/RedisConnectionFactory.cs
- Cancellation propagation · Async method without CancellationToken: InitializeConnectionAsync src/ModularNet.Infrastructure/Implementations/RedisConnectionFactory.cs
- Cancellation propagation · Async method without CancellationToken: SaveToRedisCache src/ModularNet.Infrastructure/Implementations/RedisRepository.cs
- Cancellation propagation · Async method without CancellationToken: GetFromRedisCache src/ModularNet.Infrastructure/Implementations/RedisRepository.cs
- Cancellation propagation · Async method without CancellationToken: RemoveFromRedisCache src/ModularNet.Infrastructure/Implementations/RedisRepository.cs
- Cancellation propagation · Async method without CancellationToken: GetSecret src/ModularNet.Infrastructure/Implementations/SecretsRepository.cs
- Cancellation propagation · Async method without CancellationToken: GetSecretAndCacheIt src/ModularNet.Infrastructure/Implementations/SecretsRepository.cs
- Cancellation propagation · Async method without CancellationToken: GetUserByEmail src/ModularNet.Infrastructure/Implementations/UsersRepository.cs
- Cancellation propagation · Async method without CancellationToken: RegisterUser src/ModularNet.Infrastructure/Implementations/UsersRepository.cs
- Cancellation propagation · Async method without CancellationToken: UpdateUserLoginDate src/ModularNet.Infrastructure/Implementations/UsersRepository.cs
- Cancellation propagation · Async method without CancellationToken: GetUserById src/ModularNet.Infrastructure/Implementations/UsersRepository.cs
- Cancellation propagation · Async method without CancellationToken: SetUserEmailAsVerified src/ModularNet.Infrastructure/Implementations/UsersRepository.cs
- Cancellation propagation · Async method without CancellationToken: EnableUser src/ModularNet.Infrastructure/Implementations/UsersRepository.cs
- Cancellation propagation · Async method without CancellationToken: UpdateUserOid src/ModularNet.Infrastructure/Implementations/UsersRepository.cs
- Cancellation propagation · Async method without CancellationToken: GetUserIdByEmail src/ModularNet.Infrastructure/Implementations/UsersRepository.cs
- Cancellation propagation · Async method without CancellationToken: SetTermsAndConditionsAsAccepted src/ModularNet.Infrastructure/Implementations/UsersRepository.cs
- Cancellation propagation · Async method without CancellationToken: DeactivateAccount src/ModularNet.Infrastructure/Implementations/UsersRepository.cs
- Cancellation propagation · Async method without CancellationToken: GetUserSettings src/ModularNet.Infrastructure/Implementations/UsersSettingsRepository.cs
- Cancellation propagation · Async method without CancellationToken: CreateUserSetting src/ModularNet.Infrastructure/Implementations/UsersSettingsRepository.cs
- Cancellation propagation · Async method without CancellationToken: UpdateUserSetting src/ModularNet.Infrastructure/Implementations/UsersSettingsRepository.cs
- Cancellation propagation · Async method drops its ambient CancellationToken: InvokeAsync src/ModularNet.Api/Middlewares/FirebaseAuthenticationMiddleware.cs
Rebuild cost: about €6,800 · Estimate
| Cost to rebuild | €2,300 to €11,000, for 38 to 119 hours of work, under 0.1 person-years for one engineer |
|---|---|
| Difficulty of the problem | Low, 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.8 at a score of 55. 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. |
| Size | Small: 3,645 lines of product code, of which 42% is declarations and boilerplate, 32% straight logic and 26% logic with branches |
| Comment lines | The estimate prices 3,436 lines. Comment lines count towards the size of 3,645 lines but aren't priced as work. |
| What it is not | Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one. |
Top priorities
Diagnosis: what the measurements show together
Architecture — module dependency graph
Architecture: which parts of the code depend on which
| uses → | 1 .github.scripts | 2 ModularNet.Api | 3 ModularNet.Api.Helpers | 4 ModularNet.Api.Middlewares | 5 ModularNet.Business | 6 ModularNet.Domain.CustomExceptions | 7 ModularNet.Domain.Enums | 8 ModularNet.Infrastructure | 9 ModularNet.Shared.Helpers | 10 ModularNet.Domain.Entities | 11 ModularNet.Domain.Requests | 12 ModularNet.Infrastructure.Interfaces | 13 ModularNet.Business.Interfaces | 14 ModularNet.Infrastructure.Implementations | 15 (global) | 16 ModularNet.Api.Controllers | 17 ModularNet.Business.Implementations |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 .github.scripts | |||||||||||||||||
| 2 ModularNet.Api | |||||||||||||||||
| 3 ModularNet.Api.Helpers | |||||||||||||||||
| 4 ModularNet.Api.Middlewares | |||||||||||||||||
| 5 ModularNet.Business | |||||||||||||||||
| 6 ModularNet.Domain.CustomExceptions | |||||||||||||||||
| 7 ModularNet.Domain.Enums | |||||||||||||||||
| 8 ModularNet.Infrastructure | |||||||||||||||||
| 9 ModularNet.Shared.Helpers | |||||||||||||||||
| 10 ModularNet.Domain.Entities | 1 | ||||||||||||||||
| 11 ModularNet.Domain.Requests | 1 | ||||||||||||||||
| 12 ModularNet.Infrastructure.Interfaces | 7 | ||||||||||||||||
| 13 ModularNet.Business.Interfaces | 1 | 7 | 3 | ||||||||||||||
| 14 ModularNet.Infrastructure.Implementations | 9 | 27 | |||||||||||||||
| 15 (global) | 1 | 2 | |||||||||||||||
| 16 ModularNet.Api.Controllers | 12 | 10 | |||||||||||||||
| 17 ModularNet.Business.Implementations | 1 | 8 | 3 | 14 | 31 |
10→7 ModularNet.Domain.Entities uses ModularNet.Domain.Enums✕
- Connections
- 1 pair of types, where a type in ModularNet.Domain.Entities uses a type in ModularNet.Domain.Enums.
- The types involved
ModularNet.Domain.Entities.ModularNetAudit→ModularNet.Domain.Enums.AuditType
- Direction
- ModularNet.Domain.Entities uses ModularNet.Domain.Enums, so a change to ModularNet.Domain.Enums can break ModularNet.Domain.Entities, while a change to ModularNet.Domain.Entities can't break ModularNet.Domain.Enums.
- Position
- Below the diagonal: ModularNet.Domain.Entities uses a module listed above it, which is the healthy direction.
11→10 ModularNet.Domain.Requests uses ModularNet.Domain.Entities✕
- Connections
- 1 pair of types, where a type in ModularNet.Domain.Requests uses a type in ModularNet.Domain.Entities.
- The types involved
ModularNet.Domain.Requests.CreateOrUpdateUserSettingsRequest→ModularNet.Domain.Entities.UserSetting
- Direction
- ModularNet.Domain.Requests uses ModularNet.Domain.Entities, so a change to ModularNet.Domain.Entities can break ModularNet.Domain.Requests, while a change to ModularNet.Domain.Requests can't break ModularNet.Domain.Entities.
- Position
- Below the diagonal: ModularNet.Domain.Requests uses a module listed above it, which is the healthy direction.
12→10 ModularNet.Infrastructure.Interfaces uses ModularNet.Domain.Entities✕
- Connections
- 7 pairs of types, where a type in ModularNet.Infrastructure.Interfaces uses a type in ModularNet.Domain.Entities.
- The types involved
ModularNet.Infrastructure.Interfaces.IAppSettingsRepository→ModularNet.Domain.Entities.AppSettingsModularNet.Infrastructure.Interfaces.IAuditsRepository→ModularNet.Domain.Entities.ModularNetAuditModularNet.Infrastructure.Interfaces.IEmailServiceRepository→ModularNet.Domain.Entities.ModularNetEmailModularNet.Infrastructure.Interfaces.ILogsRepository→ModularNet.Domain.Entities.ModularNetLogModularNet.Infrastructure.Interfaces.IUsersRepository→ModularNet.Domain.Entities.UserModularNet.Infrastructure.Interfaces.IUsersSettingsRepository→ModularNet.Domain.Entities.UserSettingModularNet.Infrastructure.Interfaces.IUsersSettingsRepository→ModularNet.Domain.Entities.UserSettingDto
- Direction
- ModularNet.Infrastructure.Interfaces uses ModularNet.Domain.Entities, so a change to ModularNet.Domain.Entities can break ModularNet.Infrastructure.Interfaces, while a change to ModularNet.Infrastructure.Interfaces can't break ModularNet.Domain.Entities.
- Position
- Below the diagonal: ModularNet.Infrastructure.Interfaces uses a module listed above it, which is the healthy direction.
13→7 ModularNet.Business.Interfaces uses ModularNet.Domain.Enums✕
- Connections
- 1 pair of types, where a type in ModularNet.Business.Interfaces uses a type in ModularNet.Domain.Enums.
- The types involved
ModularNet.Business.Interfaces.ICacheManager→ModularNet.Domain.Enums.CacheType
- Direction
- ModularNet.Business.Interfaces uses ModularNet.Domain.Enums, so a change to ModularNet.Domain.Enums can break ModularNet.Business.Interfaces, while a change to ModularNet.Business.Interfaces can't break ModularNet.Domain.Enums.
- Position
- Below the diagonal: ModularNet.Business.Interfaces uses a module listed above it, which is the healthy direction.
13→10 ModularNet.Business.Interfaces uses ModularNet.Domain.Entities✕
- Connections
- 7 pairs of types, where a type in ModularNet.Business.Interfaces uses a type in ModularNet.Domain.Entities.
- The types involved
ModularNet.Business.Interfaces.IAppSettingsManager→ModularNet.Domain.Entities.AppSettingsModularNet.Business.Interfaces.IAuditsManager→ModularNet.Domain.Entities.ModularNetAuditModularNet.Business.Interfaces.IEmailServiceManager→ModularNet.Domain.Entities.NewModularNetEmailModularNet.Business.Interfaces.ILogsManager→ModularNet.Domain.Entities.ModularNetLogModularNet.Business.Interfaces.IUsersManager→ModularNet.Domain.Entities.UserModularNet.Business.Interfaces.IUsersSettingsManager→ModularNet.Domain.Entities.UserSettingModularNet.Business.Interfaces.IWebAppConfigsManager→ModularNet.Domain.Entities.WebAppConfigs
- Direction
- ModularNet.Business.Interfaces uses ModularNet.Domain.Entities, so a change to ModularNet.Domain.Entities can break ModularNet.Business.Interfaces, while a change to ModularNet.Business.Interfaces can't break ModularNet.Domain.Entities.
- Position
- Below the diagonal: ModularNet.Business.Interfaces uses a module listed above it, which is the healthy direction.
13→11 ModularNet.Business.Interfaces uses ModularNet.Domain.Requests✕
- Connections
- 3 pairs of types, where a type in ModularNet.Business.Interfaces uses a type in ModularNet.Domain.Requests.
- The types involved
ModularNet.Business.Interfaces.IUsersManager→ModularNet.Domain.Requests.RegisterUserRequestModularNet.Business.Interfaces.IUsersManager→ModularNet.Domain.Requests.UserSignInRequestModularNet.Business.Interfaces.IUsersSettingsManager→ModularNet.Domain.Requests.CreateOrUpdateUserSettingsRequest
- Direction
- ModularNet.Business.Interfaces uses ModularNet.Domain.Requests, so a change to ModularNet.Domain.Requests can break ModularNet.Business.Interfaces, while a change to ModularNet.Business.Interfaces can't break ModularNet.Domain.Requests.
- Position
- Below the diagonal: ModularNet.Business.Interfaces uses a module listed above it, which is the healthy direction.
14→10 ModularNet.Infrastructure.Implementations uses ModularNet.Domain.Entities✕
- Connections
- 9 pairs of types, where a type in ModularNet.Infrastructure.Implementations uses a type in ModularNet.Domain.Entities.
- The types involved
ModularNet.Infrastructure.Implementations.AppSettingsRepository→ModularNet.Domain.Entities.AppSettingsModularNet.Infrastructure.Implementations.AuditsRepository→ModularNet.Domain.Entities.ModularNetAuditModularNet.Infrastructure.Implementations.EmailServiceRepository→ModularNet.Domain.Entities.ModularNetEmailModularNet.Infrastructure.Implementations.InMemoryCacheRepository→ModularNet.Domain.Entities.InMemoryCacheItemModularNet.Infrastructure.Implementations.LogsRepository→ModularNet.Domain.Entities.ModularNetLogModularNet.Infrastructure.Implementations.SecretsRepository→ModularNet.Domain.Entities.AppSettingsModularNet.Infrastructure.Implementations.UsersRepository→ModularNet.Domain.Entities.UserModularNet.Infrastructure.Implementations.UsersSettingsRepository→ModularNet.Domain.Entities.UserSettingModularNet.Infrastructure.Implementations.UsersSettingsRepository→ModularNet.Domain.Entities.UserSettingDto
- Direction
- ModularNet.Infrastructure.Implementations uses ModularNet.Domain.Entities, so a change to ModularNet.Domain.Entities can break ModularNet.Infrastructure.Implementations, while a change to ModularNet.Infrastructure.Implementations can't break ModularNet.Domain.Entities.
- Position
- Below the diagonal: ModularNet.Infrastructure.Implementations uses a module listed above it, which is the healthy direction.
14→12 ModularNet.Infrastructure.Implementations uses ModularNet.Infrastructure.Interfaces✕
- Connections
- 27 pairs of types, where a type in ModularNet.Infrastructure.Implementations uses a type in ModularNet.Infrastructure.Interfaces. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
- The types involved
ModularNet.Infrastructure.Implementations.AppSettingsRepository→ModularNet.Infrastructure.Interfaces.IAppSettingsRepositoryModularNet.Infrastructure.Implementations.AuditsRepository→ModularNet.Infrastructure.Interfaces.IAuditsRepositoryModularNet.Infrastructure.Implementations.AuditsRepository→ModularNet.Infrastructure.Interfaces.IDbConnectionFactoryModularNet.Infrastructure.Implementations.AuthenticationService→ModularNet.Infrastructure.Interfaces.IAuthenticationServiceModularNet.Infrastructure.Implementations.AuthenticationService→ModularNet.Infrastructure.Interfaces.IJwtProviderModularNet.Infrastructure.Implementations.DbConnectionFactory→ModularNet.Infrastructure.Interfaces.IDbConnectionFactoryModularNet.Infrastructure.Implementations.DbConnectionFactory→ModularNet.Infrastructure.Interfaces.ISecretsRepositoryModularNet.Infrastructure.Implementations.EmailServiceRepository→ModularNet.Infrastructure.Interfaces.IDbConnectionFactoryModularNet.Infrastructure.Implementations.EmailServiceRepository→ModularNet.Infrastructure.Interfaces.IEmailServiceRepositoryModularNet.Infrastructure.Implementations.HealthChecksRepository→ModularNet.Infrastructure.Interfaces.IDbConnectionFactoryModularNet.Infrastructure.Implementations.HealthChecksRepository→ModularNet.Infrastructure.Interfaces.IHealthChecksRepositoryModularNet.Infrastructure.Implementations.InMemoryCacheRepository→ModularNet.Infrastructure.Interfaces.IInMemoryCacheRepositoryModularNet.Infrastructure.Implementations.JwtProvider→ModularNet.Infrastructure.Interfaces.IJwtProviderModularNet.Infrastructure.Implementations.LogsRepository→ModularNet.Infrastructure.Interfaces.IDbConnectionFactoryModularNet.Infrastructure.Implementations.LogsRepository→ModularNet.Infrastructure.Interfaces.ILogsRepositoryModularNet.Infrastructure.Implementations.RedisConnectionFactory→ModularNet.Infrastructure.Interfaces.IRedisConnectionFactoryModularNet.Infrastructure.Implementations.RedisConnectionFactory→ModularNet.Infrastructure.Interfaces.ISecretsRepositoryModularNet.Infrastructure.Implementations.RedisRepository→ModularNet.Infrastructure.Interfaces.IRedisConnectionFactoryModularNet.Infrastructure.Implementations.RedisRepository→ModularNet.Infrastructure.Interfaces.IRedisRepositoryModularNet.Infrastructure.Implementations.SecretsRepository→ModularNet.Infrastructure.Interfaces.IInMemoryCacheRepositoryModularNet.Infrastructure.Implementations.SecretsRepository→ModularNet.Infrastructure.Interfaces.ISecretsRepositoryModularNet.Infrastructure.Implementations.UnitOfWork→ModularNet.Infrastructure.Interfaces.IDbConnectionFactoryModularNet.Infrastructure.Implementations.UnitOfWork→ModularNet.Infrastructure.Interfaces.IUnitOfWorkModularNet.Infrastructure.Implementations.UsersRepository→ModularNet.Infrastructure.Interfaces.IDbConnectionFactoryModularNet.Infrastructure.Implementations.UsersRepository→ModularNet.Infrastructure.Interfaces.IUsersRepository
- Direction
- ModularNet.Infrastructure.Implementations uses ModularNet.Infrastructure.Interfaces, so a change to ModularNet.Infrastructure.Interfaces can break ModularNet.Infrastructure.Implementations, while a change to ModularNet.Infrastructure.Implementations can't break ModularNet.Infrastructure.Interfaces.
- Position
- Below the diagonal: ModularNet.Infrastructure.Implementations uses a module listed above it, which is the healthy direction.
15→3 (global) uses ModularNet.Api.Helpers✕
- Connections
- 1 pair of types, where a type in (global) uses a type in ModularNet.Api.Helpers.
- The types involved
UserIdExtractionMiddleware→ModularNet.Api.Helpers.ITokenHelper
- Direction
- (global) uses ModularNet.Api.Helpers, so a change to ModularNet.Api.Helpers can break (global), while a change to (global) can't break ModularNet.Api.Helpers.
- Position
- Below the diagonal: (global) uses a module listed above it, which is the healthy direction.
15→13 (global) uses ModularNet.Business.Interfaces✕
- Connections
- 2 pairs of types, where a type in (global) uses a type in ModularNet.Business.Interfaces.
- The types involved
UserIdExtractionMiddleware→ModularNet.Business.Interfaces.ICacheManagerUserIdExtractionMiddleware→ModularNet.Business.Interfaces.IUsersManager
- Direction
- (global) uses ModularNet.Business.Interfaces, so a change to ModularNet.Business.Interfaces can break (global), while a change to (global) can't break ModularNet.Business.Interfaces.
- Position
- Below the diagonal: (global) uses a module listed above it, which is the healthy direction.
16→11 ModularNet.Api.Controllers uses ModularNet.Domain.Requests✕
- Connections
- 12 pairs of types, where a type in ModularNet.Api.Controllers uses a type in ModularNet.Domain.Requests.
- The types involved
ModularNet.Api.Controllers.AuthController→ModularNet.Domain.Requests.GetUserTokenRequestModularNet.Api.Controllers.AuthController→ModularNet.Domain.Requests.LogoutRequestModularNet.Api.Controllers.AuthController→ModularNet.Domain.Requests.ResetPasswordRequestModularNet.Api.Controllers.AuthController→ModularNet.Domain.Requests.SignInUserRequestModularNet.Api.Controllers.AuthController→ModularNet.Domain.Requests.SignInWithExternalProviderRequestModularNet.Api.Controllers.AuthController→ModularNet.Domain.Requests.SignUpUserRequestModularNet.Api.Controllers.AuthController→ModularNet.Domain.Requests.VerifyAuthenticationRequestModularNet.Api.Controllers.EmailVerifierController→ModularNet.Domain.Requests.VerifyEmailRequestModularNet.Api.Controllers.LogsController→ModularNet.Domain.Requests.WriteLogRequestModularNet.Api.Controllers.UsersController→ModularNet.Domain.Requests.RegisterUserRequestModularNet.Api.Controllers.UsersController→ModularNet.Domain.Requests.UserSignInRequestModularNet.Api.Controllers.UsersSettingsController→ModularNet.Domain.Requests.CreateOrUpdateUserSettingsRequest
- Direction
- ModularNet.Api.Controllers uses ModularNet.Domain.Requests, so a change to ModularNet.Domain.Requests can break ModularNet.Api.Controllers, while a change to ModularNet.Api.Controllers can't break ModularNet.Domain.Requests.
- Position
- Below the diagonal: ModularNet.Api.Controllers uses a module listed above it, which is the healthy direction.
16→13 ModularNet.Api.Controllers uses ModularNet.Business.Interfaces✕
- Connections
- 10 pairs of types, where a type in ModularNet.Api.Controllers uses a type in ModularNet.Business.Interfaces.
- The types involved
ModularNet.Api.Controllers.AuthController→ModularNet.Business.Interfaces.IAuthManagerModularNet.Api.Controllers.AuthController→ModularNet.Business.Interfaces.IEncryptManagerModularNet.Api.Controllers.AuthController→ModularNet.Business.Interfaces.IUsersManagerModularNet.Api.Controllers.EmailVerifierController→ModularNet.Business.Interfaces.IEmailVerifierManagerModularNet.Api.Controllers.HealthChecksController→ModularNet.Business.Interfaces.ICacheManagerModularNet.Api.Controllers.HealthChecksController→ModularNet.Business.Interfaces.IHealthChecksManagerModularNet.Api.Controllers.LogsController→ModularNet.Business.Interfaces.ILogsManagerModularNet.Api.Controllers.SecretsController→ModularNet.Business.Interfaces.ISecretsManagerModularNet.Api.Controllers.UsersController→ModularNet.Business.Interfaces.IUsersManagerModularNet.Api.Controllers.UsersSettingsController→ModularNet.Business.Interfaces.IUsersSettingsManager
- Direction
- ModularNet.Api.Controllers uses ModularNet.Business.Interfaces, so a change to ModularNet.Business.Interfaces can break ModularNet.Api.Controllers, while a change to ModularNet.Api.Controllers can't break ModularNet.Business.Interfaces.
- Position
- Below the diagonal: ModularNet.Api.Controllers uses a module listed above it, which is the healthy direction.
17→7 ModularNet.Business.Implementations uses ModularNet.Domain.Enums✕
- Connections
- 1 pair of types, where a type in ModularNet.Business.Implementations uses a type in ModularNet.Domain.Enums.
- The types involved
ModularNet.Business.Implementations.CacheManager→ModularNet.Domain.Enums.CacheType
- Direction
- ModularNet.Business.Implementations uses ModularNet.Domain.Enums, so a change to ModularNet.Domain.Enums can break ModularNet.Business.Implementations, while a change to ModularNet.Business.Implementations can't break ModularNet.Domain.Enums.
- Position
- Below the diagonal: ModularNet.Business.Implementations uses a module listed above it, which is the healthy direction.
17→10 ModularNet.Business.Implementations uses ModularNet.Domain.Entities✕
- Connections
- 8 pairs of types, where a type in ModularNet.Business.Implementations uses a type in ModularNet.Domain.Entities.
- The types involved
ModularNet.Business.Implementations.AppSettingsManager→ModularNet.Domain.Entities.AppSettingsModularNet.Business.Implementations.AuditsManager→ModularNet.Domain.Entities.ModularNetAuditModularNet.Business.Implementations.EmailServiceManager→ModularNet.Domain.Entities.NewModularNetEmailModularNet.Business.Implementations.EncryptManager→ModularNet.Domain.Entities.AppSettingsModularNet.Business.Implementations.LogsManager→ModularNet.Domain.Entities.ModularNetLogModularNet.Business.Implementations.UsersManager→ModularNet.Domain.Entities.UserModularNet.Business.Implementations.UsersSettingsManager→ModularNet.Domain.Entities.UserSettingModularNet.Business.Implementations.WebAppConfigsManager→ModularNet.Domain.Entities.WebAppConfigs
- Direction
- ModularNet.Business.Implementations uses ModularNet.Domain.Entities, so a change to ModularNet.Domain.Entities can break ModularNet.Business.Implementations, while a change to ModularNet.Business.Implementations can't break ModularNet.Domain.Entities.
- Position
- Below the diagonal: ModularNet.Business.Implementations uses a module listed above it, which is the healthy direction.
17→11 ModularNet.Business.Implementations uses ModularNet.Domain.Requests✕
- Connections
- 3 pairs of types, where a type in ModularNet.Business.Implementations uses a type in ModularNet.Domain.Requests.
- The types involved
ModularNet.Business.Implementations.UsersManager→ModularNet.Domain.Requests.RegisterUserRequestModularNet.Business.Implementations.UsersManager→ModularNet.Domain.Requests.UserSignInRequestModularNet.Business.Implementations.UsersSettingsManager→ModularNet.Domain.Requests.CreateOrUpdateUserSettingsRequest
- Direction
- ModularNet.Business.Implementations uses ModularNet.Domain.Requests, so a change to ModularNet.Domain.Requests can break ModularNet.Business.Implementations, while a change to ModularNet.Business.Implementations can't break ModularNet.Domain.Requests.
- Position
- Below the diagonal: ModularNet.Business.Implementations uses a module listed above it, which is the healthy direction.
17→12 ModularNet.Business.Implementations uses ModularNet.Infrastructure.Interfaces✕
- Connections
- 14 pairs of types, where a type in ModularNet.Business.Implementations uses a type in ModularNet.Infrastructure.Interfaces.
- The types involved
ModularNet.Business.Implementations.AppSettingsManager→ModularNet.Infrastructure.Interfaces.IAppSettingsRepositoryModularNet.Business.Implementations.AuditsManager→ModularNet.Infrastructure.Interfaces.IAuditsRepositoryModularNet.Business.Implementations.AuthManager→ModularNet.Infrastructure.Interfaces.IAuthenticationServiceModularNet.Business.Implementations.CacheManager→ModularNet.Infrastructure.Interfaces.IInMemoryCacheRepositoryModularNet.Business.Implementations.CacheManager→ModularNet.Infrastructure.Interfaces.IRedisRepositoryModularNet.Business.Implementations.EmailServiceManager→ModularNet.Infrastructure.Interfaces.IEmailServiceRepositoryModularNet.Business.Implementations.HealthChecksManager→ModularNet.Infrastructure.Interfaces.IHealthChecksRepositoryModularNet.Business.Implementations.LogsManager→ModularNet.Infrastructure.Interfaces.ILogsRepositoryModularNet.Business.Implementations.SecretsManager→ModularNet.Infrastructure.Interfaces.ISecretsRepositoryModularNet.Business.Implementations.UsersManager→ModularNet.Infrastructure.Interfaces.IAuthenticationServiceModularNet.Business.Implementations.UsersManager→ModularNet.Infrastructure.Interfaces.IUnitOfWorkModularNet.Business.Implementations.UsersManager→ModularNet.Infrastructure.Interfaces.IUsersRepositoryModularNet.Business.Implementations.UsersSettingsManager→ModularNet.Infrastructure.Interfaces.IUnitOfWorkModularNet.Business.Implementations.UsersSettingsManager→ModularNet.Infrastructure.Interfaces.IUsersSettingsRepository
- Direction
- ModularNet.Business.Implementations uses ModularNet.Infrastructure.Interfaces, so a change to ModularNet.Infrastructure.Interfaces can break ModularNet.Business.Implementations, while a change to ModularNet.Business.Implementations can't break ModularNet.Infrastructure.Interfaces.
- Position
- Below the diagonal: ModularNet.Business.Implementations uses a module listed above it, which is the healthy direction.
17→13 ModularNet.Business.Implementations uses ModularNet.Business.Interfaces✕
- Connections
- 31 pairs of types, where a type in ModularNet.Business.Implementations uses a type in ModularNet.Business.Interfaces. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
- The types involved
ModularNet.Business.Implementations.AppSettingsManager→ModularNet.Business.Interfaces.IAppSettingsManagerModularNet.Business.Implementations.AppSettingsManager→ModularNet.Business.Interfaces.ISecretsManagerModularNet.Business.Implementations.AuditsManager→ModularNet.Business.Interfaces.IAuditsManagerModularNet.Business.Implementations.AuthManager→ModularNet.Business.Interfaces.IAppSettingsManagerModularNet.Business.Implementations.AuthManager→ModularNet.Business.Interfaces.IAuthManagerModularNet.Business.Implementations.AuthManager→ModularNet.Business.Interfaces.ICacheManagerModularNet.Business.Implementations.AuthManager→ModularNet.Business.Interfaces.IEmailServiceManagerModularNet.Business.Implementations.AuthManager→ModularNet.Business.Interfaces.IUsersManagerModularNet.Business.Implementations.CacheManager→ModularNet.Business.Interfaces.ICacheManagerModularNet.Business.Implementations.EmailServiceManager→ModularNet.Business.Interfaces.IAppSettingsManagerModularNet.Business.Implementations.EmailServiceManager→ModularNet.Business.Interfaces.IEmailServiceManagerModularNet.Business.Implementations.EmailVerifierManager→ModularNet.Business.Interfaces.IAppSettingsManagerModularNet.Business.Implementations.EmailVerifierManager→ModularNet.Business.Interfaces.IEmailVerifierManagerModularNet.Business.Implementations.EmailVerifierManager→ModularNet.Business.Interfaces.IEncryptManagerModularNet.Business.Implementations.EmailVerifierManager→ModularNet.Business.Interfaces.IUsersManagerModularNet.Business.Implementations.EncryptManager→ModularNet.Business.Interfaces.IAppSettingsManagerModularNet.Business.Implementations.EncryptManager→ModularNet.Business.Interfaces.IEncryptManagerModularNet.Business.Implementations.HealthChecksManager→ModularNet.Business.Interfaces.IHealthChecksManagerModularNet.Business.Implementations.LogsManager→ModularNet.Business.Interfaces.ICacheManagerModularNet.Business.Implementations.LogsManager→ModularNet.Business.Interfaces.ILogsManagerModularNet.Business.Implementations.SecretsManager→ModularNet.Business.Interfaces.ICacheManagerModularNet.Business.Implementations.SecretsManager→ModularNet.Business.Interfaces.ISecretsManagerModularNet.Business.Implementations.UsersManager→ModularNet.Business.Interfaces.IAppSettingsManagerModularNet.Business.Implementations.UsersManager→ModularNet.Business.Interfaces.IAuditsManagerModularNet.Business.Implementations.UsersManager→ModularNet.Business.Interfaces.IEmailServiceManager
- Direction
- ModularNet.Business.Implementations uses ModularNet.Business.Interfaces, so a change to ModularNet.Business.Interfaces can break ModularNet.Business.Implementations, while a change to ModularNet.Business.Implementations can't break ModularNet.Business.Interfaces.
- Position
- Below the diagonal: ModularNet.Business.Implementations uses a module listed above it, which is the healthy direction.
At a glance — Code Health
At a glance — Architecture
At a glance — Maturity
At a glance — Readiness
At a glance — Security
At a glance — Performance
Security & Compliance — OWASP Top-10 mapping
| OWASP category | Findings | Severity |
|---|---|---|
| A05:2025 — Injection | 10 | High / Critical |
| A07:2025 — Authentication Failures | 5 | High / Critical |
| A03:2025 — Software Supply Chain Failures | 2 | High / Critical |
Roadmap
Top priorities: Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2), REDACTED; Add a SAST step to CI running what this repository's stack ships: CodeQL's csharp pack, or a .NET security analyzer package — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing; 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.
| Do this | Helps | Effort | Dimension |
|---|---|---|---|
| Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2), REDACTED. | +12.8 pts | Low | REDACTED Scanning |
| Add a SAST step to CI running what this repository's stack ships: CodeQL's csharp pack, or a .NET security analyzer package — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing. | +9.4 pts | Medium | Security & performance tooling |
| 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. | +5.3 pts | Medium | Outbound HTTP resilience |
| Resolve the 1 No ADRs found finding(s) in ADR Quality. | +1.1 pts | Low | ADR Quality |
| Resolve the 7 redundant comment finding(s) in Comment Value — start with UsersSettingsManager.cs (2), REDACTED, AppSettingsManager.cs. | +1.1 pts | Low | Comment Value |
| Consider OpenTelemetry tracing/metrics and a health-check endpoint for operability. | +2.3 pts | Medium | Observability |
| Authenticate ciphertext, do not just encrypt it: move to an AEAD cipher (`AesGcm`, `ChaCha20Poly1305`), or where the wire format is fixed, add encrypt-then-MAC with HMAC-SHA256 over IV+ciphertext under a separately derived key and verify the tag with `CryptographicOperations.FixedTimeEquals` before decrypting. Unauthenticated CBC is malleable, and a decrypt path that distinguishes padding failures from other failures is a padding oracle. | +2.1 pts | Medium | Web-Security Posture |
| Thread a CancellationToken through async methods so work stops promptly on cancellation. | +1.7 pts | Medium | Cancellation propagation |
File quality
| File | Score | Band | Worst signal |
|---|---|---|---|
| REDACTED | 3.0 | Slop | REDACTED Scanning: Leaked secret: REDACTED |
| REDACTED | 3.7 | Slop | Static Analysis (SAST): High: REDACTED |
| REDACTED | 4.6 | Mixed | Static Analysis (SAST): Medium: REDACTED |
| REDACTED | 4.7 | Mixed | Static Analysis (SAST): Medium: REDACTED |
| src/ModularNet.Business/Implementations/UsersSettingsManager.cs | 6.0 | Mixed | Explicit Debt: TodoComment |
| src/ModularNet.Business/Implementations/EncryptManager.cs | 6.2 | Mixed | Explicit Debt: TodoComment |
| REDACTED | 7.2 | Mixed | REDACTED Scanning: Leaked secret: REDACTED |
| src/ModularNet.Business/Implementations/EmailServiceManager.cs | 7.3 | Mixed | Explicit Debt: TodoComment |
| src/ModularNet.Business/Implementations/UsersManager.cs | 7.7 | Mixed | Explicit Debt: TodoComment |
| REDACTED | 7.9 | Mixed | Static Analysis (SAST): Medium: REDACTED |
| REDACTED | 7.9 | Mixed | Static Analysis (SAST): Medium: REDACTED |
| REDACTED | 7.9 | Mixed | Static Analysis (SAST): Medium: REDACTED |
| REDACTED | 7.9 | Mixed | Dependency Vulnerabilities: Medium CVE: REDACTED |
| src/ModularNet.Api/Controllers/UsersController.cs | 8.2 | Near-clean | Explicit Debt: TodoComment |
| src/ModularNet.Infrastructure/Implementations/DbConnectionFactory.cs | 8.2 | Near-clean | Explicit Debt: TodoComment |
| src/ModularNet.Infrastructure/Implementations/RedisConnectionFactory.cs | 8.2 | Near-clean | Explicit Debt: TodoComment |
| src/ModularNet.Infrastructure/Implementations/SecretsRepository.cs | 8.2 | Near-clean | Explicit Debt: TodoComment |
| src/ModularNet.Api/Program.cs | 8.5 | Near-clean | Cognitive Complexity: top-level statements (cognitive 16) |
| src/ModularNet.Domain/Entities/ModularNetLog.cs | 8.5 | Near-clean | Code Duplication: Duplicated block (5 lines × 2) |
| src/ModularNet.Domain/ModularNet.Domain.csproj | 8.5 | Near-clean | Coupling: Off the main sequence: ModularNet.Domain |
How the grades work
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.
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.
Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.
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
This survey 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. All 71 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
What we checked — 71 dimensions across the health lenses
- 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, 132 of 147 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line.
- Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
- 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.
Tools & methods
| Method | Backs | Version | Evaluator |
|---|---|---|---|
| Roslyn static analysis | Complexity, cohesion, coupling, dead code, API surface, layering | 5.3.0 | ✓ deterministic |
| Native secret scanner | Hardcoded secrets / credentials | 1.0.0 | ✓ deterministic |
| Canine Code Analyzer duplication detector (in-process) | Code duplication | 1.0.0 | ✓ deterministic |
| Coverage (coverlet / dotnet-coverage) | Line & branch coverage | 10.0.400 | ✓ deterministic |
| NuGet / dotnet | Outdated, vulnerable & deprecated dependencies | 10.0.400 | ✓ deterministic |
| git / LibGit2Sharp | Churn hotspots, knowledge concentration, history | 2.43.0 · 0.31.0 | ✓ deterministic |
| gitleaks · semgrep · trivy | Secrets in history, SAST, CVEs, IaC & container, PII / GDPR | 1.86.0 · 0.69.3 | ✓ deterministic |
Run transparency — what happened this run
- D8 Code Coverage — not measured this run — We 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. Coverage NOT MEASURED: the analyzer environment could not build/run the test suite (a target framework / SDK band or targeting pack the analyzer image doesn't carry). This is OUR limitation, not a defect in the repo — coverage is excluded from the score rather than counted as a near-zero. We track the analyzer-image gap so it can be closed; in the meantime, your test projects already reference a coverage collector, but no CI step we found runs the tests with it, so there is no report to hand us — run them with `--collect:"XPlat Code Coverage"` and commit (or publish into the working tree) the coverage.cobertura.xml it writes, and real coverage will be read. You can widen what we reach: optional: your test projects already reference a coverage collector, but no CI step we found runs the tests with it, so there is no report to hand us — run them with `--collect:"XPlat Code Coverage"` and commit (or publish into the working tree) the coverage.cobertura.xml it writes, and the real number is read on the next scan.
- D12 Dependency Hygiene — not measured this run — We 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. `dotnet list package` did not return usable output (restore or query failed); no outdated/vulnerable/deprecated data to assess. The tool said: `dotnet list package` exited 1 with no output.
- D15 Churn × Complexity Hotspots — measured, with a gap in what it reached — 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. Git history depth insufficient — this repository has 29 commit(s), too few for a reliable trend signal. The clone is complete, so there is no deeper history to fetch: the signal returns as the project accumulates history.
- D16 Bus Factor — 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. Single-contributor repository — bus factor is not applicable (1 contributor(s) across 29 commit(s) sampled, automation and bot accounts excluded). Concentration needs a team to concentrate: with one contributor there is nobody to spread the knowledge to, so there is nothing here for the owner to act on.
- D17 Explicit Debt — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. The C# workspace loaded this repository's projects but reported a load failure, and the dead-code reference search is unreliable over a graph that did not load cleanly, so it was skipped. The other debt markers on this row were read; dead symbols were not, and their absence from the score is not a finding that the code has none. First load diagnostic: Failure: Msbuild failed when processing the file 'src/ModularNet.Api/ModularNet.Api.csproj' with message: PackageReference Microsoft.AspNetCore.Hosting will not be pruned. This package is automatically available and does not need to be referenced explicitly. Remove the PackageReference item.
- D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
- D21 Naming Consistency — not measured this run — We 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. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
- 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.
- D34 Knowledge Freshness — 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. Too few commits to judge knowledge freshness (29 commit(s) sampled).
- D35 Change Coupling — measured, with a gap in what it reached — 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. Git history depth insufficient — this repository has 29 commit(s), too few for a reliable change-coupling signal. The clone is complete, so there is no deeper history to fetch: the signal returns as the project accumulates history.
- D39 IL Efficiency — not measured this run — We 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. IL NOT MEASURED: the analyzer's own build of this repository failed for an ENVIRONMENT reason (exit 1) — MSBuild's engine or the CLR gave up, or our image does not carry the SDK band/targeting pack this repository needs. This is OUR limitation, not a defect in the repo, and it is not a statement that this repository fails to build. D18 owns the question of whether this repository builds; it was not answered here.
- M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
- X2 Cancellation propagation — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. 69 further occurrence(s) are not listed individually; the score already reflects all 109.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do 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
- 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.
- D11 Test Reliability: Flakiness is inferred from history/markers — we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
- 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.
- 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 publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
- D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
- D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
- 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.
- 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.
- D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
- 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 Dockerfile (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.
- 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.
- M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
Dimensions
D1 · Cyclomatic Complexity
0 method(s) exceeded the cyclomatic complexity threshold of 15.
D2 · Cognitive Complexity
1 method(s) exceeded the cognitive complexity threshold of 15; the worst was top-level statements at 16.
What to do
- Bring the 1 body over 15 down to 15 or less in Cognitive Complexity — start with top-level statements (cognitive 16). — Refactoring it lifts Cognitive Complexity from 9.9 to about 10.0/10.
- Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
D3 · God Classes
0 god class(es) detected.
D4 · Code Duplication
3 duplicated block group(s) detected.
What to do
- Resolve the 1 Duplicated block (16 lines × 2) finding(s) in Code Duplication — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
- Resolve the 1 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with EncryptManager.cs. — One of this dimension's main actionable groups (1 warning-level).
- Resolve the 1 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with ModularNetLog.cs. — One of this dimension's main actionable groups (1 warning-level).
- Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
D5 · Coupling
7 projects, 0 dependency cycle(s), 0 unstable depended-on project(s).
What to do
- Resolve the 1 Off the main sequence finding(s) in Coupling — start with ModularNet.Domain.csproj. — One of this dimension's main actionable groups (1 warning-level).
- Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
D6 · Cohesion (LCOM4)
0 of 19 classes have LCOM4 above 3.
D9 · Test Distribution
161 test methods: 134 unit, 27 integration, 0 BDD, 0 e2e.
D10 · Test Quality
0 skipped, 0 zero-assertion, 2 mock references across 161 tests.
D11 · Test Reliability
0 flaky across 2 measured tier(s). unit: measured (0 flaky); integration: measured (0 flaky).
D13 · REDACTED Scanning
3 secret(s) detected.
What to do
- Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
- Enforce REDACTED Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
D14 · License Compliance
0 of 275 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 49 direct `PackageReference`(s), and 201 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.
D15 · Churn × Complexity Hotspots
No churn × complexity hotspots in the window.
D17 · Explicit Debt
14 deducted debt markers + unmeasured dead symbols across 3645 LoC in the .NET projects (0.2/KLoC) → score 9.5. Dead code not measured: the solution did not load cleanly, so the reference search was skipped.
What to do
- Resolve the 14 TodoComment finding(s) in Explicit Debt — start with UsersSettingsManager.cs (4), REDACTED (2), EmailServiceManager.cs (2). — One of this dimension's main actionable groups (14 warning-level).
- Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
D18 · Solution Shape
7 projects, 145 source files, 7356 hand-written lines of code (3645 production / 3711 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), 12 inter-project edges.
D19 · Documentation Quality
2 of 2 documentation facets pass in full. 2 document(s) read across 6 unit(s).
D20 · ADR Quality
No architecture decision records were found.
What to do
- Resolve the 1 No ADRs found finding(s) in ADR Quality. — One of this dimension's main actionable groups (1 recommendation-level).
D24 · Comment Value
11 of 120 judged comments only repeat the code they sit on (9.2 %). 1 comment(s) in another language or script were not judged.
What to do
- Resolve the 7 redundant comment finding(s) in Comment Value — start with UsersSettingsManager.cs (2), REDACTED, AppSettingsManager.cs. — One of this dimension's main actionable groups (7 recommendation-level).
D26 · Project Cohesion
0 of 7 projects flagged as possibly oversized/incoherent.
D27 · Navigability
95 % of calls cross a namespace and 23 % go through an interface, but 99 % of collaborators are co-located — so following a call takes several hops. Baseline: small — navigation cost is tolerated.
What to do
- Improve Navigability — currently 8.8/10. — 95 % of calls cross a namespace and 23 % go through an interface, but 99 % of collaborators are co-located — so following a call takes several hops. Baseline: small — navigation cost is tolerated.
D28 · Secrets (history)
1 finding(s): 0 critical, 1 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
What to do
- Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
- Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
D29 · Static Analysis (SAST)
10 finding(s): 0 critical, 2 high, 8 medium, 0 low. 2 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. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
What to do
- Resolve the 6 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (4), REDACTED, REDACTED. — One of this dimension's main actionable groups (6 warning-level).
- Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
- No action in Static Analysis (SAST) — all 2 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 (2 issue-level, 0 of them charged here).
D30 · Dependency Vulnerabilities
2 finding(s): 0 critical, 1 high, 1 medium, 0 low.
What to do
- Resolve the 1 High CVE finding(s) in Dependency Vulnerabilities. — One of this dimension's main actionable groups (1 issue-level).
- Resolve the 1 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
D35 · Change Coupling
No strong hidden change-coupling between production files.
D43 · Malicious Dependencies
No dependency in any ecosystem this repository declares is published as malicious.
D44 · Platform End-of-Life
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 7 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.
Frontend & cross-cutting dimensions
AX1 · Captive dependencies
AX10 · Code composition
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 singletons
AX3 · Project dependency cycles
AX5 · Architecture & structure
AX6 · Interface segregation
AX8 · Test isolation
C1 · Data Protection
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 Controls
- Authorization IS enforced here (via [Authorize]/guards) — this is NOT a claim that endpoints are unprotected. What's missing is NAMED policies (AddAuthorization/AddPolicy, RequireRole/RequireClaim, RequireAuthorization): the access rules are implicit rather than named and testable. Recommendation, not a defect — name the rules so they're reviewable.
- This `[Authorize]` names no policy, role or scheme, so the rule it enforces (any authenticated caller) is implicit here and cannot be listed or tested apart from this attribute. Name the rule — `[Authorize(Policy = "…")]` over a policy registered with AddAuthorization — so the access rule set is reviewable. (×6) — REDACTED:150, REDACTED:176, src/ModularNet.Api/Controllers/LogsController.cs:10, …
What to do
- Add policy-based authorization — name the access rules (AddAuthorization(o => o.AddPolicy(…))) and apply them via [Authorize(Policy = …)] or RequireAuthorization.
GD1 · Unfinished & placeholder code
IC1 · Incompleteness & stubs
- `Check` 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:25
- `GetEmailFromToken` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — src/ModularNet.Api/Helpers/TokenHelper.cs:7
- `PreparePasswordResetEmailAndSend` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — src/ModularNet.Business/Implementations/EmailServiceManager.cs:140
- `HashText` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — src/ModularNet.Business/Implementations/EncryptManager.cs:91
- `VerifyHashedText` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — src/ModularNet.Business/Implementations/EncryptManager.cs:118
- `DeriveKeyFromPassword` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — src/ModularNet.Business/Implementations/EncryptManager.cs:138
- `SaveToInMemoryCache` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — src/ModularNet.Infrastructure/Implementations/InMemoryCacheRepository.cs:22
- `GetFromInMemoryCache` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — src/ModularNet.Infrastructure/Implementations/InMemoryCacheRepository.cs:50
- `RemoveFromInMemoryCache` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — src/ModularNet.Infrastructure/Implementations/InMemoryCacheRepository.cs:69
- `RemoveExpiredItemsFromInMemoryCache` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — src/ModularNet.Infrastructure/Implementations/InMemoryCacheRepository.cs:80
- A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers). (×2) — src/ModularNet.Business/Interfaces/ISecretsManager.cs:7, src/ModularNet.Infrastructure/Interfaces/ISecretsRepository.cs:7
What to do
- 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)
What to do
- Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
- Add a README to the 5 of 5 project(s) that lack one — worth up to 2 pts.
M2 · Architecture documentation
- 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 structure
M4 · Documentation accuracy
P1 · CI/CD gates
P2 · Observability
What to do
- Consider OpenTelemetry tracing/metrics and a health-check endpoint for operability.
P3 · Security & performance tooling
- No static application security testing detected. For this repository's stack, add CodeQL's csharp pack, or a .NET security analyzer package (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 2506 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:6
- `src/ModularNet.Api/ModularNet.Api.csproj` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — src/ModularNet.Api/ModularNet.Api.csproj:13
What to do
- Add a SAST step to CI running what this repository's stack ships: CodeQL's csharp pack, or a .NET security analyzer package — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
- Enable Dependabot/Renovate or a dependency-review gate.
- Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P7 · Outbound HTTP resilience
- `services.AddHttpClient<IJwtProvider, JwtProvider>((sp, httpClient) => { var c...` 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). — src/ModularNet.Infrastructure/InfrastructureServiceRegistration.cs:29
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.
PF3 · Async & latency hygiene
S1 · Web-Security Posture
- This type encrypts through `SymmetricAlgorithm`, whose every cipher mode (CBC/ECB/OFB/CFB/CTS) is unauthenticated, and no keyed MAC or AEAD cipher appears anywhere in it — so nothing establishes that the ciphertext it produced is the ciphertext it later reads back. Encryption alone provides confidentiality, not integrity: unauthenticated CBC is MALLEABLE, and an attacker who can modify stored or transmitted ciphertext can flip chosen plaintext bits in the following block by flipping ciphertext bits in the preceding one, without ever knowing the key. Where the decrypt path reports failure differently for a padding error than for a downstream one — a broad `catch` that returns null is the usual spelling — the same construction also answers the attacker's questions, which is the padding-oracle shape that recovers plaintext outright. Prefer an AEAD cipher: `AesGcm` or `ChaCha20Poly1305` authenticate the ciphertext as part of encrypting it, and give you an associated-data slot for the surrounding context. Where the format cannot change, MAC it with encrypt-then-MAC — HMAC-SHA256 over the IV and the ciphertext together, with a key derived separately from the encryption key — and verify that tag with `CryptographicOperations.FixedTimeEquals` BEFORE decrypting anything. — src/ModularNet.Business/Implementations/EncryptManager.cs:40
- This code fixes PBKDF2-SHA-256 at 10,000 iterations. A key-derivation function's only defence is the cost of ONE guess, and that cost is this number — the algorithm choice does not set it. Current OWASP guidance is 1,300,000 PBKDF2 iterations with HMAC-SHA1, 600,000 with SHA-256 and 210,000 with SHA-512; scrypt at N=2^17, r=8, p=1 (or an equivalent N·r·p product); Argon2id at 19 MiB of memory and 2 iterations (or an equivalent row); bcrypt at a work factor of at least 10. This figure divides the attacker's work by a factor of tens or hundreds against the same stolen hash, on hardware they already own. Where what is derived is short or low-entropy — a PIN, a numeric parental code, a four-character token — the whole keyspace falls in the time this parameter buys, and no salt or constant-time comparison changes that. Raise the count to the current published figure for the PRF you use, measure it on the slowest hardware that must run it (a target of roughly 100 ms per derivation is the usual budget), and read the value from configuration so a deployment can raise it again without a rebuild. Where the derived value must interoperate with a format someone else fixed, the count cannot move — derive a SEPARATE value for anything you own rather than inheriting the external format's price. (×2) — src/ModularNet.Business/Implementations/EncryptManager.cs:101, src/ModularNet.Business/Implementations/EncryptManager.cs:128
- `iterations` fixes PBKDF2-SHA-256 at 10,000 iterations. A key-derivation function's only defence is the cost of ONE guess, and that cost is this number — the algorithm choice does not set it. Current OWASP guidance is 1,300,000 PBKDF2 iterations with HMAC-SHA1, 600,000 with SHA-256 and 210,000 with SHA-512; scrypt at N=2^17, r=8, p=1 (or an equivalent N·r·p product); Argon2id at 19 MiB of memory and 2 iterations (or an equivalent row); bcrypt at a work factor of at least 10. This figure divides the attacker's work by a factor of tens or hundreds against the same stolen hash, on hardware they already own. Where what is derived is short or low-entropy — a PIN, a numeric parental code, a four-character token — the whole keyspace falls in the time this parameter buys, and no salt or constant-time comparison changes that. Raise the count to the current published figure for the PRF you use, measure it on the slowest hardware that must run it (a target of roughly 100 ms per derivation is the usual budget), and read the value from configuration so a deployment can raise it again without a rebuild. Where the derived value must interoperate with a format someone else fixed, the count cannot move — derive a SEPARATE value for anything you own rather than inheriting the external format's price. — src/ModularNet.Business/Implementations/EncryptManager.cs:141
- None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured — defense in depth, even when a reverse proxy could set them. (−2.0 on this card.)
- This web host's pipeline is composed here and adds no security response header (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, a frame policy) to what it serves. — src/ModularNet.Api/Program.cs:24
What to do
- Authenticate ciphertext, do not just encrypt it: move to an AEAD cipher (`AesGcm`, `ChaCha20Poly1305`), or where the wire format is fixed, add encrypt-then-MAC with HMAC-SHA256 over IV+ciphertext under a separately derived key and verify the tag with `CryptographicOperations.FixedTimeEquals` before decrypting. Unauthenticated CBC is malleable, and a decrypt path that distinguishes padding failures from other failures is a padding oracle.
- Raise the cost parameter to current guidance — PBKDF2 at 1,300,000 (HMAC-SHA1), 600,000 (SHA-256) or 210,000 (SHA-512) iterations; scrypt at N=2^17, r=8, p=1; bcrypt at a work factor of 10 or more — or move to a memory-hard KDF (Argon2id, scrypt) where the platform offers one. Read the parameter from configuration and tune it to roughly 100 ms per derivation on the slowest hardware that must run it, so the price can be raised again without shipping new code. This repository constructs a key derivation priced below the floor at 3 sites, not one: `src/ModularNet.Business/Implementations/EncryptManager.cs:101` (PBKDF2-SHA-256, 10,000 iterations), `src/ModularNet.Business/Implementations/EncryptManager.cs:128` (PBKDF2-SHA-256, 10,000 iterations), `src/ModularNet.Business/Implementations/EncryptManager.cs:141` (PBKDF2-SHA-256, 10,000 iterations). Each is a separate decision — fixing only the line this row cites leaves the others in place.
- Add security response headers (Content-Security-Policy first, then Strict-Transport-Security, X-Content-Type-Options and a frame policy) — defense in depth, even when a reverse proxy could set them.
X1 · Async correctness
- `File.ReadAllText` blocks the thread on I/O while `File.ReadAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin. (×2) — src/ModularNet.Business/Implementations/EmailServiceManager.cs:111, src/ModularNet.Business/Implementations/EmailServiceManager.cs:148
- 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. — src/ModularNet.Business/Implementations/EncryptManager.cs:15
What to do
- Blocking `File.ReadAllText` inside an `async` method
X12 · Unreachable branch
- `secretFromCache == null` can never be true where it stands: the guard on line 30 (`secretFromCache == null`) left this block when it was true. No value of `secretFromCache` satisfies all of that, so this arm never runs. Reorder the tests, drop the dead branch, or fix the bound that was meant. — src/ModularNet.Business/Implementations/SecretsManager.cs:40
- `secretFromCache == null` can never be true where it stands: the guard on line 55 (`secretFromCache == null`) left this block when it was true. No value of `secretFromCache` satisfies all of that, so this arm never runs. Reorder the tests, drop the dead branch, or fix the bound that was meant. — src/ModularNet.Infrastructure/Implementations/SecretsRepository.cs:65
What to do
- Each finding names the span that makes the branch dead and the span it is dead because of. Confirm from the two, then delete the dead arm or fix the predicate that was meant to be reachable.
X13 · Undrained process stream
X14 · Bypassable address classification
X15 · Unvalidated length from an untrusted reader
X16 · Unfloored truncation loop
X17 · Uncapped recursion over a caller-supplied document
X18 · Disposal-pattern correctness
- `_dbConnectionFactory` is never created by `UnitOfWork` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 39). Its declared type `IDbConnectionFactory` is an interface, so the instance came from whoever chose and created 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. — src/ModularNet.Infrastructure/Implementations/UnitOfWork.cs:39
- `_dbConnectionFactory` is never created by `UnitOfWork` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 45). Its declared type `IDbConnectionFactory` is an interface, so the instance came from whoever chose and created 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. — src/ModularNet.Infrastructure/Implementations/UnitOfWork.cs:45
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 state
X2 · Cancellation propagation
- Only 0/107 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. (×39) — REDACTED:35, REDACTED:90, REDACTED:128, …
What to do
- Thread a CancellationToken through async methods so work stops promptly on cancellation.
X20 · Mistyped argument guard
- The guard on line 171 rejects `ciphertext` and line 172 reports that rejection as `ArgumentNullException` — but the condition's own test `ciphertext.Length <= 0` is true of a value that is NOT null: it is satisfied by an EMPTY `ciphertext`, and on that path `ciphertext` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows this case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, or split the guard and throw each on its own condition. — src/ModularNet.Business/Implementations/EncryptManager.cs:172
- The guard on line 173 rejects `key` and line 174 reports that rejection as `ArgumentNullException` — but the condition's own test `key.Length <= 0` is true of a value that is NOT null: it is satisfied by an EMPTY `key`, and on that path `key` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows this case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, or split the guard and throw each on its own condition. — src/ModularNet.Business/Implementations/EncryptManager.cs:174
- The guard on line 175 rejects `iv` and line 176 reports that rejection as `ArgumentNullException` — but the condition's own test `iv.Length <= 0` is true of a value that is NOT null: it is satisfied by an EMPTY `iv`, and on that path `iv` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows this case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, or split the guard and throw each on its own condition. — src/ModularNet.Business/Implementations/EncryptManager.cs:176
What to do
- Each finding names the throw and the test in its own condition that is true of a NON-null value. Confirm from the two, then throw the exception that describes what was actually wrong: `ArgumentException` for a value that arrived empty, or the .NET 8 helpers that spell the whole guard in one line and pick the type for you — `ArgumentException.ThrowIfNullOrEmpty(s)` / `ThrowIfNullOrWhiteSpace(s)` for strings, `ArgumentNullException.ThrowIfNull(x)` followed by `ArgumentOutOfRangeException.ThrowIfZero(x.Count)` for a collection. Splitting the two conditions is usually clearer than picking one exception for both: they are different failures and the caller may want to handle them differently.
X21 · Side-effecting pattern guard
X22 · Contradicted release guard
X23 · Unguarded diagnostic materialisation
X24 · Document value interpolated into markup unescaped
X25 · Inert configuration knob
X26 · Unsynchronised callback handoff
X27 · Collection changed while being enumerated
X28 · Index access outside its own emptiness guard
X29 · Per-element action decided by a fixed element
X3 · Exception handling
- `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. — src/ModularNet.Api/Middlewares/FirebaseAuthenticationMiddleware.cs:41
What to do
- Swallowed exception (caught, then discarded)
X30 · Support guard that admits what it rejects
X32 · Type resolved by simple name across every loaded assembly
X4 · Structured logging
- 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. (×7) — src/ModularNet.Business/Implementations/AuthManager.cs:40, src/ModularNet.Business/Implementations/AuthManager.cs:56, src/ModularNet.Business/Implementations/EmailVerifierManager.cs:56, …
What to do
- Interpolated log message defeats structured logging
X5 · Nullable reference types
Reference — by lens
| Lens | Score | Rating | Impact |
|---|---|---|---|
| Code Health | 60% | Adequate | Acceptable, with room to improve. |
| Architecture | 82% | Strong | Solid. |
| Maturity | 77% | Strong | Solid. |
| Readiness | 40% | Weak — gated by D13, P3, P7 | Capped at Fair by a Critical contributor — resolve it before relying on this lens. |
| Security | 64% | Adequate | Acceptable, with room to improve. |
| Performance | 100% | Exemplary | Strongest area. |
Unscored — 5 check(s) recorded observations but carry no score
- AXO1 Runtime API surface — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
- D36 Supply-chain Provenance & Signing — 1 observation(s) recorded · The CI pipeline builds and tests but publishes no released artifact — no package publish, container push, GitHub release or deployment step. Supply-chain provenance, signing and SBOM attest RELEASED artifacts, so there is nothing to attest here. Add them to the release pipeline when this repo starts shipping artifacts (a published package, a container image, a deployed service or a tagged release). Build integrity and workflow-token hygiene are reported below: they describe what the CI runs and the token it runs with, neither of which is affected by whether the pipeline ships an artifact.
- 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.
- X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 6 control(s) we could not find positive evidence for
- C3 Audit Trail — Repo shows no audit-logging mechanism (IAuditable, an immutable audit log, an EF SaveChanges interceptor) for sensitive changes — absence of evidence is not evidence of a working control. Record an audit trail in code (or document where it lives) so this dimension can be scored.
- C4 Data Retention — Repo shows no data-retention / TTL / cleanup mechanism for personal data — absence of evidence is not evidence of a working control. Define retention periods and a purge/cleanup job (or TTL) in code, or document where retention is enforced, so this dimension can be scored.
- 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.
- P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
- P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
- P6 Release Hygiene — not evidenced — no changelog, version stamp or semver release tag in the repo
Not included — 40 check(s) not relevant to this codebase
- AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
- AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
- AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
- AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
- AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
- AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
- AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
- AX4 Dependency direction — not applicable to a transaction-script/CRUD 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 — This repository has no user interface to render — no markup (HTML, Razor, JSX, Vue, Svelte or server templates), no UI framework dependency, no UI component source and no native UI project — so WCAG's runtime success criteria have nothing to apply to here. Not applicable: this is neither a gap in the scan nor a finding about your code.
- AXS1 Runtime exposed surface — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
- D12 Dependency Hygiene — Dependency hygiene not measured
- D16 Bus Factor — single-contributor repository — bus factor is not applicable
- D21 Naming Consistency — Naming consistency is measured on C# and TypeScript only; Python not measured.
- D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
- D23 Boundary Type-Coupling — small single-context codebase (3,645 production LoC in the .NET projects) — bounded contexts are not needed at this size No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling 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"]`.
- D25 ADR Conformance — no ADRs to check
- D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
- D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
- D34 Knowledge Freshness — too few commits to judge knowledge freshness
- D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
- D39 IL Efficiency — IL not measured — the analyzer's build of the target did not succeed
- 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.
- D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
- D8 Code Coverage — Coverage not measured — analyzer environment
- DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): a Domain/Aggregates/ValueObjects layer; 6 repository port(s) loading or saving an aggregate/entity
- ED1 Event-Driven — not scored — this repository shows only 1 of the 3 signals this lens looks for (a message-bus package)
- ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
- ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
- P8 Schema migrations — no EF Core usage detected
- 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
- PF1 Benchmark discipline — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
- PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
- X10 Duplicated predicate — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
- X6 Hand-rolled structured-format parsing — 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)
Critical — 7 finding(s)
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
Serious — 99 finding(s)
- Async method without CancellationToken: SignUpUser REDACTED:35
- Async method without CancellationToken: SignInUser REDACTED:90
- Async method without CancellationToken: VerifyAuthentication REDACTED:128
- Async method without CancellationToken: Logout REDACTED:154
- Async method without CancellationToken: SignInWithExternalProvider REDACTED:180
- Async method without CancellationToken: GetUserToken REDACTED:256
- Async method without CancellationToken: ResetPassword REDACTED:284
- Async method without CancellationToken: VerifyEmail REDACTED:26
- Async method without CancellationToken: CheckDbConnection REDACTED:47
- Async method without CancellationToken: CheckInMemoryCache REDACTED:67
- Async method without CancellationToken: CheckRedisCache REDACTED:97
- Async method without CancellationToken: WriteLog src/ModularNet.Api/Controllers/LogsController.cs:30
- Async method without CancellationToken: GetSecret src/ModularNet.Api/Controllers/SecretsController.cs:31
- Async method without CancellationToken: GetUserByEmail src/ModularNet.Api/Controllers/UsersController.cs:32
- Async method without CancellationToken: GetUserById src/ModularNet.Api/Controllers/UsersController.cs:55
- Async method without CancellationToken: RegisterUser src/ModularNet.Api/Controllers/UsersController.cs:84
- Async method without CancellationToken: LoginUser src/ModularNet.Api/Controllers/UsersController.cs:113
- Async method without CancellationToken: SetTermsAndConditionsAsAccepted src/ModularNet.Api/Controllers/UsersController.cs:134
- Async method without CancellationToken: DeactivateAccount src/ModularNet.Api/Controllers/UsersController.cs:158
- Async method without CancellationToken: EnableUser src/ModularNet.Api/Controllers/UsersController.cs:182
- Async method without CancellationToken: GetUserSettingsByUserId src/ModularNet.Api/Controllers/UsersSettingsController.cs:33
- Async method without CancellationToken: CreateOrUpdateUserSettings src/ModularNet.Api/Controllers/UsersSettingsController.cs:59
- Async method without CancellationToken: GetAppSettings src/ModularNet.Business/Implementations/AppSettingsManager.cs:31
- Async method without CancellationToken: WriteAuditToDb src/ModularNet.Business/Implementations/AuditsManager.cs:16
- Async method without CancellationToken: RegisterUserInFirebase src/ModularNet.Business/Implementations/AuthManager.cs:32
- TodoComment REDACTED:70
- TodoComment src/ModularNet.Api/Controllers/UsersController.cs:93
- TodoComment REDACTED:205
- TodoComment src/ModularNet.Business/Implementations/EmailServiceManager.cs:126
- TodoComment src/ModularNet.Business/Implementations/EmailServiceManager.cs:161
- TodoComment src/ModularNet.Business/Implementations/EncryptManager.cs:153
- TodoComment src/ModularNet.Business/Implementations/UsersManager.cs:43
- TodoComment src/ModularNet.Business/Implementations/UsersSettingsManager.cs:26
- TodoComment src/ModularNet.Business/Implementations/UsersSettingsManager.cs:63
- TodoComment src/ModularNet.Business/Implementations/UsersSettingsManager.cs:46
- TodoComment src/ModularNet.Business/Implementations/UsersSettingsManager.cs:118
- TodoComment src/ModularNet.Infrastructure/Implementations/DbConnectionFactory.cs:60
- TodoComment src/ModularNet.Infrastructure/Implementations/RedisConnectionFactory.cs:49
- TodoComment src/ModularNet.Infrastructure/Implementations/SecretsRepository.cs:21
- Fake-async — async method never awaits REDACTED:25
- Fake-async — async method never awaits src/ModularNet.Api/Helpers/TokenHelper.cs:7
- Fake-async — async method never awaits src/ModularNet.Business/Implementations/EmailServiceManager.cs:140
- Fake-async — async method never awaits src/ModularNet.Business/Implementations/EncryptManager.cs:91
- Fake-async — async method never awaits src/ModularNet.Business/Implementations/EncryptManager.cs:118
- Fake-async — async method never awaits src/ModularNet.Business/Implementations/EncryptManager.cs:138
- Fake-async — async method never awaits src/ModularNet.Infrastructure/Implementations/InMemoryCacheRepository.cs:22
- Fake-async — async method never awaits src/ModularNet.Infrastructure/Implementations/InMemoryCacheRepository.cs:50
- Fake-async — async method never awaits src/ModularNet.Infrastructure/Implementations/InMemoryCacheRepository.cs:69
- Fake-async — async method never awaits src/ModularNet.Infrastructure/Implementations/InMemoryCacheRepository.cs:80
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- API operation answered with no credentials: GET /healthchecks
- API operation answered with no credentials: GET /healthchecks/memory-cache
- API operation answered with no credentials: GET /healthchecks/redis-cache
- Password key derivation is priced too cheaply src/ModularNet.Business/Implementations/EncryptManager.cs:101
- Password key derivation is priced too cheaply src/ModularNet.Business/Implementations/EncryptManager.cs:128
- Password key derivation is priced too cheaply src/ModularNet.Business/Implementations/EncryptManager.cs:141
- Argument guard throws the exception its own condition disproves src/ModularNet.Business/Implementations/EncryptManager.cs:172
- Argument guard throws the exception its own condition disproves src/ModularNet.Business/Implementations/EncryptManager.cs:174
- Argument guard throws the exception its own condition disproves src/ModularNet.Business/Implementations/EncryptManager.cs:176
- REDACTED
- REDACTED
- Blocking `File.ReadAllText` inside an `async` method src/ModularNet.Business/Implementations/EmailServiceManager.cs:111
- Blocking `File.ReadAllText` inside an `async` method src/ModularNet.Business/Implementations/EmailServiceManager.cs:148
- Branch is unreachable — its condition cannot hold here src/ModularNet.Business/Implementations/SecretsManager.cs:40
- Branch is unreachable — its condition cannot hold here src/ModularNet.Infrastructure/Implementations/SecretsRepository.cs:65
- Disposes a dependency it does not own src/ModularNet.Infrastructure/Implementations/UnitOfWork.cs:39
- Disposes a dependency it does not own src/ModularNet.Infrastructure/Implementations/UnitOfWork.cs:45
- top-level statements (cognitive 16) src/ModularNet.Api/Program.cs:15
- REDACTED
- REDACTED
- Duplicated block (16 lines × 2) REDACTED:73
- Duplicated block (6 lines × 2) src/ModularNet.Business/Implementations/EncryptManager.cs:34
- Duplicated block (5 lines × 2) src/ModularNet.Domain/Entities/ModularNetLog.cs:6
- Off the main sequence: ModularNet.Domain src/ModularNet.Domain/ModularNet.Domain.csproj:1
- Coverage collected but not gated
- Outbound HTTP without resilience src/ModularNet.Infrastructure/InfrastructureServiceRegistration.cs:29
- Ciphertext is encrypted but not authenticated src/ModularNet.Business/Implementations/EncryptManager.cs:40
- NuGet dependencies are not locked
- Sync-over-async (deadlock risk) through `.Result` src/ModularNet.Business/Implementations/EncryptManager.cs:15
- Swallowed exception (caught, then discarded) src/ModularNet.Api/Middlewares/FirebaseAuthenticationMiddleware.cs:41
Minor — 34 finding(s)
- No named authorization policies
- No named authorization policies REDACTED:150
- No named authorization policies REDACTED:176
- No named authorization policies src/ModularNet.Api/Controllers/LogsController.cs:10
- No named authorization policies src/ModularNet.Api/Controllers/SecretsController.cs:8
- No named authorization policies src/ModularNet.Api/Controllers/UsersController.cs:10
- No named authorization policies src/ModularNet.Api/Controllers/UsersSettingsController.cs:10
- redundant comment REDACTED:75
- redundant comment src/ModularNet.Business/Implementations/AppSettingsManager.cs:43
- redundant comment src/ModularNet.Business/Implementations/EncryptManager.cs:106
- redundant comment src/ModularNet.Business/Implementations/UsersManager.cs:48
- redundant comment src/ModularNet.Business/Implementations/UsersSettingsManager.cs:72
- redundant comment src/ModularNet.Business/Implementations/UsersSettingsManager.cs:100
- redundant comment src/ModularNet.UnitTests/DomainEntitiesAndRequestsTests.cs:151
- Interpolated log message defeats structured logging src/ModularNet.Business/Implementations/AuthManager.cs:40
- Interpolated log message defeats structured logging src/ModularNet.Business/Implementations/AuthManager.cs:56
- Interpolated log message defeats structured logging src/ModularNet.Business/Implementations/EmailVerifierManager.cs:56
- Interpolated log message defeats structured logging src/ModularNet.Business/Implementations/UsersManager.cs:81
- Interpolated log message defeats structured logging src/ModularNet.Business/Implementations/UsersManager.cs:110
- Interpolated log message defeats structured logging src/ModularNet.Business/Implementations/UsersManager.cs:164
- Interpolated log message defeats structured logging src/ModularNet.Business/Implementations/UsersManager.cs:186
- Commented-out code src/ModularNet.Business/Interfaces/ISecretsManager.cs:7
- Commented-out code src/ModularNet.Infrastructure/Interfaces/ISecretsRepository.cs:7
- No security response headers detected
- No security response headers detected src/ModularNet.Api/Program.cs:24
- Mock-dominated test: LoginTests src/ModularNet.UnitTests/UsersManagerTests.cs:51
- No ADRs found
- REDACTED
- REDACTED
- No ADRs
- No SAST REDACTED:6
- No dependency-update automation src/ModularNet.Api/ModularNet.Api.csproj:13
- Not all async methods take a CancellationToken
- Silent fallback default on parse failure src/ModularNet.Business/Implementations/EncryptManager.cs:210
Minor — 7 finding(s)
- doc comments repeat the names src/ModularNet.Api/Controllers/UsersController.cs:78
- doc comments repeat the names src/ModularNet.Business/Implementations/EncryptManager.cs:18
- doc comments repeat the names src/ModularNet.Infrastructure/Implementations/UsersRepository.cs:221
- doc comments repeat the names src/ModularNet.UnitTests/CacheManagerTests.cs:10
- Mock framework: Moq
- Mock framework: Moq
- Off the main sequence: ModularNet.Shared src/ModularNet.Shared/ModularNet.Shared.csproj:1
Appendix B — Reproduction & audit trail
| Dimension | Tool | Version | Command | Findings | Raw output |
|---|---|---|---|---|---|
| D28 · Secrets (history) | gitleaks | — | gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-aeff0938bd854a56b1c57329336f7191/history.json --exit-code 0 --source . | 1 | artifacts/raw/gitleaks-history.json |
| D28 · Secrets (history) | gitleaks | — | gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-aeff0938bd854a56b1c57329336f7191/tree.json --exit-code 0 --source . | 1 | artifacts/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/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt . | 10 | artifacts/raw/semgrep.json |
| D30 · Dependency Vulnerabilities | dotnet | — | dotnet list src/ModularNet.sln package --vulnerable --include-transitive --format json | 2 | artifacts/raw/dotnet-vulnerable.json |
| D31 · IaC & Container Security | trivy | — | trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan. | 0 | — |
| D32 · Data Compliance (PII/GDPR) | semgrep | — | semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. | 0 | — |
| D37 · Vulnerability-disclosure Policy | disclosure | — | disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed. | 0 | — |
| D40 · Network Egress Confinement | runtime-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 Confinement | runtime-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 Enforcement | runtime-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 Dependencies | osv-scanner | — | osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm . /tmp/codehealth-osv-sbom-f79e83e4cba04de4896dc424acfbc04f | 0 | artifacts/raw/osv-scanner.json |
Appendix C — Personal-data map
Email — 15 field(s)
- AzureEmailService.SenderEmail src/ModularNet.Domain/Entities/AppSettings.cs:42
- ModularNetEmail.SenderEmail src/ModularNet.Domain/Entities/ModularNetEmail.cs:10
- ModularNetEmail.EmailRecipients src/ModularNet.Domain/Entities/ModularNetEmail.cs:11
- ModularNetEmail.EmailRecipientsJson src/ModularNet.Domain/Entities/ModularNetEmail.cs:12
- NewModularNetEmail.EmailRecipients src/ModularNet.Domain/Entities/NewModularNetEmail.cs:10
- User.Email src/ModularNet.Domain/Entities/User.cs:9
- User.EmailVerificationCode src/ModularNet.Domain/Entities/User.cs:20
- GetUserTokenRequest.Email src/ModularNet.Domain/Requests/GetUserTokenRequest.cs:5
- RegisterUserRequest.Email src/ModularNet.Domain/Requests/RegisterUserRequest.cs:9
- ResetPasswordRequest.Email src/ModularNet.Domain/Requests/ResetPasswordRequest.cs:5
- SignInUserRequest.Email src/ModularNet.Domain/Requests/SignInUserRequest.cs:5
- SignInWithExternalProviderRequest.Email src/ModularNet.Domain/Requests/SignInWithExternalProviderRequest.cs:10
- SignUpUserRequest.Email src/ModularNet.Domain/Requests/SignUpUserRequest.cs:5
- VerifyEmailRequest.EmailVerificationCode src/ModularNet.Domain/Requests/VerifyEmailRequest.cs:5
- AuthToken.Email src/ModularNet.Infrastructure/Implementations/JwtProvider.cs:42
Name — 6 field(s)
- User.FirstName src/ModularNet.Domain/Entities/User.cs:5
- User.LastName src/ModularNet.Domain/Entities/User.cs:7
- RegisterUserRequest.FirstName src/ModularNet.Domain/Requests/RegisterUserRequest.cs:5
- RegisterUserRequest.LastName src/ModularNet.Domain/Requests/RegisterUserRequest.cs:7
- SignUpUserRequest.FirstName src/ModularNet.Domain/Requests/SignUpUserRequest.cs:7
- SignUpUserRequest.LastName src/ModularNet.Domain/Requests/SignUpUserRequest.cs:8