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

mehdihadeli/go-food-delivery-microservices

Measured 22 October 2026, 05:59 UTC, at code version 4a59535

Supply-chain provenance & signing is not measured: Supply-chain provenance is not scored (this pipeline releases no artifact), but its build steps or GitHub Actions workflows have integrity defects, or nothing watches its dependency set for published advisories.

CAI score 51out of 100 At risk Down 8 since the last survey

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

A medium codebase: 25,802 lines of product code in 4 projects, tests not counted · Estimated rebuild effort: about 0.5 person-years · Weakest lens: Maturity, 43

Findings by how serious they are

62 critical 180 serious 247 minor

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

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
22 October 2026, 05:59 UTC

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

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

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

64of 67 dimensions measured by tools. The other 3 are advisory notes from an AI model, which explain the code but don't count towards the score.
365of 489 findings point to an exact file and line, so you can open each one in the code. The other 124 concern the repository as a whole, such as missing documentation.
67dimensions across 8 lenses, read from 25,802 lines of product code in 4 projects.
Chapters

Executive summary

mehdihadeli/go-food-delivery-microservices scores 51 out of 100, but it is rated At risk while a critical security finding is open; the score itself is unchanged.

The weakest lens counts most in the score, and here that is Maturity, which scores 43 and is rated Weak. Its Knowledge Freshness dimension scores 0 out of 10, and until that reaches 4, Maturity can't be rated higher than Adequate. The first actions are to resolve the 1 No ADRs found finding(s) in ADR Quality and to resolve the 4 Deprecated module finding(s) in Dependency Hygiene, and if Maturity rose to 70, the score would rise from 51 to about 57.

62 findings are critical: 24 in IaC & Container Security, 19 in Dependency Vulnerabilities, 16 in Static Analysis (SAST), one in CQS / query purity, one in Outbox / dual-write and one in Secrets (history).

Watchdog couldn't measure 29 dimensions in this code, among them Code Coverage, Internal API Consistency and Navigability, so they are left out of the score. The product code is 25,802 lines, which would take an estimated 0.5 person-years, around €70,000, to rebuild.

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

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

If Maturity rose from 43 to 70, the lowest score rated Strong, the score would rise from 51 to about 57.

Code composition: what the lines of code are
Product code 72%Tests 28%
New since the last survey: 7 findings

These 7 critical or serious findings weren't in the previous survey, on 7 October 2026.

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

Fixed since the last survey: 2 findings

These 2 critical or serious findings were in the previous survey, on 7 October 2026, and are gone from this one.

  • Dependency Vulnerabilities · Medium CVE: GO-2026-5841 REDACTED
  • Supply-chain Provenance & Signing REDACTED
Rebuild cost: about €70,000 · Estimate
Cost to rebuild€23,000 to €120,000, for 388 to 1,230 hours of work, about 0.5 person-years for one engineer
Difficulty of the problemVery high, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 51. 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.
SizeMedium: 25,802 lines of product code

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

Top priorities

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

1
Resolve the 1 No ADRs found finding(s) in ADR Quality.
Raises the score by about 6 points · Low effort · ADR Quality
2
Resolve the 4 Deprecated module finding(s) in Dependency Hygiene.
Raises the score by about 4 points · Low effort · Dependency Hygiene
3
Resolve the 3 Dependency pinned to a stale untagged commit finding(s) in Dependency Hygiene.
Raises the score by about 3 points · Low effort · Dependency Hygiene

Diagnosis: what the measurements show together

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

Where the investment is most exposed · Value at risk
This code would cost about €70,000 to build again, about 0.5 person-years of work. Its weakest lens is Maturity, at 43 (Weak). Maturity is about how well the project explains and looks after itself, which decides whether a new developer, or a new supplier, can take over. Because the weakest lens counts most in the score, work on Maturity also moves the score most.
Based on: the rebuild estimate · the Maturity grade · how much each lens counts
What to do: Start with the Maturity actions in Top priorities.
If you do one thing first · First action
Resolve the 1 No ADRs found finding(s) in ADR Quality. Of all the actions in this report, it raises the score most for the work it takes: about 6 points for low effort, because it clears the 1 ADR Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort

Architecture: which parts of the code depend on which

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

245 modules, with 443 dependencies between them. Every module uses only modules listed above it, so there are no loops.

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

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/config/environment2 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/cqrs3 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/metadata4 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/web/route5 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/logger6 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/utils7 com/mehdihadeli/go-food-delivery-microservices/internal/services/orderservice/internal/orders/dtos/v18 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/data9 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/domain10 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/messaging/types11 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/fxapp/contracts12 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/http/customecho/contracts13 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/mongodb14 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/otel/tracing15 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/config16 com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogreadservice/internal/products/contracts/data17 com/mehdihadeli/go-food-delivery-microservices/internal/services/orderservice/internal/orders/contracts/repositories18 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/messaging/consumer19 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/messaging/producer20 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/serializer21 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/es/models22 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/types23 com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogreadservice/internal/products/data/repositories24 com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogreadservice/internal/shared/configurations/catalogs25 com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogwriteservice/internal/products/data/repositories26 com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogwriteservice/internal/shared/configurations/catalogs27 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/messaging/bus28 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/es/contracts/store29 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/consumer/configurations30 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/producer/configurations31 com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogwriteservice/internal/products/dtos/v1/fxparams32 com/mehdihadeli/go-food-delivery-microservices/internal/services/orderservice/internal/orders/projections33 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/eventstroredb34 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/configurations35 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/consumer36 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/producer37 com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogreadservice/internal/shared/testfixture/integration38 com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogwriteservice/internal/shared/testfixtures/integration39 com/mehdihadeli/go-food-delivery-microservices/internal/services/orderservice/internal/shared/test_fixtures/integration40 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/bus
1 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/config/environment
2 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/cqrs
3 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/metadata
4 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/web/route
5 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/logger
6 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/utils
7 com/mehdihadeli/go-food-delivery-microservices/internal/services/orderservice/internal/orders/dtos/v1
8 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/data2
9 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/domain1
10 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/messaging/types3
11 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/fxapp/contracts22
12 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/http/customecho/contracts1
13 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/mongodb112
14 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/otel/tracing21
15 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/config1
16 com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogreadservice/internal/products/contracts/data2
17 com/mehdihadeli/go-food-delivery-microservices/internal/services/orderservice/internal/orders/contracts/repositories2
18 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/messaging/consumer2
19 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/messaging/producer11
20 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/serializer112
21 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/es/models48
22 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/types2
23 com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogreadservice/internal/products/data/repositories321134
24 com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogreadservice/internal/shared/configurations/catalogs11
25 com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogwriteservice/internal/products/data/repositories2212
26 com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogwriteservice/internal/shared/configurations/catalogs11
27 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/messaging/bus21
28 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/es/contracts/store11
29 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/consumer/configurations252
30 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/producer/configurations12
31 com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogwriteservice/internal/products/dtos/v1/fxparams211
32 com/mehdihadeli/go-food-delivery-microservices/internal/services/orderservice/internal/orders/projections22422
33 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/eventstroredb251434
34 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/configurations244
35 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/consumer3235333
36 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/producer13133333
37 com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogreadservice/internal/shared/testfixture/integration111121
38 com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogwriteservice/internal/shared/testfixtures/integration1111
39 com/mehdihadeli/go-food-delivery-microservices/internal/services/orderservice/internal/shared/test_fixtures/integration1111111
40 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/bus12141233
Uses a module listed above itPart of a loopThe module itself
1 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/config/environment2 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/cqrs3 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/metadata4 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/web/route5 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/logger6 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/utils7 com/mehdihadeli/go-food-delivery-microservices/internal/services/orderservice/internal/orders/dtos/v18 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/data9 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/domain10 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/messaging/types11 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/fxapp/contracts12 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/http/customecho/contracts13 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/mongodb14 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/otel/tracing15 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/config16 com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogreadservice/internal/products/contracts/data17 com/mehdihadeli/go-food-delivery-microservices/internal/services/orderservice/internal/orders/contracts/repositories18 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/messaging/consumer19 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/messaging/producer20 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/serializer21 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/es/models22 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/types23 com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogreadservice/internal/products/data/repositories24 com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogreadservice/internal/shared/configurations/catalogs25 com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogwriteservice/internal/products/data/repositories26 com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogwriteservice/internal/shared/configurations/catalogs27 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/messaging/bus28 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/es/contracts/store29 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/consumer/configurations30 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/producer/configurations31 com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogwriteservice/internal/products/dtos/v1/fxparams32 com/mehdihadeli/go-food-delivery-microservices/internal/services/orderservice/internal/orders/projections33 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/eventstroredb34 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/configurations35 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/consumer36 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/producer37 com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogreadservice/internal/shared/testfixture/integration38 com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogwriteservice/internal/shared/testfixtures/integration39 com/mehdihadeli/go-food-delivery-microservices/internal/services/orderservice/internal/shared/test_fixtures/integration40 com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/buscom/mehdihadeli/go-food-delivery-microservices/internal/pkg/config/environment1com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/cqrs2com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/metadata3com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/web/route4com/mehdihadeli/go-food-delivery-microservices/internal/pkg/logger5com/mehdihadeli/go-food-delivery-microservices/internal/pkg/utils6com/mehdihadeli/go-food-delivery-microservices/internal/services/orderservice/internal/orders/dtos/v17com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/data8com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/domain9com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/messaging/types10com/mehdihadeli/go-food-delivery-microservices/internal/pkg/fxapp/contracts11com/mehdihadeli/go-food-delivery-microservices/internal/pkg/http/customecho/contracts12com/mehdihadeli/go-food-delivery-microservices/internal/pkg/mongodb13com/mehdihadeli/go-food-delivery-microservices/internal/pkg/otel/tracing14com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/config15com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogreadservice/internal/products/contracts/data16com/mehdihadeli/go-food-delivery-microservices/internal/services/orderservice/internal/orders/contracts/repositories17com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/messaging/consumer18com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/messaging/producer19com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/serializer20com/mehdihadeli/go-food-delivery-microservices/internal/pkg/es/models21com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/types22com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogreadservice/internal/products/data/repositories23com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogreadservice/internal/shared/configurations/catalogs24com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogwriteservice/internal/products/data/repositories25com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogwriteservice/internal/shared/configurations/catalogs26com/mehdihadeli/go-food-delivery-microservices/internal/pkg/core/messaging/bus27com/mehdihadeli/go-food-delivery-microservices/internal/pkg/es/contracts/store28com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/consumer/configurations29com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/producer/configurations30com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogwriteservice/internal/products/dtos/v1/fxparams31com/mehdihadeli/go-food-delivery-microservices/internal/services/orderservice/internal/orders/projections32com/mehdihadeli/go-food-delivery-microservices/internal/pkg/eventstroredb33com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/configurations34com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/consumer35com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/producer36com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogreadservice/internal/shared/testfixture/integration37com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogwriteservice/internal/shared/testfixtures/integration38com/mehdihadeli/go-food-delivery-microservices/internal/services/orderservice/internal/shared/test_fixtures/integration39com/mehdihadeli/go-food-delivery-microservices/internal/pkg/rabbitmq/bus402132211122112221111248232113411221211211125212211224222514342443235333131333331111211111111111112141233+205 more modules (most-connected shown)

At a glance — Code Health · 84% · Strong ·

At a glance — Architecture · 87% · Strong ·

At a glance — Maturity · 43% · Weak · gated by D34, M4 ·

At a glance — Readiness · 49% · Weak · gated by P3, P7, P8 ·

At a glance — Security · 52% · Adequate · gated by D29, D30, D31 ·

At a glance — Domain Modelling · 67% · Adequate ·

At a glance — Event-Driven · 91% · Exemplary ·

At a glance — Event Sourcing · 100% · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection36High / Critical
A03:2025 — Software Supply Chain Failures35High / Critical
A02:2025 — Security Misconfiguration29High / Critical
A07:2025 — Authentication Failures2High / Critical

Roadmap

Begin by resolving the 101 orphaned files in the knowledge base, prioritizing integration_test_fixture.go, REDACTED, and event_store.go. Next, address the missing architectural decision records by creating an ADR for the current state and updating the README to accurately reflect existing directory structures. Finally, clean up four deprecated modules and establish a dedicated folder for documenting future design decisions with their dates and consequences.

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

Do thisHelpsEffortDimension
Resolve the 1 No ADRs found finding(s) in ADR Quality.+6.1 ptsLowADR Quality
Resolve the 4 Deprecated module finding(s) in Dependency Hygiene.+3.5 ptsLowDependency Hygiene
Resolve the 3 Dependency pinned to a stale untagged commit finding(s) in Dependency Hygiene.+3.0 ptsLowDependency Hygiene
Reconcile the README with reality: readme.md links to `pkg/messaging/bus/`, but `pkg/messaging/bus` does not exist; readme.md links to `services/catalogs/read_service/`, but `services/catalogs/read_service` does not exist; readme.md links to `services/orders/`, but `services/orders` does not exist; readme.md links to `services/catalogs/write_service/`, but `services/catalogs/write_service` does not exist; readme.md links to `services/catalogs/orders/`, but `services/catalogs/orders` does not exist.+5.4 ptsMediumDocumentation accuracy
Resolve the 101 Orphaned file finding(s) in Knowledge Freshness — start with integration_test_fixture.go (3), REDACTED (3), event_store.go (2).+6.9 ptsHighKnowledge Freshness
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.+3.2 ptsMediumArchitecture documentation
Improve Test Distribution — currently 7.3/10.+2.3 ptsMediumTest Distribution
Resolve the 24 High IaC finding(s) in IaC & Container Security — start with REDACTED (12), REDACTED (8), REDACTED (4).+1.4 ptsMediumIaC & Container Security

