Executive summary
Read through the Template lens: this is a template / kata / sample / demo — code meant to be read or copied, not operated. The ship-it and operate-it dimensions (CI/CD, observability, ADRs, architecture docs, deployment security) are N/A, and the colour bands on what remains are relaxed to what an example needs. Code correctness stays near-strict; the score is absolute and comparable across repos.
Particular/NServiceBus is in good health (62%). It can be evolved and operated with normal engineering discipline; the items below are improvements, not blockers.
The area that most needs attention is Code Health (58%) — changes there are slower and more error-prone. Architecture (60%) is the next concern — the code resists change, so features cost more over time.
Leadership focus, highest impact first: Finish or delete the unfinished stubs (NotImplementedException… (Incompleteness & stubs); Enable <Nullable>enable</Nullable> across all projects… (Nullable reference types); Swallowed exception (empty catch) (Exception handling).
For scale: Medium (~41,131 production lines); rebuilding it from scratch would take roughly ~1.2 person-years (~1–3 engineers). Approximate, ±~30%.
Raise Code Health 58 → 70 (the Healthy floor) ⇒ headline 62 → ~65.
Rebuild cost & value ~ Modeled — €60,000–€300,000
| Cost to rebuild | €60,000–€300,000 |
| Domain complexity | Standard |
| Quality factor | 0.9× (at 62% quality) |
| Size & shape | Medium · 47% boilerplate · 20% straight-line · 33% branching logic |
This codebase represents roughly ~1.2 person-years of build effort (about ~€180,000 to rebuild). Its weakest lens is Code Health at 58% — the part of that asset most exposed by the findings below.
Top priorities
Diagnosis — what's actually going on
Trajectory
Architecture — module dependency graph
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
Roadmap
Begin by eliminating dead code by completing or removing the 50 unfinished method stubs to ensure all surface area is functional. Next, enable nullable reference types across all projects and resolve the resulting warnings instead of suppressing them. Then, address the 97 explicit debt items, prioritizing obsoletes-v10.cs, followed by resolving the single empty catch block in DefaultRecoverabilityPolicy.cs.
| Do this | Helps | Effort | Dimension |
|---|---|---|---|
| Resolve the 1 EmptyCatchBlock finding(s) in Explicit Debt — start with DefaultRecoverabilityPolicy.cs. | +3.8 pts | Low | Explicit Debt |
| Resolve the 1 Split NServiceBus.Core finding(s) in Project Cohesion. | +2.6 pts | Low | Project Cohesion |
| Resolve the 1 Scattered collaborators finding(s) in Navigability. | +2.3 pts | Low | Navigability |
| Finish or delete the unfinished stubs (NotImplementedException / empty / constant-returning bodies) — they are dead surface that looks live. | +4.3 pts | Medium | Incompleteness & stubs |
| Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`. | +4.3 pts | Medium | Nullable reference types |
| Swallowed exception (empty catch) | +3.9 pts | Medium | Exception handling |
| Resolve the 97 ObsoleteWithCallers finding(s) in Explicit Debt — start with obsoletes-v10.cs (69), DefaultFactory.cs (3), Endpoint.cs (3). | +3.8 pts | Medium | Explicit Debt |
| Keep singletons stateless or back their state with thread-safe types (Concurrent*/Immutable*); otherwise concurrent callers race. | +3.4 pts | Medium | Stateful singletons |
File quality
| File | Score | Band | Worst signal |
|---|---|---|---|
| src/NServiceBus.Core/Recoverability/DefaultRecoverabilityPolicy.cs | 5.8 | Mixed | Explicit Debt: EmptyCatchBlock |
| src/NServiceBus.Core/obsoletes-v10.cs | 6.4 | Near-clean | Explicit Debt: ObsoleteWithCallers |
| src/NServiceBus.Core/EndpointConfiguration.cs | 6.6 | Near-clean | Explicit Debt: BareSuppressMessage |
| src/NServiceBus.Core/EndpointCreator.cs | 6.6 | Near-clean | Explicit Debt: BareSuppressMessage |
| src/NServiceBus.Core/Features/Feature.cs | 6.7 | Near-clean | Explicit Debt: ObsoleteWithCallers |
| src/NServiceBus.Core/Endpoint.cs | 6.9 | Near-clean | Explicit Debt: ObsoleteWithCallers |
| src/NServiceBus.Core/IStartableEndpointWithExternallyManagedContainer.cs | 6.9 | Near-clean | Explicit Debt: ObsoleteWithCallers |
| src/NServiceBus.Core/Logging/DefaultFactory.cs | 6.9 | Near-clean | Explicit Debt: ObsoleteWithCallers |
| src/NServiceBus.Core/Pipeline/Incoming/IncomingPipelineMetrics.cs | 7.0 | Near-clean | Code Duplication: Duplicated block (14 lines × 3) |
| src/NServiceBus.Testing.Fakes/TestableMessageSession.cs | 7.0 | Near-clean | Code Duplication: Duplicated block (10 lines × 2) |
| src/NServiceBus.Core.Analyzer/Sagas/SagaAnalyzer.cs | 7.1 | Near-clean | Cyclomatic Complexity: SagaAnalyzer.AnalyzeSagaClass (cyclomatic 39) |
| src/NServiceBus.Core.Tests/MessageMapper/MessageMapperTests.cs | 7.1 | Near-clean | Test Quality: No assertions: Initialize_ShouldBeThreadsafe |
| src/NServiceBus.Core.Analyzer/Handlers/HandlerAttributeAnalyzer.cs | 7.1 | Near-clean | Cyclomatic Complexity: HandlerAttributeAnalyzer.Initialize (cyclomatic 63) |
| src/NServiceBus.Core/Serializers/XML/XmlDeserialization.cs | 7.1 | Near-clean | Cyclomatic Complexity: XmlDeserialization.GetPropertyValue (cyclomatic 60) |
| src/NServiceBus.Core.Analyzer.Fixes/Handlers/HandlerAttributeFixer.cs | 7.2 | Near-clean | Cyclomatic Complexity: HandlerAttributeFixer.MoveHandlerAttribute (cyclomatic 27) |
| src/NServiceBus.Core.Analyzer.Fixes/Sagas/RewriteConfigureHowToFindSagaFixer.cs | 7.3 | Near-clean | Explicit Debt: TodoComment |
| src/NServiceBus.Core.Tests/Serializers/XML/XmlSerializerCacheTests.cs | 7.3 | Near-clean | Explicit Debt: BarePragmaDisable |
| src/NServiceBus.Core/IStartableEndpoint.cs | 7.3 | Near-clean | Explicit Debt: ObsoleteWithCallers |
| src/NServiceBus.Core/IEndpointInstance.cs | 7.3 | Near-clean | Explicit Debt: ObsoleteWithCallers |
| src/NServiceBus.Core/Installation/Installer.cs | 7.3 | Near-clean | Explicit Debt: ObsoleteWithCallers |
Methodology & how to trust this report
Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 48 of 51 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 3 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.7 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
What we checked — 51 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, 249 of 268 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, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — 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 |
| jscpd | Code duplication | — | ✓ deterministic |
| Coverage (coverlet / dotnet-coverage) | Line & branch coverage | 10.0.301 | ✓ deterministic |
| NuGet / dotnet | Outdated, vulnerable & deprecated dependencies | 10.0.301 | ✓ deterministic |
| git / LibGit2Sharp | Churn hotspots, knowledge concentration, history | 2.43.0 · 0.31.0 | ✓ deterministic |
| gitleaks · semgrep · trivy · checkov | Secrets in history, SAST, CVEs, IaC & container, PII / GDPR | 1.86.0 · 0.69.3 | ✓ deterministic |
| LLM (sampled · advisory) | Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurement | Local LLM | ◐ LLM · sampled · advisory |
Run transparency — what happened this run
- D24 Comment Value — LLM provider failed — The model provider returned an unusable result, so this LLM-assisted dimension fell back to a measurement gap (confidence 0) rather than a penalty. Re-run with a reachable provider to score it.
- D30 Dependency Vulnerabilities — scanner not present in this environment — The backing tool was not installed where this scan ran, so this dimension was not scored. Install the tool (or run in the hosted environment, where it is always present) for a graded result.
- D31 IaC & Container Security — scanner not present in this environment — The backing tool was not installed where this scan ran, so this dimension was not scored. Install the tool (or run in the hosted environment, where it is always present) for a graded result.
- D32 Data Compliance (PII/GDPR) — scanner not present in this environment — The backing tool was not installed where this scan ran, so this dimension was not scored. Install the tool (or run in the hosted environment, where it is always present) for a graded result.
- D33 JS/npm Dependency Vulnerabilities — scanner not present in this environment — The backing tool was not installed where this scan ran, so this dimension was not scored. Install the tool (or run in the hosted environment, where it is always present) for a graded result.
- D38 OSV Dependency Vulnerabilities — scanner not present in this environment — The backing tool was not installed where this scan ran, so this dimension was not scored. Install the tool (or run in the hosted environment, where it is always present) for a graded result.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
- 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 (jscpd) — it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (EF migration scaffolds, *.Designer.cs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only; the generated footprint is reported separately under Solution Shape.
- 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 — Watchdog runs 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.
- D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
- D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
- D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
- D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
- D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
- D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (EF migrations, designer files, snapshots) is excluded — it is never the team's dead code to delete.
- D18 Solution Shape: Build integrity reflects whether the solution compiled in this environment — a build that needs a private feed, a specific SDK, or a generated file absent from the repo can read as broken when it is merely unreproducible here.
- D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement.
- D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
- 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").
- 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.
- 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: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
- P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
The LLM boundary
Dimensions
D1 · Cyclomatic Complexity
16 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was HandlerAttributeAnalyzer.Initialize at 63.
What to do
- Resolve the 1 HandlerAttributeAnalyzer.Initialize (cyclomatic 63) finding(s) in Cyclomatic Complexity — start with HandlerAttributeAnalyzer.cs. — One of this dimension's main actionable groups (1 warning-level).
- Resolve the 1 XmlDeserialization.GetPropertyValue (cyclomatic 60) finding(s) in Cyclomatic Complexity — start with XmlDeserialization.cs. — One of this dimension's main actionable groups (1 warning-level).
- Resolve the 1 SagaAnalyzer.AnalyzeSagaClass (cyclomatic 39) finding(s) in Cyclomatic Complexity — start with SagaAnalyzer.cs. — One of this dimension's main actionable groups (1 warning-level).
- Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
D2 · Cognitive Complexity
33 method(s) exceeded the cognitive complexity threshold of 15; the worst was XmlDeserialization.GetPropertyValue at 131.
What to do
- Resolve the 1 XmlDeserialization.GetPropertyValue (cognitive 131) finding(s) in Cognitive Complexity — start with XmlDeserialization.cs. — One of this dimension's main actionable groups (1 warning-level).
- Resolve the 1 HandlerAttributeAnalyzer.Initialize (cognitive 126) finding(s) in Cognitive Complexity — start with HandlerAttributeAnalyzer.cs. — One of this dimension's main actionable groups (1 warning-level).
- Resolve the 1 SagaAnalyzer.AnalyzeSagaClass (cognitive 88) finding(s) in Cognitive Complexity — start with SagaAnalyzer.cs. — One of this dimension's main actionable groups (1 warning-level).
- 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
23 duplicated block group(s) detected.
D5 · Coupling
11 projects, 0 dependency cycle(s), 0 unstable depended-on project(s).
What to do
- Resolve the 3 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (3 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)
4 of 166 classes have LCOM4 above 3.
D9 · Test Distribution
2023 test methods: 2023 unit, 0 integration, 0 BDD, 0 e2e.
D10 · Test Quality
6 skipped (4 with a documented reason), 24 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 1853 tests.
D11 · Test Reliability
0 flaky across 1 measured tier(s). unit: measured (0 flaky); other: not included — too large to re-run within its budget.
D12 · Dependency Hygiene
0 outdated, 0 vulnerable, 0 deprecated packages.
D13 · Secret Scanning
Secret scan ran and found no leaked secrets.
D14 · License Compliance
0 of 13 packages use a banned license.
D15 · Churn × Complexity Hotspots
Top hotspots: src/NServiceBus.Core/Serializers/XML/XmlDeserialization.cs (2×60=120); src/NServiceBus.Core.Analyzer/Handlers/HandlerAttributeAnalyzer.cs (1×63=63); src/NServiceBus.Core.Analyzer/Handlers/ConventionBasedHandlerHelper.cs (2×17=34)
D16 · Bus Factor
99 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is src/NServiceBus.Core.Analyzer/ForwardCancellationTokenAnalyzer.cs.
What to do
- Resolve the 3 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (3 recommendation-level).
- Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
D17 · Explicit Debt
133 deducted debt markers + 0 dead symbols across 41123 LoC (1.4/KLoC) → score 7.1.
What to do
- Resolve the 97 ObsoleteWithCallers finding(s) in Explicit Debt — start with obsoletes-v10.cs (69), DefaultFactory.cs (3), Endpoint.cs (3). — One of this dimension's main actionable groups (97 warning-level).
- Resolve the 1 EmptyCatchBlock finding(s) in Explicit Debt — start with DefaultRecoverabilityPolicy.cs. — One of this dimension's main actionable groups (1 issue-level).
- Resolve the 15 BarePragmaDisable finding(s) in Explicit Debt — start with XmlSerializerCacheTests.cs (2), LoadHandlersConnector.cs, MeterTests.cs. — One of this dimension's main actionable groups (15 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
11 projects, 1807 .cs files, 107726 hand-written lines of code (41123 production / 66603 test), 13 inter-project edges (build status unknown — did not finish).
D19 · Documentation Quality
The README for NServiceBus is clear and comprehensive: it describes the platform's value proposition, links to a quick start, explains how to install templates, lists NuGet packages, and notes support channels. It also begins a Guidelines section referencing coding guidelines, but no further documentation exists in the visible portion of the file (the clip marker ends the body). A separate architecture/usage doc would strengthen the README.
What to do
- Resolve the 3 Low XML-doc coverage finding(s) in Documentation Quality — start with NServiceBus.Core.Analyzer.Fixes.csproj, NServiceBus.Core.Analyzer.csproj, NServiceBus.Core.csproj. — One of this dimension's main actionable groups (3 warning-level).
- Resolve the 1 The Getting started section links to two tutorials and one NuGet package… finding(s) in Documentation Quality — start with README.md. — One of this dimension's main actionable groups (1 recommendation-level).
D21 · Naming Consistency
0 naming inconsistencies across 200 sampled symbols.
D26 · Project Cohesion
4 of 11 projects flagged as possibly oversized/incoherent.
What to do
- Resolve the 1 Split NServiceBus.Core finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
D27 · Navigability
68 % of calls cross a namespace and 9 % go through an interface, but 49 % of collaborators are co-located — so following a call takes several hops. Baseline: medium — clean/modular boundaries expected.
What to do
- Resolve the 1 Scattered collaborators finding(s) in Navigability. — One of this dimension's main actionable groups (1 recommendation-level).
D28 · Secrets (history)
gitleaks scanned the full history AND the current working tree and found no secrets.
D29 · Static Analysis (SAST)
semgrep found no security issues.
D35 · Change Coupling
No strong hidden change-coupling between production files.
D36 · Supply-chain Provenance & Signing
0/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).
What to do
- Resolve the 1 Unpinned build actions finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
- Resolve the 1 No build provenance finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
- Resolve the 1 No artifact signing finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
D37 · Vulnerability-disclosure Policy
A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.
Frontend & cross-cutting dimensions
AX1 · Captive dependencies
AX10 · Code composition
What to do
- The domain core is a small share of production code — check that business logic isn't leaking into the application/infrastructure layers (a thin domain is the anemic-domain smell).
AX2 · Stateful singletons
- `MessageHandlerRegistry` is a singleton (one shared instance) but mutates instance state outside any lock (deduplicationSet, messageHandlerFactories; e.g. `deduplicationSet` at line 122). — MessageHandlerRegistry.cs:19
- `MessageMetadataRegistry` is a singleton (one shared instance) but mutates instance state outside any lock (isMessageType, allowDynamicTypeLoading, preRegisteredMessagesWithHierarchy, preRegisteredMessageTypes, initialized; e.g. `isMessageType` at line 36). — obsoletes-v10.cs:614
What to do
- Keep singletons stateless or back their state with thread-safe types (Concurrent*/Immutable*); otherwise concurrent callers race.
AX3 · Project dependency cycles
AX5 · Architecture & structure
AX6 · Interface segregation
- `IRecoverabilityActionContext` declares 22 members. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — IRecoverabilityActionContext.cs:13
- `IRecoverabilityContext` declares 28 members. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — IRecoverabilityContext.cs:13
- `ILog` declares 25 members. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — ILog.cs:10
What to do
- Split fat interfaces into focused role-interfaces so clients depend only on what they use.
AX7 · Slice cohesion
- `DefaultTestingLoggerFactory` (slice 'NServiceBus.Testing.Fakes') depends on `LogLevel` from slice 'NServiceBus'. — DefaultTestingLoggerFactory.cs:7
- `TestableAuditContext` (slice 'NServiceBus.Testing.Fakes') depends on `OutgoingMessage` from slice 'NServiceBus'. — TestableAuditContext.cs:12
- `TestableBehaviorContext` (slice 'NServiceBus.Testing.Fakes') depends on `ContextBag` from slice 'NServiceBus'. — TestableBehaviorContext.cs:13
- `TestableIncomingLogicalMessageContext` (slice 'NServiceBus.Testing.Fakes') depends on `LogicalMessage` from slice 'NServiceBus'. — TestableIncomingLogicalMessageContext.cs:10
- `TestableIncomingPhysicalMessageContext` (slice 'NServiceBus.Testing.Fakes') depends on `IncomingMessage` from slice 'NServiceBus'. — TestableIncomingPhysicalMessageContext.cs:10
- `TestableInvokeHandlerContext` (slice 'NServiceBus.Testing.Fakes') depends on `ISynchronizedStorageSession` from slice 'NServiceBus'. — TestableInvokeHandlerContext.cs:13
- `TestableMessageSession` (slice 'NServiceBus.Testing.Fakes') depends on `ContextBag` from slice 'NServiceBus'. — TestableMessageSession.cs:13
- `TestableOutgoingLogicalMessageContext` (slice 'NServiceBus.Testing.Fakes') depends on `OutgoingLogicalMessage` from slice 'NServiceBus'. — TestableOutgoingLogicalMessageContext.cs:10
- `TestableOutgoingPublishContext` (slice 'NServiceBus.Testing.Fakes') depends on `OutgoingLogicalMessage` from slice 'NServiceBus'. — TestableOutgoingPublishContext.cs:8
- `TestableOutgoingReplyContext` (slice 'NServiceBus.Testing.Fakes') depends on `OutgoingLogicalMessage` from slice 'NServiceBus'. — TestableOutgoingReplyContext.cs:8
- `TestableOutgoingSendContext` (slice 'NServiceBus.Testing.Fakes') depends on `OutgoingLogicalMessage` from slice 'NServiceBus'. — TestableOutgoingSendContext.cs:8
- `TestablePipelineContext` (slice 'NServiceBus.Testing.Fakes') depends on `ContextBag` from slice 'NServiceBus'. — TestablePipelineContext.cs:14
- `TestableRecoverabilityContext` (slice 'NServiceBus.Testing.Fakes') depends on `IncomingMessage` from slice 'NServiceBus'. — TestableRecoverabilityContext.cs:11
- `TestableRoutingContext` (slice 'NServiceBus.Testing.Fakes') depends on `OutgoingMessage` from slice 'NServiceBus'. — TestableRoutingContext.cs:12
- `TestableTransportReceiveContext` (slice 'NServiceBus.Testing.Fakes') depends on `IncomingMessage` from slice 'NServiceBus'. — TestableTransportReceiveContext.cs:10
What to do
- Keep slices independent: share cross-slice needs via an explicit contract/shared-kernel, not direct references between slices.
AX8 · Test isolation
GD1 · Unfinished & placeholder code
- A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface. (×25) — HostStartupDiagnosticsWriter.cs:110, obsoletes-v10.cs:30, obsoletes-v10.cs:40, …
What to do
- Finish or delete NotImplementedException stubs and replace placeholder literals before shipping.
IC1 · Incompleteness & stubs
- `Create` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — Feature.cs:234
- `StartedAsync` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — EndpointHostedService.cs:18
- `StoppingAsync` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. (×2) — EndpointHostedService.cs:20, InstallerCoordinatorHostedService.cs:24
- `StoppedAsync` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. (×2) — EndpointHostedService.cs:22, InstallerCoordinatorHostedService.cs:25
- `InstallerCoordinatorHostedService` has 5 unfinished members out of 6 — a scaffolded type that was never implemented. — InstallerCoordinatorHostedService.cs:9
- `StartingAsync` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — InstallerCoordinatorHostedService.cs:11
- `StartAsync` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — InstallerCoordinatorHostedService.cs:22
- `StopAsync` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — InstallerCoordinatorHostedService.cs:23
- `Read` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — HostStartupDiagnosticsWriter.cs:110
- `Open` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — LearningSynchronizedStorageSession.cs:54
- `CreateInvokerNode` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — IBehavior.cs:47
- `CompletedRoot` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — PipelineInvoker.cs:27
- `OnStop` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — AutoSubscribe.cs:100
- `Commit` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — NoTransaction.cs:28
- `BasePath` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — obsoletes-v10.cs:25
- `IsDataBusProperty` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — obsoletes-v10.cs:35
- `DefiningDataBusPropertiesAs` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — obsoletes-v10.cs:45
- `SetValue` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — obsoletes-v10.cs:105
- `GetValue` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — obsoletes-v10.cs:112
- `ProvidedByFeature` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — obsoletes-v10.cs:127
- `Serialize` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — obsoletes-v10.cs:185
- `Deserialize` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — obsoletes-v10.cs:192
- `UseDataBus` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. (×3) — obsoletes-v10.cs:214, obsoletes-v10.cs:223, obsoletes-v10.cs:231
- `UsePersistence` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — obsoletes-v10.cs:241
- `EnableFeature` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — obsoletes-v10.cs:268
- `DisableFeature` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — obsoletes-v10.cs:273
What to do
- Finish or delete the unfinished stubs (NotImplementedException / empty / constant-returning bodies) — they are dead surface that looks live.
- Clear the softer debt: remove commented-out code and dead branches, re-enable or delete skipped tests, and replace blanket warning suppressions with targeted ones.
M1 · Documentation (README)
- 843 code files changed in the last 6 months but the README was not touched — it may no longer reflect the system.
What to do
- Add a 'Testing' section to the root README — how to run the test suite.
- Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
- Add a README to the 11 of 11 project(s) that lack one — worth up to 2 pts.
- Review the README against recent changes; refresh the parts that drifted.
M3 · Folder & project structure
- Test projects aren't grouped under a tests/ folder — the test surface isn't separable from production code at a glance.
What to do
- Group test projects under tests/ (or test/, spec/) so the test surface is discoverable and CI can scope it.
M4 · Documentation accuracy
- README advertises Docker containerisation, but no Dockerfile/compose file exists
What to do
- Reconcile the README with reality: README advertises Docker containerisation, but no Dockerfile/compose file exists.
P1 · CI/CD gates
P10 · Library API & versioning
P2 · Observability
- Only 2/4 service-like projects use logging (pure contract/DTO projects are excluded — they have nothing to log).
What to do
- Extend structured logging to the remaining service-like projects so the whole executable surface is diagnosable in production.
- Add a health-check endpoint (AddHealthChecks/MapHealthChecks) so orchestrators and load balancers can probe liveness/readiness.
P3 · Security & performance tooling
What to do
- Enable Dependabot/Renovate or a dependency-review gate.
- Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback
- Deployment automation exists but no readiness/liveness probes, rolling-update strategy, lifecycle hooks or migration job were evidenced — a bad release is harder to detect and reverse.
What to do
- Add readiness/liveness probes and a rolling-update (or blue/green) strategy so a bad release is caught and rolled back automatically.
- Add an approval/environment gate (required reviewers / protection rules) before production promotion.
PF1 · Benchmark discipline
- No BenchmarkDotNet suite was found. For a performance-sensitive library, a benchmark guards against silent regressions — but it's a bonus here, not a deduction.
What to do
- Add a BenchmarkDotNet project for the hot paths (with [MemoryDiagnoser] to track allocations), and run it in CI to catch regressions.
PF2 · Allocation hygiene
What to do
- Raise allocation-aware density on the hot paths — currently 179 use(s) across 41,955 production line(s) (~4.3/1k). More Span/Memory, pooling (ArrayPool/ObjectPool), stackalloc and ValueTask on the allocation-heavy paths climbs this toward 10.
PF3 · Async & latency hygiene
X1 · Async correctness
X2 · Cancellation propagation
- Only 101/128 async methods accept a CancellationToken, so requests can't be cancelled cleanly under load or on client disconnect. In Blazor Server circuits and other short-write hosts, omitting it can be an accepted convention — judge against your hosting model.
- No CancellationToken parameter — work can't be cancelled cleanly on disconnect/shutdown. (×25) — InvokeAuditPipelineBehavior.cs:19, EndpointInstanceExtensions.cs:26, BaseEndpointLifecycle.cs:103, …
What to do
- Thread a CancellationToken through async methods so work stops promptly on cancellation.
X3 · Exception handling
- An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. — DefaultRecoverabilityPolicy.cs:94
What to do
- Swallowed exception (empty catch)
X4 · Structured logging
X5 · Nullable reference types
- 0/2 projects enable <Nullable>enable</Nullable>. NRTs catch a whole class of null-deref bugs at compile time.
- ~0.5 `!` suppressions per 1k syntax nodes — each one tells the compiler to trust you about null, suppressing the very safety NRTs provide.
What to do
- Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.
Reference — by lens
| Lens | Score | Rating | Impact |
|---|---|---|---|
| Code Health | 58% | Adequate — gated by X5 | Capped at Fair by a Critical contributor — resolve it before relying on this lens. |
| Architecture | 60% | Adequate — gated by D26, AX7 | Capped at Fair by a Critical contributor — resolve it before relying on this lens. |
| Maturity | 70% | Strong | Solid. |
| Readiness | 69% | Strong | Solid. |
| Security | 75% | Adequate — gated by D36 | Capped at Fair by a Critical contributor — resolve it before relying on this lens. |
| Performance | 76% | Strong | Strongest area. |
Not included — 44 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 vertical-slice architecture (the inward-dependency rule is for layered/clean styles)
- AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
- AXB2 Runtime readiness — no data
- C1 Data Protection — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
- C2 Access Controls — This is a dotnet-new template — authorization is deferred to the application you build from it. Add [Authorize]/policies (or imperative guards) when you wire up real users; until then there are no real endpoints to protect.
- C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
- C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
- C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
- D20 ADR Quality — N/A — this repo declares itself a template / kata / sample / demo; a formal ADR log is deferred to a real application built from it.
- D22 Internal API Consistency — No exposed public API
- D23 Boundary Type-Coupling — Bounded contexts not declared
- D24 Comment Value — LLM evaluation failed
- D25 ADR Conformance — no ADRs to check
- D30 Dependency Vulnerabilities — the solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan for NuGet CVEs — excluded rather than scored; re-run on an SDK that can restore this solution
- D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Terraform, Kubernetes/Helm, CloudFormation); nothing to scan.
- D32 Data Compliance (PII/GDPR) — No PII/GDPR-handling patterns detected (p/gdpr ruleset) — no data-compliance surface to assess.
- D33 JS/npm Dependency Vulnerabilities — No JS/npm manifest or lockfile found outside bin/obj (package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb); no JS dependencies to scan.
- D34 Knowledge Freshness — knowledge concentrated in recent work — freshness signal contradicted by repo activity
- D38 OSV Dependency Vulnerabilities — No JS/npm lockfile found outside bin/obj (package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb); nothing for OSV to scan.
- D39 IL Efficiency — The target did not build, so no IL was available to measure.
- D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
- D8 Code Coverage — Coverage not measured — test suite did not build
- DM1 Domain Modelling — not run — only 1/3 markers (10 value object(s))
- ED1 Event-Driven — not run — only 1/3 markers (a message-bus package)
- ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
- ES1 Event Sourcing — not run — 0/3 markers found
- M2 Architecture documentation — This repo declares itself a template / kata / sample / demo — formal architecture documentation (ADRs, C4 diagrams) is deferred to a real application built from it, so its absence is not a defect here.
- P12 CI test-gate honesty — no data
- 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
- P7 Outbound HTTP resilience — no outbound HTTP usage detected
- P8 Schema migrations — no EF Core usage detected
- P9 Domain vs controller coverage — no coverage report found on disk — run tests with `--collect:"XPlat Code Coverage"` (or in CI) to enable this cross-layer check
- S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
- SC1 Supply-chain hygiene — no data
- X6 Hand-rolled structured-format parsing — no data
- X7 Silent fallback defaults — no data
Appendix A — Findings (grouped)
Issue — 1 finding(s)
- EmptyCatchBlock src/NServiceBus.Core/Recoverability/DefaultRecoverabilityPolicy.cs:94
Warning — 248 finding(s)
- ObsoleteWithCallers src/NServiceBus.Core/Endpoint.cs:16
- ObsoleteWithCallers src/NServiceBus.Core/Endpoint.cs:29
- ObsoleteWithCallers src/NServiceBus.Core/EndpointWithExternallyManagedContainer.cs:21
- ObsoleteWithCallers src/NServiceBus.Core/obsoletes-v10.cs:588
- ObsoleteWithCallers src/NServiceBus.Core/obsoletes-v10.cs:592
- ObsoleteWithCallers src/NServiceBus.Core/Endpoint.cs:57
- ObsoleteWithCallers src/NServiceBus.Core/IStartableEndpoint.cs:25
- ObsoleteWithCallers src/NServiceBus.Core/IStartableEndpointWithExternallyManagedContainer.cs:27
- ObsoleteWithCallers src/NServiceBus.Core/obsoletes-v10.cs:419
- ObsoleteWithCallers src/NServiceBus.Core/EndpointConfiguration.cs:99
- ObsoleteWithCallers src/NServiceBus.Core/EndpointInstanceExtensions.cs:26
- ObsoleteWithCallers src/NServiceBus.Core/IEndpointInstance.cs:24
- ObsoleteWithCallers src/NServiceBus.Core/Features/Feature.cs:83
- ObsoleteWithCallers src/NServiceBus.Core/IEndpointInstance.cs:13
- ObsoleteWithCallers src/NServiceBus.Core/IStartableEndpoint.cs:13
- ObsoleteWithCallers src/NServiceBus.Core/IStartableEndpointWithExternallyManagedContainer.cs:13
- ObsoleteWithCallers src/NServiceBus.Core/IStartableEndpointWithExternallyManagedContainer.cs:39
- ObsoleteWithCallers src/NServiceBus.Core/IWantToRunBeforeConfigurationIsFinalized.cs:13
- ObsoleteWithCallers src/NServiceBus.Core/Installation/Installer.cs:26
- ObsoleteWithCallers src/NServiceBus.Core/Installation/Installer.cs:54
- ObsoleteWithCallers src/NServiceBus.Core/Logging/DefaultFactory.cs:13
- ObsoleteWithCallers src/NServiceBus.Core/Logging/DefaultFactory.cs:51
- ObsoleteWithCallers src/NServiceBus.Core/Logging/DefaultFactory.cs:61
- ObsoleteWithCallers src/NServiceBus.Core/Logging/LogManager.cs:28
- ObsoleteWithCallers src/NServiceBus.Core/Logging/LogManager.cs:52
- No assertions: Should_allow_sending_events src/NServiceBus.AcceptanceTests/Core/BestPractices/When_sending_events_bestpractices_disabled_on_endpoint.cs:11
- No assertions: Should_pass_it_to_the_transport src/NServiceBus.AcceptanceTests/Core/FakeTransport/ProcessingOptimizations/When_using_concurrency_limit.cs:15
- No assertions: ReceiveFeature_should_work_without_ISynchronizedStorage src/NServiceBus.AcceptanceTests/Core/Persistence/When_a_persistence_does_not_provide_synchronized_storage_session.cs:18
- No assertions: Should_throttle_pipeline_after_configured_number_of_consecutive_failures src/NServiceBus.AcceptanceTests/Core/Recoverability/When_messages_never_succeed.cs:15
- No assertions: Should_not_throttle_pipeline_if_number_of_consecutive_failures_is_below_threshold src/NServiceBus.AcceptanceTests/Core/Recoverability/When_messages_never_succeed.cs:34
- No assertions: Should_wait_the_configured_delay_between_processing_attempts_in_throttled_mode src/NServiceBus.AcceptanceTests/Core/Recoverability/When_messages_never_succeed_with_delays_specified.cs:11
- No assertions: Should_end_throttling_mode_after_a_single_successful_message src/NServiceBus.AcceptanceTests/Core/Recoverability/When_messages_succeed_after_throttling.cs:11
- No assertions: Should_hydrate_and_invoke_the_existing_instance src/NServiceBus.AcceptanceTests/Sagas/When_saga_has_a_non_empty_constructor.cs:11
- No assertions: Should_handle_message src/NServiceBus.AcceptanceTests/Serialization/When_no_content_type.cs:11
- No assertions: Dll_with_message_handlers_gets_loaded src/NServiceBus.Core.Tests/AssemblyScanner/When_directory_with_handler_dll_is_scanned.cs:10
- No assertions: ShouldAllowSettingMessageProperties src/NServiceBus.Core.Tests/Fakes/TestableMessageHandlerContextTests.cs:122
- No assertions: Initialize_ShouldBeThreadsafe src/NServiceBus.Core.Tests/MessageMapper/MessageMapperTests.cs:14
- No assertions: CreateInstance_WhenMessageInitialized_ShouldBeThreadsafe src/NServiceBus.Core.Tests/MessageMapper/MessageMapperTests.cs:30
- No assertions: Should_handle_messages_with_nullable_reference_types src/NServiceBus.Core.Tests/MessageMapper/MessageMapperTests.cs:51
- No assertions: CreateInstance_WhenMessageNotInitialized_ShouldBeThreadsafe src/NServiceBus.Core.Tests/MessageMapper/MessageMapperTests.cs:71
- No assertions: ShouldAllowMultipleMapperInstancesPerAppDomain src/NServiceBus.Core.Tests/MessageMapper/MessageMapperTests.cs:84
- No assertions: Should_create_instance_of_concrete_type_with_illegal_interface_property src/NServiceBus.Core.Tests/MessageMapper/MessageMapperTests.cs:96
- No assertions: Should_not_throw_for_simple_behavior src/NServiceBus.Core.Tests/Pipeline/BehaviorTypeCheckerTests.cs:13
- No assertions: Should_not_throw_for_behavior_using_context_interfaces src/NServiceBus.Core.Tests/Pipeline/BehaviorTypeCheckerTests.cs:19
- No assertions: Should_not_throw_for_closed_generic_behavior src/NServiceBus.Core.Tests/Pipeline/BehaviorTypeCheckerTests.cs:25
- No assertions: Comparison src/NServiceBus.Core.Tests/Serializers/XML/SerializerTests.cs:625
- No assertions: TestInterfaces src/NServiceBus.Core.Tests/Serializers/XML/SerializerTests.cs:632
- No assertions: TestDataContractSerializer src/NServiceBus.Core.Tests/Serializers/XML/SerializerTests.cs:767
- No assertions: RunNew src/NServiceBus.Core.Tests/Unicast/HandlerInvocationCache.cs:15
- BarePragmaDisable src/NServiceBus.AcceptanceTesting/Support/ScenarioRunner.cs:62
- BarePragmaDisable src/NServiceBus.Core.Tests/Pipeline/PipelineTests.cs:200
- BarePragmaDisable src/NServiceBus.Core/Pipeline/Incoming/LoadHandlersConnector.cs:63
- BarePragmaDisable src/NServiceBus.Core/Unicast/RunningEndpointInstance.cs:113
- BarePragmaDisable src/NServiceBus.AcceptanceTests/Core/LoggingIntegration/When_using_extensions_logging_bridge.cs:79
- BarePragmaDisable src/NServiceBus.AcceptanceTests/Registrations/Sagas/When_mixing_registered_and_scanned_sagas.cs:96
- BarePragmaDisable src/NServiceBus.Core.Analyzer.Tests.Roslyn5/Helpers/MockTrimmingAnalyzer.cs:15
- BarePragmaDisable src/NServiceBus.Core.Tests/OpenTelemetry/MeterTests.cs:24
- BarePragmaDisable src/NServiceBus.Core.Tests/Sagas/SagaMetadataCreationTests.cs:916
- BarePragmaDisable src/NServiceBus.Core.Tests/Sagas/SagaModelPartialProperty1Tests.cs:5
- BarePragmaDisable src/NServiceBus.Core.Tests/Sagas/SagaModelPartialProperty2Tests.cs:5
- BarePragmaDisable src/NServiceBus.Core.Tests/Serializers/XML/XmlSerializerCacheTests.cs:57
- BarePragmaDisable src/NServiceBus.Core.Tests/Serializers/XML/XmlSerializerCacheTests.cs:66
- BarePragmaDisable src/NServiceBus.Core.Tests/Utils/Reflection/MethodInfoExtensionTests.cs:64
- BarePragmaDisable src/NServiceBus.Core/Logging/RollingLoggerProvider.cs:67
- TodoComment src/NServiceBus.Core.Analyzer.Fixes/ForwardCancellationTokenFixer.cs:40
- TodoComment src/NServiceBus.Core.Analyzer.Fixes/Sagas/RewriteConfigureHowToFindSagaFixer.cs:107
- TodoComment src/NServiceBus.Core.Analyzer/TypeSymbolExtensions.cs:145
- TodoComment src/NServiceBus.Core.Tests/Recoverability/RecoverabilityExecutorTests.cs:67
- TodoComment src/NServiceBus.Core.Tests/ServicePlatform/Retries/RetryAcknowledgementBehaviorTests.cs:120
- TodoComment src/NServiceBus.Core.Tests/StandardsTests.cs:40
- TodoComment src/NServiceBus.Testing.Fakes/TestableBehaviorContext.cs:36
- TodoComment src/NServiceBus.Testing.Fakes/TestableIncomingContext.cs:36
- TodoComment src/NServiceBus.Testing.Fakes/TestableOutgoingContext.cs:29
- BareSuppressMessage src/NServiceBus.Core/EndpointConfiguration.cs:131
- BareSuppressMessage src/NServiceBus.Core/EndpointConfiguration.cs:179
- BareSuppressMessage src/NServiceBus.Core/EndpointConfiguration.cs:180
- BareSuppressMessage src/NServiceBus.Core/EndpointCreator.cs:61
- BareSuppressMessage src/NServiceBus.Core/EndpointCreator.cs:180
- BareSuppressMessage src/NServiceBus.Core/EndpointCreator.cs:183
- BareSuppressMessage src/NServiceBus.Core/EndpointCreator.cs:186
- Hotspot: src/NServiceBus.Core/Serializers/XML/XmlDeserialization.cs src/NServiceBus.Core/Serializers/XML/XmlDeserialization.cs
- Hotspot: src/NServiceBus.Core.Analyzer/Handlers/HandlerAttributeAnalyzer.cs src/NServiceBus.Core.Analyzer/Handlers/HandlerAttributeAnalyzer.cs
- Hotspot: src/NServiceBus.Core.Analyzer/Handlers/ConventionBasedHandlerHelper.cs src/NServiceBus.Core.Analyzer/Handlers/ConventionBasedHandlerHelper.cs
- Hotspot: src/NServiceBus.Core.Analyzer.Fixes/Handlers/HandlerAttributeFixer.cs src/NServiceBus.Core.Analyzer.Fixes/Handlers/HandlerAttributeFixer.cs
- Hotspot: src/NServiceBus.Core/Serializers/XML/XmlSerialization.cs src/NServiceBus.Core/Serializers/XML/XmlSerialization.cs
- Duplicated block (15 lines × 2) src/NServiceBus.Core/Pipeline/PipelineModelBuilder.cs:209
- Duplicated block (15 lines × 2) src/NServiceBus.Core.Analyzer.Fixes/Handlers/AddConventionBasedHandleMethodFixer.cs:31
- Duplicated block (15 lines × 2) src/NServiceBus.Core.Analyzer.Fixes/Handlers/HandlerAttributeFixer.cs:294
- Duplicated block (15 lines × 2) src/NServiceBus.Core.Analyzer/Handlers/HandlerAttributeAnalyzer.cs:88
- Low cohesion: IncomingPipelineMetrics (LCOM4 10) src/NServiceBus.Core/Pipeline/Incoming/IncomingPipelineMetrics.cs:12
- Low cohesion: Feature (LCOM4 6) src/NServiceBus.Core/Features/Feature.cs:15
- Low cohesion: SettingsHolder (LCOM4 6) src/NServiceBus.Core/Settings/SettingsHolder.cs:10
- Low cohesion: TestableMessageSession (LCOM4 4) src/NServiceBus.Testing.Fakes/TestableMessageSession.cs:13
- HackComment src/NServiceBus.AcceptanceTests/EndpointTemplates/ConfigureExtensions.cs:13
- HackComment src/NServiceBus.Core.Tests/Features/FeatureStartupTests.cs:285
- HackComment src/NServiceBus.Core/Recoverability/DefaultRecoverabilityPolicy.cs:91
- Low XML-doc coverage: NServiceBus.Core src/NServiceBus.Core/NServiceBus.Core.csproj
- Low XML-doc coverage: NServiceBus.Core.Analyzer.Fixes src/NServiceBus.Core.Analyzer.Fixes/NServiceBus.Core.Analyzer.Fixes.csproj
- Low XML-doc coverage: NServiceBus.Core.Analyzer src/NServiceBus.Core.Analyzer/NServiceBus.Core.Analyzer.csproj
- Off the main sequence: NServiceBus.Core.Analyzer.Fixes
- Off the main sequence: NServiceBus.Core.Analyzer
- Off the main sequence: NServiceBus.Core
- Skipped test: Should_for_our_code_exclude_everything_but_NServiceBus_by_default src/NServiceBus.Core.Tests/AssemblyScanner/When_scanning_assemblies.cs:21
- Skipped test: Class_abstract_with_methods_should_not_be_mapped src/NServiceBus.Core.Tests/MessageMapper/When_mapping_usinggenerics.cs:80
- Duplicated block (16 lines × 2) src/NServiceBus.Core/Conventions/Conventions.cs:139
- Duplicated block (16 lines × 2) src/NServiceBus.Core.Analyzer/Handlers/AddHandlerInterceptor.Suppressor.cs:19
- Duplicated block (12 lines × 2) src/NServiceBus.Core.Analyzer/Handlers/AddHandlerGenerator.cs:37
- Duplicated block (12 lines × 2) src/NServiceBus.Core.Analyzer/Handlers/HandlerAttributeAnalyzer.cs:193
- Duplicated block (9 lines × 2) src/NServiceBus.Core/Routing/MessageDrivenSubscriptions/MessageDrivenUnsubscribeTerminator.cs:36
- Duplicated block (9 lines × 2) src/NServiceBus.Core.Analyzer/Handlers/AddHandlerInterceptor.cs:22
- Duplicated block (7 lines × 2) src/NServiceBus.Core/Hosting/KeyedServices/KeyedServiceCollectionAdapter.cs:143
- Duplicated block (7 lines × 2) src/NServiceBus.Core.Analyzer.Fixes/Handlers/AddConventionBasedHandleMethodFixer.cs:53
- HandlerAttributeAnalyzer.Initialize (cyclomatic 63) src/NServiceBus.Core.Analyzer/Handlers/HandlerAttributeAnalyzer.cs:17
- XmlDeserialization.GetPropertyValue (cyclomatic 60) src/NServiceBus.Core/Serializers/XML/XmlDeserialization.cs:342
- SagaAnalyzer.AnalyzeSagaClass (cyclomatic 39) src/NServiceBus.Core.Analyzer/Sagas/SagaAnalyzer.cs:73
- SagaAttributeAnalyzer.Initialize (cyclomatic 29) src/NServiceBus.Core.Analyzer/Sagas/SagaAttributeAnalyzer.cs:16
- HandlerAttributeFixer.MoveHandlerAttribute (cyclomatic 27) src/NServiceBus.Core.Analyzer.Fixes/Handlers/HandlerAttributeFixer.cs:121
- XmlSerializerCache.InitTypeInternal (cyclomatic 26) src/NServiceBus.Core/Serializers/XML/XmlSerializerCache.cs:27
- XmlSerialization.WriteEntry (cyclomatic 24) src/NServiceBus.Core/Serializers/XML/XmlSerialization.cs:172
- SagaAnalyzer.TryAddSagaMappingsFromExpression (cyclomatic 22) src/NServiceBus.Core.Analyzer/Sagas/SagaAnalyzer.cs:625
- SagaAttributeFixer.MoveSagaAttribute (cyclomatic 21) src/NServiceBus.Core.Analyzer.Fixes/Sagas/SagaAttributeFixer.cs:113
- SagaPersistenceBehavior.Invoke (cyclomatic 20) src/NServiceBus.Core/Sagas/SagaPersistenceBehavior.cs:15
- ForwardCancellationTokenAnalyzer.HasSameParametersPlusCancellationToken (cyclomatic 19) src/NServiceBus.Core.Analyzer/ForwardCancellationTokenAnalyzer.cs:302
- PipelineModelBuilder.Build (cyclomatic 18) src/NServiceBus.Core/Pipeline/PipelineModelBuilder.cs:17
- DateTimeOffsetHelper.ToDateTimeOffset (cyclomatic 17) src/NServiceBus.Core/DateTimeOffsetHelper.cs:23
- ConventionBasedHandlerHelper.IsValidConventionBasedHandleMethod (cyclomatic 17) src/NServiceBus.Core.Analyzer/Handlers/ConventionBasedHandlerHelper.cs:65
- SagaAnalyzer.AnalyzeSagaDataClass (cyclomatic 17) src/NServiceBus.Core.Analyzer/Sagas/SagaAnalyzer.cs:289
- HandlerRegistryExtensionsAttributeAnalyzer.Initialize (cyclomatic 16) src/NServiceBus.Core.Analyzer/HandlerRegistryExtensionsAttributeAnalyzer.cs:30
- CommentedOutCode src/NServiceBus.Core.Analyzer.Fixes/Sagas/RewriteConfigureHowToFindSagaFixer.cs:151
- XmlDeserialization.GetPropertyValue (cognitive 131) src/NServiceBus.Core/Serializers/XML/XmlDeserialization.cs:342
- HandlerAttributeAnalyzer.Initialize (cognitive 126) src/NServiceBus.Core.Analyzer/Handlers/HandlerAttributeAnalyzer.cs:17
- SagaAnalyzer.AnalyzeSagaClass (cognitive 88) src/NServiceBus.Core.Analyzer/Sagas/SagaAnalyzer.cs:73
- SagaAttributeAnalyzer.Initialize (cognitive 50) src/NServiceBus.Core.Analyzer/Sagas/SagaAttributeAnalyzer.cs:16
- XmlSerializerCache.InitTypeInternal (cognitive 44) src/NServiceBus.Core/Serializers/XML/XmlSerializerCache.cs:27
- HandlerAttributeFixer.MoveHandlerAttribute (cognitive 44) src/NServiceBus.Core.Analyzer.Fixes/Handlers/HandlerAttributeFixer.cs:121
- XmlSerialization.WriteEntry (cognitive 43) src/NServiceBus.Core/Serializers/XML/XmlSerialization.cs:172
- SagaPersistenceBehavior.Invoke (cognitive 40) src/NServiceBus.Core/Sagas/SagaPersistenceBehavior.cs:15
- SagaAnalyzer.TryAddSagaMappingsFromExpression (cognitive 40) src/NServiceBus.Core.Analyzer/Sagas/SagaAnalyzer.cs:625
- Parser.GetRegistrationMethodNamePatterns (cognitive 38) src/NServiceBus.Core.Analyzer/AddHandlerAndSagasRegistrationGenerator.Parser.cs:147
- ConventionBasedHandlerHelper.CollectInterfaceHandleCallees (cognitive 37) src/NServiceBus.Core.Analyzer/Handlers/ConventionBasedHandlerHelper.cs:135
- SagaAttributeFixer.MoveSagaAttribute (cognitive 35) src/NServiceBus.Core.Analyzer.Fixes/Sagas/SagaAttributeFixer.cs:113
- PipelineModelBuilder.Build (cognitive 34) src/NServiceBus.Core/Pipeline/PipelineModelBuilder.cs:17
- KeyedServiceCollectionAdapter.EnsureKeyedDescriptor (cognitive 30) src/NServiceBus.Core/Hosting/KeyedServices/KeyedServiceCollectionAdapter.cs:134
- AssemblyScanner.GetScannableAssemblies (cognitive 28) src/NServiceBus.Core/Hosting/Helpers/AssemblyScanner.cs:73
- XmlSerializerCache.GetAllPropertiesForType (cognitive 28) src/NServiceBus.Core/Serializers/XML/XmlSerializerCache.cs:145
- DateTimeOffsetHelper.ToDateTimeOffset (cognitive 25) src/NServiceBus.Core/DateTimeOffsetHelper.cs:23
- SagaAnalyzer.AnalyzeSagaDataClass (cognitive 25) src/NServiceBus.Core.Analyzer/Sagas/SagaAnalyzer.cs:289
- HandlerRegistryExtensionsAttributeAnalyzer.Initialize (cognitive 23) src/NServiceBus.Core.Analyzer/HandlerRegistryExtensionsAttributeAnalyzer.cs:30
- XmlDeserialization.InferNodeType (cognitive 22) src/NServiceBus.Core/Serializers/XML/XmlDeserialization.cs:193
- MessageMetadataRegistry.GetMessageMetadata (cognitive 22) src/NServiceBus.Core/Unicast/Messages/MessageMetadataRegistry.cs:89
- ConventionBasedHandlerHelper.ImplementsHandlerInterfaceMember (cognitive 21) src/NServiceBus.Core.Analyzer/Handlers/ConventionBasedHandlerHelper.cs:208
- Conventions.IsMessageType (cognitive 20) src/NServiceBus.Core/Conventions/Conventions.cs:28
- MessageMapper.InnerInitialize (cognitive 20) src/NServiceBus.Core/MessageInterfaces/MessageMapper/Reflection/MessageMapper.cs:132
- EnvelopeUnwrapper.UnwrapEnvelope (cognitive 19) src/NServiceBus.Core/Envelopes/EnvelopeUnwrapper.cs:14
- XmlDeserialization.CacheDefaultNamespaceMessageBaseTypesAndPrefixes (cognitive 18) src/NServiceBus.Core/Serializers/XML/XmlDeserialization.cs:128
- DeserializeMessageConnector.Extract (cognitive 17) src/NServiceBus.Core/Pipeline/Incoming/DeserializeMessageConnector.cs:60
- WrappedMessageReceiver.RateLimitLoop (cognitive 17) src/NServiceBus.Core/Receiving/WrappedMessageReceiver.cs:96
- XmlDeserialization.GetObjectOfTypeFromNode (cognitive 17) src/NServiceBus.Core/Serializers/XML/XmlDeserialization.cs:274
- ActivityFactory.StartIncomingPipelineActivity (cognitive 16) src/NServiceBus.Core/OpenTelemetry/Tracing/ActivityFactory.cs:11
- MigrationSubscribeTerminator.Terminate (cognitive 16) src/NServiceBus.Core/Routing/SubscriptionMigrationMode/MigrationSubscribeTerminator.cs:31
- ForwardCancellationTokenAnalyzer.LooksLikeCancellationToken (cognitive 16) src/NServiceBus.Core.Analyzer/ForwardCancellationTokenAnalyzer.cs:152
- ForwardCancellationTokenAnalyzer.HasSameParametersPlusCancellationToken (cognitive 16) src/NServiceBus.Core.Analyzer/ForwardCancellationTokenAnalyzer.cs:302
- LLM evaluation failed
- Unpinned build actions
- Duplicated block (118 lines × 2) src/NServiceBus.Core.Analyzer.Fixes/Handlers/HandlerAttributeFixer.cs:144
- Duplicated block (25 lines × 2) src/NServiceBus.Core.Analyzer.Fixes/Handlers/AddConventionBasedHandleMethodFixer.cs:84
- Duplicated block (21 lines × 2) src/NServiceBus.Core.Analyzer/Sagas/Sagas.Parser.cs:177
- Duplicated block (18 lines × 2) src/NServiceBus.Core/Routing/NativeSubscribeTerminator.cs:20
- Duplicated block (17 lines × 3) src/NServiceBus.Core/DateTimeOffsetHelper.cs:49
- Duplicated block (17 lines × 2) src/NServiceBus.Core/Transports/Learning/DirectoryBasedTransaction.cs:119
- Duplicated block (14 lines × 3) src/NServiceBus.Core/Pipeline/Incoming/IncomingPipelineMetrics.cs:191
- Duplicated block (14 lines × 2) src/NServiceBus.Core.Analyzer/Handlers/HandlerAttributeAnalyzer.cs:213
- Duplicated block (13 lines × 2) src/NServiceBus.Core.Analyzer/AddHandlerAndSagasRegistrationGenerator.Emitter.cs:149
- Duplicated block (11 lines × 2) src/NServiceBus.Core/Sagas/HeaderPropertySagaFinder.cs:44
- Duplicated block (10 lines × 2) src/NServiceBus.Testing.Fakes/TestableMessageSession.cs:95
- Coverage not measured — test suite did not build
Recommendation — 12 finding(s)
- Off-boarding risk: anonymized user #1
- Off-boarding risk: anonymized user #2
- Off-boarding risk: anonymized user #3
- Further sole-owners (lower concentration)
- The Getting started section links to two tutorials and one NuGet package for templates but does not mention how to install NServiceBus via nuget or dotnet new. README.md
- Bounded contexts not declared
- Split NServiceBus.Core
- Scattered collaborators
- knowledge concentrated in recent work — freshness signal contradicted by repo activity
- No build provenance
- No artifact signing
- No SBOM
Info — 7 finding(s)
- Skipped (documented): Should_deserialize_arrayList src/NServiceBus.Core.Tests/Serializers/XML/SerializerTests.cs:183
- Skipped (documented): Should_deserialize_hashtable src/NServiceBus.Core.Tests/Serializers/XML/SerializerTests.cs:198
- Skipped (documented): System_classes_with_non_default_constructors_should_be_supported src/NServiceBus.Core.Tests/Serializers/XML/SerializerTests.cs:1140
- Skipped (documented): Messages_with_polymorphic_properties_should_be_supported src/NServiceBus.Core.Tests/Serializers/XML/SerializerTests.cs:1162
- Build status unknown
- XML-doc coverage: NServiceBus.Testing.Fakes src/NServiceBus.Testing.Fakes/NServiceBus.Testing.Fakes.csproj
- No exposed public API
Appendix B — Reproduction & audit trail
| Dimension | Tool | Version | Command | Findings | Raw output |
|---|---|---|---|---|---|
| D28 · Secrets (history) | gitleaks | — | gitleaks detect --no-banner --report-format json --report-path /dev/stdout --exit-code 0 --source . | 0 | artifacts/raw/gitleaks-history.json |
| D29 · Static Analysis (SAST) | semgrep | — | semgrep --config auto --json --quiet --timeout 0 --metrics off . | 0 | — |
| D30 · Dependency Vulnerabilities | dotnet | — | dotnet: not applicable — the solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan for NuGet CVEs — excluded rather than scored; re-run on an SDK that can restore this solution | 0 | — |
| D31 · IaC & Container Security | trivy | — | trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Terraform, Kubernetes/Helm, CloudFormation); nothing to scan. | 0 | — |
| D32 · Data Compliance (PII/GDPR) | semgrep | — | semgrep: not applicable — No PII/GDPR-handling patterns detected (p/gdpr ruleset) — no data-compliance surface to assess. | 0 | — |
| D33 · JS/npm Dependency Vulnerabilities | trivy | — | trivy: not applicable — No JS/npm manifest or lockfile found outside bin/obj (package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb); no JS dependencies to scan. | 0 | — |
| D38 · OSV Dependency Vulnerabilities | osv-scanner | — | osv-scanner: not applicable — No JS/npm lockfile found outside bin/obj (package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb); nothing for OSV to scan. | 0 | — |
Appendix C — Personal-data map
Name — 4 field(s)
- AssemblyIdentity.FullName src/NServiceBus.Core/Hosting/Helpers/AssemblyScanner.cs:423
- AssemblyDetails.FullName src/NServiceBus.Core/Hosting/Helpers/AssemblyScanningDiagnostics.cs:28
- PersistenceDefinition.FullName src/NServiceBus.Core/Persistence/PersistenceDefinition.cs:53
- ReceiveComponentManifestMessageType.FullName src/NServiceBus.Core/Receiving/ReceiveComponent.Configuration.cs:52