Executive summary
Read through the Production lens — the standard calibration. *Green* means good enough to run in production. The score is absolute and comparable across repos.
kalintsenkov/BookStore carries serious gaps (38%). Several issues below can materially affect correctness, security, or the cost of changing it — and propagate to everything that depends on it.
Most urgent: a critical security exposure was detected (see the Security & Compliance lens). Treat it as a priority regardless of the overall grade.
The area that most needs attention is Readiness (18%) — releases are harder to depend on — versioning, release notes and dependency hygiene are thin, so consumers can't easily tell what changed or trust an upgrade. Maturity (45%) is the next concern — onboarding is slow — key decisions and the architecture aren't written down, so contributors have to reverse-engineer the intent.
Leadership focus, highest impact first: CI workflow that builds and runs the test suite on every push/PR (CI/CD gates); ILogger (or Serilog) and log at meaningful points across… (Observability); Codify backups + geo-recovery in IaC and document RTO/RPO… (DR & Backup).
For scale: Small (~6,003 production lines); rebuilding it from scratch would take roughly ~0.1 person-years (~1 engineer). Approximate, ±~30%.
Raise Readiness 18 → 70 (the Healthy floor) ⇒ headline 38 → ~58.
Rebuild cost & value ~ Modeled — €1,500–€7,300
| Cost to rebuild | €1,500–€7,300 |
| Domain complexity | Standard |
| Quality factor | 0.7× (at 38% quality) |
| Size & shape | Small · 55% boilerplate · 38% straight-line · 7% branching logic |
This codebase represents roughly ~0.1 person-years of build effort (about ~€4,400 to rebuild). Its weakest lens is Readiness at 18% — the part of that asset most exposed by the findings below.
Top priorities
Diagnosis — what's actually going on
Architecture — module dependency graph
At a glance — Code Health
At a glance — Architecture
At a glance — Maturity
At a glance — Readiness
At a glance — Security
Security & Compliance — OWASP Top-10 mapping
| OWASP category | Findings | Severity |
|---|---|---|
| A06:2021 — Vulnerable & Outdated Components | 65 | High / Critical |
| A05:2021 — Security Misconfiguration | 4 | High / Critical |
| A02:2021 — Cryptographic Failures | 1 | High / Critical |
Roadmap
First, establish a continuous integration workflow to automatically build and test code on every push. Next, implement structured logging and observability across all services to improve monitoring and debugging capabilities. Then, formalize disaster recovery and backup procedures in infrastructure as code, ensuring clear recovery time and objectives are documented. Finally, enhance tooling by adding linting and type checking to the build process, and configure deployment strategies with health checks and automated rollback mechanisms to ensure safe releases.
| Do this | Helps | Effort | Dimension |
|---|---|---|---|
| Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with .env. | +12.4 pts | Low | Secret Scanning |
| Add a CI workflow that builds and runs the test suite on every push/PR. | +23.2 pts | Medium | CI/CD gates |
| Adopt ILogger (or Serilog) and log at meaningful points across the projects. | +23.2 pts | Medium | Observability |
| Codify backups + geo-recovery in IaC and document RTO/RPO and the restore procedure — a persistence guard alone is not disaster recovery. | +23.2 pts | Medium | DR & Backup |
| Add the missing tooling (eslint, tsc) as package.json scripts and run them in CI. | +21.9 pts | Medium | Tooling |
| Add readiness/liveness probes and a rolling-update (or blue/green) strategy so a bad release is caught and rolled back automatically. | +19.6 pts | Medium | Deployment & Rollback |
| Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. | +9.5 pts | Low | Knowledge Freshness |
| Resolve the 1 No ADRs found finding(s) in ADR Quality. | +6.6 pts | Low | ADR Quality |
File quality
| File | Score | Band | Worst signal |
|---|---|---|---|
| src/Client/package-lock.json | 4.4 | Mixed | OSV Dependency Vulnerabilities: Critical CVE: [GHSA redacted] |
| src/Client/Dockerfile | 6.5 | Mixed | IaC & Container Security: High IaC: DS-0002 |
| src/Server/BookStore.Startup/Dockerfile | 6.5 | Mixed | IaC & Container Security: High IaC: DS-0002 |
| src/Server/BookStore.Startup/.env | 7.2 | Mixed | Secret Scanning: Leaked secret: hardcoded-credential |
| src/Client/src/common/routes.ts | 8.0 | Near-clean | Change Coupling: Boundary-crossing change coupling: routes.ts ↔ Router.tsx |
| src/Server/BookStore.Domain/Catalog/Models/Books/Book.Data.cs | 8.2 | Near-clean | Explicit Debt: Dead code: BookData |
| src/Server/BookStore.Domain/Sales/Models/Books/Book.Data.cs | 8.2 | Near-clean | Explicit Debt: Dead code: BookData |
| src/Server/BookStore.Infrastructure/Catalog/Repositories/AuthorRepository.cs | 8.2 | Near-clean | Explicit Debt: Dead code: AuthorRepository |
| src/Server/BookStore.Infrastructure/Catalog/Repositories/BookRepository.cs | 8.2 | Near-clean | Explicit Debt: Dead code: BookRepository |
| src/Server/BookStore.Infrastructure/Sales/Repositories/BookRepository.cs | 8.2 | Near-clean | Explicit Debt: Dead code: BookRepository |
| src/Server/BookStore.Infrastructure/Sales/Repositories/CustomerRepository.cs | 8.2 | Near-clean | Explicit Debt: Dead code: CustomerRepository |
| src/Server/BookStore.Infrastructure/Sales/Repositories/OrderRepository.cs | 8.2 | Near-clean | Explicit Debt: Dead code: OrderRepository |
| src/Server/BookStore.Infrastructure/Sales/Repositories/ShoppingCartRepository.cs | 8.2 | Near-clean | Explicit Debt: Dead code: ShoppingCartRepository |
| src/Server/BookStore.Domain/Common/Models/Entity.Specs.cs | 9.5 | Near-clean | Comment Value: redundant comment |
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. 49 of 52 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 3 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.7 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
What we checked — 52 dimensions across the health lenses
- Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 65 of 86 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line.
- Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
- Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
Tools & methods
| Method | Backs | Version | Evaluator |
|---|---|---|---|
| Roslyn static analysis | Complexity, cohesion, coupling, dead code, API surface, layering | 5.3.0 | ✓ deterministic |
| Native secret scanner | Hardcoded secrets / credentials | 1.0.0 | ✓ deterministic |
| jscpd | Code duplication | — | ✓ deterministic |
| Coverage (coverlet / dotnet-coverage) | Line & branch coverage | 10.0.301 | ✓ deterministic |
| NuGet / dotnet | Outdated, vulnerable & deprecated dependencies | 10.0.301 | ✓ deterministic |
| git / LibGit2Sharp | Churn hotspots, knowledge concentration, history | 2.43.0 · 0.31.0 | ✓ deterministic |
| gitleaks · semgrep · trivy · checkov | Secrets in history, SAST, CVEs, IaC & container, PII / GDPR | 1.86.0 · 0.69.3 | ✓ deterministic |
| LLM (sampled · advisory) | Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurement | Local LLM | ◐ LLM · sampled · advisory |
Run transparency — what happened this run
- D32 Data Compliance (PII/GDPR) — scanner not present in this environment — The backing tool was not installed where this scan ran, so this dimension was not scored. Install the tool (or run in the hosted environment, where it is always present) for a graded result.
- D36 Supply-chain Provenance & Signing — scanner not present in this environment — The backing tool was not installed where this scan ran, so this dimension was not scored. Install the tool (or run in the hosted environment, where it is always present) for a graded result.
- D37 Vulnerability-disclosure Policy — scanner not present in this environment — The backing tool was not installed where this scan ran, so this dimension was not scored. Install the tool (or run in the hosted environment, where it is always present) for a graded result.
- Solution could not be loaded — run is Degraded — The C# workspace returned 0 projects, so every compiler-dependent dimension ran on estimated input. Treat the grade as indicative only; diagnostics.md records the exact cause.
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
- D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
- D4 Code Duplication: Duplication is token-similarity (jscpd) — it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (EF migration scaffolds, *.Designer.cs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only; the generated footprint is reported separately under Solution Shape.
- D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
- D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
- D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
- D11 Test Reliability: Flakiness is inferred from history/markers — Watchdog runs the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
- D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
- D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
- D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
- D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
- D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (EF migrations, designer files, snapshots) is excluded — it is never the team's dead code to delete.
- D18 Solution Shape: Build integrity reflects whether the solution compiled in this environment — a build that needs a private feed, a specific SDK, or a generated file absent from the repo can read as broken when it is merely unreproducible here.
- D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement.
- 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.
- D24 Comment Value: Comment value (WHY vs WHAT) is an LLM judgement over a bounded sample — it is advisory and cannot weigh a comment against the precise code change it was written to explain.
- D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
- D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
- D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
- D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
- D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and the advisory database — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen.
- 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.
- D33 JS/npm Dependency Vulnerabilities: JS/npm CVE matching reads package manifests and lockfiles — risk from how a dependency is used, and advisories not yet published, fall outside this scan.
- 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.
- AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
- M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
- P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
- 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.
The LLM boundary
Dimensions
D3 · God Classes
0 god class(es) detected.
D4 · Code Duplication
0 duplicated block group(s) detected.
D5 · Coupling
5 projects, 0 dependency cycle(s), 0 unstable depended-on project(s).
What to do
- Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
D9 · Test Distribution
19 test methods: 19 unit, 0 integration, 0 BDD, 0 e2e.
D10 · Test Quality
0 skipped, 0 zero-assertion, 1 mock references across 19 tests.
D11 · Test Reliability
0 flaky across 1 measured tier(s). other: measured (0 flaky).
D12 · Dependency Hygiene
0 outdated, 0 vulnerable, 0 deprecated packages.
D13 · Secret Scanning
1 secret(s) detected.
What to do
- Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with .env. — One of this dimension's main actionable groups (1 issue-level).
- Enforce Secret Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
D14 · License Compliance
0 of 27 packages use a banned license.
D15 · Churn × Complexity Hotspots
No churn × complexity hotspots in the window.
D17 · Explicit Debt
0 deducted debt markers + 8 dead symbols across 0 LoC (1.0/KLoC) → score 8.0.
What to do
- Resolve the 8 Dead code finding(s) in Explicit Debt — start with Book.Data.cs (2), BookRepository.cs (2), AuthorRepository.cs. — One of this dimension's main actionable groups (8 warning-level).
- Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
D18 · Solution Shape
5 projects, 215 .cs files, 6583 hand-written lines of code (0 production / 6583 test), plus 2278 generated (EF migrations / designer / snapshots, excluded from quality), 9 inter-project edges.
D19 · Documentation Quality
The single README is an honest, well-organized personal thesis document that describes the application and its Docker build/run steps. It states what it is (a book store), links to Docker Desktop installation for local development, shows a docker-compose command with git clone, and lists every technology stack used in the Built with section plus author and license. However, it contains no architecture or design documentation, so any scaling, deployment, or data-flow details are missing from the visible text.
What to do
- Improve Documentation Quality — currently 4.0/10. — The single README is an honest, well-organized personal thesis document that describes the application and its Docker build/run steps. It states what it is (a book store), links to Docker Desktop installation for local development, shows a docker-compose command with git clone, and lists every technology stack used in the Built with section plus author and license. However, it contains no architecture or design documentation, so any scaling, deployment, or data-flow details are missing from the visible text.
D20 · ADR Quality
No architecture decision records were found.
What to do
- Resolve the 1 No ADRs found finding(s) in ADR Quality. — One of this dimension's main actionable groups (1 recommendation-level).
D21 · Naming Consistency
0 naming inconsistencies across 200 sampled symbols.
D24 · Comment Value
0 valuable / 1 redundant across 12 sampled comments; 1 shown with locations.
What to do
- Resolve the 1 redundant comment finding(s) in Comment Value — start with Entity.Specs.cs. — One of this dimension's main actionable groups (1 recommendation-level).
D26 · Project Cohesion
0 of 5 projects flagged as possibly oversized/incoherent.
D27 · Navigability
96 % of calls cross a namespace and 7 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.
D28 · Secrets (history)
gitleaks scanned the full history AND the current working tree and found no secrets.
D29 · Static Analysis (SAST)
semgrep found no security issues.
D30 · Dependency Vulnerabilities
15 vulnerable package(s): 1 critical, 10 high, 4 medium, 0 low.
What to do
- Resolve the 10 High CVE finding(s) in Dependency Vulnerabilities. — One of this dimension's main actionable groups (10 issue-level).
- Resolve the 4 Medium CVE finding(s) in Dependency Vulnerabilities. — One of this dimension's main actionable groups (4 warning-level).
- Resolve the 1 Critical CVE finding(s) in Dependency Vulnerabilities. — One of this dimension's main actionable groups (1 issue-level).
D31 · IaC & Container Security
4 finding(s): 0 critical, 2 high, 0 medium, 2 low.
D33 · JS/npm Dependency Vulnerabilities
No known-vulnerable JS/npm dependencies.
D34 · Knowledge Freshness
16 of 16 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is src/Server/BookStore.Domain/Catalog/Models/Books/Book.Data.cs.
What to do
- Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
D35 · Change Coupling
Strongest change-coupling: routes.ts↔Router.tsx 77%
D38 · OSV Dependency Vulnerabilities
145 finding(s): 7 critical, 62 high, 62 medium, 14 low.
What to do
- Resolve the 43 High CVE finding(s) in OSV Dependency Vulnerabilities — start with package-lock.json (43). — One of this dimension's main actionable groups (43 issue-level).
- Resolve the 7 Critical CVE finding(s) in OSV Dependency Vulnerabilities — start with package-lock.json (7). — One of this dimension's main actionable groups (7 issue-level).
Frontend & cross-cutting dimensions
AX10 · Code composition
AX3 · Project dependency cycles
AX4 · Dependency direction
AX5 · Architecture & structure
AX8 · Test isolation
- `BookStore.Startup` (production) references the test project `BookStore.Infrastructure`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
- `BookStore.Web` (production) references the test project `BookStore.Application`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
What to do
- Remove every production → test project reference: extract any shared test helper into a production support library (which the tests reference), or invert the dependency so the test project depends on production — not the reverse.
M1 · Documentation (README)
What to do
- Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
- Add a 'Testing' section to the root README — how to run the test suite.
- Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
- Add a README to the 5 of 5 project(s) that lack one — worth up to 2 pts.
M2 · Architecture documentation
- No Architecture Decision Records found — decisions aren't captured for future maintainers.
- No C4/PlantUML/Mermaid diagram or architecture.md — the high-level shape isn't documented.
What to do
- Start an ADR log (docs/adr/) recording significant decisions and their rationale.
- Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
M3 · Folder & project structure
- Test projects aren't grouped under a tests/ folder — the test surface isn't separable from production code at a glance.
What to do
- Group test projects under tests/ (or test/, spec/) so the test surface is discoverable and CI can scope it.
M4 · Documentation accuracy
P1 · CI/CD gates
- No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
What to do
- Add a CI workflow that builds and runs the test suite on every push/PR.
P2 · Observability
- No ILogger/Serilog usage found — production issues will be hard to diagnose.
What to do
- Adopt ILogger (or Serilog) and log at meaningful points across the projects.
- Consider OpenTelemetry tracing/metrics and a health-check endpoint for operability.
P3 · Security & performance tooling
- No static application security testing (CodeQL / security analyzers / codehealth) detected.
What to do
- Add a SAST step (e.g. CodeQL) or a security analyzer package.
- Enable Dependabot/Renovate or a dependency-review gate.
- Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback
- Deployment automation exists but no readiness/liveness probes, rolling-update strategy, lifecycle hooks or migration job were evidenced — a bad release is harder to detect and reverse.
What to do
- Add readiness/liveness probes and a rolling-update (or blue/green) strategy so a bad release is caught and rolled back automatically.
- Add an approval/environment gate (required reviewers / protection rules) before production promotion.
P5 · DR & Backup
- A persistence guard (data volume / purge-protection) was found, but no backup, geo-recovery or RTO/RPO controls were evidenced — a volume that survives a container recreate is not a tested restore from catastrophic loss.
What to do
- Codify backups + geo-recovery in IaC and document RTO/RPO and the restore procedure — a persistence guard alone is not disaster recovery.
R1 · Type Safety
R10 · Code Duplication
- src/Client/src/pages/authors/create/AuthorCreate.tsx:75 · src/Client/src/pages/authors/edit/AuthorEdit.tsx:89 · src/Client/src/pages/books/create/BookCreate.tsx:137 · src/Client/src/pages/books/edit/BookEdit.tsx:156 — AuthorCreate.tsx:75
- src/Client/src/pages/authentication/Login.tsx:74 · src/Client/src/pages/authentication/Register.tsx:102 · src/Client/src/pages/authors/create/AuthorCreate.tsx:73 · src/Client/src/pages/authors/edit/AuthorEdit.tsx:87 — Login.tsx:74
- src/Client/src/pages/authors/details/AuthorDetails.tsx:67 · src/Client/src/pages/books/details/BookDetails.tsx:104 — AuthorDetails.tsx:67
- src/Client/src/components/Router.tsx:99 · src/Client/src/components/Router.tsx:115 — Router.tsx:99
- src/Client/src/components/Router.tsx:75 · src/Client/src/components/Router.tsx:123 — Router.tsx:75
- src/Client/src/pages/authors/edit/AuthorEdit.tsx:45 · src/Client/src/pages/books/edit/BookEdit.tsx:62 — AuthorEdit.tsx:45
- src/Client/src/pages/books/list/BooksList.tsx:91 · src/Client/src/pages/books/list/BooksList.tsx:110 — BooksList.tsx:91
- src/Client/src/pages/cart/Cart.tsx:93 · src/Client/src/pages/orders/details/OrderDetails.tsx:101 — Cart.tsx:93
What to do
- Extract the duplicated blocks into shared functions/components.
R2 · Cyclomatic Complexity
- Branch-heavy code is where defects cluster — extract decisions into smaller functions. (×3) — Header.tsx:14, BooksList.tsx:52, BooksList.tsx:15
R3 · Large Files
R5 · Dependency Freshness
What to do
- Bump outdated dependencies to current versions to limit upgrade debt.
R6 · Tooling
- test ✓ · lint ✗ · typecheck ✗
What to do
- Add the missing tooling (eslint, tsc) as package.json scripts and run them in CI.
R7 · Dead Code
R8 · Dependency Hygiene
- Declared in src/Client/package.json but never imported anywhere in that package or its workspace members — dead weight and attack surface. Verify against build tooling before removing. (×3)
What to do
- Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports
X1 · Async correctness
X3 · Exception handling
X4 · Structured logging
Reference — by lens
| Lens | Score | Rating | Impact |
|---|---|---|---|
| Code Health | 81% | Strong | Strongest area. |
| Maturity | 45% | Weak — gated by D34, M2 | Capped at Fair by a Critical contributor — resolve it before relying on this lens. |
| Readiness | 18% | Critical — gated by R6, P1, P2, P3, P5 | Capped at Fair by a Critical contributor — resolve it before relying on this lens. |
| Security | 68% | Adequate — gated by D30, D38 | Capped at Fair by a Critical contributor — resolve it before relying on this lens. |
Not included — 51 check(s) not relevant to this codebase
- AC1 Text alternatives — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
- AC2 Forms & labels — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
- AC3 Page structure — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
- AC4 Keyboard semantics — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
- AC5 ARIA correctness — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
- AC6 Visual & motion safety — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
- AC7 A11y enforcement — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
- AX1 Captive dependencies — no DI registrations detected
- AX2 Stateful singletons — no singleton implementations detected
- AX6 Interface segregation — no public interfaces
- AX7 Slice cohesion — not applicable — not a vertical-slice architecture
- AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
- AXB2 Runtime readiness — no data
- C1 Data Protection — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
- C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
- C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
- C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
- C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
- D1 Cyclomatic Complexity — No production methods were analyzable, so cyclomatic complexity was not measured (the solution likely failed to load or has no production code).
- D16 Bus Factor — single-maintainer — knowledge-concentration (bus factor) risk
- D2 Cognitive Complexity — No production methods were analyzable, so cognitive complexity was not measured (the solution likely failed to load or has no production code).
- D22 Internal API Consistency — No exposed public API
- D23 Boundary Type-Coupling — At only 0 LoC the codebase is trivial and single-purpose, so declaring boundaries would be overkill.
- D25 ADR Conformance — no ADRs to check
- D32 Data Compliance (PII/GDPR) — No PII/GDPR-handling patterns detected (p/gdpr ruleset) — no data-compliance surface to assess.
- D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/workflows, .gitlab-ci.yml, azure-pipelines.yml, Jenkinsfile, .circleci); there is no build to attest provenance for.
- D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md, .github/SECURITY.md, docs/SECURITY.md, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
- D39 IL Efficiency — The target did not build, so no IL was available to measure.
- D6 Cohesion (LCOM4) — No production classes were analyzable, so cohesion (LCOM4) was not measured (the solution likely failed to load or has no production code).
- D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
- D8 Code Coverage — Coverage not measured — test suite did not build
- DM1 Domain Modelling — not run — 0/3 markers found
- ED1 Event-Driven — not run — only 1/3 markers (a message-bus package)
- ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
- ES1 Event Sourcing — not run — 0/3 markers found
- GD1 Unfinished & placeholder code — no source files
- IC1 Incompleteness & stubs — no C# methods found
- P12 CI test-gate honesty — no CI workflow found
- P6 Release Hygiene — not evidenced — no changelog, version stamp or semver release tag in the repo
- P7 Outbound HTTP resilience — not applicable — this isn't a service/API/worker
- P8 Schema migrations — no EF Core usage detected
- P9 Domain vs controller coverage — no coverage report found on disk — run tests with `--collect:"XPlat Code Coverage"` (or in CI) to enable this cross-layer check
- PF1 Benchmark discipline — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
- PF2 Allocation hygiene — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
- PF3 Async & latency hygiene — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
- R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
- R4 Test Coverage — 1 test file(s) reach none of 49 production file(s) via imports — exercised outside the JS import graph (integration/bundled), not import-reachable
- S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
- SC1 Supply-chain hygiene — no data
- X2 Cancellation propagation — no async methods found
- X5 Nullable reference types — no NRT-eligible projects
Appendix A — Findings (grouped)
Issue — 65 finding(s)
- High CVE: [GHSA redacted] src/Client/package-lock.json
- High CVE: [GHSA redacted] src/Client/package-lock.json
- High CVE: [GHSA redacted] src/Client/package-lock.json
- High CVE: [GHSA redacted] src/Client/package-lock.json
- High CVE: [GHSA redacted] src/Client/package-lock.json
- High CVE: [GHSA redacted] src/Client/package-lock.json
- High CVE: [GHSA redacted] src/Client/package-lock.json
- High CVE: [GHSA redacted] src/Client/package-lock.json
- High CVE: [GHSA redacted] src/Client/package-lock.json
- High CVE: [GHSA redacted] src/Client/package-lock.json
- High CVE: [GHSA redacted] src/Client/package-lock.json
- High CVE: [GHSA redacted] src/Client/package-lock.json
- High CVE: [GHSA redacted] src/Client/package-lock.json
- High CVE: [GHSA redacted] src/Client/package-lock.json
- High CVE: [GHSA redacted] src/Client/package-lock.json
- High CVE: [GHSA redacted] src/Client/package-lock.json
- High CVE: [GHSA redacted] src/Client/package-lock.json
- High CVE: [GHSA redacted] src/Client/package-lock.json
- High CVE: [GHSA redacted] src/Client/package-lock.json
- High CVE: [GHSA redacted] src/Client/package-lock.json
- High CVE: [GHSA redacted] src/Client/package-lock.json
- High CVE: [GHSA redacted] src/Client/package-lock.json
- High CVE: [GHSA redacted] src/Client/package-lock.json
- High CVE: [GHSA redacted] src/Client/package-lock.json
- High CVE: [GHSA redacted] src/Client/package-lock.json
- High CVE: AutoMapper 12.0.0
- High CVE: Azure.Identity 1.6.0
- High CVE: Microsoft.Data.SqlClient 5.0.1
- High CVE: System.Formats.Asn1 5.0.0
- High CVE: System.Net.Http 4.3.0
- High CVE: System.Text.Json 7.0.0
- High CVE: System.Text.RegularExpressions 4.3.0
- High CVE: System.Text.Json 6.0.0
- High CVE: Microsoft.Extensions.Caching.Memory 6.0.1
- High CVE: System.Text.Json 6.0.5
- Critical CVE: [GHSA redacted] src/Client/package-lock.json
- Critical CVE: [GHSA redacted] src/Client/package-lock.json
- Critical CVE: [GHSA redacted] src/Client/package-lock.json
- Critical CVE: [GHSA redacted] src/Client/package-lock.json
- Critical CVE: [GHSA redacted] src/Client/package-lock.json
- Critical CVE: [GHSA redacted] src/Client/package-lock.json
- Critical CVE: [GHSA redacted] src/Client/package-lock.json
- High IaC: DS-0002 src/Client/Dockerfile
- High IaC: DS-0002 src/Server/BookStore.Startup/Dockerfile
- Leaked secret: hardcoded-credential src/Server/BookStore.Startup/.env:2
- Critical CVE: System.Drawing.Common 5.0.0
- Boundary-crossing change coupling: routes.ts ↔ Router.tsx src/Client/src/common/routes.ts
Warning — 14 finding(s)
- Dead code: BookData src/Server/BookStore.Domain/Catalog/Models/Books/Book.Data.cs:8
- Dead code: BookData src/Server/BookStore.Domain/Sales/Models/Books/Book.Data.cs:7
- Dead code: AuthorRepository src/Server/BookStore.Infrastructure/Catalog/Repositories/AuthorRepository.cs:18
- Dead code: BookRepository src/Server/BookStore.Infrastructure/Catalog/Repositories/BookRepository.cs:20
- Dead code: BookRepository src/Server/BookStore.Infrastructure/Sales/Repositories/BookRepository.cs:13
- Dead code: CustomerRepository src/Server/BookStore.Infrastructure/Sales/Repositories/CustomerRepository.cs:21
- Dead code: OrderRepository src/Server/BookStore.Infrastructure/Sales/Repositories/OrderRepository.cs:19
- Dead code: ShoppingCartRepository src/Server/BookStore.Infrastructure/Sales/Repositories/ShoppingCartRepository.cs:16
- Medium CVE: Azure.Identity 1.6.0
- Medium CVE: Azure.Identity 1.6.0
- Medium CVE: Microsoft.IdentityModel.JsonWebTokens 6.21.0
- Medium CVE: System.IdentityModel.Tokens.Jwt 6.21.0
- single-maintainer — knowledge-concentration (bus factor) risk
- Coverage not measured — test suite did not build
Recommendation — 5 finding(s)
- Low IaC: DS-0026 src/Client/Dockerfile
- Low IaC: DS-0026 src/Server/BookStore.Startup/Dockerfile
- No ADRs found
- redundant comment src/Server/BookStore.Domain/Common/Models/Entity.Specs.cs:11
- Further orphaned files (smaller)
Info — 2 finding(s)
- Mock framework: FakeItEasy
- No exposed public API
Appendix B — Reproduction & audit trail
| Dimension | Tool | Version | Command | Findings | Raw output |
|---|---|---|---|---|---|
| D28 · Secrets (history) | gitleaks | — | gitleaks detect --no-banner --report-format json --report-path /dev/stdout --exit-code 0 --source . | 0 | artifacts/raw/gitleaks-history.json |
| D29 · Static Analysis (SAST) | semgrep | — | semgrep --config auto --json --quiet --timeout 0 --metrics off . | 0 | — |
| D30 · Dependency Vulnerabilities | dotnet | — | dotnet list src/Server/BookStore.sln package --vulnerable --include-transitive --format json | 15 | artifacts/raw/dotnet-vulnerable.json |
| D31 · IaC & Container Security | trivy | — | trivy config --format json --quiet . | 4 | artifacts/raw/trivy-config.json |
| D32 · Data Compliance (PII/GDPR) | semgrep | — | semgrep: not applicable — No PII/GDPR-handling patterns detected (p/gdpr ruleset) — no data-compliance surface to assess. | 0 | — |
| D33 · JS/npm Dependency Vulnerabilities | trivy | — | trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update | 0 | — |
| D36 · Supply-chain Provenance & Signing | provenance | — | provenance: not applicable — No CI/build pipeline found (.github/workflows, .gitlab-ci.yml, azure-pipelines.yml, Jenkinsfile, .circleci); there is no build to attest provenance for. | 0 | — |
| D37 · Vulnerability-disclosure Policy | disclosure | — | disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md, .github/SECURITY.md, docs/SECURITY.md, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed. | 0 | — |
| D38 · OSV Dependency Vulnerabilities | osv-scanner | — | osv-scanner --format json --recursive . | 145 | artifacts/raw/osv-scanner.json |