File quality

Per-file score 0–10 — a quality signature. Of 74 files carrying findings, judged against the Production bar: 11% slop · 39% mixed · 50% near-clean.

FileScoreBandWorst signal
REDACTED0.2SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED1.2SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED2.3SlopIaC & Container Security: High IaC: REDACTED
REDACTED2.3SlopIaC & Container Security: High IaC: REDACTED
REDACTED3.2SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopIaC & Container Security: High IaC: REDACTED
REDACTED3.7SlopIaC & Container Security: High IaC: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.3MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.6MixedCode Duplication: Duplicated block (21 lines × 2)
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
internal/pkg/mapper/mapper.go6.0MixedExplicit Debt: TodoComment
internal/pkg/mongodb/repository/mongo_generic_repository.go6.0MixedExplicit Debt: TodoComment
internal/pkg/eventstroredb/esdb_serilizer.go6.3MixedCode Duplication: Duplicated block (20 lines × 2)
internal/services/orderservice/internal/orders/data/repositories/elastic_order_read_repository.go6.4MixedExplicit Debt: TodoComment
internal/pkg/postgresmessaging/messagepersistence/postgres_message_service.go6.6MixedExplicit Debt: TodoComment

How the grades work

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

Critical — 62

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

Serious — 180

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

Minor — 247

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

Could not be resolved — 29

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

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 64 of 67 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.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

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

