Public report — fiber, published 6 Aug 2026.
Concrete security findings (CVE IDs, secret matches, dependency versions) are hidden in this version;
ask the repo owner for the full report.
209findings with an exact file:lineof 220 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
24/94dimensions across the health lenses35862 LoC — wide & deep
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.
gofiber/fiber is sound in substance but carries real gaps (68%). It is not in crisis, but the issues below raise the cost of changing it — friction its consumers ultimately inherit.
It is strongest in Architecture (100%) — the structure is clean and changes stay contained.
The area that most needs attention is Code Health (61%) — changes there are slower and more error-prone.
Leadership focus, highest impact first: 'Testing' section to the root README (Documentation (README)); Record significant decisions one document per decision (Architecture documentation); Stamp a version in your build/package manifest (e.g. csproj <Version> (Release Hygiene).
For scale: Medium (~35,862 production lines); rebuilding it from scratch would take roughly ~1.0 person-years (~1–2 engineers). Approximate, ±~30%.
It builds on a genuinely strong Architecture foundation (100%); the priorities above are the highest-leverage way to bring the rest up to that level.
How the score is built — each lens's share of the headlineWidth is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.
1.0× (at 68% quality) — the last 20% of quality is most of the work
Size & shape
Medium · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)
This codebase represents roughly ~1.0 person-years of build effort (about ~€140,000 to rebuild). Its weakest lens is Code Health at 61% — the part of that asset most exposed by the findings below.
How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × a 1.0× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).
Top priorities
The highest-leverage moves; the full ranked list is in the Roadmap below.
1
Add a 'Testing' section to the root README — how to run the test suite.
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree with `NNNN-title.md` names is the most discoverable form).
The top-ranked fix costs roughly 3–10 engineer-days once. Not doing it costs about 31.1–186.4 engineer-days every year, paid as drag on the ~177,852 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 1–4 months and is free after that. Method, stated so this is not read as a quotation: debt from the ranked task's effort band; interest = annual changed lines (measured, annualised from the 90-day window) ÷ an ASSUMED 150–400 lines per engineer-day × the 7–16% drag implied by the code-quality signals; breaking point = debt ÷ annual interest. A modelled planning range built from measured inputs and one named assumption — not a quotation, a valuation, or a certified figure.
Evidence: D15 churn: 43,854 line(s) changed over a 90-day window ⇒ ~177,852/year · D1/D2/D4 code quality: averaging 5.2/10 ⇒ a 7–16% drag on each change · top-ranked remediation: Medium effort ⇒ about 3–10 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 4 months.
Value concentrated against a weak lens · Medium · Value at risk
This is a Medium asset (~1.0 person-years to rebuild), and its weakest lens is Code Health at 61%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
→ Direct remediation budget at Code Health first — highest risk-reduction per euro on an asset this size.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Add a 'Testing' section to the root README — how to run the test suite. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Add a 'Testing' section to the root README — how to run the test suite.
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 5.2/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 7–16% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2/D4 code quality: averaging 5.2/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.
Architecture — module dependency matrix
48 modules, 23 dependencies — every dependency points down the layering, so there are no cycles. Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)
At a glance — Code Health · 61% · Adequate · gated by D1, D2
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 category
Findings
Severity
A03:2021 — Injection
8
High / Critical
A06:2021 — Vulnerable & Outdated Components
3
Medium
Roadmap
Begin by adding a testing section to the root README to clarify how to run the test suite. Next, establish architecture decision records in a dedicated directory to document significant design choices and their consequences. Ensure release hygiene by stamping a version in your build manifest or tagging releases with semver to maintain traceability. Reconcile the README with reality by correcting the description of the project's architecture. Finally, address the seven long files identified as 'God Classes,' starting with helpers.go, app.go, and router.go.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Add a 'Testing' section to the root README — how to run the test suite.
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree with `NNNN-title.md` names is the most discoverable form).
Stamp a version in your build/package manifest (e.g. csproj <Version>, package.json, pyproject.toml, Cargo.toml, or a VERSION file) or tag releases with semver so builds and releases are traceable.
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. 22 of 24 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 2 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.6 — 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 — 24 dimensions across the health lenses
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
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, 209 of 220 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.)
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.
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.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
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.
D30 Dependency Vulnerabilities — scanner not present in this environment — The backing tool was not installed where this scan ran, so this dimension was not scored. Install the tool (or run in the hosted environment, where it is always present) for a graded result.
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 (jscpd) — 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.
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").
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
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").
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.
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".
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 (documentation, ADR quality, naming, comment value, onboarding) — D25 sets the ADR-conformance fraction over sampled code, D22 judges API accuracy over a sample. These 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.
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.
61 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was cache.New at 183. A further 1 method(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 proxy.isBlockedIP at 16 — they are counted neither in the figure above nor in this dimension's score.
+ 56 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 cache.New (cyclomatic 183) finding(s) in Cyclomatic Complexity — start with cache.go. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 cors.New (cyclomatic 39) finding(s) in Cyclomatic Complexity — start with cors.go. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 static.New (cyclomatic 39) finding(s) in Cyclomatic Complexity — start with static.go. — One of this dimension's main actionable groups (1 warning-level).
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 80 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 cache.New (cognitive 311) finding(s) in Cognitive Complexity — start with cache.go. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 fiber.getOffer (cognitive 63) finding(s) in Cognitive Complexity — start with helpers.go. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 cors.New (cognitive 56) finding(s) in Cognitive Complexity — start with cors.go. — One of this dimension's main actionable groups (1 warning-level).
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.7 / 10Strong✓ 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.
Resolve the 7 TooManyMethods finding(s) in God Classes — start with app.go, client.go, ctx.go. — One of this dimension's main actionable groups (7 warning-level).
Resolve the 7 FileTooLong finding(s) in God Classes — start with helpers.go, app.go, router.go. — One of this dimension's main actionable groups (7 warning-level).
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.
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.
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.
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.
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.6 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
4 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is middleware/proxy/security.go.
Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Fiber's documentation is clear, complete, and well-structured across READMEs, architecture/design docs, and a dedicated whats_new.md guide. The README for each package (extractors, client, binder) is targeted at middleware developers with an explicit Audience note directing users to the Extractors Guide when they are framework users. A comprehensive whats_new.md covers migration, versioning, core method changes, new features, and drop-in support for Go 1.25+. The docs also include a dedicated ecosystem map showing where template engines, contrib middleware, storage drivers, and other packages live together. The middleware documentation is comprehensive and well-structured for a Go web framework: each of the 70 architecture/design docs (plus the READMEs) covers its subject with signifiers, examples, config tables, security notes, and a full outline. The SSE, Skip, Session, Rewrite, ResponseTime, RequestID, Redirect, Recover, Proxy, Pprof, and Paginate middleware are all documented with code samples, clear signatures, and detailed configuration; the session doc even has an outline listing Quick Start, Usage Patterns, Security, ID Extractors, Configuration, Migration Guide, and API Reference. The only unshown section is the one clipped by the scanner. The middleware documentation is exemplary: each of the five README files under docs/middleware/ (plus architecture/Docs markdown and per-project XML-doc coverage) is a complete, well-structured guide for its Fiber-specific purpose. The logger, limiter, and keyauth examples are long, rich in code, with clear ordering notes, and all sections present in the outline appear. Idempotency covers RFC 7231 requirements, method categorization, both skip behaviors (safe vs idempotent), custom config, and a Config table, matching its outline. The only visible gap is that the limiter's Storage note mentions storage databases but does not show how to configure them; the clip ends before the Storage section.
The Ecosystem landing page links to the FiberLandscape component but does not describe how the core module's template engines, contrib middleware, storage drivers, and other packages fit together in detail for new readers.docs/ecosystem.md
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Git-history secret scan via gitleaks detect over full history in an isolated checkout; each match flagged High. Exhaustive; degrades cleanly when tool absent.
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).
High: dependabot-missing-cooldown · ×2.github/dependabot.yml:5detected by semgrep finding
Low: use-of-unsafe-block · ×6app.go:837detected by semgrep finding
What to do
Resolve the 6 Low finding(s) in Static Analysis (SAST) — start with app.go (2), readonly.go (2), helpers.go. — One of this dimension's main actionable groups (6 recommendation-level).
Resolve the 2 High finding(s) in Static Analysis (SAST) — start with dependabot.yml, cleanup-release-draft.yml. — One of this dimension's main actionable groups (2 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
3 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/tlstest/tls.go.
Further orphaned files (smaller)
✓ On the Gold path — maintain.
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
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; coupling through a build step, config, or non-source file isn't seen.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
Resolve the 1 Unpinned build actions finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 No build provenance finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 No artifact signing finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether dependencies have known published vulnerabilities (CVEs) per the OSV database — read natively from whatever lockfile the repository ships (Cargo, npm, Go, Python, Maven, RubyGems, …). D33 and D30 add ecosystem-specific scanners on top for npm and .NET.
Method: Multi-ecosystem dependency-CVE scan via osv-scanner --recursive (queries the osv.dev database + parses lockfiles natively across ecosystems: npm package-lock/yarn/pnpm/bun, Go go.mod, Rust Cargo.lock, Maven/Gradle pom.xml/gradle.lockfile, PyPI requirements.txt/poetry.lock/Pipfile.lock, Composer composer.lock, RubyGems Gemfile.lock, Hex mix.lock, pub pubspec.lock, Swift Package.resolved); severity tally (Critical/High/Medium/Low) to 0-10 tight normalizer (8.0). NotApplicable only when the repo declares no supported non-.NET dependency lockfile (a NuGet-only repo stays NotApplicable — .NET CVEs are D30's domain); coverage needs a resolved lockfile. Additive to D33 (trivy fs); exhaustive + deterministic, DB kept fresh.
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 '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.
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 `NNNN-title.md` documents 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 significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree with `NNNN-title.md` names is the most discoverable form).
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 advertises a microservices architecture, but the repo is a single project with no service manifests
What to do
Reconcile the README with reality: README advertises a microservices architecture, but the repo is a single project with no service manifests.
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
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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.
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.
What to do
Stamp a version in your build/package manifest (e.g. csproj <Version>, package.json, pyproject.toml, Cargo.toml, or a VERSION file) or tag releases with semver so builds and releases are traceable.
Do you agree with this assessment?
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.
Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Not included — 70 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 — Frontend below the scale floor (6 DOM element(s) < 25) — too little surface to assess accessibility.
AC2 Forms & labels — Frontend below the scale floor (6 DOM element(s) < 25) — too little surface to assess accessibility.
AC3 Page structure — Frontend below the scale floor (6 DOM element(s) < 25) — too little surface to assess accessibility.
AC4 Keyboard semantics — Frontend below the scale floor (6 DOM element(s) < 25) — too little surface to assess accessibility.
AC5 ARIA correctness — Frontend below the scale floor (6 DOM element(s) < 25) — too little surface to assess accessibility.
AC6 Visual & motion safety — Frontend below the scale floor (6 DOM element(s) < 25) — too little surface to assess accessibility.
AC7 A11y enforcement — Frontend below the scale floor (6 DOM element(s) < 25) — too little surface to assess accessibility.
AX1 Captive dependencies — no DI registrations detected
AX10 Code composition — not assessed — code composition is computed by ROLE over a document set 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
AX2 Stateful singletons — no singleton implementations detected
AX3 Project dependency cycles — not assessed — project cycles and dependency direction are computed over a project-reference graph 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
AX4 Dependency direction — not assessed — project cycles and dependency direction are computed over a project-reference graph 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
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) 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
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 — not assessed — test isolation is computed from a project graph (which projects are test projects, and what they reference) 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
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
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.
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.
D10 Test Quality — ~79066 lines of test source are present (.go) but the test-quality collector reads C# only, so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D11 Test Reliability — Test reliability not included
D12 Dependency Hygiene — Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
D14 License Compliance — Not scored — this repository's package manifest is not parsed for licence data yet. A gap in the analyzer's language coverage, NOT a finding that the repository's licenses are compliant (a Go module (go.mod/go.sum)), which this pass does not parse yet — so this dimension asserts nothing about this repository's licensing in either direction.
D17 Explicit Debt — explicit-debt markers are read through a C# workspace today, so they were not read for this repository's language — this asserts nothing about how many markers the code carries. Not scored — this is a gap in the analyzer, not a finding about this repository
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.
D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
D22 Internal API Consistency — No exposed public API
D23 Boundary Type-Coupling — Production source is present (.go) but bounded contexts are resolved over the C#/VB project set, which exposed none, so context scope could not be assessed. Not scored — this is a gap in the analyzer, not a verdict about this repository. Declaring the codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed — see the recommendation on this dimension for where. 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
D26 Project Cohesion — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
D27 Navigability — No calls could be sampled, so navigability was not assessed — tracing effort is measured over resolved call sites and this target exposed none. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Go module (go.mod/go.sum) — not scanned yet) — where an OSV-supported manifest exists, dependency vulnerabilities for this repository are reported under D38 instead.
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Terraform, Kubernetes/Helm, CloudFormation); nothing to scan.
D32 Data Compliance (PII/GDPR) — No PII/GDPR-handling patterns detected (p/gdpr ruleset) — no data-compliance surface to assess.
D33 JS/npm Dependency Vulnerabilities — No JS/npm manifest or lockfile found outside build output (package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb); no JS dependencies to scan.
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.
D5 Coupling — Inter-project coupling could not be assessed — no analyzable project graph was found for this repository. Not scored: a gap in the analyzer's reach, not a verdict about this repository. (Coupling here is Martin afferent/efferent/instability plus reference cycles across a project-reference graph, read today from .NET project files; other ecosystems' module graphs are not read yet.)
D6 Cohesion (LCOM4) — Cohesion (LCOM4) is measured over a C#/VB class graph, and this repository's production source is mostly .go, which this pass does not read, so cohesion was not assessed for this repository. Not scored — this is a gap in the analyzer, not a finding about this repository.
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
D9 Test Distribution — Test source is present (.go) but the test-pyramid classifier reads C# only, so its unit/integration/BDD/E2E split couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
DM1 Domain Modelling — not scored — this repository shows none of the 2 signals this check looks for
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this check looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this check looks for
GD1 Unfinished & placeholder code — no source files
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 — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
P2 Observability — Observability was not assessed: this check reads a source model that does not carry this repository's product — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of a logging idiom this check recognises is NOT evidence that this repo lacks structured logging (it may log through its own ecosystem's logger). This is a gap in the analyzer, not a finding about this repository.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
P7 Outbound HTTP resilience — not measured — the application kind could not be determined for this repo
P8 Schema migrations — not assessed — schema-migration practice is read from 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
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (`go test -coverprofile=coverage.out ./...`) into the repo working tree before the scan — a CI step is the usual place, since the artefact is commonly gitignored, or wire coverage collection into CI, to enable this cross-layer check
PF1 Benchmark discipline — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
PF2 Allocation hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
PF3 Async & latency hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
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
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
X3 Exception handling — 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
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 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
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.
High: dependabot-missing-cooldown .github/dependabot.yml:5— This Dependabot configuration does not set a cooldown period. Newly published packages can be malicious or unstable. Add a `cooldown` block with `default-days: 7` to each `package-ecosystem` entry under `updates` to wait 7 days before proposing updates to newly published package versions. Reference: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#cooldown. This is a semgrep security-AUDIT rule reporting a POLICY that is absent or weaker than its recommendation, not an exploitable defect. Confirm whether the current setting is a deliberate decision for this repository — and apply the change where it is not; where it is (a policy your release process already enforces elsewhere, or one this repository has consciously opted out of), record the decision and leave the configuration as it is. This configuration file has 2 such entries; one cooldown decision clears them all — reported once.
High: github-actions-mutable-action-tag .github/workflows/cleanup-release-draft.yml:32— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: gofiber/.github/.github/actions/cleanup-release-draft@<40-character SHA>`. This step references `gofiber/.github/.github/actions/cleanup-release-draft@main`; resolve the SHA it points at today with `gh api repos/gofiber/.github/commits/main --jq .sha`. `gofiber/.github/.github/actions/cleanup-release-draft` is hosted INSIDE the `gofiber/.github` repository (a subdirectory action or a reusable workflow), so the SHA to pin is that repository's commit — keep the full `gofiber/.github/.github/actions/cleanup-release-draft` path in `uses:` and query only `gofiber/.github`.
Hotspot: middleware/cache/cache.go middleware/cache/cache.go— middleware/cache/cache.go changed 23 times in last 90 days, max complexity 183. 10 of those changes were fix/bug commits, and the other 13 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: app.go app.go— app.go changed 44 times in last 90 days, max complexity 27. 21 of those changes were fix/bug commits, and the other 23 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: router.go router.go— router.go changed 37 times in last 90 days, max complexity 27. 12 of those changes were fix/bug commits, and the other 25 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: helpers.go helpers.go— helpers.go changed 27 times in last 90 days, max complexity 33. 17 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: path.go path.go— path.go changed 27 times in last 90 days, max complexity 31. 11 of those changes were fix/bug commits, and the other 16 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: res.go res.go— res.go changed 19 times in last 90 days, max complexity 31. 14 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: middleware/proxy/proxy.go middleware/proxy/proxy.go— middleware/proxy/proxy.go changed 31 times in last 90 days, max complexity 18. 13 of those changes were fix/bug commits, and the other 18 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: middleware/proxy/security.go middleware/proxy/security.go— middleware/proxy/security.go changed 24 times in last 90 days, max complexity 23. 10 of those changes were fix/bug commits, and the other 14 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: client/cookiejar.go client/cookiejar.go— client/cookiejar.go changed 26 times in last 90 days, max complexity 16. 15 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: middleware/static/static.go middleware/static/static.go— middleware/static/static.go changed 10 times in last 90 days, max complexity 39. 5 of those changes were fix/bug commits, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
TooManyMethods: App app.go:76— TooManyMethods — 102 methods, declared across 9 files: ./app.go (46), ./router.go (18), ./listen.go (8), ./services.go (8), +5 more file(s). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Client client/client.go:43— TooManyMethods — 83 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DefaultCtx ctx.go:57— TooManyMethods — 83 methods, declared across 2 files: ./ctx.go (68), ./req.go (15). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Request client/request.go:45— TooManyMethods — 78 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DefaultRes res.go:127— TooManyMethods — 43 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SharedState shared_state.go:19— TooManyMethods — 31 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: State state.go:21— TooManyMethods — 31 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
FileTooLong: ./helpers.go helpers.go:0— FileTooLong — 763 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: ./app.go app.go:0— FileTooLong — 689 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: ./router.go router.go:0— FileTooLong — 627 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: ./res.go res.go:0— FileTooLong — 623 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: client/request.go client/request.go:0— FileTooLong — 574 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: client/client.go client/client.go:0— FileTooLong — 569 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: cache/cache.go middleware/cache/cache.go:0— FileTooLong — 566 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: New (100-897). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
Duplicated block (9 lines × 2) client/request.go:242— client/request.go:242-250 | client/request.go:481-489 — 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 `client/request.go:242` 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 (9 lines × 2) constraint.go:418— constraint.go:418-426 | constraint.go:507-515 — 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 `constraint.go:418` 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 (9 lines × 2) middleware/limiter/limiter_fixed.go:137— middleware/limiter/limiter_fixed.go:137-145 | middleware/limiter/limiter_sliding.go:152-160 — before extracting anything, compare `middleware/limiter/limiter_fixed.go` and `middleware/limiter/limiter_sliding.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 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 `middleware/limiter/limiter_fixed.go:137` 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 (9 lines × 2) middleware/proxy/security.go:431— middleware/proxy/security.go:431-439 | middleware/proxy/security.go:534-542 — 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. 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 (9 lines × 2) middleware/redirect/redirect.go:54— middleware/redirect/redirect.go:54-62 | middleware/rewrite/rewrite.go:45-53 — 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 `middleware/redirect/redirect.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.
Duplicated block (8 lines × 2) binder/form.go:54— binder/form.go:54-61 | binder/query.go:25-32 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `binder/form.go:54` 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 (8 lines × 2) client/cookiejar.go:167— client/cookiejar.go:167-175 | client/cookiejar.go:207-214 — 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 `client/cookiejar.go:167` 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) client/cookiejar.go:619— client/cookiejar.go:619-627 | client/cookiejar.go:664-671 — 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 `client/cookiejar.go:619` 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 (8 lines × 2) internal/tlstest/tls.go:24— internal/tlstest/tls.go:24-31 | internal/tlstest/tls.go:72-79 — 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/tlstest/tls.go:24` 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 (13 lines × 2) listen.go:281— listen.go:281-293 | listen.go:337-349 — 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 `listen.go:281` 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 (13 lines × 2) middleware/cors/utils.go:17— middleware/cors/utils.go:17-33 | middleware/csrf/helpers.go:37-49 — 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 `middleware/cors/utils.go:17` 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 (13 lines × 2) middleware/cache/utils.go:148— middleware/cache/utils.go:148-160 | middleware/cache/vary.go:67-80 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `middleware/cache/utils.go:148` 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 (10 lines × 2) client/cookiejar.go:301— client/cookiejar.go:301-310 | client/cookiejar.go:517-526 — 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 `client/cookiejar.go:301` 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.
Duplicated block (10 lines × 2) domain.go:449— domain.go:449-463 | mount.go:88-97 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `domain.go:449` 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 (10 lines × 2) router_skip.go:254— router_skip.go:254-263 | router_skip.go:269-278 — 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 `router_skip.go:254` 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.
D38 · OSV Dependency Vulnerabilities· Medium CVE · ×2
Medium CVE: GO-2026-4513 go.mod— github.com/shamaton/msgpack/v3 3.2.0 (github.com/shamaton/msgpack/v3): GO-2026-4513 — no fixed version has been published yet. Track the advisory, and remove or replace github.com/shamaton/msgpack/v3 if the exposure is not acceptable until one lands. Before doing either, check whether any affected package above is actually linked here: `go list -deps ./... | grep -F -e github.com/shamaton/msgpack/v3` lists it whether your own code imports it or a dependency pulls it in — a module can be in the build list for one sub-package while the vulnerable one is never reached, in which case there is nothing to remove and tracking the advisory is the whole action.
Medium CVE: GO-2025-3955 go.mod— stdlib 1.25.0 (net/http): GO-2025-3955 — fixed in Go 1.25.1; pin a build toolchain at or above it (go.mod `toolchain` directive, or your CI's Go version) — the `go` directive is a minimum language version, not the compiler that builds your binaries. This one row stands for the 39 advisories this scan raises against stdlib 1.25.0: GO-2025-3955, GO-2025-4006, GO-2025-4007, GO-2025-4008, GO-2025-4009, GO-2025-4010, GO-2025-4011, GO-2025-4012, GO-2025-4013, GO-2025-4014, GO-2025-4015, GO-2025-4155, GO-2025-4175, GO-2026-4337, GO-2026-4340, GO-2026-4341, GO-2026-4342, GO-2026-4601, GO-2026-4602, GO-2026-4603, GO-2026-4864, GO-2026-4865, GO-2026-4869, GO-2026-4870, GO-2026-4918, GO-2026-4946, GO-2026-4947, GO-2026-4970, GO-2026-4971, GO-2026-4976, GO-2026-4977, GO-2026-4980, GO-2026-4981, GO-2026-4982, GO-2026-4986, GO-2026-5037, GO-2026-5038, GO-2026-5039, GO-2026-5856.
Duplicated block (24 lines × 2) middleware/limiter/limiter_fixed.go:85— middleware/limiter/limiter_fixed.go:85-108 | middleware/limiter/limiter_sliding.go:93-116 — before extracting anything, compare `middleware/limiter/limiter_fixed.go` and `middleware/limiter/limiter_sliding.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 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 `middleware/limiter/limiter_fixed.go:85` 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 (24 lines × 2) router.go:473— router.go:473-496 | router.go:606-629 — 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 `router.go:473` 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 (21 lines × 2) middleware/limiter/limiter_fixed.go:16— middleware/limiter/limiter_fixed.go:16-36 | middleware/limiter/limiter_sliding.go:18-38 — before extracting anything, compare `middleware/limiter/limiter_fixed.go` and `middleware/limiter/limiter_sliding.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 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 `middleware/limiter/limiter_fixed.go:16` 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 (21 lines × 2) router.go:555— router.go:555-575 | router.go:686-706 — 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 `router.go:555` 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 (5 lines × 2) client/transport.go:341— client/transport.go:341-345 | middleware/proxy/proxy.go:446-450 — 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 `client/transport.go:341` 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 (5 lines × 2) middleware/proxy/proxy.go:590— middleware/proxy/proxy.go:590-594 | middleware/proxy/proxy.go:649-653 — 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 `middleware/proxy/proxy.go:590` 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.
cache.New (cyclomatic 183) middleware/cache/cache.go:100— cache.New has cyclomatic complexity 183 (threshold 15). Most of this is not in the body itself: 2 of the 183 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 203, 159, 146, …). 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.
cors.New (cyclomatic 39) middleware/cors/cors.go:27— cors.New has cyclomatic complexity 39 (threshold 15). Of this number, 16 points are the body's own statements and 23 belong to 2 function literals inside it that branch. 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.
static.New (cyclomatic 39) middleware/static/static.go:148— static.New has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 3 of the 39 points are its own statements and the rest belongs to one function literal inside it that branches (line 168). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
fiber.getOffer (cyclomatic 33) helpers.go:793— fiber.getOffer has cyclomatic complexity 33 (threshold 15). Of this number, 17 points are the body's own statements and 16 belong to one function literal inside it that branches. 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.
cache.parseCacheControlDirectives (cyclomatic 33) middleware/cache/cachecontrol.go:58— cache.parseCacheControlDirectives has cyclomatic complexity 33 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
fiber.genericParseType (cyclomatic 31) helpers.go:1311— fiber.genericParseType has cyclomatic complexity 31 (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.
routeParser.analyseParameterPart (cyclomatic 31) path.go:455— routeParser.analyseParameterPart has cyclomatic complexity 31 (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.
DefaultRes.SendFile (cyclomatic 31) res.go:855— DefaultRes.SendFile has cyclomatic complexity 31 (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.
fiber.adaptExpressHandler (cyclomatic 29) adapter.go:52— fiber.adaptExpressHandler has cyclomatic complexity 29 (threshold 15). Of this number, 21 points are the body's own statements and 8 belong to 6 function literals inside it that branch. 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.
App.Test (cyclomatic 27) app.go:1390— App.Test has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
App.next (cyclomatic 27) router.go:460— App.next has cyclomatic complexity 27 (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.
App.nextCustom (cyclomatic 27) router.go:592— App.nextCustom has cyclomatic complexity 27 (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.
csrf.New (cyclomatic 27) middleware/csrf/csrf.go:56— csrf.New has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 6 of the 27 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 112, 64). 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.
idempotency.New (cyclomatic 26) middleware/idempotency/idempotency.go:45— idempotency.New has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 101, 70, 51). 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.
DefaultReq.Range (cyclomatic 25) req.go:1145— DefaultReq.Range has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function literal inside it that branches. 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.
skipRouteIndex.buildLookahead (cyclomatic 25) router_skip.go:94— skipRouteIndex.buildLookahead has cyclomatic complexity 25 (threshold 15). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
App.startupMessage (cyclomatic 24) listen.go:448— App.startupMessage has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs 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.
static.sanitizePath (cyclomatic 24) middleware/static/static.go:80— static.sanitizePath has cyclomatic complexity 24 (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.
fiber.New (cyclomatic 23) app.go:694— fiber.New has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs 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.
DefaultCtx.Charset (cyclomatic 23) req.go:273— DefaultCtx.Charset has cyclomatic complexity 23 (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.
adaptor.handlerFunc (cyclomatic 23) middleware/adaptor/adaptor.go:463— adaptor.handlerFunc has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to one function literal inside it that branches (line 471). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
basicauth.New (cyclomatic 23) middleware/basicauth/basicauth.go:32— basicauth.New has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to one function literal inside it that branches (line 41). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
keyauth.configDefault (cyclomatic 23) middleware/keyauth/config.go:102— keyauth.configDefault has cyclomatic complexity 23 (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.
proxy.canFastJoinPath (cyclomatic 23) middleware/proxy/security.go:865— proxy.canFastJoinPath has cyclomatic complexity 23 (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.
helmet.New (cyclomatic 22) middleware/helmet/helmet.go:11— helmet.New has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 4 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 32). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
App.serverErrorHandler (cyclomatic 21) app.go:1625— App.serverErrorHandler has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
FixedWindow.New (cyclomatic 21) middleware/limiter/limiter_fixed.go:15— FixedWindow.New has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 31). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
SlidingWindow.New (cyclomatic 21) middleware/limiter/limiter_sliding.go:17— SlidingWindow.New has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 33). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Route.match (cyclomatic 21) router.go:407— Route.match has cyclomatic complexity 21 (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.
fiber.normalizeContentTypeMediaType (cyclomatic 20) helpers.go:299— fiber.normalizeContentTypeMediaType has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
App.Listen (cyclomatic 20) listen.go:199— App.Listen has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
core.execFunc (cyclomatic 20) client/core.go:50— core.execFunc has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 56, 130). 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.
App.resolveSkip (cyclomatic 19) router_skip.go:181— App.resolveSkip 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.
domainMatcher.match (cyclomatic 19) domain.go:139— domainMatcher.match 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.
proxy.embeddedIPv4 (cyclomatic 19) middleware/proxy/security.go:696— proxy.embeddedIPv4 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.
routeParser.getMatch (cyclomatic 19) path.go:606— routeParser.getMatch 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.
DefaultReq.Fresh (cyclomatic 19) req.go:454— DefaultReq.Fresh 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.
fiber.buildRouteURL (cyclomatic 18) router.go:234— fiber.buildRouteURL has cyclomatic complexity 18 (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.
extractors.isValidToken68 (cyclomatic 18) extractors/extractors.go:559— extractors.isValidToken68 has cyclomatic complexity 18 (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.
hostauthorization.parseNormalizedAuthority (cyclomatic 18) middleware/hostauthorization/hostauthorization.go:126— hostauthorization.parseNormalizedAuthority has cyclomatic complexity 18 (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.
keyauth.New (cyclomatic 18) middleware/keyauth/keyauth.go:31— keyauth.New has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 68). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
pprof.New (cyclomatic 18) middleware/pprof/pprof.go:14— pprof.New has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 37). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
proxy.Balancer (cyclomatic 18) middleware/proxy/proxy.go:21— proxy.Balancer has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 74). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
proxy.joinUpstreamPath (cyclomatic 18) middleware/proxy/security.go:759— proxy.joinUpstreamPath has cyclomatic complexity 18 (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.
fiber.parseDomainPattern (cyclomatic 17) domain.go:55— fiber.parseDomainPattern 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.
fiber.addParameterMetaInfo (cyclomatic 17) path.go:373— fiber.addParameterMetaInfo 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.
Bind.All (cyclomatic 17) bind.go:510— Bind.All 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.
client.setConfigToRequest (cyclomatic 17) client/client.go:846— client.setConfigToRequest has cyclomatic complexity 17 (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.
cache.appendCanonicalQueryString (cyclomatic 17) middleware/cache/keygen.go:84— cache.appendCanonicalQueryString 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.
hostauthorization.isValidHostSyntax (cyclomatic 17) middleware/hostauthorization/hostauthorization.go:194— hostauthorization.isValidHostSyntax 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.
DefaultReq.extractIPsFromHeader (cyclomatic 17) req.go:655— DefaultReq.extractIPsFromHeader has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
fiber.RoutePatternMatch (cyclomatic 16) path.go:188— fiber.RoutePatternMatch has cyclomatic complexity 16 (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.
App.register (cyclomatic 16) router.go:978— App.register has cyclomatic complexity 16 (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.
client.parserRequestHeader (cyclomatic 16) client/hooks.go:122— client.parserRequestHeader has cyclomatic complexity 16 (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.
client.SetValWithStruct (cyclomatic 16) client/request.go:1070— client.SetValWithStruct has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 1084). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
CookieJar.cookiesForRequest (cyclomatic 16) client/cookiejar.go:191— CookieJar.cookiesForRequest has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
CookieJar.parseCookiesFromResp (cyclomatic 16) client/cookiejar.go:515— CookieJar.parseCookiesFromResp has cyclomatic complexity 16 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
helmet.configDefault (cyclomatic 16) middleware/helmet/config.go:100— helmet.configDefault has cyclomatic complexity 16 (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.
logger.New (cyclomatic 16) middleware/logger/logger.go:30— logger.New has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 91). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
DefaultReq.extractIPFromHeader (cyclomatic 16) req.go:718— DefaultReq.extractIPFromHeader has cyclomatic complexity 16 (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.
DefaultReq.isTrustedProxyIP (cyclomatic 16) req.go:800— DefaultReq.isTrustedProxyIP has cyclomatic complexity 16 (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.
cache.New (cognitive 311) middleware/cache/cache.go:100— cache.New has cognitive complexity 311 (threshold 15). Drivers by points: if/else 241, boolean chains 43, loops 22, jumps 3, match/switch 2 (nesting depth added 129). Most of this is not in the body itself: 1 of the 311 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 203, 159, 146, …). 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.
fiber.getOffer (cognitive 63) helpers.go:793— fiber.getOffer has cognitive complexity 63 (threshold 15). Drivers by points: if/else 40, loops 14, boolean chains 6, jumps 2, match/switch 1 (nesting depth added 30). Of this number, 37 points are the body's own statements and 26 belong to one function literal inside it that branches. 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.
cors.New (cognitive 56) middleware/cors/cors.go:27— cors.New has cognitive complexity 56 (threshold 15). Drivers by points: if/else 45, boolean chains 10, loops 1 (nesting depth added 15). Of this number, 25 points are the body's own statements and 31 belong to 2 function literals inside it that branch. 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.
csrf.New (cognitive 55) middleware/csrf/csrf.go:56— csrf.New has cognitive complexity 55 (threshold 15). Drivers by points: if/else 52, boolean chains 1, loops 1, match/switch 1 (nesting depth added 25). Most of this is not in the body itself: 12 of the 55 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 112, 64). 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.
cache.parseCacheControlDirectives (cognitive 48) middleware/cache/cachecontrol.go:58— cache.parseCacheControlDirectives has cognitive complexity 48 (threshold 15). Drivers by points: loops 19, boolean chains 16, if/else 13 (nesting depth added 18). 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.
static.New (cognitive 48) middleware/static/static.go:148— static.New has cognitive complexity 48 (threshold 15). Drivers by points: if/else 35, boolean chains 11, match/switch 2 (nesting depth added 13). Most of this is not in the body itself: 3 of the 48 points are its own statements and the rest belongs to one function literal inside it that branches (line 168). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
App.next (cognitive 46) router.go:460— App.next has cognitive complexity 46 (threshold 15). Drivers by points: if/else 37, boolean chains 5, loops 4 (nesting depth added 21). 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.
App.nextCustom (cognitive 46) router.go:592— App.nextCustom has cognitive complexity 46 (threshold 15). Drivers by points: if/else 37, boolean chains 5, loops 4 (nesting depth added 21). 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.
routeParser.analyseParameterPart (cognitive 46) path.go:455— routeParser.analyseParameterPart has cognitive complexity 46 (threshold 15). Drivers by points: if/else 28, boolean chains 12, loops 4, match/switch 2 (nesting depth added 18). 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.
skipRouteIndex.buildLookahead (cognitive 46) router_skip.go:94— skipRouteIndex.buildLookahead has cognitive complexity 46 (threshold 15). Drivers by points: if/else 31, loops 11, boolean chains 4 (nesting depth added 25). Of this number, 45 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
App.Test (cognitive 40) app.go:1390— App.Test has cognitive complexity 40 (threshold 15). Drivers by points: if/else 30, match/switch 5, boolean chains 4, loops 1 (nesting depth added 15). Of this number, 39 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
DefaultReq.Range (cognitive 40) req.go:1145— DefaultReq.Range has cognitive complexity 40 (threshold 15). Drivers by points: if/else 36, match/switch 2, boolean chains 1, loops 1 (nesting depth added 17). Of this number, 38 points are the body's own statements and 2 belong to one function literal inside it that branches. 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.
keyauth.New (cognitive 38) middleware/keyauth/keyauth.go:31— keyauth.New has cognitive complexity 38 (threshold 15). Drivers by points: if/else 33, boolean chains 3, loops 2 (nesting depth added 21). Of this number, 25 points are the body's own statements and 13 belong to one function literal inside it that branches. 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.
fiber.adaptExpressHandler (cognitive 37) adapter.go:52— fiber.adaptExpressHandler has cognitive complexity 37 (threshold 15). Drivers by points: if/else 36, match/switch 1 (nesting depth added 18). Of this number, 21 points are the body's own statements and 16 belong to 6 function literals inside it that branch. 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.
fiber.buildRouteURL (cognitive 37) router.go:234— fiber.buildRouteURL has cognitive complexity 37 (threshold 15). Drivers by points: if/else 26, loops 7, boolean chains 4 (nesting depth added 20). 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.
CookieJar.parseCookiesFromResp (cognitive 37) client/cookiejar.go:515— CookieJar.parseCookiesFromResp has cognitive complexity 37 (threshold 15). Drivers by points: if/else 28, loops 7, boolean chains 2 (nesting depth added 18). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
adaptor.handlerFunc (cognitive 36) middleware/adaptor/adaptor.go:463— adaptor.handlerFunc has cognitive complexity 36 (threshold 15). Drivers by points: if/else 30, loops 4, boolean chains 1, match/switch 1 (nesting depth added 15). Most of this is not in the body itself: 0 of the 36 points are its own statements and the rest belongs to one function literal inside it that branches (line 471). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
idempotency.New (cognitive 36) middleware/idempotency/idempotency.go:45— idempotency.New has cognitive complexity 36 (threshold 15). Drivers by points: if/else 28, loops 7, boolean chains 1 (nesting depth added 10). Most of this is not in the body itself: 0 of the 36 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 101, 70, 51). 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.
DefaultRes.SendFile (cognitive 36) res.go:855— DefaultRes.SendFile has cognitive complexity 36 (threshold 15). Drivers by points: if/else 26, boolean chains 9, loops 1 (nesting depth added 8). 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.
routeParser.getMatch (cognitive 35) path.go:606— routeParser.getMatch has cognitive complexity 35 (threshold 15). Drivers by points: if/else 26, loops 5, boolean chains 4 (nesting depth added 17). 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.
hostauthorization.parseNormalizedAuthority (cognitive 34) middleware/hostauthorization/hostauthorization.go:126— hostauthorization.parseNormalizedAuthority has cognitive complexity 34 (threshold 15). Drivers by points: if/else 24, match/switch 6, loops 4 (nesting depth added 18). 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.
fiber.parseDomainPattern (cognitive 32) domain.go:55— fiber.parseDomainPattern has cognitive complexity 32 (threshold 15). Drivers by points: if/else 23, loops 7, boolean chains 2 (nesting depth added 16). 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.
fiber.forEachMediaRange (cognitive 32) helpers.go:731— fiber.forEachMediaRange has cognitive complexity 32 (threshold 15). Drivers by points: if/else 22, loops 4, match/switch 4, boolean chains 1, jumps 1 (nesting depth added 20). 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.
proxy.Balancer (cognitive 32) middleware/proxy/proxy.go:21— proxy.Balancer has cognitive complexity 32 (threshold 15). Drivers by points: if/else 29, loops 2, boolean chains 1 (nesting depth added 11). Most of this is not in the body itself: 13 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 74). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
fiber.genericParseType (cognitive 31) helpers.go:1311— fiber.genericParseType has cognitive complexity 31 (threshold 15). Drivers by points: if/else 30, 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.
DefaultCtx.Charset (cognitive 31) req.go:273— DefaultCtx.Charset has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15, match/switch 7, boolean chains 5, loops 3, jumps 1 (nesting depth added 13). 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.
static.sanitizePath (cognitive 31) middleware/static/static.go:80— static.sanitizePath has cognitive complexity 31 (threshold 15). Drivers by points: if/else 24, boolean chains 7 (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.
fiber.normalizeContentTypeMediaType (cognitive 30) helpers.go:299— fiber.normalizeContentTypeMediaType has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12, loops 10, boolean chains 8 (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.
App.startupMessage (cognitive 30) listen.go:448— App.startupMessage has cognitive complexity 30 (threshold 15). Drivers by points: if/else 20, boolean chains 5, loops 5 (nesting depth added 7). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
CookieJar.cookiesForRequest (cognitive 29) client/cookiejar.go:191— CookieJar.cookiesForRequest has cognitive complexity 29 (threshold 15). Drivers by points: if/else 22, loops 4, boolean chains 3 (nesting depth added 13). Of this number, 27 points are the body's own statements and 2 belong to one function literal inside it that branches. This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
keyauth.configDefault (cognitive 29) middleware/keyauth/config.go:102— keyauth.configDefault has cognitive complexity 29 (threshold 15). Drivers by points: if/else 21, boolean chains 4, loops 2, match/switch 2 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
logger.defaultLoggerInstance (cognitive 29) middleware/logger/default_logger.go:18— logger.defaultLoggerInstance has cognitive complexity 29 (threshold 15). Drivers by points: if/else 20, loops 8, boolean chains 1 (nesting depth added 14). Of this number, 17 points are the body's own statements and 12 belong to one function literal inside it that branches. 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.
fiber.addParameterMetaInfo (cognitive 28) path.go:373— fiber.addParameterMetaInfo has cognitive complexity 28 (threshold 15). Drivers by points: if/else 19, loops 5, boolean chains 4 (nesting depth added 13). 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.
App.Listen (cognitive 28) listen.go:199— App.Listen has cognitive complexity 28 (threshold 15). Drivers by points: if/else 22, boolean chains 4, match/switch 2 (nesting depth added 10). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
App.buildTree (cognitive 28) router.go:1172— App.buildTree has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13, loops 13, boolean chains 2 (nesting depth added 15). 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.
encryptcookie.New (cognitive 28) middleware/encryptcookie/encryptcookie.go:12— encryptcookie.New has cognitive complexity 28 (threshold 15). Drivers by points: if/else 19, loops 8, boolean chains 1 (nesting depth added 14). Most of this is not in the body itself: 0 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 17). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
SlidingWindow.New (cognitive 28) middleware/limiter/limiter_sliding.go:17— SlidingWindow.New has cognitive complexity 28 (threshold 15). Drivers by points: if/else 21, boolean chains 7 (nesting depth added 8). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to one function literal inside it that branches (line 33). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
proxy.canFastJoinPath (cognitive 28) middleware/proxy/security.go:865— proxy.canFastJoinPath has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18, boolean chains 7, match/switch 2, loops 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.
DefaultReq.Fresh (cognitive 28) req.go:454— DefaultReq.Fresh has cognitive complexity 28 (threshold 15). Drivers by points: if/else 24, boolean chains 4 (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.
DefaultReq.extractIPFromHeader (cognitive 27) req.go:718— DefaultReq.extractIPFromHeader has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17, loops 8, boolean chains 2 (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.
DefaultRes.Render (cognitive 27) res.go:737— DefaultRes.Render has cognitive complexity 27 (threshold 15). Drivers by points: if/else 24, boolean chains 2, loops 1 (nesting depth added 14). Of this number, 23 points are the body's own statements and 4 belong to one function literal inside it that branches. 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.
domainMatcher.match (cognitive 26) domain.go:139— domainMatcher.match has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16, boolean chains 5, loops 5 (nesting depth added 8). 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.
favicon.New (cognitive 26) middleware/favicon/favicon.go:21— favicon.New has cognitive complexity 26 (threshold 15). Drivers by points: if/else 24, boolean chains 2 (nesting depth added 10). Of this number, 17 points are the body's own statements and 9 belong to one function literal inside it that branches. 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.
Route.match (cognitive 26) router.go:407— Route.match has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19, boolean chains 7 (nesting depth added 7). 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.
App.resolveSkip (cognitive 25) router_skip.go:181— App.resolveSkip has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19, loops 4, boolean chains 2 (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.
cache.appendCanonicalQueryString (cognitive 25) middleware/cache/keygen.go:84— cache.appendCanonicalQueryString has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18, loops 6, boolean chains 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.
helmet.New (cognitive 25) middleware/helmet/helmet.go:11— helmet.New has cognitive complexity 25 (threshold 15). Drivers by points: if/else 23, boolean chains 2 (nesting depth added 3). Most of this is not in the body itself: 5 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 32). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
fiber.getBindingPrecedence (cognitive 24) bind.go:455— fiber.getBindingPrecedence has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16, loops 4, match/switch 4 (nesting depth added 15). 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.
CookieJar.setByHostAndPath (cognitive 24) client/cookiejar.go:299— CookieJar.setByHostAndPath has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, loops 4, boolean chains 1 (nesting depth added 12). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
basicauth.New (cognitive 24) middleware/basicauth/basicauth.go:32— basicauth.New has cognitive complexity 24 (threshold 15). Drivers by points: if/else 20, boolean chains 4 (nesting depth added 2). Most of this is not in the body itself: 0 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 41). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
FixedWindow.New (cognitive 24) middleware/limiter/limiter_fixed.go:15— FixedWindow.New has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18, boolean chains 6 (nesting depth added 4). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to one function literal inside it that branches (line 31). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
logger.New (cognitive 24) middleware/logger/logger.go:30— logger.New has cognitive complexity 24 (threshold 15). Drivers by points: if/else 20, loops 3, boolean chains 1 (nesting depth added 6). Most of this is not in the body itself: 9 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 91). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
fiber.New (cognitive 22) app.go:694— fiber.New has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20, loops 2. Of this number, 21 points are the body's own statements and 1 belongs 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.
App.deleteRoute (cognitive 22) router.go:909— App.deleteRoute has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16, boolean chains 3, loops 3 (nesting depth added 11). 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.
Storage.gc (cognitive 22) internal/storage/memory/memory.go:164— Storage.gc has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11, loops 7, boolean chains 2, match/switch 2 (nesting depth added 13). 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.
hostauthorization.isValidHostSyntax (cognitive 22) middleware/hostauthorization/hostauthorization.go:194— hostauthorization.isValidHostSyntax has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15, boolean chains 6, loops 1 (nesting depth added 7). 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.
DefaultReq.extractIPsFromHeader (cognitive 22) req.go:655— DefaultReq.extractIPsFromHeader has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 7, if/else 7, loops 5, match/switch 3 (nesting depth added 8). 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.
App.register (cognitive 21) router.go:978— App.register has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12, loops 5, boolean chains 4 (nesting depth added 5). 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.
Bind.All (cognitive 21) bind.go:510— Bind.All has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12, boolean chains 3, loops 3, match/switch 3 (nesting depth added 8). 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.
proxy.joinUpstreamPath (cognitive 21) middleware/proxy/security.go:759— proxy.joinUpstreamPath has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16, boolean chains 4, loops 1 (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.
DefaultRes.Format (cognitive 21) res.go:430— DefaultRes.Format has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, loops 5, boolean chains 2 (nesting depth added 7). 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.
App.processSubAppsRoutes (cognitive 20) mount.go:170— App.processSubAppsRoutes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11, loops 7, boolean chains 2 (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.
core.execFunc (cognitive 20) client/core.go:50— core.execFunc has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, boolean chains 4, match/switch 3 (nesting depth added 4). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 56, 130). 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.
DefaultReq.isTrustedProxyIP (cognitive 20) req.go:800— DefaultReq.isTrustedProxyIP has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, boolean chains 3, loops 3 (nesting depth added 5). 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.
fiber.acceptsLanguageOfferExtended (cognitive 19) helpers.go:444— fiber.acceptsLanguageOfferExtended has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, loops 4, boolean chains 2 (nesting depth added 5). 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.
binder.parseParamSquareBrackets (cognitive 19) binder/mapping.go:181— binder.parseParamSquareBrackets has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, boolean chains 1, loops 1 (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.
CookieJar.ensureHostCapacityLocked (cognitive 19) client/cookiejar.go:657— CookieJar.ensureHostCapacityLocked has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, loops 4, boolean chains 3 (nesting depth added 7). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
adaptor.resolveRemoteAddr (cognitive 19) middleware/adaptor/adaptor.go:416— adaptor.resolveRemoteAddr has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, boolean chains 2 (nesting depth added 7). 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.
binder.parseToMap (cognitive 18) binder/mapping.go:129— binder.parseToMap has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 2, loops 2, match/switch 1 (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.
client.doRedirectsWithClient (cognitive 18) client/transport.go:299— client.doRedirectsWithClient has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 2, loops 1 (nesting depth added 7). 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.
basicauth.parseHashedPassword (cognitive 18) middleware/basicauth/config.go:263— basicauth.parseHashedPassword has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 1, match/switch 1 (nesting depth added 9). 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.
proxy.followRedirects (cognitive 18) middleware/proxy/proxy.go:409— proxy.followRedirects has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 2, loops 1 (nesting depth added 7). 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.
DefaultReq.Scheme (cognitive 18) req.go:1029— DefaultReq.Scheme has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 2, match/switch 2, loops 1 (nesting depth added 7). 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.
App.ensureAutoHeadRoutesLocked (cognitive 17) router.go:1096— App.ensureAutoHeadRoutesLocked has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 3, loops 2 (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.
Response.Save (cognitive 17) client/response.go:144— Response.Save has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, match/switch 1 (nesting depth added 9). 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.
adaptor.CopyContextToFiberContext (cognitive 17) middleware/adaptor/adaptor.go:276— adaptor.CopyContextToFiberContext has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 2, match/switch 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.
cache.hasDirective (cognitive 17) middleware/cache/cachecontrol.go:11— cache.hasDirective has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, boolean chains 2, loops 1 (nesting depth added 7). 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.
fiber.RoutePatternMatch (cognitive 16) path.go:188— fiber.RoutePatternMatch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 4 (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.
binder.formatBindData (cognitive 16) binder/mapping.go:360— binder.formatBindData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, loops 4, boolean chains 1, match/switch 1 (nesting depth added 7). 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.
client.setConfigToRequest (cognitive 16) client/client.go:846— client.setConfigToRequest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, match/switch 2 (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.
client.writeMultipartBody (cognitive 16) client/hooks.go:257— client.writeMultipartBody has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 2, loops 2 (nesting depth added 5). 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.
defaultLogger.privateLogw (cognitive 16) log/default.go:110— defaultLogger.privateLogw has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, match/switch 3, loops 2, boolean chains 1 (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.
basicauth.configDefault (cognitive 16) middleware/basicauth/config.go:117— basicauth.configDefault has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 1, match/switch 1 (nesting depth added 3). Of this number, 11 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
Session.getExtractorInfo (cognitive 16) middleware/session/session.go:436— Session.getExtractorInfo has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 2, loops 2, match/switch 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.
Store.getSession (cognitive 16) middleware/session/store.go:125— Store.getSession has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, boolean chains 1 (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.
Unpinned build actions — CI references GitHub Actions by a floating ref (@main / @tag) rather than a pinned commit SHA, weakening build integrity. 12 floating ref(s) across 11 workflow file(s), 12 of them mutable BRANCH refs — pin those first. The reusable-workflow ref(s) below are the SAST lens's blind spot — pin these first: `gofiber/.github/.github/workflows/sync-sponsors.yml@main` (.github/workflows/sync-sponsors.yml:16), `gofiber/.github/.github/workflows/sync-docs.yml@main` (.github/workflows/sync-docs.yml:28), `gofiber/.github/.github/workflows/go-lint-single.yml@main` (.github/workflows/lint.yml:25), `gofiber/.github/.github/workflows/gh-pages-trim.yml@main` (.github/workflows/gh-pages-trim.yml:19), `gofiber/.github/.github/workflows/dependabot-automerge.yml@main` (.github/workflows/dependabot_automerge.yml:13), `gofiber/.github/.github/workflows/dependabot-on-demand.yml@main` (.github/workflows/dependabot-on-demand.yml:13), `gofiber/.github/.github/workflows/benchmark.yml@main` (.github/workflows/benchmark.yml:25), `gofiber/.github/.github/workflows/auto-labeler.yml@main` (.github/workflows/auto-labeler.yml:17), … (+1 more)
D38 · OSV Dependency Vulnerabilities· Medium vulnerability · ×1
Medium vulnerability: GO-2026-5932 go.mod— golang.org/x/crypto 0.54.0 (golang.org/x/crypto/openpgp, golang.org/x/crypto/openpgp/packet, golang.org/x/crypto/openpgp/armor, +4 more): GO-2026-5932 — no fixed version has been published yet. Track the advisory, and remove or replace golang.org/x/crypto if the exposure is not acceptable until one lands. Before doing either, check whether any affected package above is actually linked here: `go list -deps ./... | grep -F -e golang.org/x/crypto/openpgp` lists it whether your own code imports it or a dependency pulls it in — a module can be in the build list for one sub-package while the vulnerable one is never reached, in which case there is nothing to remove and tracking the advisory is the whole action.
Duplicated block (18 lines × 2) middleware/cors/utils.go:74— middleware/cors/utils.go:74-91 | middleware/csrf/helpers.go:98-115 — 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 `middleware/cors/utils.go:74` 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 (15 lines × 2) app.go:1037— app.go:1037-1051 | group.go:79-93 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app.go:1037` 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 (14 lines × 2) shared_state.go:101— shared_state.go:101-114 | shared_state.go:320-333 — 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 `shared_state.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 (12 lines × 2) middleware/redirect/redirect.go:18— middleware/redirect/redirect.go:18-31 | middleware/rewrite/rewrite.go:17-28 — 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 `middleware/redirect/redirect.go:18` 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 × 3) binder/cookie.go:24— binder/cookie.go:24-31 | binder/header.go:24-31 | binder/resp_header.go:24-31 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `binder/cookie.go:24` 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) req.go:577— req.go:577-582 | res.go:555-560 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. 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.
Low: use-of-unsafe-block app.go:837— Using the unsafe package in Go gives you low-level memory management and many of the strengths of the C language, but also steps around the type safety of Go and can lead to buffer overflows and possible arbitrary code execution by an attacker. Only use this package if you absolutely know what you're doing. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Low: use-of-unsafe-block app.go:849— Using the unsafe package in Go gives you low-level memory management and many of the strengths of the C language, but also steps around the type safety of Go and can lead to buffer overflows and possible arbitrary code execution by an attacker. Only use this package if you absolutely know what you're doing. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Low: use-of-unsafe-block helpers.go:137— Using the unsafe package in Go gives you low-level memory management and many of the strengths of the C language, but also steps around the type safety of Go and can lead to buffer overflows and possible arbitrary code execution by an attacker. Only use this package if you absolutely know what you're doing. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is. This site turns an address obtained through `reflect` into an `unsafe.Pointer`. What makes it correct is not a buffer length but ADDRESSABILITY and timing: `reflect.Value.UnsafeAddr`/`Pointer` return a `uintptr`, which stops being a live reference the moment the statement ends, so the conversion has to stay inside the expression that produced the address — and the call panics outright on a value that is not addressable. Keep `go vet` (its `unsafeptr` pass) on the package so a later edit that lifts the address into a local is caught, and make sure the value reaching this line is one your code made addressable.
Low: use-of-unsafe-block middleware/adaptor/adaptor.go:317— Using the unsafe package in Go gives you low-level memory management and many of the strengths of the C language, but also steps around the type safety of Go and can lead to buffer overflows and possible arbitrary code execution by an attacker. Only use this package if you absolutely know what you're doing. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is. This site turns an address obtained through `reflect` into an `unsafe.Pointer`. What makes it correct is not a buffer length but ADDRESSABILITY and timing: `reflect.Value.UnsafeAddr`/`Pointer` return a `uintptr`, which stops being a live reference the moment the statement ends, so the conversion has to stay inside the expression that produced the address — and the call panics outright on a value that is not addressable. Keep `go vet` (its `unsafeptr` pass) on the package so a later edit that lifts the address into a local is caught, and make sure the value reaching this line is one your code made addressable.
Low: use-of-unsafe-block readonly.go:16— Using the unsafe package in Go gives you low-level memory management and many of the strengths of the C language, but also steps around the type safety of Go and can lead to buffer overflows and possible arbitrary code execution by an attacker. Only use this package if you absolutely know what you're doing. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is. This site converts between `unsafe.Pointer` and `uintptr` and does arithmetic on the result. That is the one unsafe form whose validity depends on HOW it is written: the Go rules require the conversion, the arithmetic and the conversion back to sit in a single expression, because the collector may move the object between separate statements and leave a stale address behind. Check this line against the `unsafe.Pointer` rules and keep `go vet` (its `unsafeptr` pass) on the package — of the unsafe shapes in this repository, this is the one worth a second reader.
Low: use-of-unsafe-block readonly.go:17— Using the unsafe package in Go gives you low-level memory management and many of the strengths of the C language, but also steps around the type safety of Go and can lead to buffer overflows and possible arbitrary code execution by an attacker. Only use this package if you absolutely know what you're doing. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is. This site converts between `unsafe.Pointer` and `uintptr` and does arithmetic on the result. That is the one unsafe form whose validity depends on HOW it is written: the Go rules require the conversion, the arithmetic and the conversion back to sit in a single expression, because the collector may move the object between separate statements and leave a stale address behind. Check this line against the `unsafe.Pointer` rules and keep `go vet` (its `unsafeptr` pass) on the package — of the unsafe shapes in this repository, this is the one worth a second reader.
D11 · Test Reliability· Test reliability not included · ×1
Test reliability not included — Test source is present (.go) but the built-in reliability runner does not support this repository's ecosystem, so flakiness couldn't be assessed. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 2 significant file(s) lose their only recent owner: internal/logtemplate/template.go, middleware/cache/vary.go. Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 2 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (4 single-owned of 101 analysed files in total, counted over production source files of roughly 100 lines or more, excluding tests, vendored, generated and example/demo trees, largest first). They are anonymized user #2 (1 file(s)), anonymized user #3 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above.
D19 · Documentation Quality· The Ecosystem landing page links to the FiberLandscape component but does not describe how the core module's template engines, contrib middleware, storage drivers, and other packages fit together in detail for new readers. · ×1
The Ecosystem landing page links to the FiberLandscape component but does not describe how the core module's template engines, contrib middleware, storage drivers, and other packages fit together in detail for new readers. docs/ecosystem.md— Add a short 'Getting Started' section that maps out the main ecosystem components (template engines, contrib middleware) with a link to the FiberLandscape map.
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 3 of 101 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 100 lines or more, excluding tests, vendored, generated and example/demo trees, largest first). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — largest first: internal/tlstest/tls.go, middleware/idempotency/config.go, middleware/cache/heap.go. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
No build provenance — No SLSA provenance generation or build attestation found in CI — nothing binds a released artifact to the build that produced it, so a consumer cannot tell your artifact from a substituted one. On GitHub Actions, `actions/attest-build-provenance` (or slsa-github-generator) emits one from the job's own OIDC identity; elsewhere, run `cosign attest` over the released artifact from the release pipeline and publish the attestation beside it.
No artifact signing — No artifact signing found in CI — sign your released artifacts with whatever your ecosystem ships (a GPG/minisign detached signature — or `cosign sign-blob` — over the release archives, or over a checksum file published alongside them) so consumers can verify what you built.
D36 · Supply-chain Provenance & Signing· No SBOM · ×1
No SBOM — No SBOM generation or committed SBOM found — produce one with what your ecosystem ships (`cyclonedx-gomod` over the module graph — or Go's own build info, which already records the module set in the binary, `syft` (or `anchore/sbom-action` in CI) over the source tree or released image). Publish it as a release asset (`*.spdx.json` / `*.cdx.json`) so consumers can see what they are installing.
Coverage not included — suite not readable by the collector — Coverage NOT READ here — but this repository measures it: a Codecov configuration (.github/codecov.yml) and a coverage step in CI (`codecov/codecov-action`) shows that coverage is collected and tracked in your own CI. The built-in collector has no runner for this ecosystem (.go), so the analyzer could not read the number — a gap in the analyzer's language coverage, not an unmeasured repo. Not scored. To have the real number read, produce a coverage report in a standard format (`go test -coverprofile=coverage.out ./...`) into the repo working tree before the scan — a CI step is the usual place, since the artefact is commonly gitignored.
Info — 2 finding(s)
D12 · Dependency Hygiene· Dependency hygiene not measured · ×1
Dependency hygiene not measured — dependency manifest found but not parsed for hygiene — This repository's dependency manifest (a Go module (go.mod/go.sum)) was found, but this pass cannot parse it for hygiene, so no package was assessed. Zero packages read is NOT a clean dependency tree, so this is NOT SCORED — a gap in the analyzer, not a verdict about this repository. This row is about dependency HYGIENE — outdated, deprecated or unmaintained direct dependencies; known CVEs in the same dependency graph are a separate question, reported under D38 wherever the manifest is OSV-readable.
D22 · Internal API Consistency· No exposed public API · ×1
No exposed public API — No intentionally-exposed types (IsPackable or .Contracts) to evaluate.
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.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Terraform, Kubernetes/Helm, CloudFormation); nothing to scan.
trivy: not applicable — No JS/npm manifest or lockfile found outside build output (package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb); no JS dependencies to scan.
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.
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.
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
—
Run 019fd5d2-4058-7ae4-b248-7b4d2328ca2f · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 2 · Warnings: 201 · Recommendations: 15 · Info: 2 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 06-08-2026 @ 06:45 UTC.
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.