What we checked — 67 dimensions across the health lenses
D1D2D3D4D5D6D9D11D12D13D14D15D17D19D20D21D26D28D29D30D31D34D35D43D44AX10AX2AX3AX4AX5AX9DM1DM10DM11DM12DM4DM5DM6DM7DM8DM9ED1ED2ED3ED4ES1ES2ES3M1M2M3M4P1P10P2P3P4P5P6P7P8X14X15X26X28X3X30

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

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a16231-b37e-7ed5-bc13-79d1c2b8aa28.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.go) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (`go test -coverprofile=coverage.out ./...`) 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. You can widen what we reach: optional: produce a coverage report in a standard format (`go test -coverprofile=coverage.out ./...`) 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 — then the real number is read on the next scan.
  • D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its Go module dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • 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-maintainer repository — bus factor is not applicable (3 contributor(s) across 276 commit(s) sampled, automation and bot accounts excluded). One of them holds 99% of the history; the other 2 hold 0.5% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (REDACTED), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
  • D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D31 IaC & Container Security — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. REDACTED, internal/services/catalogreadservice/Dockerfile carries no `FROM` instruction, so it declares no build stage and every REDACTED rule this engine owns — the runtime-hardening, key-material, mutable-clone, no-op-shim, build-context, trust-anchor, install-guard, setuid and world-writable-path rules — is outside its own premise there and returned nothing. That silence is deliberate and correct: with no base image there is no image to reason about. It is reported here because it is NOT the same fact as a clean file, and coverage is stated as 13 of 15 Infrastructure-as-Code manifest(s) fully judged rather than as 100%. The vendor scanners (trivy, checkov) do read these files and their findings above stand; only this engine's own stage-keyed rules are absent. No owner action: a build file with no FROM is a legitimate include fragment.
  • D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `internal/pkg/core/cqrs/handler.go`, `internal/pkg/core/data/generic_repository.go` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DockerCompose (.devcontainer/docker-compose.yaml). the app booted but exposed no published HTTP port — nothing to crawl (publish the web service's port to unlock runtime evidence).
  • C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
  • DM9 Scattered domain decisions — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Arm two tells a construction that PRODUCES a measurement from one that merely passes it along, and this repository's frontend does not compute that fact. A measurement built independently in two places would not appear above.
  • DM9 Scattered domain decisions — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Some of this repository's production types come from a frontend that does not bind comparison operands to the members they read, which arm one needs, and those types were not walked for this dimension. The counts above speak for the languages that declare it.
  • ED5 Idempotency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check decides whether a handler's mutation is safe to re-run by recognising its persistence writes (a database save, a repository write, an event publish) and its guards. Those markers are .NET member names, so in this repository's language a write such as `repository.save(order)` is not recognised and a same-named call on an unrelated library type could be. The handlers were found; their idempotency was neither confirmed nor ruled out.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's Go is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala was found, and this repository's Go is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X1 Async correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X12 Unreachable branch — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X13 Undrained process stream — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X19 Unrestored process-global state — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X2 Cancellation propagation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X22 Contradicted release guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, TypeScript/JavaScript, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded, and this repository's Go is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X23 Unguarded diagnostic materialisation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X25 Inert configuration knob — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart and Ruby source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart or Ruby was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded, no Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala or Kotlin was found, and this repository's Go is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X29 Per-element action decided by a fixed element — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Rust, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, Rust, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala or Rust was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • 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.
  • 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.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • 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.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • 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 REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (REDACTED, 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.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • DM4 Rich vs anemic model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
  • DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
  • 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".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

The LLM boundary

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

Dimensions

D1 · Cyclomatic Complexity8.5 / 10Strong✓ Tool-verified

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

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

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

8 function(s) exceeded the cyclomatic complexity threshold of 15; the worst was FxCustomLogger.LogEvent at 33. A further 2 function(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being grpcerrors.ParseError at 21 — they are counted neither in the figure above nor in this dimension's score. 2 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: internal/pkg/grpc/grpcErrors/grpc_error_parser.go (grpcerrors.ParseError at 21), internal/pkg/http/httperrors/problemdetails/problem_detail_parser.go (problemDetails.ParseError at 21). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

FxCustomLogger.LogEvent (cyclomatic 33)internal/pkg/logger/external/fxlog/fx.go:36
mappings.ConfigureOrdersMappings (cyclomatic 21)REDACTED:15
orders.configOrdersMetrics (cyclomatic 21)internal/services/orderservice/internal/shared/configurations/orders/orders_fx.go:33
mapper.Map (cyclomatic 19)internal/pkg/mapper/mapper.go:164
TracingOpenTelemetry.configExporters (cyclomatic 19)internal/pkg/otel/tracing/tracing.go:149

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

What to do

  1. Bring the 8 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with FxCustomLogger.LogEvent (cyclomatic 33), mappings.ConfigureOrdersMappings (cyclomatic 21), orders.configOrdersMetrics (cyclomatic 21). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 8 together lifts Cyclomatic Complexity from 8.5 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D2 · Cognitive Complexity7.5 / 10Strong✓ Tool-verified

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

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

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

17 function(s) exceeded the cognitive complexity threshold of 15; the worst was TracingOpenTelemetry.configExporters at 45.

TracingOpenTelemetry.configExporters (cognitive 45)internal/pkg/otel/tracing/tracing.go:149
FxCustomLogger.LogEvent (cognitive 37)internal/pkg/logger/external/fxlog/fx.go:36
OtelMetrics.configExporters (cognitive 34)internal/pkg/otel/metrics/metrics.go:127
rabbitMQConsumer.Start (cognitive 23)internal/pkg/rabbitmq/consumer/rabbitmq_consumer.go:101
esdbSubscriptionAllWorker.SubscribeAll (cognitive 22)internal/pkg/eventstroredb/subscription_all_worker.go:72

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

What to do

  1. Bring the 17 bodies over 15 down to 15 or less in Cognitive Complexity — start with TracingOpenTelemetry.configExporters (cognitive 45), FxCustomLogger.LogEvent (cognitive 37), OtelMetrics.configExporters (cognitive 34). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 17 together lifts Cognitive Complexity from 7.5 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God Classes9.5 / 10Stronggated by 3 serious findings✓ Tool-verified

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

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

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

3 over-large unit(s) detected — types, modules or files that carry too much.

FunctionTooLong: mappings.ConfigureOrdersMappings · ×2REDACTED:15
MethodTooLong: TracingOpenTelemetry.configExportersinternal/pkg/otel/tracing/tracing.go:149

What to do

  1. Resolve the 2 FunctionTooLong finding(s) in God Classes — start with REDACTED, orders_fx.go. — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 1 MethodTooLong finding(s) in God Classes — start with tracing.go. — One of this dimension's main actionable groups (1 warning-level).
  3. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication8.7 / 10Strong✓ Tool-verified

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

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

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

73 duplicated block group(s) detected. A further 2 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 7 of the 75 are in trees this repository does not ship — vendored, example/demo, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Duplicated block (10 lines × 2) · ×10internal/pkg/core/serializer/json/event_serializer.go:86
Duplicated block (6 lines × 2) · ×7internal/pkg/es/models/stream_name/stream_name.go:29
Duplicated block (12 lines × 2) · ×4internal/pkg/postgresgorm/gormdbcontext/gorm_dbcontext_extensions.go:155
Duplicated block (11 lines × 2) · ×3internal/services/catalogwriteservice/internal/products/features/creatingproduct/v1/create_product.go:59
Duplicated block (8 lines × 2) · ×3internal/services/catalogreadservice/internal/products/products_fx.go:22

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

What to do

  1. Resolve the 10 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with event_serializer.go (2), mongo_generic_repository.go (2), mapper.go. — One of this dimension's main actionable groups (10 warning-level).
  2. Resolve the 7 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with REDACTED (2), stream_name.go, mongo_generic_repository.go. — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 4 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with gorm_dbcontext_extensions.go, get_product_by_id_endpoint.go, catalogs_metrics.go. — One of this dimension's main actionable groups (4 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D5 · Coupling10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

4 production modules (Go), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 0 module(s) off the main sequence.

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)9.8 / 10Stronggated by 1 serious finding✓ Tool-verified

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

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

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

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

1 of 69 classes have LCOM4 above 3.

Low cohesion: EsdbSerializer (LCOM4 4)internal/pkg/eventstroredb/esdb_serilizer.go:25

What to do

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

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

D9 · Test Distribution7.3 / 10Strong✓ Tool-verified

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

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

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

196 test methods: 128 unit, 18 integration, 39 BDD, 11 e2e. The Go suite contributes 196 test case(s) across 69 `_test.go` file(s) declaring at least one — every `func Test…(t *testing.T)` that `go test` would collect, plus the suite methods a testify-style runner reaches; a table-driven case list counts once, so this is a floor. Its tier split is INFERRED from file names, paths and build constraints, not declared: 1 of those file(s) use Go's external test package (`package x_test`), which is a visibility boundary rather than a pyramid tier and was not read as one.

What to do

  1. Improve Test Distribution — currently 7.3/10. — 196 test methods: 128 unit, 18 integration, 39 BDD, 11 e2e. The Go suite contributes 196 test case(s) across 69 `_test.go` file(s) declaring at least one — every `func Test…(t *testing.T)` that `go test` would collect, plus the suite methods a testify-style runner reaches; a table-driven case list counts once, so this is a floor. Its tier split is INFERRED from file names, paths and build constraints, not declared: 1 of those file(s) use Go's external test package (`package x_test`), which is a visibility boundary rather than a pyramid tier and was not read as one.

Detailed fixes: d9_recommendation.md.

D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the tests pass reliably, with no flakiness.

Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.

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

0 flaky across 1 measured tier(s). Go (4 modules): measured (0 flaky).

✓ On the Gold path — maintain.

Detailed fixes: d11_recommendation.md.

D12 · Dependency Hygiene5.2 5.0 / 10Adequate✓ Tool-verified

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

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

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

111 outdated, 4 author-deprecated direct Go module(s), 3 pinning or checksum defect(s). 154 of 157 direct requirement(s) were graded against proxy.golang.org (3 not served there, 3 publishing no tagged release to be behind). Whether any of these modules is UNMAINTAINED is not graded — proxy.golang.org publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, not a registry one. Known CVEs in this module graph are D30's question, read from REDACTED and go.sum there.

Deprecated module: go.mongodb.org/mongo-driver · ×4
Dependency pinned to a stale untagged commit: github.com/TylerBrock/colorjson · ×3
Outdated: github.com/brianvoe/gofakeit/v6 · ×111

What to do

  1. Resolve the 4 Deprecated module finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (4 warning-level).
  2. Resolve the 3 Dependency pinned to a stale untagged commit finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (3 warning-level).
  3. Enforce Dependency Hygiene in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D13 · Secret Scanning10.0 / 10Exemplary○ Nothing flagged

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 279 required Go module(s) use a banned license. Licences were read per module version from the licence files pkg.go.dev detects (via api.deps.dev), over every module this repository's REDACTED requires, direct and indirect, at the version the build uses. Go records no test-only scope at module level, so modules only this repository's own tests import are included. ★ COVERAGE OF THIS VERDICT: it grades this repository's Go module dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots10.0 / 10Exemplary✓ Tool-verified

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

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

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

No churn × complexity hotspots in the window.

✓ On the Gold path — maintain.

Detailed fixes: d15_recommendation.md.

D17 · Explicit Debt9.9 / 10Stronggated by 20 serious findings✓ Tool-verified

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

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

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

20 deducted task-comment markers across 25802 LoC (0.1/KLoC) → score 9.9. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

TodoComment · ×20internal/pkg/core/serializer/json/message_serializer.go:48

What to do

  1. Resolve the 20 TodoComment finding(s) in Explicit Debt — start with elastic_order_read_repository.go (7), postgres_message_service.go (4), message_serializer.go. — One of this dimension's main actionable groups (20 warning-level).
  2. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D19 · Documentation QualityExemplary◐ Sampled · advisory

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

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

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

The repository's root README is a well-written project overview that states what it does (an imaginary food delivery microservices project built with Golang and various architectural principles) and its purpose (a template for Go backend projects), while the internal service READMEs document their own directories. The accompanying Buf documentation gives an excellent Prerequisites section plus a complete Developer Workflow, Linting, Breaking Change Detection, Format/Generate, Tools (grpcurl, ghz), and Reference; GitFlow is also well written with Setup, FAQ, Versioning, and Changelog sections. All the outlined documents exist in the summary.

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

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

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

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

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

No architecture decision records were found.

No ADRs found

What to do

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

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

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

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

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

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

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D26 · Project Cohesion5.0 / 10Adequate✓ Tool-verified

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

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

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

1 of 4 build units (Go) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

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

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

D28 · Secrets (history)9.0 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

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.

REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

36 finding(s): 0 critical, 16 high, 9 medium, 11 low. 5 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 5 file(s) — `.github/release-drafter.yml`, `deployments/docker-compose/traefik.yaml`, `internal/pkg/core/cqrs/handler.go` (line 13), `internal/pkg/core/data/generic_repository.go` (line 30), `internal/services/catalogwriteservice/db/fixtures/products/products.yaml` — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 8 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (4), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (8 issue-level).
  2. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
  3. No action in Static Analysis (SAST) — all 5 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 (5 issue-level, 0 of them charged here).

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

D30 · Dependency Vulnerabilities0.0 / 10Critical✓ Tool-verified

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

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

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

35 finding(s): 5 critical, 14 high, 15 medium, 1 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 14 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (11), REDACTED (3). — One of this dimension's main actionable groups (14 issue-level).
  2. Resolve the 13 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (12), REDACTED. — One of this dimension's main actionable groups (13 warning-level).
  3. Resolve the 5 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (5). — One of this dimension's main actionable groups (5 issue-level).

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

D31 · IaC & Container Security1.6 1.4 / 10Critical✓ Tool-verified

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

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

Maturity: Documented → Verified → Prevented · effective 1.4 / 10 · rule-coverage 87% · ceiling Documented

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

REDACTED
REDACTED
REDACTED

What to do

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

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

D34 · Knowledge Freshness0.0 / 10Critical✓ Tool-verified

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

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

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

101 of 101 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is internal/pkg/rabbitmq/consumer/rabbitmq_consumer.go. Counted over 101 of the 472 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×101internal/pkg/rabbitmq/consumer/rabbitmq_consumer.go:1
Dormant codebase

What to do

  1. Resolve the 101 Orphaned file finding(s) in Knowledge Freshness — start with integration_test_fixture.go (3), REDACTED (3), event_store.go (2). — One of this dimension's main actionable groups (101 recommendation-level).
  2. Resolve the 1 Dormant codebase finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

D35 · Change Coupling10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.

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

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AX10 · Code composition7.3 / 10Strong✓ Tool-verified

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

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

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

What to do

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

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

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

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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

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

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

AX5 · Architecture & structure10.0 / 10Exemplary✓ Tool-verified

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

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

AX9 · CQS / query purity9.1 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.

Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.

Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.

  • `com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogreadservice/internal/products/features/get_product_by_id/v1/queries.GetProductByIdHandler` is a read (query) handler but its body writes persistent state — a query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica. — internal/services/catalogreadservice/internal/products/features/get_product_by_id/v1/queries/get_product_by_id_handler.go:17

What to do

  • Keep query handlers read-only — move the writes/event-publishes into a command handler so reads stay safe to retry, cache, and route to a read replica.
DM1 · Aggregate boundaries10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether aggregates reference each other by identity (id) rather than by direct object reference — the core DDD consistency-boundary rule.

Method: Roslyn (DDD-gated): aggregate roots identified by convention; each aggregate field checked for direct references to other aggregates versus id-only. Deterministic, DDD-native.

Coverage: Population: aggregate roots identified by AggregateRoot/IAggregateRoot base/interface NAME convention; reference-by-identity then checked exhaustively within that set — a root not using those names is invisible.

DM10 · One transaction, one aggregate10.0 / 10Exemplary○ Nothing flagged

Other · Domain Modelling — Whether a single operation mutates more than one aggregate root. An aggregate is a consistency boundary, so saving two together fuses them into one — the second's invariants come to depend on the first's transaction, and the pair can no longer be separated. Reads of other aggregates are not counted.

Method: Neutral body surface (DDD-gated): every method body scanned for repository WRITE calls (Add/Update/Save/Remove/Delete/Insert/Store and their async forms), keyed on the ARGUMENT type rather than the repository type — three `IRepository<T>` writes collapse to one repository but are three distinct aggregates. Reads (Get/Find/Load/Query) are excluded, so loading another aggregate for context never counts. Score is offending methods over methods that write at all. Deterministic.

DM11 · Constructible invalid state10.0 / 10Exemplary○ Nothing flagged

Other · Domain Modelling — Whether an aggregate can be constructed in a state its own rules forbid — a public constructor that takes a raw primitive, stores it, and validates nothing, with no factory beside it. A constructor taking only value objects is not counted: each parameter has already validated itself.

Method: Neutral surface (DDD-gated): each non-abstract entity/aggregate checked for a PUBLIC constructor taking at least one RAW PRIMITIVE parameter whose body contains no guard token (throw / Guard. / Ensure. / ArgumentException / CheckRule), on a type that also offers no static Create/Of/From/New factory. A constructor taking only value objects is never charged -- measured: 64 of 87 unguarded public constructors on the C# corpus take value objects only, so ignoring parameter types would be 73% false positives. One finding per entity. Deterministic.

DM12 · Ambient inputs in the domain10.0 / 10Exemplary○ Nothing flagged

Other · Domain Modelling — Whether domain types receive the time and randomness their rules depend on, rather than reading the process clock or a global random source directly — an ambient read makes the rule it feeds untestable at the instant that matters and lets two reads inside one operation disagree.

Method: Roslyn (DDD-gated, C#/VB only): domain-layer types scanned for ambient reads — DateTime/DateTimeOffset.Now/UtcNow/Today, Random.Shared, new Random(), Stopwatch.GetTimestamp — resolved against the semantic model, with a comment/string-stripped token fallback only where resolution fails. Body reads are scored; field/property initialisers are surfaced unscored. Apply/When folds excluded (ES1 owns them). Deterministic, symbol-resolved.

DM4 · Rich vs anemic model10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether aggregates/entities carry the behaviour that protects their invariants, rather than being data bags driven by external services.

Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.

Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.

DM5 · Encapsulated state4.8 / 10Weak✓ Tool-verified

Other · Domain Modelling — Whether entities protect their state — private/init-only setters, and collections handed out as read-only views rather than the mutable backing collection — instead of exposing writable state that bypasses invariants. Softened when a rehydration framework (Marten/EF) is present.

Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.

Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.

  • `Entity` exposes exported guard-free setter(s) (SetUpdatedAt, SetEntityType) that rewrite business state without enforcing invariants. — internal/pkg/core/domain/entity.go:65

What to do

  • Make entity setters private/init-only and hand collections out as IReadOnlyList/IReadOnlyCollection over a private backing field; change state only through methods that enforce the invariants (Marten/EF can bind via constructor or private setters).
DM6 · Domain ↔ infrastructure boundary5.2 / 10Adequate✓ Tool-verified

Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies (EF/Marten/HTTP/ASP.NET) — the clean-architecture dependency rule.

Method: Roslyn (DDD-gated): domain-layer types scanned for infrastructure usage in member SIGNATURES and inside method/accessor BODIES — resolved calls and object-creations into EF/Marten/HTTP/Mongo/Redis/message-bus types (not just a namespace allowlist). Deterministic, symbol-resolved, exhaustive over domain-layer bodies, DDD-native.

Coverage: Domain layer identified by NAMESPACE heuristic; infrastructure then resolved by symbol in member SIGNATURES and method/accessor BODIES — rename the layer and the check evaporates.

  • The domain package `github.com/mehdihadeli/go-food-delivery-microservices/internal/services/orderservice/internal/orders/exceptions/domain_exceptions` imports `http-transport` — an infrastructure concern (persistence/HTTP/broker/auth). The dependency direction points from the domain layer to infrastructure; invert it behind a domain-owned port. — internal/services/orderservice/internal/orders/exceptions/domain_exceptions/invalid_delivery_address_error.go:4
  • The domain package `github.com/mehdihadeli/go-food-delivery-microservices/internal/services/orderservice/internal/orders/features/creating_order/v1/events/domain_events` imports `http-transport` — an infrastructure concern (persistence/HTTP/broker/auth). The dependency direction points from the domain layer to infrastructure; invert it behind a domain-owned port. — internal/services/orderservice/internal/orders/features/creating_order/v1/events/domain_events/order_created.go:7
  • The domain package `github.com/mehdihadeli/go-food-delivery-microservices/internal/services/orderservice/internal/orders/features/submitting_order/v1/events/domain_events` imports `http-transport` — an infrastructure concern (persistence/HTTP/broker/auth). The dependency direction points from the domain layer to infrastructure; invert it behind a domain-owned port. — internal/services/orderservice/internal/orders/features/submitting_order/v1/events/domain_events/order_submitted.go:6
  • The domain package `github.com/mehdihadeli/go-food-delivery-microservices/internal/services/orderservice/internal/orders/models/orders/aggregate` imports `http-transport` — an infrastructure concern (persistence/HTTP/broker/auth). The dependency direction points from the domain layer to infrastructure; invert it behind a domain-owned port. — internal/services/orderservice/internal/orders/models/orders/aggregate/order.go:11

What to do

  • Invert domain→infrastructure dependencies: declare interfaces in the domain, implement them in infrastructure (Dependency Inversion).
DM7 · Repository granularity4.9 / 10Weak✓ Tool-verified

Other · Domain Modelling — Whether repositories are per aggregate root (not per child entity) and keep the persistence query handle behind the contract, so the root's invariants can't be bypassed.

Method: Roslyn (DDD-gated): repository abstraction detection; repositories over non-aggregate-root entities flagged, and (C#/VB) repository INTERFACES whose members return a live persistence query handle (IQueryable/DbSet/IMongoQueryable) — implementations and specification evaluators are out of population by design, since composing a query internally is what an implementation is for. Deterministic, DDD-native.

Coverage: Population: repositories + aggregate roots by NAME convention; per-root repository rule checked within the set.

  • `ProductRepository` leaks the persistence query-machinery type `ListQuery` into its contract. A repository should be a persistence PORT over an aggregate ROOT — expose intention-revealing whole-aggregate operations (Save/FindByID) and keep framework types, query specifications and business logic out of its contract so callers can't bypass the aggregate's invariants. (×2) — internal/services/catalogreadservice/internal/products/contracts/data/product_repository.go:11, internal/services/catalogwriteservice/internal/products/contracts/product_repository.go:13
  • `orderReadRepository` leaks the persistence query-machinery type `ListQuery` into its contract. A repository should be a persistence PORT over an aggregate ROOT — expose intention-revealing whole-aggregate operations (Save/FindByID) and keep framework types, query specifications and business logic out of its contract so callers can't bypass the aggregate's invariants. — internal/services/orderservice/internal/orders/contracts/repositories/order_repository.go:13

What to do

  • Define repositories per aggregate root and keep the query handle inside them; reach child entities through their root so invariants can't be bypassed.
DM8 · Value-object opportunities10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether clusters of primitives that travel together (a missing value object) are extracted — a low-weight suggestion, LLM-confirmed when configured.

Method: Roslyn (DDD-gated): primitive parameter clusters recurring three or more times across signatures extracted, then confirmed by language model when configured. Advisory, low-weight.

DM9 · Scattered domain decisions10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether one domain rule is decided — or one measurement produced — in more than one place, rather than living on the type that owns it.

Method: Neutral body surface plus Roslyn (DDD-gated), two arms. DECISION (Roslyn only): a predicate over a domain type's members judged in two or more types, where none of those decisions live on the owning type — operands of comparisons and relational property patterns only, so a member merely passed as an argument is not judged. DERIVATION: a plain all-numeric carrier of ≥2 members, with no base type and exactly one constructor, CONSTRUCTED as the result of a method (returned or assigned, never inline as an argument) in two or more types other than its own — the same measurement produced twice, which centralising the judgement does not fix. DERIVATION runs on every language whose frontend declares the produced-or-passed fact per construction (Roslyn and the Java sidecar today); a target with only the derivation arm carries an engine gap naming the decision arm as not assessed, and a frontend that declares nothing keeps the dimension not measured rather than clean. Single-member rules, test code and generated code are out of population for both. Advisory.

ED1 · Handler temporal coupling10.0 / 10Exemplary✓ Tool-verified

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

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

ED2 · Event/command shape10.0 / 10Exemplary✓ Tool-verified

Other · Event-Driven — Whether commands have a single handler (one owner of the decision) and fan-out is modelled with events.

Method: Roslyn scan (event-driven gated): command-shaped messages identified by convention; handler count per command checked for the exactly-one rule. Deterministic, hard fact.

ED3 · Event naming10.0 / 10Exemplary✓ Tool-verified

Other · Event-Driven — Whether events are named in the past tense (a clarity nudge — low weight).

Method: Roslyn scan (event-driven gated): domain and integration events checked for past-tense naming (-ed/-en suffix or irregular set). Naming nudge, low-weight advisory.

ED4 · Outbox / dual-write7.9 / 10Strong✓ Tool-verified

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

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

  • `mongoOrderProjection.onOrderCreated` writes to the database AND publishes to the message bus in the same flow, with no outbox referenced in this path. These two writes aren't atomic — a crash between them either loses the message (DB committed, publish failed) or emits a phantom event (publish succeeded, DB rolled back). Use the transactional outbox pattern — write the message to an outbox table in the SAME transaction as the state change, and dispatch it from there afterwards — or your platform's equivalent (a broker transaction, or an outbox library from your own ecosystem). — internal/services/orderservice/internal/orders/projections/mongo_order_projection.go:60

What to do

  • Adopt the transactional outbox pattern so DB writes and message publishes commit atomically — no lost or phantom events on a crash.
ES1 · Fold determinism10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether Apply/When folds reconstruct state purely from the event (no DateTime.Now, Guid.NewGuid, Random or IO) so replay is reproducible.

Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.

ES2 · Immutable events10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether persisted events are immutable facts (init-only/readonly) — a settable event member lets stored history be rewritten.

Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.

ES3 · PII in the event store10.0 / 10Exemplary○ Nothing flagged

Other · Event Sourcing — Whether the append-only event log avoids un-erasable personal data (or has a crypto-shredding strategy) — a GDPR right-to-erasure risk.

Method: Roslyn (event-sourcing gated): high-confidence PII flagged Warning; ambiguous name-like fields adjudicated by language model as person versus fictional. Advisory without model, definitive with.

M1 · Documentation (README)8.2 / 10Strong✓ Tool-verified

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

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

What to do

  • Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
  • Add a README to the 1 of 4 project(s) that lack one — worth up to 0.5 pts.
M2 · Architecture documentation5.0 / 10Adequate✓ Tool-verified

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

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

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

What to do

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

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

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

M4 · Documentation accuracy0.0 / 10Critical◐ Sampled · advisory

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

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

  • readme.md links to `pkg/messaging/bus/`, but `pkg/messaging/bus` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — readme.md:29
  • readme.md links to `services/catalogs/read_service/`, but `services/catalogs/read_service` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — readme.md:30
  • readme.md links to `services/orders/`, but `services/orders` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — readme.md:31
  • readme.md links to `services/catalogs/write_service/`, but `services/catalogs/write_service` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — readme.md:46
  • readme.md links to `services/catalogs/orders/`, but `services/catalogs/orders` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — readme.md:46
  • readme.md names `rabbitmq/amqp091-go`, but no file or folder `rabbitmq/amqp091-go` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — readme.md:58
  • readme.md names `grpc/grpc-go`, but no file or folder `grpc/grpc-go` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — readme.md:62
  • readme.md links to `github.com/prometheus/client_golang`, but `github.com/prometheus/client_golang` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — readme.md:69
  • readme.md names `mongodb/mongo-go-driver`, but no file or folder `mongodb/mongo-go-driver` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — readme.md:70
  • docs/buf.md documents the environment variable `GO111MODULE`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/buf.md:16

What to do

  • Reconcile the README with reality: readme.md links to `pkg/messaging/bus/`, but `pkg/messaging/bus` does not exist; readme.md links to `services/catalogs/read_service/`, but `services/catalogs/read_service` does not exist; readme.md links to `services/orders/`, but `services/orders` does not exist; readme.md links to `services/catalogs/write_service/`, but `services/catalogs/write_service` does not exist; readme.md links to `services/catalogs/orders/`, but `services/catalogs/orders` does not exist.
P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

P2 · Observability10.0 / 10Exemplary○ Nothing flagged

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

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

P3 · Security & performance tooling3.0 / 10Weak✓ Tool-verified

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

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

What to do

  • Your ecosystem's static analyzer is declared as a dependency but is not wired into CI — run it as a required step on push/PR (e.g. `composer phpstan` / `mix sobelow` / `bundle exec brakeman` / the spotbugs Gradle task / `sbt scalafixAll --check` / `golangci-lint run` / `rebar3 lint`) so a regression fails the build instead of relying on someone running it locally.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback8.0 / 10Strong✓ Tool-verified

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

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

What to do

  • Add an approval/environment gate (required reviewers / protection rules) before production promotion.
P5 · DR & Backup7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.

Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.

What to do

  • Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

  • `resty.New(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — internal/pkg/http/client/http_client.go:22

What to do

  • Give every `http.Client` an explicit `Timeout` (never call `http.Get`/`http.Post` or `http.DefaultClient`, which have none), or build each request with `http.NewRequestWithContext` under a `context.WithTimeout`; add retry with back-off (`hashicorp/go-retryablehttp`) and a breaker (`sony/gobreaker`) around dependencies that fail.
P8 · Schema migrations3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether database schema changes go through versioned migrations rather than being auto-created from the model at startup.

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

  • This repository versions its schema (Atlas, goose, versioned SQL (up/down)), but GORM AutoMigrate here builds or alters the schema from the model as well, outside that history — the two paths can disagree about the shape, and a change made this way is never a reviewed migration. Turn it off and let Atlas, goose, versioned SQL (up/down) own the schema. (×3) — internal/pkg/postgresmessaging/postgres_messaging_fx.go:21, internal/services/catalogwriteservice/internal/shared/configurations/catalogs/catalogs_configurator_migration.go:34, internal/services/catalogwriteservice/internal/shared/testfixtures/unittest/unit_test_fixture.go:175

What to do

  • Turn off GORM AutoMigrate in production and let the versioned migrations own the schema.
X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

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

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

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

X3 · Exception handling7.4 / 10Strong✓ Tool-verified

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

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

  • `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×13) — internal/pkg/core/metadata/metadata_extentions.go:29, internal/pkg/core/serializer/json/json_serializer.go:74, internal/pkg/core/serializer/json/json_serializer.go:85, …

What to do

  • Swallowed exception (caught, then discarded)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

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

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

Reference — by lens

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

LensScoreRatingImpact
Code Health84%StrongSolid.
Architecture87%StrongSolid.
Maturity43%Weak — gated by D34, M4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness49%Weak — gated by P3, P7, P8Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security52%Adequate — gated by D29, D30, D31Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling67%AdequateAcceptable, with room to improve.
Event-Driven91%ExemplarySolid.
Event Sourcing100%ExemplaryStrongest area.
Unscored — 2 check(s) recorded observations but carry no score

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

  • 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.
  • X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 control(s) we could not find positive evidence for

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

  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
Not included — 65 check(s) not relevant to this codebase

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

  • 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.
  • AX1 Captive dependencies — Not applicable: Go's fx constructs every dependency once for the life of the application, so there is no shorter lifetime to capture.
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the app booted but exposed no published HTTP port — nothing to crawl (publish the web service's port to unlock runtime evidence) This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D10 Test Quality — ~10164 lines of test source are present (.go) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. Aggregate roots were found in only one source directory (pkg), which is a layered codebase, not two contexts. 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"]`.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.go), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — 2 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • 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 — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • 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 project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM2 Strongly-typed ids — no id-bearing domain types detected — strongly-typed-id adoption not assessable
  • DM3 Integration-event coupling — no integration events detected — coupling check not applicable
  • ED5 Idempotency — Not assessed, and this one is on us: 10 command handler(s) or message consumer(s) were found here, but this check does not yet recognise persistence writes in this repository's language. Idempotency was neither confirmed nor ruled out — this is a limit of the analyzer, not a finding about your code.
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (`go test -coverprofile=coverage.out ./...`) 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 — Not applicable: no benchmark suite was found. This check searched for a `func BenchmarkXxx(b *testing.B)` in any `_test.go` file, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not applicable: allocation awareness is rated where code engineers for it — at least 400 production lines that ship benchmarks or already use allocation-aware idioms (8 or more). This repository's Go code has 29,948 production line(s), 5 such use(s) and no benchmarks, so there is no allocation work to rate. The card is reward-only: its absence costs nothing.
  • PF3 Async & latency hygiene — Not applicable: Go has no async/await function colour, so there is no asynchronous code for a blocking call to stall.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X10 Duplicated predicate — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X12 Unreachable branch — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X13 Undrained process stream — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X16 Unfloored truncation loop — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X17 Uncapped recursion over a caller-supplied document — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X18 Disposal-pattern correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X19 Unrestored process-global state — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X21 Side-effecting pattern guard — Not applicable: this check looks for a pattern guard or `case` label that increments, decrements or assigns while the switch is deciding whether it matches, and in this repository's languages none can. Go's `++`, `--` and assignments are STATEMENTS, not expressions, so none of them can appear in a `case` expression or anywhere else in a condition, and a type switch's cases are types. Not a gap in the analyzer and not a finding about your code.
  • X22 Contradicted release guard — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X23 Unguarded diagnostic materialisation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X24 Document value interpolated into markup unescaped — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X25 Inert configuration knob — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X27 Collection changed while being enumerated — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X29 Per-element action decided by a fixed element — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X5 Nullable reference types — Not applicable: this check asks whether the null-typed discipline a language offers is switched on, and how much of that the assertion operator takes back, and in this repository's languages there is no such switch and no such operator. Go's type system has no nullable and non-nullable types — every pointer, map, slice and interface is nil-able at every position, there is no switch that turns null checking on, and the compiler produces no nullability warning for an operator to silence. Not a gap in the analyzer and not a finding about your code.
  • 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)

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

Critical — 62 finding(s)
D31 · IaC & Container Security · High IaC · ×24
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×14
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Critical CVE · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
AX9 · CQS / query purity · Query handler writes persistent state · ×1
  • Query handler writes persistent state: com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogreadservice/internal/products/features/get_product_by_id/v1/queries.GetProductByIdHandler internal/services/catalogreadservice/internal/products/features/get_product_by_id/v1/queries/get_product_by_id_handler.go:17 — `com/mehdihadeli/go-food-delivery-microservices/internal/services/catalogreadservice/internal/products/features/get_product_by_id/v1/queries.GetProductByIdHandler` is a read (query) handler but its body writes persistent state — a query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica.
D28 · Secrets (history) · High secret · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
ED4 · Outbox / dual-write · Dual write (no outbox) · ×1
  • Dual write (no outbox): mongoOrderProjection.onOrderCreated internal/services/orderservice/internal/orders/projections/mongo_order_projection.go:60 — `mongoOrderProjection.onOrderCreated` writes to the database AND publishes to the message bus in the same flow, with no outbox referenced in this path. These two writes aren't atomic — a crash between them either loses the message (DB committed, publish failed) or emits a phantom event (publish succeeded, DB rolled back). Use the transactional outbox pattern — write the message to an outbox table in the SAME transaction as the state change, and dispatch it from there afterwards — or your platform's equivalent (a broker transaction, or an outbox library from your own ecosystem).
Serious — 180 finding(s)
D17 · Explicit Debt · TodoComment · ×20
  • TodoComment internal/pkg/core/serializer/json/message_serializer.go:48 — // TODO implement me — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment internal/pkg/mongodb/repository/mongo_generic_repository.go:495 — // TODO implement me — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment internal/pkg/postgresmessaging/messagepersistence/postgres_message_service.go:24 — // TODO implement me — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment internal/pkg/postgresmessaging/messagepersistence/postgres_message_service.go:29 — // TODO implement me — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment internal/pkg/postgresmessaging/messagepersistence/postgres_message_service.go:37 — // TODO implement me — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment internal/pkg/postgresmessaging/messagepersistence/postgres_message_service.go:45 — // TODO implement me — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment internal/services/orderservice/internal/orders/data/repositories/elastic_order_read_repository.go:34 — // TODO implement me — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment internal/services/orderservice/internal/orders/data/repositories/elastic_order_read_repository.go:43 — // TODO implement me — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment internal/services/orderservice/internal/orders/data/repositories/elastic_order_read_repository.go:51 — // TODO implement me — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment internal/services/orderservice/internal/orders/data/repositories/elastic_order_read_repository.go:59 — // TODO implement me — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment internal/services/orderservice/internal/orders/data/repositories/elastic_order_read_repository.go:67 — // TODO implement me — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment internal/services/orderservice/internal/orders/data/repositories/elastic_order_read_repository.go:75 — // TODO implement me — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment internal/services/orderservice/internal/orders/data/repositories/elastic_order_read_repository.go:80 — // TODO implement me — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment internal/pkg/mapper/mapper.go:447 — // TODO dynamic cast, m.b. with Mapper extensions — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment internal/pkg/test/containers/testcontainer/eventstoredb/eventstoredb_container.go:50 — // TODO: Using Parallel Container — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment internal/pkg/test/containers/testcontainer/gorm/gorm_container.go:55 — // TODO: Using Parallel Container — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment internal/pkg/test/containers/testcontainer/mongo/mongo_container.go:60 — // TODO: Using Parallel Container — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment internal/pkg/test/containers/testcontainer/postgrespxg/postgrespgx_container.go:52 — // TODO: Using Parallel Container — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment internal/pkg/test/containers/testcontainer/redis/redis_container.go:50 — // TODO: Using Parallel Container — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment internal/services/orderservice/internal/orders/projections/elastic_order_projection.go:25 — // TODO: Handling and projecting event to elastic read model — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D30 · Dependency Vulnerabilities · Medium CVE · ×13
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×13
  • Swallowed exception (caught, then discarded) internal/pkg/core/metadata/metadata_extentions.go:29 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) internal/pkg/core/serializer/json/json_serializer.go:74 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) internal/pkg/core/serializer/json/json_serializer.go:85 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) internal/pkg/core/serializer/json/json_serializer.go:92 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) internal/pkg/eventstroredb/esdb_serilizer.go:179 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) internal/pkg/eventstroredb/aggregate_store.go:84 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) internal/pkg/http/customecho/config/echo_http_options.go:33 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) internal/pkg/mongodb/repository/mongo_generic_repository.go:485 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:26 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:43 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:68 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:174 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:203 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×10
  • Duplicated block (10 lines × 2) internal/pkg/core/serializer/json/event_serializer.go:86 — internal/pkg/core/serializer/json/event_serializer.go:86-95 | internal/pkg/core/serializer/json/message_serializer.go:95-104 — before extracting anything, compare `internal/pkg/core/serializer/json/event_serializer.go` and `internal/pkg/core/serializer/json/message_serializer.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `internal/pkg/core/serializer/json/event_serializer.go:86` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) internal/pkg/mapper/mapper.go:255 — internal/pkg/mapper/mapper.go:255-264 | internal/pkg/mapper/mapper.go:267-276 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) REDACTED:121 — REDACTED:121-130 | REDACTED:160-169 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:121` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) internal/services/catalogreadservice/internal/products/contracts/data/product_repository.go:10 — internal/services/catalogreadservice/internal/products/contracts/data/product_repository.go:10-19 | internal/services/catalogwriteservice/internal/products/contracts/product_repository.go:12-21 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `internal/services/catalogreadservice/internal/products/contracts/data/product_repository.go:10` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) internal/services/catalogwriteservice/internal/products/configurations/mappings/mapping_profile.go:39 — internal/services/catalogwriteservice/internal/products/configurations/mappings/mapping_profile.go:39-48 | internal/services/catalogwriteservice/internal/products/configurations/mappings/mapping_profile.go:55-64 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/services/catalogwriteservice/internal/products/configurations/mappings/mapping_profile.go:39` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) internal/pkg/core/serializer/json/event_serializer.go:101 — internal/pkg/core/serializer/json/event_serializer.go:101-110 | internal/pkg/core/serializer/json/message_serializer.go:110-119 — before extracting anything, compare `internal/pkg/core/serializer/json/event_serializer.go` and `internal/pkg/core/serializer/json/message_serializer.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `internal/pkg/core/serializer/json/event_serializer.go:101` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) internal/pkg/mongodb/repository/mongo_generic_repository.go:100 — internal/pkg/mongodb/repository/mongo_generic_repository.go:100-109 | internal/pkg/postgresgorm/repository/gorm_generic_repository.go:83-92 — before extracting anything, compare `internal/pkg/mongodb/repository/mongo_generic_repository.go` and `internal/pkg/postgresgorm/repository/gorm_generic_repository.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `internal/pkg/mongodb/repository/mongo_generic_repository.go:100` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) internal/pkg/mongodb/repository/mongo_generic_repository.go:408 — internal/pkg/mongodb/repository/mongo_generic_repository.go:408-417 | internal/pkg/postgresgorm/repository/gorm_generic_repository.go:265-274 — before extracting anything, compare `internal/pkg/mongodb/repository/mongo_generic_repository.go` and `internal/pkg/postgresgorm/repository/gorm_generic_repository.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `internal/pkg/mongodb/repository/mongo_generic_repository.go:408` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) internal/services/catalogwriteservice/internal/shared/grpc/product_grpc_service_server.go:105 — internal/services/catalogwriteservice/internal/shared/grpc/product_grpc_service_server.go:105-114 | internal/services/catalogwriteservice/internal/shared/grpc/product_grpc_service_server.go:171-180 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/services/catalogwriteservice/internal/shared/grpc/product_grpc_service_server.go:105` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) internal/services/catalogreadservice/internal/shared/testfixture/integration/integration_test_fixture.go:76 — internal/services/catalogreadservice/internal/shared/testfixture/integration/integration_test_fixture.go:76-86 | internal/services/orderservice/internal/shared/test_fixtures/integration/integration_test_fixture.go:88-97 — before extracting anything, compare `internal/services/catalogreadservice/internal/shared/testfixture/integration/integration_test_fixture.go` and `internal/services/orderservice/internal/shared/test_fixtures/integration/integration_test_fixture.go` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×7
  • Duplicated block (6 lines × 2) internal/pkg/es/models/stream_name/stream_name.go:29 — internal/pkg/es/models/stream_name/stream_name.go:29-34 | internal/pkg/es/models/stream_name/stream_name.go:42-47 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) internal/pkg/mongodb/repository/mongo_generic_repository.go:206 — internal/pkg/mongodb/repository/mongo_generic_repository.go:206-215 | internal/pkg/mongodb/repository/mongo_generic_repository.go:235-240 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/pkg/mongodb/repository/mongo_generic_repository.go:206` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 2) REDACTED:50 — REDACTED:50-55 | REDACTED:127-132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:50` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) REDACTED:87 — REDACTED:87-92 | REDACTED:166-171 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:87` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) internal/services/catalogreadservice/internal/shared/app/application.go:22 — internal/services/catalogreadservice/internal/shared/app/application.go:22-27 | internal/services/catalogwriteservice/internal/shared/app/application.go:22-27 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `internal/services/catalogreadservice/internal/shared/app/application.go:22` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) internal/services/orderservice/internal/orders/data/repositories/mongo_order_read_repository.go:128 — internal/services/orderservice/internal/orders/data/repositories/mongo_order_read_repository.go:128-133 | internal/services/orderservice/internal/orders/data/repositories/mongo_order_read_repository.go:165-170 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (6 lines × 2) internal/pkg/mapper/mapper.go:73 — internal/pkg/mapper/mapper.go:73-78 | internal/pkg/mapper/mapper.go:137-142 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D12 · Dependency Hygiene · Deprecated module · ×4
  • Deprecated module: go.mongodb.org/mongo-driver — `go.mongodb.org/mongo-driver` is required at v1.12.1 in REDACTED, and its author has DEPRECATED the module: "Use go.mongodb.org/mongo-driver/v2 instead." A deprecation is declared by the author in the module's own REDACTED and applies to the whole module, not to one release, so moving to a newer version of it does not clear this. Follow the replacement the notice names.
  • Deprecated module: go.mongodb.org/mongo-driver — `go.mongodb.org/mongo-driver` is required at v1.12.1 in internal/services/orderservice/go.mod, and its author has DEPRECATED the module: "Use go.mongodb.org/mongo-driver/v2 instead." A deprecation is declared by the author in the module's own REDACTED and applies to the whole module, not to one release, so moving to a newer version of it does not clear this. Follow the replacement the notice names.
  • Deprecated module: go.mongodb.org/mongo-driver — `go.mongodb.org/mongo-driver` is required at v1.12.1 in REDACTED, and its author has DEPRECATED the module: "Use go.mongodb.org/mongo-driver/v2 instead." A deprecation is declared by the author in the module's own REDACTED and applies to the whole module, not to one release, so moving to a newer version of it does not clear this. Follow the replacement the notice names.
  • Deprecated module: go.opentelemetry.io/otel/exporters/zipkin — `go.opentelemetry.io/otel/exporters/zipkin` is required at v1.19.0 in REDACTED, and its author has DEPRECATED the module: "The zipkin exporter is deprecated and will be removed in early 2027. See the blog post "Deprecating Zipkin Exporter": https://opentelemetry.io/blog/2025/deprecating-zipkin-exporters/" A deprecation is declared by the author in the module's own REDACTED and applies to the whole module, not to one release, so moving to a newer version of it does not clear this. Follow the replacement the notice names.
D31 · IaC & Container Security · Medium IaC · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×4
  • Duplicated block (12 lines × 2) internal/pkg/postgresgorm/gormdbcontext/gorm_dbcontext_extensions.go:155 — internal/pkg/postgresgorm/gormdbcontext/gorm_dbcontext_extensions.go:155-166 | internal/pkg/postgresgorm/gormdbcontext/gorm_dbcontext_extensions.go:220-231 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) internal/services/catalogreadservice/internal/products/features/get_product_by_id/v1/endpoints/get_product_by_id_endpoint.go:43 — internal/services/catalogreadservice/internal/products/features/get_product_by_id/v1/endpoints/get_product_by_id_endpoint.go:43-54 | internal/services/catalogwriteservice/internal/products/features/gettingproductbyid/v1/get_product_by_id_endpoint.go:40-51 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `internal/services/catalogreadservice/internal/products/features/get_product_by_id/v1/endpoints/get_product_by_id_endpoint.go:43` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) internal/services/catalogreadservice/internal/shared/contracts/catalogs_metrics.go:7 — internal/services/catalogreadservice/internal/shared/contracts/catalogs_metrics.go:7-18 | internal/services/catalogwriteservice/internal/shared/contracts/catalogs_metrics.go:7-18 — before extracting anything, compare `internal/services/catalogreadservice/internal/shared/contracts/catalogs_metrics.go` and `internal/services/catalogwriteservice/internal/shared/contracts/catalogs_metrics.go` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) internal/services/catalogreadservice/internal/products/data/repositories/redis_product_repository.go:75 — internal/services/catalogreadservice/internal/products/data/repositories/redis_product_repository.go:75-89 | internal/services/catalogreadservice/internal/products/data/repositories/redis_product_repository.go:132-143 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/services/catalogreadservice/internal/products/data/repositories/redis_product_repository.go:75` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D12 · Dependency Hygiene · Dependency pinned to a stale untagged commit · ×3
  • Dependency pinned to a stale untagged commit: github.com/TylerBrock/colorjson — Direct dependency `github.com/TylerBrock/colorjson` is required at `v0.0.0-20200706003622-8a50f05110d2` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2020-07-06, 6.3 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/TylerBrock/colorjson` and has not moved this requirement in 6.3 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/TylerBrock/colorjson` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
  • Dependency pinned to a stale untagged commit: github.com/araddon/dateparse — Direct dependency `github.com/araddon/dateparse` is required at `v0.0.0-20210429162001-6b43995a97de` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2021-04-29, 5.5 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/araddon/dateparse` and has not moved this requirement in 5.5 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/araddon/dateparse` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
  • Dependency pinned to a stale untagged commit: github.com/phayes/freeport — Direct dependency `github.com/phayes/freeport` is required at `v0.0.0-20220201140144-74d24b5ae9f5` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2022-02-01, 4.7 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/phayes/freeport` and has not moved this requirement in 4.7 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/phayes/freeport` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×3
  • Duplicated block (11 lines × 2) internal/services/catalogwriteservice/internal/products/features/creatingproduct/v1/create_product.go:59 — internal/services/catalogwriteservice/internal/products/features/creatingproduct/v1/create_product.go:59-69 | internal/services/catalogwriteservice/internal/products/features/updatingproduct/v1/update_product.go:54-64 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `internal/services/catalogwriteservice/internal/products/features/creatingproduct/v1/create_product.go:59` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) internal/services/catalogreadservice/internal/shared/testfixture/integration/integration_test_fixture.go:89 — internal/services/catalogreadservice/internal/shared/testfixture/integration/integration_test_fixture.go:89-99 | internal/services/orderservice/internal/shared/test_fixtures/integration/integration_test_fixture.go:100-110 — before extracting anything, compare `internal/services/catalogreadservice/internal/shared/testfixture/integration/integration_test_fixture.go` and `internal/services/orderservice/internal/shared/test_fixtures/integration/integration_test_fixture.go` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) internal/services/catalogreadservice/internal/shared/testfixture/integration/integration_test_fixture.go:129 — internal/services/catalogreadservice/internal/shared/testfixture/integration/integration_test_fixture.go:129-139 | internal/services/orderservice/internal/shared/test_fixtures/integration/integration_test_fixture.go:209-219 — before extracting anything, compare `internal/services/catalogreadservice/internal/shared/testfixture/integration/integration_test_fixture.go` and `internal/services/orderservice/internal/shared/test_fixtures/integration/integration_test_fixture.go` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `internal/services/catalogreadservice/internal/shared/testfixture/integration/integration_test_fixture.go:129` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×3
  • Duplicated block (8 lines × 2) internal/services/catalogreadservice/internal/products/products_fx.go:22 — internal/services/catalogreadservice/internal/products/products_fx.go:22-29 | internal/services/catalogwriteservice/internal/products/products_fx.go:27-36 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `internal/services/catalogreadservice/internal/products/products_fx.go:22` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) internal/services/catalogreadservice/config/config.go:14 — internal/services/catalogreadservice/config/config.go:14-21 | internal/services/orderservice/config/config.go:14-21 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) internal/pkg/eventstroredb/event_store.go:54 — internal/pkg/eventstroredb/event_store.go:54-61 | internal/pkg/eventstroredb/event_store.go:182-189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/pkg/eventstroredb/event_store.go:54` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
DM7 · Repository granularity · Leaky repository contract · ×3
  • Leaky repository contract: ProductRepository internal/services/catalogreadservice/internal/products/contracts/data/product_repository.go:11 — `ProductRepository` leaks the persistence query-machinery type `ListQuery` into its contract. A repository should be a persistence PORT over an aggregate ROOT — expose intention-revealing whole-aggregate operations (Save/FindByID) and keep framework types, query specifications and business logic out of its contract so callers can't bypass the aggregate's invariants.
  • Leaky repository contract: ProductRepository internal/services/catalogwriteservice/internal/products/contracts/product_repository.go:13 — `ProductRepository` leaks the persistence query-machinery type `ListQuery` into its contract. A repository should be a persistence PORT over an aggregate ROOT — expose intention-revealing whole-aggregate operations (Save/FindByID) and keep framework types, query specifications and business logic out of its contract so callers can't bypass the aggregate's invariants.
  • Leaky repository contract: orderReadRepository internal/services/orderservice/internal/orders/contracts/repositories/order_repository.go:13 — `orderReadRepository` leaks the persistence query-machinery type `ListQuery` into its contract. A repository should be a persistence PORT over an aggregate ROOT — expose intention-revealing whole-aggregate operations (Save/FindByID) and keep framework types, query specifications and business logic out of its contract so callers can't bypass the aggregate's invariants.
P8 · Schema migrations · Schema created by GORM AutoMigrate outside the migrations · ×3
  • Schema created by GORM AutoMigrate outside the migrations internal/pkg/postgresmessaging/postgres_messaging_fx.go:21 — This repository versions its schema (Atlas, goose, versioned SQL (up/down)), but GORM AutoMigrate here builds or alters the schema from the model as well, outside that history — the two paths can disagree about the shape, and a change made this way is never a reviewed migration. Turn it off and let Atlas, goose, versioned SQL (up/down) own the schema.
  • Schema created by GORM AutoMigrate outside the migrations internal/services/catalogwriteservice/internal/shared/configurations/catalogs/catalogs_configurator_migration.go:34 — This repository versions its schema (Atlas, goose, versioned SQL (up/down)), but GORM AutoMigrate here builds or alters the schema from the model as well, outside that history — the two paths can disagree about the shape, and a change made this way is never a reviewed migration. Turn it off and let Atlas, goose, versioned SQL (up/down) own the schema.
  • Schema created by GORM AutoMigrate outside the migrations internal/services/catalogwriteservice/internal/shared/testfixtures/unittest/unit_test_fixture.go:175 — This repository versions its schema (Atlas, goose, versioned SQL (up/down)), but GORM AutoMigrate here builds or alters the schema from the model as well, outside that history — the two paths can disagree about the shape, and a change made this way is never a reviewed migration. Turn it off and let Atlas, goose, versioned SQL (up/down) own the schema.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D3 · God Classes · FunctionTooLong · ×2
  • FunctionTooLong: mappings.ConfigureOrdersMappings REDACTED:15 — FunctionTooLong — ConfigureOrdersMappings runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: orders.configOrdersMetrics internal/services/orderservice/internal/shared/configurations/orders/orders_fx.go:33 — FunctionTooLong — configOrdersMetrics runs 123 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×2
  • Duplicated block (24 lines × 2) internal/services/catalogreadservice/internal/shared/configurations/catalogs/catalogs_configurator.go:48 — internal/services/catalogreadservice/internal/shared/configurations/catalogs/catalogs_configurator.go:48-71 | internal/services/orderservice/internal/shared/configurations/orders/orders_configurator.go:50-73 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (24 lines × 2) internal/services/catalogwriteservice/internal/shared/configurations/catalogs/catalogs_configurator_seed.go:76 — internal/services/catalogwriteservice/internal/shared/configurations/catalogs/catalogs_configurator_seed.go:76-99 | internal/services/catalogwriteservice/internal/shared/testfixtures/integration/integration_test_fixture.go:173-196 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `internal/services/catalogwriteservice/internal/shared/configurations/catalogs/catalogs_configurator_seed.go:76` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22–23 lines × 2) · ×2
  • Duplicated block (22–23 lines × 2) internal/services/catalogreadservice/internal/products/features/deleting_products/v1/commands/delete_product_handler.go:40 — internal/services/catalogreadservice/internal/products/features/deleting_products/v1/commands/delete_product_handler.go:40-61 | internal/services/catalogreadservice/internal/products/features/updating_products/v1/commands/update_product_handler.go:40-62 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22–23 lines × 2) internal/services/catalogreadservice/internal/products/features/searching_products/v1/endpoints/search_products_endpoint.go:44 — internal/services/catalogreadservice/internal/products/features/searching_products/v1/endpoints/search_products_endpoint.go:44-66 | internal/services/catalogwriteservice/internal/products/features/searchingproduct/v1/search_products_endpoint.go:41-62 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `internal/services/catalogreadservice/internal/products/features/searching_products/v1/endpoints/search_products_endpoint.go:44` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×2
  • Duplicated block (18 lines × 2) internal/pkg/eventstroredb/esdb_serilizer.go:199 — internal/pkg/eventstroredb/esdb_serilizer.go:199-216 | internal/pkg/eventstroredb/esdb_serilizer.go:223-240 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/pkg/eventstroredb/esdb_serilizer.go:199` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) internal/services/catalogreadservice/internal/shared/configurations/catalogs/infrastructure/infrastructure_configurator.go:28 — internal/services/catalogreadservice/internal/shared/configurations/catalogs/infrastructure/infrastructure_configurator.go:28-45 | internal/services/orderservice/internal/shared/configurations/orders/infrastructure/infrastructure_configurator.go:28-45 — before extracting anything, compare `internal/services/catalogreadservice/internal/shared/configurations/catalogs/infrastructure/infrastructure_configurator.go` and `internal/services/orderservice/internal/shared/configurations/orders/infrastructure/infrastructure_configurator.go` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×2
  • Duplicated block (16 lines × 2) internal/pkg/core/serializer/json/event_serializer.go:26 — internal/pkg/core/serializer/json/event_serializer.go:26-41 | internal/pkg/core/serializer/json/message_serializer.go:28-43 — before extracting anything, compare `internal/pkg/core/serializer/json/event_serializer.go` and `internal/pkg/core/serializer/json/message_serializer.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) internal/services/catalogreadservice/internal/products/features/getting_products/v1/queries/get_products_handler.go:39 — internal/services/catalogreadservice/internal/products/features/getting_products/v1/queries/get_products_handler.go:39-55 | internal/services/catalogreadservice/internal/products/features/searching_products/v1/queries/search_products_handler.go:43-58 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `internal/services/catalogreadservice/internal/products/features/getting_products/v1/queries/get_products_handler.go:39` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×2
  • Duplicated block (15 lines × 2) internal/pkg/postgresgorm/gormdbcontext/gorm_dbcontext_extensions.go:174 — internal/pkg/postgresgorm/gormdbcontext/gorm_dbcontext_extensions.go:174-188 | internal/pkg/postgresgorm/gormdbcontext/gorm_dbcontext_extensions.go:239-253 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/pkg/postgresgorm/gormdbcontext/gorm_dbcontext_extensions.go:174` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) internal/services/catalogreadservice/internal/shared/testfixture/integration/integration_test_fixture.go:191 — internal/services/catalogreadservice/internal/shared/testfixture/integration/integration_test_fixture.go:191-205 | internal/services/orderservice/internal/shared/test_fixtures/integration/integration_test_fixture.go:148-162 — before extracting anything, compare `internal/services/catalogreadservice/internal/shared/testfixture/integration/integration_test_fixture.go` and `internal/services/orderservice/internal/shared/test_fixtures/integration/integration_test_fixture.go` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `internal/services/catalogreadservice/internal/shared/testfixture/integration/integration_test_fixture.go:191` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×2
  • Duplicated block (13 lines × 2) REDACTED:31 — REDACTED:31-43 | REDACTED:68-80 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:31` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) REDACTED:107 — REDACTED:107-119 | REDACTED:146-158 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:107` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×2
  • Duplicated block (11 lines × 3) REDACTED:62 — REDACTED:62-72 | REDACTED:132-143 | REDACTED:97-108 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 59 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:132` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 3) internal/pkg/otel/metrics/mediatr/pipelines/mediator_metrics_pipeline.go:28 — internal/pkg/otel/metrics/mediatr/pipelines/mediator_metrics_pipeline.go:28-38 | internal/pkg/otel/metrics/messaging/pipeline/messaging_metrics_pipeline.go:27-37 | internal/pkg/otel/tracing/mediatr/pipelines/mediator_tracing_pipeline.go:27-37 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `internal/pkg/otel/metrics/mediatr/pipelines/mediator_metrics_pipeline.go:28` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×2
  • Duplicated block (9 lines × 2) internal/pkg/mongodb/repository/mongo_generic_repository.go:152 — internal/pkg/mongodb/repository/mongo_generic_repository.go:152-160 | internal/pkg/postgresgorm/repository/gorm_generic_repository.go:131-140 — before extracting anything, compare `internal/pkg/mongodb/repository/mongo_generic_repository.go` and `internal/pkg/postgresgorm/repository/gorm_generic_repository.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `internal/pkg/mongodb/repository/mongo_generic_repository.go:152` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) internal/services/orderservice/internal/orders/data/repositories/mongo_order_read_repository.go:134 — internal/services/orderservice/internal/orders/data/repositories/mongo_order_read_repository.go:134-142 | internal/services/orderservice/internal/orders/data/repositories/mongo_order_read_repository.go:171-179 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/services/orderservice/internal/orders/data/repositories/mongo_order_read_repository.go:134` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×2
  • Duplicated block (7 lines × 2) internal/pkg/core/serializer/json/event_serializer.go:60 — internal/pkg/core/serializer/json/event_serializer.go:60-66 | internal/pkg/core/serializer/json/message_serializer.go:69-75 — before extracting anything, compare `internal/pkg/core/serializer/json/event_serializer.go` and `internal/pkg/core/serializer/json/message_serializer.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) internal/pkg/http/customecho/middlewares/otel_metrics/metric.go:327 — internal/pkg/http/customecho/middlewares/otel_metrics/metric.go:327-333 | internal/pkg/http/customecho/middlewares/otel_metrics/metric.go:346-352 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/pkg/http/customecho/middlewares/otel_metrics/metric.go:327` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×2
  • Duplicated block (5 lines × 2) internal/pkg/mapper/mapper.go:177 — internal/pkg/mapper/mapper.go:177-181 | internal/pkg/mapper/mapper.go:185-189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) internal/pkg/logger/external/fxlog/fx.go:79 — internal/pkg/logger/external/fxlog/fx.go:79-83 | internal/pkg/logger/external/fxlog/fx.go:88-92 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×2
  • Duplicated block (9 lines × 3) internal/services/catalogreadservice/internal/shared/app/application_builder.go:18 — internal/services/catalogreadservice/internal/shared/app/application_builder.go:18-26 | internal/services/catalogwriteservice/internal/shared/app/application_builder.go:18-26 | internal/services/orderservice/internal/shared/app/application_builder.go:16-24 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (9 lines × 3) internal/services/orderservice/internal/orders/exceptions/domain_exceptions/invalid_delivery_address_error.go:16 — internal/services/orderservice/internal/orders/exceptions/domain_exceptions/invalid_delivery_address_error.go:16-24 | internal/services/orderservice/internal/orders/exceptions/domain_exceptions/invalid_email_error.go:17-25 | internal/services/orderservice/internal/orders/exceptions/domain_exceptions/order_items_required_errors.go:17-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D1 · Cyclomatic Complexity · FxCustomLogger.LogEvent (cyclomatic 33) · ×1
  • FxCustomLogger.LogEvent (cyclomatic 33) internal/pkg/logger/external/fxlog/fx.go:36 — FxCustomLogger.LogEvent has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mappings.ConfigureOrdersMappings (cyclomatic 21) · ×1
  • mappings.ConfigureOrdersMappings (cyclomatic 21) REDACTED:15 — mappings.ConfigureOrdersMappings has cyclomatic complexity 21 (threshold 15). Of this number, 15 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · orders.configOrdersMetrics (cyclomatic 21) · ×1
  • orders.configOrdersMetrics (cyclomatic 21) internal/services/orderservice/internal/shared/configurations/orders/orders_fx.go:33 — orders.configOrdersMetrics has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mapper.Map (cyclomatic 19) · ×1
  • mapper.Map (cyclomatic 19) internal/pkg/mapper/mapper.go:164 — mapper.Map has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TracingOpenTelemetry.configExporters (cyclomatic 19) · ×1
  • TracingOpenTelemetry.configExporters (cyclomatic 19) internal/pkg/otel/tracing/tracing.go:149 — TracingOpenTelemetry.configExporters has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · rabbitMQProducer.PublishMessageWithTopicName (cyclomatic 18) · ×1
  • rabbitMQProducer.PublishMessageWithTopicName (cyclomatic 18) internal/pkg/rabbitmq/producer/rabbitmq_producer.go:75 — rabbitMQProducer.PublishMessageWithTopicName has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mapper.CreateMap (cyclomatic 17) · ×1
  • mapper.CreateMap (cyclomatic 17) internal/pkg/mapper/mapper.go:72 — mapper.CreateMap has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · rabbitMQConsumer.Start (cyclomatic 17) · ×1
  • rabbitMQConsumer.Start (cyclomatic 17) internal/pkg/rabbitmq/consumer/rabbitmq_consumer.go:101 — rabbitMQConsumer.Start has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · TracingOpenTelemetry.configExporters (cognitive 45) · ×1
  • TracingOpenTelemetry.configExporters (cognitive 45) internal/pkg/otel/tracing/tracing.go:149 — TracingOpenTelemetry.configExporters has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (43 pts), loops 1 (2 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FxCustomLogger.LogEvent (cognitive 37) · ×1
  • FxCustomLogger.LogEvent (cognitive 37) internal/pkg/logger/external/fxlog/fx.go:36 — FxCustomLogger.LogEvent has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (30 pts), loops 3 (6 pts), match/switch 1 (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · OtelMetrics.configExporters (cognitive 34) · ×1
  • OtelMetrics.configExporters (cognitive 34) internal/pkg/otel/metrics/metrics.go:127 — OtelMetrics.configExporters has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (32 pts), loops 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rabbitMQConsumer.Start (cognitive 23) · ×1
  • rabbitMQConsumer.Start (cognitive 23) internal/pkg/rabbitmq/consumer/rabbitmq_consumer.go:101 — rabbitMQConsumer.Start has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (17 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 6). Of this number, 14 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · esdbSubscriptionAllWorker.SubscribeAll (cognitive 22) · ×1
  • esdbSubscriptionAllWorker.SubscribeAll (cognitive 22) internal/pkg/eventstroredb/subscription_all_worker.go:72 — esdbSubscriptionAllWorker.SubscribeAll has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rabbitMQProducer.PublishMessageWithTopicName (cognitive 22) · ×1
  • rabbitMQProducer.PublishMessageWithTopicName (cognitive 22) internal/pkg/rabbitmq/producer/rabbitmq_producer.go:75 — rabbitMQProducer.PublishMessageWithTopicName has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · mapper.CreateMap (cognitive 21) · ×1
  • mapper.CreateMap (cognitive 21) internal/pkg/mapper/mapper.go:72 — mapper.CreateMap has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 8 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoGenericRepository.Update (cognitive 20) · ×1
  • mongoGenericRepository.Update (cognitive 20) internal/pkg/mongodb/repository/mongo_generic_repository.go:350 — mongoGenericRepository.Update has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (20 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mappings.ConfigureOrdersMappings (cognitive 20) · ×1
  • mappings.ConfigureOrdersMappings (cognitive 20) REDACTED:15 — mappings.ConfigureOrdersMappings has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20. Of this number, 14 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · orders.configOrdersMetrics (cognitive 20) · ×1
  • orders.configOrdersMetrics (cognitive 20) internal/services/orderservice/internal/shared/configurations/orders/orders_fx.go:33 — orders.configOrdersMetrics has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · mapper.mapStructs (cognitive 19) · ×1
  • mapper.mapStructs (cognitive 19) internal/pkg/mapper/mapper.go:331 — mapper.mapStructs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · typemapper.discoverTypes (cognitive 19) · ×1
  • typemapper.discoverTypes (cognitive 19) REDACTED:29 — typemapper.discoverTypes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoGenericRepository.Search (cognitive 18) · ×1
  • mongoGenericRepository.Search (cognitive 18) internal/pkg/mongodb/repository/mongo_generic_repository.go:194 — mongoGenericRepository.Search has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · config.BindConfigKey (cognitive 16) · ×1
  • config.BindConfigKey (cognitive 16) internal/pkg/config/config_helper.go:23 — config.BindConfigKey has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (16 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mapper.Map (cognitive 16) · ×1
  • mapper.Map (cognitive 16) internal/pkg/mapper/mapper.go:164 — mapper.Map has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · mapper.configProfile (cognitive 16) · ×1
  • mapper.configProfile (cognitive 16) internal/pkg/mapper/mapper.go:219 — mapper.configProfile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rabbitMQConsumer.handleReceived (cognitive 16) · ×1
  • rabbitMQConsumer.handleReceived (cognitive 16) internal/pkg/rabbitmq/consumer/rabbitmq_consumer.go:290 — rabbitMQConsumer.handleReceived has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (3 pts) (nesting depth added 8). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 332, 350). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D3 · God Classes · MethodTooLong · ×1
  • MethodTooLong: TracingOpenTelemetry.configExporters internal/pkg/otel/tracing/tracing.go:149 — MethodTooLong — configExporters runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D36 · Supply-chain Provenance & Signing REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (57 shared lines) · ×1
  • Near-duplicate member pair (57 shared lines) internal/services/catalogreadservice/internal/shared/configurations/catalogs/catalogs_fx.go:34 — internal/services/catalogreadservice/internal/shared/configurations/catalogs/catalogs_fx.go:34-135 | internal/services/catalogwriteservice/internal/shared/configurations/catalogs/catalogs_fx.go:36-163 — These two members are variants of one another: 57 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:60 — REDACTED:60-97 | REDACTED:97-155 | REDACTED:130-169 | REDACTED:95-134 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (32–36 lines × 2) · ×1
  • Duplicated block (32–36 lines × 2) internal/pkg/mongodb/repository/mongo_generic_repository.go:268 — internal/pkg/mongodb/repository/mongo_generic_repository.go:268-303 | internal/pkg/mongodb/repository/mongo_generic_repository.go:447-478 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/pkg/mongodb/repository/mongo_generic_repository.go:268` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×1
  • Duplicated block (27 lines × 2) REDACTED:133 — REDACTED:133-159 | REDACTED:98-124 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 59 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:133` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (25–27 lines × 2) · ×1
  • Duplicated block (25–27 lines × 2) internal/services/catalogreadservice/internal/shared/configurations/catalogs/catalogs_fx.go:43 — internal/services/catalogreadservice/internal/shared/configurations/catalogs/catalogs_fx.go:43-67 | internal/services/catalogwriteservice/internal/shared/configurations/catalogs/catalogs_fx.go:41-67 — before extracting anything, compare `internal/services/catalogreadservice/internal/shared/configurations/catalogs/catalogs_fx.go` and `internal/services/catalogwriteservice/internal/shared/configurations/catalogs/catalogs_fx.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `internal/services/catalogreadservice/internal/shared/configurations/catalogs/catalogs_fx.go:43` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (19–21 lines × 2) · ×1
  • Duplicated block (19–21 lines × 2) internal/pkg/mongodb/repository/mongo_generic_repository.go:128 — internal/pkg/mongodb/repository/mongo_generic_repository.go:128-146 | internal/pkg/postgresgorm/repository/gorm_generic_repository.go:105-125 — before extracting anything, compare `internal/pkg/mongodb/repository/mongo_generic_repository.go` and `internal/pkg/postgresgorm/repository/gorm_generic_repository.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `internal/pkg/mongodb/repository/mongo_generic_repository.go:128` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) REDACTED:203 — REDACTED:203-223 | REDACTED:227-247 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:203` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (20 lines × 4) · ×1
  • Duplicated block (20 lines × 4) REDACTED:78 — REDACTED:78-97 | REDACTED:136-155 | REDACTED:150-169 | REDACTED:115-134 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 59 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:78` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×1
  • Duplicated block (20 lines × 2) internal/pkg/eventstroredb/esdb_serilizer.go:245 — internal/pkg/eventstroredb/esdb_serilizer.go:245-264 | internal/pkg/eventstroredb/esdb_serilizer.go:269-288 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (17–20 lines × 2) · ×1
  • Duplicated block (17–20 lines × 2) internal/pkg/rabbitmq/bus/rabbitmq-bus.go:164 — internal/pkg/rabbitmq/bus/rabbitmq-bus.go:164-183 | internal/pkg/rabbitmq/bus/rabbitmq-bus.go:209-225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/pkg/rabbitmq/bus/rabbitmq-bus.go:164` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×1
  • Duplicated block (18–19 lines × 2) internal/services/catalogreadservice/internal/shared/configurations/catalogs/catalogs_fx.go:118 — internal/services/catalogreadservice/internal/shared/configurations/catalogs/catalogs_fx.go:118-135 | internal/services/catalogwriteservice/internal/shared/configurations/catalogs/catalogs_fx.go:145-163 — before extracting anything, compare `internal/services/catalogreadservice/internal/shared/configurations/catalogs/catalogs_fx.go` and `internal/services/catalogwriteservice/internal/shared/configurations/catalogs/catalogs_fx.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `internal/services/catalogreadservice/internal/shared/configurations/catalogs/catalogs_fx.go:118` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14–17 lines × 2) · ×1
  • Duplicated block (14–17 lines × 2) internal/services/catalogreadservice/internal/shared/configurations/catalogs/catalogs_fx.go:70 — internal/services/catalogreadservice/internal/shared/configurations/catalogs/catalogs_fx.go:70-83 | internal/services/catalogwriteservice/internal/shared/configurations/catalogs/catalogs_fx.go:72-88 — before extracting anything, compare `internal/services/catalogreadservice/internal/shared/configurations/catalogs/catalogs_fx.go` and `internal/services/catalogwriteservice/internal/shared/configurations/catalogs/catalogs_fx.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `internal/services/catalogreadservice/internal/shared/configurations/catalogs/catalogs_fx.go:70` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11–12 lines × 3) · ×1
  • Duplicated block (11–12 lines × 3) internal/pkg/otel/tracing/utils/utils.go:108 — internal/pkg/otel/tracing/utils/utils.go:108-119 | internal/pkg/otel/tracing/utils/utils.go:188-198 | internal/pkg/otel/tracing/utils/utils.go:215-225 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/pkg/otel/tracing/utils/utils.go:108` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `internal/pkg/otel/tracing/utils/utils.go:226` calls `SetAttributes`, `Int` and `internal/pkg/otel/tracing/utils/utils.go:120` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×1
  • Duplicated block (12 lines × 3) internal/pkg/postgresgorm/gormdbcontext/gorm_dbcontext_extensions.go:58 — internal/pkg/postgresgorm/gormdbcontext/gorm_dbcontext_extensions.go:58-70 | internal/pkg/postgresgorm/gormdbcontext/gorm_dbcontext_extensions.go:174-185 | internal/pkg/postgresgorm/gormdbcontext/gorm_dbcontext_extensions.go:239-250 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/pkg/postgresgorm/gormdbcontext/gorm_dbcontext_extensions.go:58` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (9–10 lines × 3) · ×1
  • Duplicated block (9–10 lines × 3) internal/pkg/otel/tracing/utils/utils.go:297 — internal/pkg/otel/tracing/utils/utils.go:297-305 | internal/pkg/otel/tracing/utils/utils.go:312-320 | internal/pkg/otel/tracing/utils/utils.go:326-335 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/pkg/otel/tracing/utils/utils.go:297` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `internal/pkg/otel/tracing/utils/utils.go:296` calls `ParentSpanFromContext` and `internal/pkg/otel/tracing/utils/utils.go:325` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) internal/pkg/otel/metrics/metrics.go:74 — internal/pkg/otel/metrics/metrics.go:74-82 | internal/pkg/otel/tracing/tracing.go:75-82 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `internal/pkg/otel/metrics/metrics.go:74` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `internal/pkg/otel/tracing/tracing.go:84` calls `Int64` and `internal/pkg/otel/metrics/metrics.go:84` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5–8 lines × 3) · ×1
  • Duplicated block (5–8 lines × 3) REDACTED:112 — REDACTED:112-116 | REDACTED:151-155 | REDACTED:190-197 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:112` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (36 lines × 3) · ×1
  • Duplicated block (36 lines × 3) internal/pkg/otel/metrics/mediatr/pipelines/config.go:8 — internal/pkg/otel/metrics/mediatr/pipelines/config.go:8-43 | internal/pkg/otel/metrics/messaging/pipeline/config.go:8-43 | internal/pkg/otel/tracing/mediatr/pipelines/config.go:8-43 — before extracting anything, compare `internal/pkg/otel/metrics/mediatr/pipelines/config.go` and `internal/pkg/otel/metrics/messaging/pipeline/config.go` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×1
  • Duplicated block (16 lines × 3) internal/pkg/http/httperrors/customerrors/api_error.go:49 — internal/pkg/http/httperrors/customerrors/api_error.go:49-64 | internal/pkg/http/httperrors/customerrors/application_error.go:63-78 | internal/pkg/http/httperrors/customerrors/domain_error.go:59-74 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (16 lines × 9) · ×1
  • Duplicated block (16 lines × 9) internal/pkg/http/httperrors/customerrors/bad_request_error.go:51 — internal/pkg/http/httperrors/customerrors/bad_request_error.go:51-66 | internal/pkg/http/httperrors/customerrors/conflict_error.go:51-66 | internal/pkg/http/httperrors/customerrors/forbiden_error.go:51-66 | internal/pkg/http/httperrors/customerrors/internal_server_error.go:51-66 | internal/pkg/http/httperrors/customerrors/marshaling_error.go:54-69 | internal/pkg/http/httperrors/customerrors/not_found_error.go:51-66 | internal/pkg/http/httperrors/customerrors/unauthorized_error.go:51-66 | internal/pkg/http/httperrors/customerrors/unmarshaling_error.go:54-69 | internal/pkg/http/httperrors/customerrors/validation_error.go:54-69 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 9 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×1
  • Duplicated block (6 lines × 3) internal/pkg/mongodb/mongo_options.go:23 — internal/pkg/mongodb/mongo_options.go:23-28 | internal/pkg/otel/metrics/metrics_options.go:36-42 | internal/pkg/otel/tracing/tracing_options.go:42-48 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `internal/pkg/mongodb/mongo_options.go:23` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×1
  • Duplicated block (19 lines × 2) internal/pkg/eventstroredb/event_store.go:204 — internal/pkg/eventstroredb/event_store.go:204-222 | internal/pkg/eventstroredb/event_store.go:297-315 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/pkg/eventstroredb/event_store.go:204` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (18 lines × 3) · ×1
  • Duplicated block (18 lines × 3) internal/pkg/otel/metrics/metrics.go:169 — internal/pkg/otel/metrics/metrics.go:169-187 | internal/pkg/otel/metrics/metrics.go:201-219 | internal/pkg/otel/metrics/metrics.go:231-248 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/pkg/otel/metrics/metrics.go:169` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (18–19 lines × 3) · ×1
  • Duplicated block (18–19 lines × 3) internal/services/catalogreadservice/internal/shared/testfixture/integration/integration_test_fixture.go:156 — internal/services/catalogreadservice/internal/shared/testfixture/integration/integration_test_fixture.go:156-174 | internal/services/catalogwriteservice/internal/shared/testfixtures/integration/integration_test_fixture.go:107-125 | internal/services/orderservice/internal/shared/test_fixtures/integration/integration_test_fixture.go:115-132 — before extracting anything, compare `internal/services/catalogreadservice/internal/shared/testfixture/integration/integration_test_fixture.go` and `internal/services/orderservice/internal/shared/test_fixtures/integration/integration_test_fixture.go` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) internal/services/catalogwriteservice/internal/shared/testfixtures/integration/integration_test_fixture.go:52 — internal/services/catalogwriteservice/internal/shared/testfixtures/integration/integration_test_fixture.go:52-62 | internal/services/orderservice/internal/shared/test_fixtures/integration/integration_test_fixture.go:60-69 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `internal/services/catalogwriteservice/internal/shared/testfixtures/integration/integration_test_fixture.go:52` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×1
  • Duplicated block (8 lines × 3) internal/services/catalogreadservice/internal/shared/testfixture/integration/integration_test_fixture.go:47 — internal/services/catalogreadservice/internal/shared/testfixture/integration/integration_test_fixture.go:47-54 | internal/services/catalogwriteservice/internal/shared/testfixtures/integration/integration_test_fixture.go:49-57 | internal/services/orderservice/internal/shared/test_fixtures/integration/integration_test_fixture.go:57-65 — before extracting anything, compare `internal/services/catalogreadservice/internal/shared/testfixture/integration/integration_test_fixture.go` and `internal/services/orderservice/internal/shared/test_fixtures/integration/integration_test_fixture.go` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `internal/services/catalogreadservice/internal/shared/testfixture/integration/integration_test_fixture.go:47` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D6 · Cohesion (LCOM4) · Low cohesion · ×1
  • Low cohesion: EsdbSerializer (LCOM4 4) internal/pkg/eventstroredb/esdb_serilizer.go:25 — EsdbSerializer's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×1
  • Outbound HTTP without resilience internal/pkg/http/client/http_client.go:22 — `resty.New(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Minor — 136 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×101
  • Orphaned file internal/pkg/rabbitmq/consumer/rabbitmq_consumer.go:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file internal/pkg/mongodb/repository/mongo_generic_repository.go:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file internal/pkg/mapper/mapper.go:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file internal/pkg/eventstroredb/event_store.go:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file internal/pkg/otel/tracing/tracing.go:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file internal/pkg/otel/metrics/metrics.go:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file internal/pkg/otel/tracing/utils/utils.go:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file internal/pkg/rabbitmq/bus/rabbitmq-bus.go:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file internal/pkg/http/customecho/middlewares/otel_metrics/metric.go:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file internal/pkg/postgresgorm/repository/gorm_generic_repository.go:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file internal/pkg/logger/zap/zap_logger.go:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file internal/services/orderservice/internal/orders/data/repositories/mongo_order_read_repository.go:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file internal/pkg/postgresgorm/gormdbcontext/gorm_dbcontext_extensions.go:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file internal/pkg/eventstroredb/aggregate_store.go:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file internal/pkg/grpc/handlers/otel/handler.go:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file internal/pkg/eventstroredb/esdb_serilizer.go:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file internal/pkg/rabbitmq/producer/rabbitmq_producer.go:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file internal/services/orderservice/internal/shared/test_fixtures/integration/integration_test_fixture.go:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file internal/pkg/rabbitmq/consumer/configurations/rabbitmq_consumer_configuration_builder.go:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file internal/services/catalogwriteservice/internal/shared/grpc/product_grpc_service_server.go:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file internal/services/catalogreadservice/internal/products/data/repositories/mongo_product_repository.go:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file internal/services/orderservice/internal/shared/grpc/order_grpc_service_server.go:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file internal/pkg/postgresmessaging/messagepersistence/postgres_message_service.go:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • + 76 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED · ×11
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
M4 · Documentation accuracy · README/code drift · ×10
  • README/code drift readme.md:29 — readme.md links to `pkg/messaging/bus/`, but `pkg/messaging/bus` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift readme.md:30 — readme.md links to `services/catalogs/read_service/`, but `services/catalogs/read_service` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift readme.md:31 — readme.md links to `services/orders/`, but `services/orders` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift readme.md:46 — readme.md links to `services/catalogs/write_service/`, but `services/catalogs/write_service` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift readme.md:46 — readme.md links to `services/catalogs/orders/`, but `services/catalogs/orders` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift readme.md:58 — readme.md names `rabbitmq/amqp091-go`, but no file or folder `rabbitmq/amqp091-go` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift readme.md:62 — readme.md names `grpc/grpc-go`, but no file or folder `grpc/grpc-go` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift readme.md:69 — readme.md links to `github.com/prometheus/client_golang`, but `github.com/prometheus/client_golang` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift readme.md:70 — readme.md names `mongodb/mongo-go-driver`, but no file or folder `mongodb/mongo-go-driver` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/buf.md:16 — docs/buf.md documents the environment variable `GO111MODULE`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
DM6 · Domain ↔ infrastructure boundary · Domain depends on infrastructure · ×4
  • Domain depends on infrastructure: domain_exceptions internal/services/orderservice/internal/orders/exceptions/domain_exceptions/invalid_delivery_address_error.go:4 — The domain package `github.com/mehdihadeli/go-food-delivery-microservices/internal/services/orderservice/internal/orders/exceptions/domain_exceptions` imports `http-transport` — an infrastructure concern (persistence/HTTP/broker/auth). The dependency direction points from the domain layer to infrastructure; invert it behind a domain-owned port.
  • Domain depends on infrastructure: domain_events internal/services/orderservice/internal/orders/features/creating_order/v1/events/domain_events/order_created.go:7 — The domain package `github.com/mehdihadeli/go-food-delivery-microservices/internal/services/orderservice/internal/orders/features/creating_order/v1/events/domain_events` imports `http-transport` — an infrastructure concern (persistence/HTTP/broker/auth). The dependency direction points from the domain layer to infrastructure; invert it behind a domain-owned port.
  • Domain depends on infrastructure: domain_events internal/services/orderservice/internal/orders/features/submitting_order/v1/events/domain_events/order_submitted.go:6 — The domain package `github.com/mehdihadeli/go-food-delivery-microservices/internal/services/orderservice/internal/orders/features/submitting_order/v1/events/domain_events` imports `http-transport` — an infrastructure concern (persistence/HTTP/broker/auth). The dependency direction points from the domain layer to infrastructure; invert it behind a domain-owned port.
  • Domain depends on infrastructure: aggregate internal/services/orderservice/internal/orders/models/orders/aggregate/order.go:11 — The domain package `github.com/mehdihadeli/go-food-delivery-microservices/internal/services/orderservice/internal/orders/models/orders/aggregate` imports `http-transport` — an infrastructure concern (persistence/HTTP/broker/auth). The dependency direction points from the domain layer to infrastructure; invert it behind a domain-owned port.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 4 project(s) overshoot their size bounds, lowering Project Cohesion to 5.0/10. The most over is `internal/pkg` (17381 LoC, 339 module-visible types across 133 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Low CVE · ×1
  • REDACTED
D31 · IaC & Container Security · Low IaC · ×1
  • REDACTED
D34 · Knowledge Freshness · Dormant codebase · ×1
  • Dormant codebase — 101 of 101 significant files have no living knowledge — the codebase as a whole is dormant, not 101 separate risks. Counted over 101 of the 472 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. Re-engage owners or document before change.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
DM5 · Encapsulated state · Mutable entity · ×1
  • Mutable entity: Entity internal/pkg/core/domain/entity.go:65 — `Entity` exposes exported guard-free setter(s) (SetUpdatedAt, SetEntityType) that rewrite business state without enforcing invariants.
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
X7 · Silent fallback defaults · Silent fallback default on error · ×1
  • Silent fallback default on error internal/pkg/http/customecho/config/echo_http_options.go:33 — `BasePathAddress` turns a non-nil `err` into `return ""` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
Minor — 111 finding(s)
D12 · Dependency Hygiene · Outdated · ×111
  • Outdated: github.com/brianvoe/gofakeit/v6 — `github.com/brianvoe/gofakeit/v6` is required at v6.25.0 in REDACTED, but v6.28.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/brianvoe/gofakeit/v6@v6.28.0 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/brianvoe/gofakeit/v6 — `github.com/brianvoe/gofakeit/v6` is required at v6.25.0 in internal/services/orderservice/go.mod, but v6.28.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/brianvoe/gofakeit/v6@v6.28.0 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/brianvoe/gofakeit/v6 — `github.com/brianvoe/gofakeit/v6` is required at v6.25.0 in internal/services/catalogwriteservice/go.mod, but v6.28.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/brianvoe/gofakeit/v6@v6.28.0 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/brianvoe/gofakeit/v6 — `github.com/brianvoe/gofakeit/v6` is required at v6.25.0 in REDACTED, but v6.28.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/brianvoe/gofakeit/v6@v6.28.0 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/docker/docker — `github.com/docker/docker` is required at v24.0.6+incompatible in REDACTED, but v28.5.2+incompatible is the module's current release — so this build is missing every fix published since, including any security fix. This crosses a major version — v0 releases carry no compatibility promise, so read the changelog before taking it. Run `go get github.com/docker/docker@v28.5.2+incompatible && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/docker/go-connections — `github.com/docker/go-connections` is required at v0.4.0 in REDACTED, but v0.8.2 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/docker/go-connections@v0.8.2 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/doug-martin/goqu/v9 — `github.com/doug-martin/goqu/v9` is required at v9.18.0 in REDACTED, but v9.19.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/doug-martin/goqu/v9@v9.19.0 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/elastic/go-elasticsearch/v8 — `github.com/elastic/go-elasticsearch/v8` is required at v8.10.0 in internal/services/orderservice/go.mod, but v8.19.7 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/elastic/go-elasticsearch/v8@v8.19.7 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/elastic/go-elasticsearch/v8 — `github.com/elastic/go-elasticsearch/v8` is required at v8.10.0 in REDACTED, but v8.19.7 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/elastic/go-elasticsearch/v8@v8.19.7 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/gavv/httpexpect/v2 — `github.com/gavv/httpexpect/v2` is required at v2.15.0 in internal/services/orderservice/go.mod, but v2.17.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/gavv/httpexpect/v2@v2.17.0 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/gavv/httpexpect/v2 — `github.com/gavv/httpexpect/v2` is required at v2.3.1 in REDACTED, but v2.17.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/gavv/httpexpect/v2@v2.17.0 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/gavv/httpexpect/v2 — `github.com/gavv/httpexpect/v2` is required at v2.3.1 in internal/services/catalogwriteservice/go.mod, but v2.17.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/gavv/httpexpect/v2@v2.17.0 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/glebarez/sqlite — `github.com/glebarez/sqlite` is required at v1.10.0 in internal/services/catalogwriteservice/go.mod, but v1.11.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/glebarez/sqlite@v1.11.0 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/glebarez/sqlite — `github.com/glebarez/sqlite` is required at v1.10.0 in REDACTED, but v1.11.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/glebarez/sqlite@v1.11.0 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/go-resty/resty/v2 — `github.com/go-resty/resty/v2` is required at v2.9.1 in REDACTED, but v2.17.2 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/go-resty/resty/v2@v2.17.2 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/go-testfixtures/testfixtures/v3 — `github.com/go-testfixtures/testfixtures/v3` is required at v3.9.0 in REDACTED, but v3.19.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/go-testfixtures/testfixtures/v3@v3.19.0 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/goccy/go-json — `github.com/goccy/go-json` is required at v0.10.2 in internal/services/orderservice/go.mod, but v0.11.2 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/goccy/go-json@v0.11.2 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/goccy/go-json — `github.com/goccy/go-json` is required at v0.10.2 in internal/services/catalogwriteservice/go.mod, but v0.11.2 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/goccy/go-json@v0.11.2 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/goccy/go-json — `github.com/goccy/go-json` is required at v0.10.2 in REDACTED, but v0.11.2 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/goccy/go-json@v0.11.2 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/golang-migrate/migrate/v4 — `github.com/golang-migrate/migrate/v4` is required at v4.16.2 in REDACTED, but v4.20.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/golang-migrate/migrate/v4@v4.20.1 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/hibiken/asynq — `github.com/hibiken/asynq` is required at v0.24.1 in REDACTED, but v0.26.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/hibiken/asynq@v0.26.0 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/jackc/pgconn — `github.com/jackc/pgconn` is required at v1.14.1 in REDACTED, but v1.14.3 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/jackc/pgconn@v1.14.3 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/jackc/pgx/v4 — `github.com/jackc/pgx/v4` is required at v4.18.1 in REDACTED, but v4.18.3 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/jackc/pgx/v4@v4.18.3 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/jmoiron/sqlx — `github.com/jmoiron/sqlx` is required at v1.3.5 in REDACTED, but v1.4.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/jmoiron/sqlx@v1.4.0 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/labstack/echo/v4 — `github.com/labstack/echo/v4` is required at v4.11.1 in internal/services/catalogwriteservice/go.mod, but v4.16.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/labstack/echo/v4@v4.16.0 && go mod tidy` and commit the updated REDACTED and go.sum.
  • + 86 more in this group — see findings.md.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-dd26f8529a744c19a52168525f81b78e/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-dd26f8529a744c19a52168525f81b78e/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .36artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update35artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .29artifacts/raw/trivy-config.json
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. semgrep could not parse 2 file(s) — `internal/pkg/core/cqrs/handler.go`, `internal/pkg/core/data/generic_repository.go` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—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 Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a16231-b37e-7ed5-bc13-79d1c2b8aa28 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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