Public report — traefik, published 16 Aug 2026.
Concrete security findings (CVE IDs, secret matches, dependency versions) are hidden in this version;
ask the repo owner for the full report.
549findings with an exact file:lineof 562 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
41/115dimensions across the health lenses74809 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.
traefik/traefik carries serious gaps (54%). Several issues below can materially affect correctness, security, or the cost of changing it — and propagate to everything that depends on it.
It is strongest in Architecture (87%) — the structure is clean and changes stay contained. Code Health (85%) is solid too.
Most urgent: a critical security exposure was detected (see the Security & Compliance lens). Treat it as a priority regardless of the overall grade.
The area that most needs attention is Readiness (44%) — releases are harder to depend on — versioning, release notes and dependency hygiene are thin, so consumers can't easily tell what changed or trust an upgrade. Security (54%) is the next concern — exposure to security and compliance incidents is elevated.
Leadership focus, highest impact first: 2 Leaked secret finding(s) (Secret Scanning); Codify backups + geo-recovery in IaC… (DR & Backup); Stamp a version in your build/package manifest (e.g. csproj <Version> (Release Hygiene).
For scale: Medium (~74,809 production lines); rebuilding it from scratch would take roughly ~1.5 person-years (~1–3 engineers). Approximate, ±~30%.
It builds on a genuinely strong Architecture foundation (87%); 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.
R2 · Complex function Dashboard (cyclomatic 11, cognitive 10) webui/src/pages/dashboard/Dashboard.tsx
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.
0.8× (at 54% 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)
Dead frontend code
~88 LoC unreachable (3 file(s)) — that slice of this estimate buys code with zero runtime value; deleting it is the cheapest win in this report (the R7 card lists every file)
This codebase represents roughly ~1.5 person-years of build effort (about ~€210,000 to rebuild). Its weakest lens is Readiness at 44% — 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 0.8× 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
Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with local.key, consul.key.
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.
Value concentrated against a weak lens · High · Value at risk
This is a Medium asset (~1.5 person-years to rebuild), and its weakest lens is Readiness at 44%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
→ Direct remediation budget at Readiness first — highest risk-reduction per euro on an asset this size.
The top fix pays for itself · High · Economics
The top-ranked fix costs roughly 1–3 engineer-days once. Not doing it costs about 58–348 engineer-days every year, paid as drag on the ~356,573 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–2 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–15% 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: 87,922 line(s) changed over a 90-day window ⇒ ~356,573/year · D1/D2/D4 code quality: averaging 5.4/10 ⇒ a 7–15% drag on each change · top-ranked remediation: Low effort ⇒ about 1–3 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 2 months.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with local.key, consul.key. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with local.key, consul.key.
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 5.4/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 7–15% 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.4/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
138 modules, 396 dependencies — 1 dependency cycle, shown as the red cell(s) above the diagonal. 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 · 85% · Adequate · gated by 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
31
High / Critical
A06:2021 — Vulnerable & Outdated Components
30
High / Critical
A02:2021 — Cryptographic Failures
6
High / Critical
A05:2021 — Security Misconfiguration
6
High / Critical
Roadmap
Top priorities: Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with local.key, consul.key; Codify backups + geo-recovery in IaC (snapshot/replication/geo-redundant) to back the DR plan; 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.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with local.key, consul.key.
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. 40 of 41 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 1 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 — 41 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, 549 of 562 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.
D21 Naming Consistency — LLM provider failed — The model provider returned an unusable result, so this LLM-assisted dimension fell back to a measurement gap (confidence 0) rather than a penalty. Re-run with a reachable provider to score it.
D30 Dependency Vulnerabilities — scanner not present in this environment — The backing tool was not installed where this scan ran, so this dimension was not scored. Install the tool (or run in the hosted environment, where it is always present) for a graded result.
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.
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").
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D33 JS/npm Dependency Vulnerabilities: JS/npm CVE matching reads package manifests and lockfiles — risk from how a dependency is used, and advisories not yet published, fall outside this scan.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A clean result is "no unlabelled native control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
The LLM boundary
LLM-set scores this run (2): D19, 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.
84 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Provider.build at 80. A further 2 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 Headers.HasSecureHeadersDefined at 29 — they are counted neither in the figure above nor in this dimension's score.
+ 79 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 Provider.build (cyclomatic 80) finding(s) in Cyclomatic Complexity — start with build.go. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Builder.buildConstructor (cyclomatic 77) finding(s) in Cyclomatic Complexity — start with middlewares.go. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Provider.loadConfigurationFromCRD (cyclomatic 70) finding(s) in Cyclomatic Complexity — start with kubernetes.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.
+ 156 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 3 Balancer.ServeHTTP (cognitive 23) finding(s) in Cognitive Complexity — start with leasttime.go, p2c.go, wrr.go. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 1 Provider.build (cognitive 255) finding(s) in Cognitive Complexity — start with build.go. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Provider.loadConfigurationFromCRD (cognitive 181) finding(s) in Cognitive Complexity — start with kubernetes.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 Classes9.4 / 10Exemplary✓ 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.
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.
+ 30 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 20 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with client.go (2), grpcroute.go (2), tcproute.go (2). — One of this dimension's main actionable groups (20 warning-level).
Resolve the 19 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with config.go (4), kubernetes_http.go (2), client.go (2). — One of this dimension's main actionable groups (19 warning-level).
Resolve the 17 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with handler_http.go (2), config.go (2), kubernetes_http.go (2). — One of this dimension's main actionable groups (17 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with local.key, consul.key. — One of this dimension's main actionable groups (2 issue-level).
Enforce Secret Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
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.8 / 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.
5 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is pkg/observability/types/tracing.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.
Traefik's documentation is comprehensive and well-structured across READMEs, architecture docs, and a dedicated requirements.txt list. The main strengths are the full Traefik web UI guide (build/run/edit commands for frontend developers), an extensive release procedure covering both automated and manual steps with changelog generation, TLS certificate generation examples, and a detailed setup guide for Docker Swarm including prerequisites, self-signed certs, dashboard credentials, and dynamic TLS configuration. A strong architecture overview and product features comparison also round out the set. Traefik documentation is clear and complete for its audience. The setup guides cover both Kubernetes Helm and Docker standalone deployments (with a clipped but fully outlined architecture section), plus dedicated security topics such as request-path sanitization, HTTP/2 header memory exhaustion, underscore-header handling, content-length validation, WAF with Coraza, and OIDC authentication. A strong security focus is evident across the volume. Traefik Hub documentation is clear and complete for its audience. The READMEs are strong with practical JWT-authentication examples (secret signing, JWK/jwksUrl sources, claim usage) and dynamic-configuration YAML snippets showing the full routing/middleware label/service structure across Docker/Swarm/Kubernetes CRD/Consul paths. The dedicated tracing doc is thorough: explains OpenTelemetry setup for Jaeger/Zipkin/Datadog, a values.yaml example, and per-router trace enablement.
The guide mentions a self-signed certificate for *.docker.localhost but does not explain how to generate one or where to mount the certs directory (the Create a self-signed certificate section is clipped).docs/content/setup/kubernetes.md
What to do
Resolve the 1 The guide mentions a self-signed certificate for *.docker.localhost but… finding(s) in Documentation Quality — start with kubernetes.md. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
5 finding(s): 0 critical, 5 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
Secret: private-key · ×3Godeps/_workspace/src/github.com/fsouza/go-dockerclient/testing/data/key.pem:1detected by gitleaks finding
Rotate the exposed credentials — git history can't be un-committed
What to do
Resolve the 3 Secret finding(s) in Secrets (history) — start with key.pem, consul.key, local.key. — One of this dimension's main actionable groups (3 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
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).
31 finding(s): 0 critical, 8 high, 11 medium, 12 low. semgrep could NOT parse 38 file(s) — `.github/workflows/close-org-fork-pr.yaml`, `.github/workflows/release.yaml`, `.github/workflows/test-integration.yaml`, `pkg/provider/file/fixtures/yaml/template_file.yml`, `pkg/provider/file/fixtures/yaml/template_in_directory_file01.yml`, … (+33 more) — so nothing in them was analysed and no absence of findings there is evidence of anything. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.
High: gha-curl-pipe-shell · ×8.github/workflows/documentation.yaml:39detected by semgrep finding
Medium: watchdog-discarded-close-flush-error-go · ×11pkg/api/handler_support_dump.go:53detected by semgrep finding
Low: use-of-unsafe-block · ×12pkg/plugins/fixtures/src/testpluginsyscall/testpluginsyscall.go:21detected by semgrep finding
What to do
Resolve the 12 Low finding(s) in Static Analysis (SAST) — start with dialer.go (3), provider.go (2), tls.go (2). — One of this dimension's main actionable groups (12 recommendation-level).
Resolve the 11 Medium finding(s) in Static Analysis (SAST) — start with service.go (3), handler_support_dump.go (2), plugins.go. — One of this dimension's main actionable groups (11 warning-level).
Resolve the 8 High finding(s) in Static Analysis (SAST) — start with documentation.yaml (3), manager.go (2), test-integration.yaml. — One of this dimension's main actionable groups (8 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.
19 of 267 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is pkg/api/sort.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 Workflow holding a long-lived secret is unscoped 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.
High CVE: [GHSA redacted] · ×20webui/yarn.lockdetected by osv-scanner finding
Critical CVE: [GHSA redacted] · ×2webui/yarn.lockdetected by osv-scanner finding
Medium CVE: GO-2026-4599 · ×5go.moddetected by osv-scanner finding
Medium vulnerability: GO-2026-5932 · ×2go.moddetected by osv-scanner finding
Low CVE: [GHSA redacted]webui/yarn.lockdetected by osv-scanner finding
What to do
Resolve the 20 High CVE finding(s) in OSV Dependency Vulnerabilities — start with yarn.lock (20). — One of this dimension's main actionable groups (20 issue-level).
Resolve the 2 Critical CVE finding(s) in OSV Dependency Vulnerabilities — start with yarn.lock (2). — One of this dimension's main actionable groups (2 issue-level).
Resolve the 5 Medium CVE finding(s) in OSV Dependency Vulnerabilities — start with yarn.lock (3), go.mod (2). — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d38_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives10.0 / 10Exemplary○ Nothing flagged
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Do you agree with this assessment?
AC2 · Forms & labels4.3 / 10Weak✓ Tool-verified
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. — TableFilter.tsx:82
What to do
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Do you agree with this assessment?
AC3 · Page structure4.8 / 10Weak✓ Tool-verified
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it. (×2) — index.dev.html:3, index.html:2
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.
Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.
An a11y linter is configured (Documented) but there's no automated a11y test or CI gate. Add vitest-axe to verify at runtime, then gate it in CI.
What to do
Accessibility linting is already configured — assert with vitest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
Add a 'Testing' section to the root README — how to run the test suite.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Add a README to the 5 of 6 project(s) that lack one — worth up to 1.7 pts.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record 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 each file named `NNNN-title` in whatever markup those docs already use, 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
Enable Dependabot/Renovate or a dependency-review gate.
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.
Do you agree with this assessment?
P5 · DR & Backup3.0 / 10Weak✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
What to do
Codify backups + geo-recovery in IaC (snapshot/replication/geo-redundant) to back the DR plan.
No persistence guard on critical data stores — use Docker named volumes (or your orchestrator's persistent-volume equivalent) so the data store can't be wiped by a container recreate (or, in cloud, set purge-protection / soft-delete / prevent_destroy).
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?
R1 · Type Safety10.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
React / JS · Code Health — Copy-pasted token-identical blocks across the frontend (the D4 clone algorithm over JS/TS tokens, D-386).
Method: Copy-pasted token-identical blocks across the frontend (the D4 clone algorithm run over JS/TS tokens). Deterministic.
webui/src/pages/http/HttpMiddlewares.tsx:33 · webui/src/pages/tcp/TcpMiddlewares.tsx:33 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — HttpMiddlewares.tsx:33
webui/src/pages/http/HttpRouters.tsx:65 · webui/src/pages/tcp/TcpRouters.tsx:50 · webui/src/pages/udp/UdpRouters.tsx:36 — the 3 copies are spread across 3 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — HttpRouters.tsx:65
webui/src/pages/http/HttpServices.tsx:31 · webui/src/pages/tcp/TcpServices.tsx:31 · webui/src/pages/udp/UdpServices.tsx:31 — the 3 copies are spread across 3 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — HttpServices.tsx:31
webui/src/pages/certificates/Certificates.tsx:50 · webui/src/pages/http/HttpMiddlewares.tsx:43 · webui/src/pages/http/HttpRouters.tsx:72 · webui/src/pages/http/HttpServices.tsx:41 · +5 more site(s) not listed — the 9 copies are spread across 4 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — Certificates.tsx:50
webui/src/pages/http/HttpMiddlewares.tsx:90 · webui/src/pages/http/HttpRouters.tsx:123 · webui/src/pages/http/HttpServices.tsx:89 · webui/src/pages/tcp/TcpMiddlewares.tsx:90 · +4 more site(s) not listed — the 8 copies are spread across 3 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — HttpMiddlewares.tsx:90
webui/src/components/icons/providers/Docker.tsx:1 · webui/src/components/icons/providers/File.tsx:1 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — Docker.tsx:1
webui/src/pages/certificates/Certificates.tsx:103 · webui/src/pages/http/HttpMiddlewares.tsx:95 · webui/src/pages/http/HttpRouters.tsx:128 · webui/src/pages/http/HttpServices.tsx:94 · +5 more site(s) not listed — the 9 copies are spread across 4 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — Certificates.tsx:103
webui/src/components/middlewares/MiddlewareDetail.tsx:57 · webui/src/components/routers/RouterDetail.tsx:36 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — MiddlewareDetail.tsx:57
webui/src/pages/hub-demo/icons/api.tsx:9 · webui/src/pages/hub-demo/icons/portal.tsx:7 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — api.tsx:9
webui/src/components/icons/providers/index.tsx:67 · webui/src/components/resources/ProviderIcon.tsx:61 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — index.tsx:67
webui/src/components/routers/RouterDetail.tsx:21 · webui/src/components/services/ServiceDetail.tsx:23 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — RouterDetail.tsx:21
webui/src/pages/dashboard/Dashboard.tsx:108 · webui/src/pages/dashboard/Dashboard.tsx:127 — 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. — Dashboard.tsx:108
webui/src/components/services/MirrorServices.tsx:4 · webui/src/components/services/WeightedServices.tsx:4 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — MirrorServices.tsx:4
webui/src/components/middlewares/MiddlewareDefinition.tsx:6 · webui/src/components/services/ServiceDefinition.tsx:6 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — MiddlewareDefinition.tsx:6
webui/src/pages/http/HttpRouters.tsx:28 · webui/src/pages/tcp/TcpRouters.tsx:26 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — HttpRouters.tsx:28
webui/src/components/middlewares/MiddlewareDefinition.tsx:23 · webui/src/components/services/ServiceDefinition.tsx:23 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — MiddlewareDefinition.tsx:23
webui/src/pages/dashboard/Dashboard.tsx:186 · webui/src/pages/dashboard/Dashboard.tsx:204 — 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. — Dashboard.tsx:186
webui/src/components/icons/providers/index.tsx:34 · webui/src/components/icons/providers/index.tsx:43 · webui/src/components/icons/providers/index.tsx:61 · webui/src/components/resources/ProviderIcon.tsx:31 · +2 more site(s) not listed — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — index.tsx:34
webui/src/pages/certificates/Certificates.tsx:22 · webui/src/pages/http/HttpMiddlewares.tsx:21 · webui/src/pages/tcp/TcpMiddlewares.tsx:21 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — Certificates.tsx:22
webui/src/pages/hub-demo/icons/api.tsx:33 · webui/src/pages/hub-demo/icons/portal.tsx:23 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — api.tsx:33
webui/src/components/icons/providers/Consul.tsx:1 · webui/src/components/icons/providers/ECS.tsx:1 · webui/src/components/icons/providers/Etcd.tsx:1 · webui/src/components/icons/providers/Http.tsx:1 · +7 more site(s) not listed — the 11 copies are spread across 11 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — Consul.tsx:1
webui/src/pages/tcp/TcpRouters.tsx:21 · webui/src/pages/udp/UdpRouters.tsx:19 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — TcpRouters.tsx:21
webui/src/components/resources/Status.tsx:38 · webui/src/components/resources/Status.tsx:44 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — Status.tsx:38
webui/src/components/tables/AriaTableSkeleton.tsx:30 · webui/src/components/tables/AriaTableSkeleton.tsx:38 — 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. — AriaTableSkeleton.tsx:30
webui/src/mocks/handlers.ts:20 · webui/src/mocks/handlers.ts:26 — 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. — handlers.ts:20
webui/src/pages/http/HttpMiddleware.tsx:1 · webui/src/pages/http/HttpRouter.tsx:1 · webui/src/pages/http/HttpService.tsx:1 · webui/src/pages/tcp/TcpMiddleware.tsx:1 · +4 more site(s) not listed — the 8 copies are spread across 3 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — HttpMiddleware.tsx:1
webui/src/pages/http/HttpServices.tsx:62 · webui/src/pages/tcp/TcpServices.tsx:62 · webui/src/pages/udp/UdpServices.tsx:62 — the 3 copies are spread across 3 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — HttpServices.tsx:62
webui/src/pages/hub-demo/icons/api.tsx:1 · webui/src/pages/hub-demo/icons/portal.tsx:1 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — api.tsx:1
webui/src/pages/tcp/TcpRouters.tsx:79 · webui/src/pages/udp/UdpRouters.tsx:63 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — TcpRouters.tsx:79
webui/src/components/resources/ResourceErrors.tsx:22 · webui/src/components/routers/RouterFlowDiagram.tsx:190 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — ResourceErrors.tsx:22
webui/src/pages/tcp/TcpRouters.tsx:37 · webui/src/pages/udp/UdpRouters.tsx:23 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — TcpRouters.tsx:37
What to do
Extract the duplicated blocks into shared functions/components.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
Branch-heavy code is where defects cluster — extract decisions into smaller functions. (×9) — ServiceHealthCheck.tsx:16, index.tsx:26, CertificateDetails.tsx:15, …
Do you agree with this assessment?
R3 · Large Files10.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
Do you agree with this assessment?
R4 · Test Coverage9.7 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×4) — ProviderIcon.tsx, index.tsx, use-previous.tsx, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
Do you agree with this assessment?
R7 · Dead Code9.2 / 10Exemplary✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
Unreachable from the 4 application, 9 tooling and 38 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
no import path from any entry point (4 application, 9 tooling, 38 test roots considered) (×3) — ProviderIcon.tsx, use-previous.tsx, wait.ts
Nothing imports this binding — it is safe to review for removal. (×11) — CertificateDetails.tsx:106, ResourceStatus.tsx:6, TableFilter.tsx:114, …
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Imported but not declared in any reachable package.json — installs work only by hoisting accident. — SideNavBar.tsx:16
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
webui/src/layout/navigation/index.ts → webui/src/layout/navigation/SideNavBar.tsx → webui/src/layout/navigation/index.ts (one verified cycle inside a mutually-dependent group of 8 files) — index.ts
What to do
Break each cycle by extracting the shared piece into a module both sides can import.
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 13 of 55 WCAG 2.2 Level A/AA success criteria (24%; ≈26% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 42 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
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.
Not included — 74 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.
AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
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
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
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 — ~142969 lines of test source are present (.go, .tsx, .ts) 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), a Python pyproject.toml/requirements.txt (pip/uv/Poetry) and package.json), 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.
D21 Naming Consistency — LLM evaluation failed
D22 Internal API Consistency — No exposed public API
D23 Boundary Type-Coupling — Production source is present (.go, .ts, .tsx) 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), a Python pyproject.toml/requirements.txt (pip/uv/Poetry) and package.json — not scanned yet) — where an OSV-supported manifest exists, dependency vulnerabilities for this repository are reported under D38 instead.
D32 Data Compliance (PII/GDPR) — No PII/GDPR-handling patterns detected (p/gdpr ruleset) — no data-compliance surface to assess.
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, .ts, .tsx, 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, .tsx, .ts) 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 — applicable but not scored (1 of 2 signals for this style — below the bar we score at): 1 value object(s)
ED1 Event-Driven — not scored — this repository shows only 1 of the 3 signals this check looks for (2 integration event(s))
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 — and nothing was matched here. The coverage check applies to any stack, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
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.
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.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
R5 Dependency Freshness — uses a yarn lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D33 (JS/npm Dependency Vulnerabilities)
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
X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
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
X9 Subsumed condition operand — Reported, not scored — this card publishes what it found rather than grading it. Its content is the findings and the key metric above.
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.
Issue — 39 finding(s)
D38 · OSV Dependency Vulnerabilities· High CVE · ×20
High CVE: [GHSA redacted] webui/yarn.lock— minimatch 3.1.2: [GHSA redacted] — minimatch is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin minimatch to 3.1.4 with a `resolutions` entry). This is 1 of 3 advisories with a published fix this scan raises against minimatch 3.1.2, and their fixed versions do not agree — anything below 3.1.4 still leaves at least one of them open. Take this package to 3.1.4 or later: that is the floor for the package, not this row's target alone. This one row stands for the 3 advisories this scan raises against minimatch 3.1.2: [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] webui/yarn.lock— minimatch 9.0.5: [GHSA redacted] — minimatch is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin minimatch to 9.0.7 with a `resolutions` entry). This is 1 of 3 advisories with a published fix this scan raises against minimatch 9.0.5, and their fixed versions do not agree — anything below 9.0.7 still leaves at least one of them open. Take this package to 9.0.7 or later: that is the floor for the package, not this row's target alone. This one row stands for the 3 advisories this scan raises against minimatch 9.0.5: [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] webui/yarn.lock— flatted 3.3.3: [GHSA redacted] — flatted is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin flatted to 3.4.0 with a `resolutions` entry). This is 1 of 2 advisories with a published fix this scan raises against flatted 3.3.3, and their fixed versions do not agree — anything below 3.4.2 still leaves at least one of them open. Take this package to 3.4.2 or later: that is the floor for the package, not this row's target alone. This one row stands for the 2 advisories this scan raises against flatted 3.3.3: [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] webui/yarn.lock— nanoid 3.3.11: [GHSA redacted] — nanoid is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin nanoid to 3.3.16 with a `resolutions` entry). This is 1 of 2 advisories with a published fix this scan raises against nanoid 3.3.11, and their fixed versions do not agree — anything below 3.3.18 still leaves at least one of them open. Take this package to 3.3.18 or later: that is the floor for the package, not this row's target alone. This one row stands for the 2 advisories this scan raises against nanoid 3.3.11: [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] webui/yarn.lock— brace-expansion 1.1.11: [GHSA redacted] — brace-expansion is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin brace-expansion to 1.1.16 with a `resolutions` entry). This is 1 of 5 advisories with a published fix this scan raises against brace-expansion 1.1.11, and their fixed versions do not agree — anything below 1.1.18 still leaves at least one of them open. Take this package to 1.1.18 or later: that is the floor for the package, not this row's target alone. This one row stands for the 5 advisories this scan raises against brace-expansion 1.1.11: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] webui/yarn.lock— brace-expansion 2.0.1: [GHSA redacted] — brace-expansion is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin brace-expansion to 2.1.2 with a `resolutions` entry). This is 1 of 5 advisories with a published fix this scan raises against brace-expansion 2.0.1, and their fixed versions do not agree — anything below 2.1.4 still leaves at least one of them open. Take this package to 2.1.4 or later: that is the floor for the package, not this row's target alone. This one row stands for the 5 advisories this scan raises against brace-expansion 2.0.1: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] webui/yarn.lock— undici 7.27.0: [GHSA redacted] — upgrade to 7.29.0. This is 1 of 12 advisories with a published fix this scan raises against undici 7.27.0, and their fixed versions do not agree — anything below 7.29.0 still leaves at least one of them open. Take this package to 7.29.0 or later: that is the floor for the package, not this row's target alone. This one row stands for the 12 advisories this scan raises against undici 7.27.0: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] webui/yarn.lock— js-yaml 4.1.1: [GHSA redacted] — upgrade to 4.3.0. This is 1 of 3 advisories with a published fix this scan raises against js-yaml 4.1.1, and their fixed versions do not agree — anything below 4.3.1 still leaves at least one of them open. Take this package to 4.3.1 or later: that is the floor for the package, not this row's target alone. This one row stands for the 3 advisories this scan raises against js-yaml 4.1.1: [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] webui/yarn.lock— glob 10.4.5: [GHSA redacted] — glob is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin glob to 10.5.0 with a `resolutions` entry).
High CVE: [GHSA redacted] webui/yarn.lock— postcss 8.5.3: [GHSA redacted] — postcss is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin postcss to 8.5.12 with a `resolutions` entry). This is 1 of 4 advisories with a published fix this scan raises against postcss 8.5.3, and their fixed versions do not agree — anything below 8.5.23 still leaves at least one of them open. Take this package to 8.5.23 or later: that is the floor for the package, not this row's target alone. This one row stands for the 4 advisories this scan raises against postcss 8.5.3: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] webui/yarn.lock— postcss 8.5.6: [GHSA redacted] — postcss is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin postcss to 8.5.12 with a `resolutions` entry). This is 1 of 4 advisories with a published fix this scan raises against postcss 8.5.6, and their fixed versions do not agree — anything below 8.5.23 still leaves at least one of them open. Take this package to 8.5.23 or later: that is the floor for the package, not this row's target alone. This one row stands for the 4 advisories this scan raises against postcss 8.5.6: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] webui/yarn.lock— picomatch 2.3.1: [GHSA redacted] — picomatch is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin picomatch to 2.3.2 with a `resolutions` entry). This one row stands for the 2 advisories this scan raises against picomatch 2.3.1: [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] webui/yarn.lock— picomatch 4.0.2: [GHSA redacted] — picomatch is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin picomatch to 4.0.4 with a `resolutions` entry). This one row stands for the 2 advisories this scan raises against picomatch 4.0.2: [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] webui/yarn.lock— picomatch 4.0.3: [GHSA redacted] — picomatch is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin picomatch to 4.0.4 with a `resolutions` entry). This one row stands for the 2 advisories this scan raises against picomatch 4.0.3: [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] webui/yarn.lock— vite 5.4.19: [GHSA redacted] — upgrade to 6.4.3. This is 1 of 6 advisories with a published fix this scan raises against vite 5.4.19, and their fixed versions do not agree — anything below 5.4.21 still leaves at least one of them open. Take this package to 5.4.21 or later: that is the floor for the package, not this row's target alone. This one row stands for the 6 advisories this scan raises against vite 5.4.19: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] webui/yarn.lock— vite 7.1.12: [GHSA redacted] — this repo declares vite ^5.4.19, but the vulnerable 7.1.12 is a SEPARATE copy on another release line, so editing your own vite entry cannot move it: upgrade the dependency that pulls it in (or pin vite to 7.3.5 with a `resolutions` entry). This is 1 of 5 advisories with a published fix this scan raises against vite 7.1.12, and their fixed versions do not agree — anything below 7.3.5 still leaves at least one of them open. Take this package to 7.3.5 or later: that is the floor for the package, not this row's target alone. This one row stands for the 5 advisories this scan raises against vite 7.1.12: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] webui/yarn.lock— rollup 4.39.0: [GHSA redacted] — rollup is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin rollup to 4.59.0 with a `resolutions` entry).
High CVE: [GHSA redacted] webui/yarn.lock— rollup 4.52.5: [GHSA redacted] — rollup is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin rollup to 4.59.0 with a `resolutions` entry).
High CVE: [GHSA redacted] webui/yarn.lock— ip-address 9.0.5: [GHSA redacted] — ip-address is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (— 10.3.1 is a MAJOR ahead of the resolved 9.0.5, so a `resolutions` pin would force a breaking version under a dependent written against 9.0.5; upgrading the declaring package is the remedy, and where no patched release exists in your major line, record the exposure instead). This is 1 of 2 advisories with a published fix this scan raises against ip-address 9.0.5, and their fixed versions do not agree — anything below 10.3.1 still leaves at least one of them open. Take this package to 10.3.1 or later: that is the floor for the package, not this row's target alone. This one row stands for the 2 advisories this scan raises against ip-address 9.0.5: [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] webui/yarn.lock— lodash 4.17.21: [GHSA redacted] — this repo already declares lodash 4.18.1 directly, at or above the fixed 4.18.0; the vulnerable 4.17.21 is a second copy resolved for a dependency that requires an older range. Upgrade those dependents, or pin lodash with a `resolutions` entry so only one copy resolves. This one row stands for the 2 advisories this scan raises against lodash 4.17.21: [GHSA redacted], [GHSA redacted].
High: gha-curl-pipe-shell .github/workflows/documentation.yaml:39— A `run:` step pipes the output of `curl` or `wget` directly into a shell interpreter. This is the "curl | bash" install pattern — if the remote server is compromised or the URL is hijacked, an attacker can execute arbitrary code in your CI runner. Consider downloading the file first, verifying its checksum or signature, and then executing it.
High: gha-curl-pipe-shell .github/workflows/documentation.yaml:42— A `run:` step pipes the output of `curl` or `wget` directly into a shell interpreter. This is the "curl | bash" install pattern — if the remote server is compromised or the URL is hijacked, an attacker can execute arbitrary code in your CI runner. Consider downloading the file first, verifying its checksum or signature, and then executing it.
High: gha-curl-pipe-shell .github/workflows/documentation.yaml:45— A `run:` step pipes the output of `curl` or `wget` directly into a shell interpreter. This is the "curl | bash" install pattern — if the remote server is compromised or the URL is hijacked, an attacker can execute arbitrary code in your CI runner. Consider downloading the file first, verifying its checksum or signature, and then executing it.
High: watchdog-unpinned-package-install-in-run .github/workflows/test-integration.yaml:128— This CI step installs a third-party package by name with no version, so what lands on the runner is whatever the registry serves at the moment the job happens to run. A global or tool install resolves outside every lockfile in this repository, so nothing in version control records or constrains what was installed, and two runs of an UNCHANGED workflow file can install different code. That matters more than reproducibility here: package managers execute the downloaded package's install-time scripts with the job's environment in scope, tokens included, so a compromised release or a taken-over maintainer account upstream becomes code execution inside this job — the same supply-chain exposure as a floating action reference, reached through the `run:` key instead. Name an exact version on this command, in your manager's own syntax (`pkg@1.2.3` for npm/pnpm/yarn, `pkg==1.2.3` for pip, `-v 1.2.3` for gem, `--version 1.2.3` for cargo and `dotnet tool`, a real `@v1.2.3` module version for go), or move the tool into a manifest the repository already pins and installs from — a devDependency plus `npm ci`, a `requirements.txt` fed to `pip install -r`, or a `dotnet-tools.json` restored with `dotnet tool restore`.
High: gha-curl-pipe-shell .github/workflows/validate.yaml:89— A `run:` step pipes the output of `curl` or `wget` directly into a shell interpreter. This is the "curl | bash" install pattern — if the remote server is compromised or the URL is hijacked, an attacker can execute arbitrary code in your CI runner. Consider downloading the file first, verifying its checksum or signature, and then executing it.
High: watchdog-archive-entry-mode-go pkg/plugins/manager.go:281— An archive entry's own permission bits are applied to the file this extractor writes, so a tarball or zip the caller merely downloaded decides the mode of a file on the local disk. An entry declaring `04755` therefore lands as a SETUID executable owned by whoever ran the extraction, and `02755` as setgid - a local privilege escalation from nothing more than opening an untrusted archive, and one that the traversal check sitting above it does not address, because the path is fine and the MODE is the payload. Decide the mode yourself (`0o644`, `0o755` for entries the format says are executable), or strip the special bits before the write - `mode.Perm()`, or `mode &^ (os.ModeSetuid|os.ModeSetgid|os.ModeSticky)`.
High: watchdog-archive-entry-mode-go pkg/plugins/manager.go:294— An archive entry's own permission bits are applied to the file this extractor writes, so a tarball or zip the caller merely downloaded decides the mode of a file on the local disk. An entry declaring `04755` therefore lands as a SETUID executable owned by whoever ran the extraction, and `02755` as setgid - a local privilege escalation from nothing more than opening an untrusted archive, and one that the traversal check sitting above it does not address, because the path is fine and the MODE is the payload. Decide the mode yourself (`0o644`, `0o755` for entries the format says are executable), or strip the special bits before the write - `mode.Perm()`, or `mode &^ (os.ModeSetuid|os.ModeSetgid|os.ModeSticky)`.
High: yarn-missing-minimal-age-gate webui/.yarnrc.yml:1— This .yarnrc.yml does not set a minimal age gate or sets it too low. Newly published packages can be malicious or unstable. Add `npmMinimalAgeGate: "7d"` to wait 7 days before resolving newly published package versions. Added in: 4.10 Reference: https://yarnpkg.com/configuration/yarnrc#npmMinimalAgeGate. 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.
Leaked secret: private-key integration/resources/tls/local.key:1— private-key detected. Treat the value as compromised: it is readable by everyone who has ever had the repository, and deleting the line does not un-publish it. In order — (1) REVOKE it at whatever issued it and issue a replacement, which is the only step that actually closes the exposure; (2) load the replacement at run time from your platform's secret store or the process environment instead of from the tree, so no future value is committable; (3) remove the file or line and add its path to the repository's ignore rules, so it cannot come back; (4) if the value was ever live, purge it from the history as well, since a clone taken before the deletion still carries it. If this is instead a FIXTURE — key material generated for tests and valid nowhere — then the exposure is nil and the fix is to make that legible: generate it in test setup, or keep it under a test-data path, so a reader (and this scan) can tell it from the real thing.
Leaked secret: private-key integration/resources/tls/consul.key:1— private-key detected. Treat the value as compromised: it is readable by everyone who has ever had the repository, and deleting the line does not un-publish it. In order — (1) REVOKE it at whatever issued it and issue a replacement, which is the only step that actually closes the exposure; (2) load the replacement at run time from your platform's secret store or the process environment instead of from the tree, so no future value is committable; (3) remove the file or line and add its path to the repository's ignore rules, so it cannot come back; (4) if the value was ever live, purge it from the history as well, since a clone taken before the deletion still carries it. If this is instead a FIXTURE — key material generated for tests and valid nowhere — then the exposure is nil and the fix is to make that legible: generate it in test setup, or keep it under a test-data path, so a reader (and this scan) can tell it from the real thing.
High IaC: DS-0002 Dockerfile— Image user should not be 'root' A container that starts as root runs your process with root's capabilities inside the namespace, so a compromise of the process starts from there. The step: create an unprivileged account in the image (`RUN adduser -S -D app`), give it ownership of the paths the process writes at runtime (`COPY --chown=` on those layers, or a `RUN chown -R`), and end the final stage with `USER app` so it is the default at start. Build stages that only compile can stay root; it is the stage that RUNS that needs the account. If the process genuinely requires root — it manages the container runtime, ptraces another process or opens raw devices — say so here rather than making a change that breaks it.
High IaC: DS-0002 webui/buildx.Dockerfile— Image user should not be 'root' A container that starts as root runs your process with root's capabilities inside the namespace, so a compromise of the process starts from there. The step: create an unprivileged account in the image (`RUN useradd -r -M app` — or whatever this base image's account tooling is, `adduser` and `useradd` are not both present everywhere`), give it ownership of the paths the process writes at runtime (`COPY --chown=` on those layers, or a `RUN chown -R`), and end the final stage with `USER app` so it is the default at start. Build stages that only compile can stay root; it is the stage that RUNS that needs the account. If the process genuinely requires root — it manages the container runtime, ptraces another process or opens raw devices — say so here rather than making a change that breaks it.
Critical CVE: [GHSA redacted] webui/yarn.lock— tar 7.4.3: [GHSA redacted] — tar is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin tar to 7.5.19 with a `resolutions` entry). This is 1 of 12 advisories with a published fix this scan raises against tar 7.4.3, and their fixed versions do not agree — anything below 7.5.21 still leaves at least one of them open. Take this package to 7.5.21 or later: that is the floor for the package, not this row's target alone. This one row stands for the 12 advisories this scan raises against tar 7.4.3: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
Critical CVE: [GHSA redacted] webui/yarn.lock— vitest 4.0.3: [GHSA redacted] — this repo declares vitest ^4.0.3, a range that ALREADY admits the fixed 4.1.0, so there is no manifest edit to make here. Re-resolve the lock so vitest moves onto 4.1.0 or later; if the flagged 4.0.3 comes back, a dependency is pinning it — upgrade that dependent, or pin vitest with a `resolutions` entry so only one copy resolves.
Unlisted import 'react-router' webui/src/layout/navigation/SideNavBar.tsx:16— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Hotspot: pkg/provider/kubernetes/gateway/kubernetes.go pkg/provider/kubernetes/gateway/kubernetes.go— pkg/provider/kubernetes/gateway/kubernetes.go changed 13 times in last 90 days, max complexity 33. 2 of those changes were fix/bug commits, and the other 11 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, 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: pkg/provider/kubernetes/crd/kubernetes.go pkg/provider/kubernetes/crd/kubernetes.go— pkg/provider/kubernetes/crd/kubernetes.go changed 6 times in last 90 days, max complexity 70. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves.
Hotspot: pkg/provider/kubernetes/ingress-nginx/build.go pkg/provider/kubernetes/ingress-nginx/build.go— pkg/provider/kubernetes/ingress-nginx/build.go changed 4 times in last 90 days, max complexity 80. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, 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: pkg/provider/kubernetes/ingress/kubernetes.go pkg/provider/kubernetes/ingress/kubernetes.go— pkg/provider/kubernetes/ingress/kubernetes.go changed 6 times in last 90 days, max complexity 49. 1 of those changes was a fix/bug commit, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, 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: pkg/server/aggregator.go pkg/server/aggregator.go— pkg/server/aggregator.go changed 8 times in last 90 days, max complexity 35. 2 of those changes were fix/bug commits, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, 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: pkg/provider/kubernetes/gateway/httproute.go pkg/provider/kubernetes/gateway/httproute.go— pkg/provider/kubernetes/gateway/httproute.go changed 13 times in last 90 days, max complexity 18. 2 of those changes were fix/bug commits, and the other 11 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, 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: pkg/config/static/static_config.go pkg/config/static/static_config.go— pkg/config/static/static_config.go changed 4 times in last 90 days, max complexity 54. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves.
Hotspot: pkg/provider/kubernetes/gateway/client.go pkg/provider/kubernetes/gateway/client.go— pkg/provider/kubernetes/gateway/client.go changed 7 times in last 90 days, max complexity 29. 1 of those changes was a fix/bug commit, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, 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: pkg/provider/kubernetes/crd/kubernetes_http.go pkg/provider/kubernetes/crd/kubernetes_http.go— pkg/provider/kubernetes/crd/kubernetes_http.go changed 5 times in last 90 days, max complexity 37. 2 of those changes were fix/bug commits, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, 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: pkg/provider/kubernetes/gateway/tlsroute.go pkg/provider/kubernetes/gateway/tlsroute.go— pkg/provider/kubernetes/gateway/tlsroute.go changed 9 times in last 90 days, max complexity 19. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves.
Hotspot: pkg/provider/kubernetes/ingress-nginx/translator.go pkg/provider/kubernetes/ingress-nginx/translator.go— pkg/provider/kubernetes/ingress-nginx/translator.go changed 5 times in last 90 days, max complexity 33. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves.
Hotspot: pkg/server/server_entrypoint_tcp.go pkg/server/server_entrypoint_tcp.go— pkg/server/server_entrypoint_tcp.go changed 6 times in last 90 days, max complexity 27. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves.
Hotspot: cmd/traefik/traefik.go cmd/traefik/traefik.go— cmd/traefik/traefik.go changed 4 times in last 90 days, max complexity 39. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves.
Hotspot: pkg/provider/kubernetes/gateway/tcproute.go pkg/provider/kubernetes/gateway/tcproute.go— pkg/provider/kubernetes/gateway/tcproute.go changed 8 times in last 90 days, max complexity 17. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves.
Hotspot: pkg/server/router/tcp/router.go pkg/server/router/tcp/router.go— pkg/server/router/tcp/router.go changed 4 times in last 90 days, max complexity 34. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves.
Hotspot: pkg/provider/kubernetes/crd/kubernetes_tcp.go pkg/provider/kubernetes/crd/kubernetes_tcp.go— pkg/provider/kubernetes/crd/kubernetes_tcp.go changed 4 times in last 90 days, max complexity 33. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves.
Hotspot: pkg/provider/kubernetes/gateway/grpcroute.go pkg/provider/kubernetes/gateway/grpcroute.go— pkg/provider/kubernetes/gateway/grpcroute.go changed 7 times in last 90 days, max complexity 18. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves.
Hotspot: pkg/middlewares/auth/forward.go pkg/middlewares/auth/forward.go— pkg/middlewares/auth/forward.go changed 3 times in last 90 days, max complexity 36. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves.
Hotspot: pkg/server/router/tcp/manager.go pkg/server/router/tcp/manager.go— pkg/server/router/tcp/manager.go changed 4 times in last 90 days, max complexity 26. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves.
Hotspot: pkg/provider/kubernetes/crd/kubernetes_udp.go pkg/provider/kubernetes/crd/kubernetes_udp.go— pkg/provider/kubernetes/crd/kubernetes_udp.go changed 3 times in last 90 days, max complexity 33. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves.
Hotspot: pkg/provider/kubernetes/ingress-nginx/middleware.go pkg/provider/kubernetes/ingress-nginx/middleware.go— pkg/provider/kubernetes/ingress-nginx/middleware.go changed 4 times in last 90 days, max complexity 18. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves.
Hotspot: pkg/provider/acme/provider.go pkg/provider/acme/provider.go— pkg/provider/acme/provider.go changed 2 times in last 90 days, max complexity 36. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves.
Hotspot: pkg/provider/kubernetes/crd/client.go pkg/provider/kubernetes/crd/client.go— pkg/provider/kubernetes/crd/client.go changed 2 times in last 90 days, max complexity 30. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves.
Hotspot: pkg/config/dynamic/middlewares.go pkg/config/dynamic/middlewares.go— pkg/config/dynamic/middlewares.go changed 2 times in last 90 days, max complexity 29. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves.
Hotspot: pkg/provider/kubernetes/ingress-nginx/client.go pkg/provider/kubernetes/ingress-nginx/client.go— pkg/provider/kubernetes/ingress-nginx/client.go changed 2 times in last 90 days, max complexity 28. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves.
Duplicated block (8 lines × 2) pkg/api/sort.go:194— pkg/api/sort.go:194-201 | pkg/api/sort.go:312-319 — 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 `pkg/api/sort.go:194` 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 (8 lines × 2) pkg/middlewares/compress/compress.go:213— pkg/middlewares/compress/compress.go:213-220 | pkg/middlewares/compress/compress.go:227-234 — 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 `pkg/middlewares/compress/compress.go:213` 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) pkg/middlewares/inflightreq/inflight_req.go:27— pkg/middlewares/inflightreq/inflight_req.go:27-34 | pkg/middlewares/ratelimiter/rate_limiter.go:46-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 `pkg/middlewares/inflightreq/inflight_req.go:27` 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) pkg/middlewares/replacepath/replace_path.go:54— pkg/middlewares/replacepath/replace_path.go:54-61 | pkg/middlewares/replacepathregex/replace_path_regex.go:67-76 — 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 `pkg/middlewares/replacepath/replace_path.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. 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) pkg/provider/acme/provider.go:525— pkg/provider/acme/provider.go:525-532 | pkg/provider/acme/provider.go:561-568 — 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 `pkg/provider/acme/provider.go:525` 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) pkg/provider/consulcatalog/consul_catalog.go:163— pkg/provider/consulcatalog/consul_catalog.go:163-173 | pkg/provider/nomad/nomad.go:185-192 — 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 `pkg/provider/consulcatalog/consul_catalog.go:163` 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. 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) pkg/provider/docker/config.go:167— pkg/provider/docker/config.go:167-174 | pkg/provider/ecs/config.go:138-145 — `pkg/provider/docker/config.go` and `pkg/provider/ecs/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 7 separate duplicated blocks between them, totalling at least 80 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/docker/config.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) pkg/provider/docker/pdocker.go:65— pkg/provider/docker/pdocker.go:65-72 | pkg/provider/docker/pswarm.go:69-76 — 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 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 (8 lines × 2) pkg/provider/kubernetes/crd/kubernetes_http.go:160— pkg/provider/kubernetes/crd/kubernetes_http.go:160-167 | pkg/provider/kubernetes/crd/kubernetes_tcp.go:130-137 — before extracting anything, compare `pkg/provider/kubernetes/crd/kubernetes_http.go` and `pkg/provider/kubernetes/crd/kubernetes_tcp.go` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/kubernetes/crd/kubernetes_http.go:160` 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 (8 lines × 2) pkg/provider/kubernetes/ingress-nginx/client.go:162— pkg/provider/kubernetes/ingress-nginx/client.go:162-169 | pkg/provider/kubernetes/ingress/client.go:162-169 — `pkg/provider/kubernetes/ingress-nginx/client.go` and `pkg/provider/kubernetes/ingress/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 12 separate duplicated blocks between them, totalling at least 116 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (8 lines × 2) pkg/provider/kubernetes/ingress-nginx/client.go:207— pkg/provider/kubernetes/ingress-nginx/client.go:207-214 | pkg/provider/kubernetes/ingress/client.go:199-206 — `pkg/provider/kubernetes/ingress-nginx/client.go` and `pkg/provider/kubernetes/ingress/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 12 separate duplicated blocks between them, totalling at least 116 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/kubernetes/ingress-nginx/client.go:207` 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) pkg/server/router/router.go:278— pkg/server/router/router.go:278-285 | pkg/server/router/router.go:503-511 — 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 `pkg/server/router/router.go:278` 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) pkg/server/server_entrypoint_tcp.go:148— pkg/server/server_entrypoint_tcp.go:148-155 | pkg/server/server_entrypoint_udp.go:50-57 — 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 `pkg/server/server_entrypoint_tcp.go:148` 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) pkg/server/service/tcp/service.go:41— pkg/server/service/tcp/service.go:41-48 | pkg/server/service/udp/service.go:34-41 — 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 `pkg/server/service/tcp/service.go:41` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) pkg/udp/conn.go:275— pkg/udp/conn.go:275-282 | pkg/udp/conn.go:295-302 — 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 `pkg/udp/conn.go:275` 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) pkg/provider/kubernetes/gateway/grpcroute.go:330— pkg/provider/kubernetes/gateway/grpcroute.go:330-337 | pkg/provider/kubernetes/gateway/httproute.go:469-476 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/httproute.go` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 119 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 `pkg/provider/kubernetes/gateway/grpcroute.go:330` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) pkg/provider/kubernetes/gateway/grpcroute.go:454— pkg/provider/kubernetes/gateway/grpcroute.go:454-461 | pkg/provider/kubernetes/gateway/httproute.go:596-603 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/httproute.go` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 119 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 `pkg/provider/kubernetes/gateway/grpcroute.go:454` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) pkg/provider/kubernetes/gateway/httproute.go:289— pkg/provider/kubernetes/gateway/httproute.go:289-296 | pkg/provider/kubernetes/gateway/httproute.go:303-310 — 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 `pkg/provider/kubernetes/gateway/httproute.go:289` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) pkg/provider/kubernetes/gateway/tcproute.go:264— pkg/provider/kubernetes/gateway/tcproute.go:264-271 | pkg/provider/kubernetes/gateway/tlsroute.go:266-273 — before extracting anything, compare `pkg/provider/kubernetes/gateway/tcproute.go` and `pkg/provider/kubernetes/gateway/tlsroute.go` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 117 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 `pkg/provider/kubernetes/gateway/tcproute.go:264` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `p *Provider) loadTCPService(routerName` in one and `routerName` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8 lines × 2) pkg/provider/kubernetes/gateway/tcproute.go:324— pkg/provider/kubernetes/gateway/tcproute.go:324-331 | pkg/provider/kubernetes/gateway/tlsroute.go:439-447 — before extracting anything, compare `pkg/provider/kubernetes/gateway/tcproute.go` and `pkg/provider/kubernetes/gateway/tlsroute.go` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. 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 (10 lines × 2) pkg/api/handler_overview.go:263— pkg/api/handler_overview.go:263-272 | pkg/api/handler_overview.go:281-290 — 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 `pkg/api/handler_overview.go:263` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) pkg/config/dynamic/tcp_config.go:118— pkg/config/dynamic/tcp_config.go:118-127 | pkg/config/dynamic/udp_config.go:72-81 — 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 `pkg/config/dynamic/tcp_config.go:118` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) pkg/middlewares/ingressnginx/snippet/action.go:901— pkg/middlewares/ingressnginx/snippet/action.go:901-910 | pkg/middlewares/ingressnginx/snippet/action.go:926-935 — 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 `pkg/middlewares/ingressnginx/snippet/action.go:901` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) pkg/middlewares/ingressnginx/snippet/snippet.go:175— pkg/middlewares/ingressnginx/snippet/snippet.go:175-184 | pkg/middlewares/ingressnginx/snippet/snippet.go:199-208 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) pkg/middlewares/ipwhitelist/ip_whitelist.go:30— pkg/middlewares/ipwhitelist/ip_whitelist.go:30-39 | pkg/middlewares/tcp/ipwhitelist/ip_whitelist.go:27-36 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/middlewares/ipwhitelist/ip_whitelist.go:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) pkg/observability/metrics/otel.go:214— pkg/observability/metrics/otel.go:214-223 | pkg/observability/types/logs.go:203-212 — 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 `pkg/observability/metrics/otel.go:214` 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) pkg/plugins/builder.go:46— pkg/plugins/builder.go:46-55 | pkg/plugins/builder.go:81-90 — 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 `pkg/plugins/builder.go:46` 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 (10 lines × 2) pkg/provider/consulcatalog/config.go:322— pkg/provider/consulcatalog/config.go:322-331 | pkg/provider/nomad/config.go:282-291 — 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 `pkg/provider/consulcatalog/config.go:322` 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) pkg/provider/docker/config.go:46— pkg/provider/docker/config.go:46-55 | pkg/provider/ecs/config.go:36-45 — `pkg/provider/docker/config.go` and `pkg/provider/ecs/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 7 separate duplicated blocks between them, totalling at least 80 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/docker/config.go:46` 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 (10 lines × 2) pkg/provider/docker/config.go:114— pkg/provider/docker/config.go:114-128 | pkg/provider/docker/config.go:148-157 — 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 `pkg/provider/docker/config.go:114` 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) pkg/provider/docker/config.go:289— pkg/provider/docker/config.go:289-298 | pkg/provider/ecs/config.go:253-262 — `pkg/provider/docker/config.go` and `pkg/provider/ecs/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 7 separate duplicated blocks between them, totalling at least 80 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/docker/config.go:289` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) pkg/provider/ecs/ecs.go:138— pkg/provider/ecs/ecs.go:138-147 | pkg/provider/http/http.go:102-111 — 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 `pkg/provider/ecs/ecs.go:138` 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) pkg/provider/kubernetes/crd/kubernetes_http.go:347— pkg/provider/kubernetes/crd/kubernetes_http.go:347-356 | pkg/provider/kubernetes/crd/kubernetes_http.go:726-735 — 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 `pkg/provider/kubernetes/crd/kubernetes_http.go:347` 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 (10 lines × 2) pkg/provider/kubernetes/crd/kubernetes_http.go:645— pkg/provider/kubernetes/crd/kubernetes_http.go:645-658 | pkg/provider/kubernetes/ingress-nginx/build.go:747-756 — 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 `pkg/provider/kubernetes/crd/kubernetes_http.go:645` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) pkg/provider/kubernetes/ingress-nginx/client.go:175— pkg/provider/kubernetes/ingress-nginx/client.go:175-184 | pkg/provider/kubernetes/ingress/client.go:175-184 — `pkg/provider/kubernetes/ingress-nginx/client.go` and `pkg/provider/kubernetes/ingress/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 12 separate duplicated blocks between them, totalling at least 116 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (10 lines × 2) pkg/provider/kubernetes/ingress-nginx/client.go:267— pkg/provider/kubernetes/ingress-nginx/client.go:267-276 | pkg/provider/kubernetes/ingress/client.go:252-261 — `pkg/provider/kubernetes/ingress-nginx/client.go` and `pkg/provider/kubernetes/ingress/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 12 separate duplicated blocks between them, totalling at least 116 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/kubernetes/ingress-nginx/client.go:267` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) pkg/server/service/loadbalancer/hrw/hrw.go:185— pkg/server/service/loadbalancer/hrw/hrw.go:185-194 | pkg/server/service/loadbalancer/p2c/p2c.go:201-210 — 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 `pkg/server/service/loadbalancer/hrw/hrw.go:185` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10 lines × 2) pkg/provider/kubernetes/gateway/httproute.go:876— pkg/provider/kubernetes/gateway/httproute.go:876-885 | pkg/provider/kubernetes/gateway/httproute.go:898-907 — 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 `pkg/provider/kubernetes/gateway/httproute.go:876` 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10 lines × 2) pkg/provider/kubernetes/gateway/tcproute.go:163— pkg/provider/kubernetes/gateway/tcproute.go:163-172 | pkg/provider/kubernetes/gateway/tlsroute.go:165-174 — before extracting anything, compare `pkg/provider/kubernetes/gateway/tcproute.go` and `pkg/provider/kubernetes/gateway/tlsroute.go` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 117 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 `pkg/provider/kubernetes/gateway/tcproute.go:163` 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 (11 lines × 2) pkg/api/handler_http.go:200— pkg/api/handler_http.go:200-210 | pkg/api/handler_tcp.go:195-205 — before extracting anything, compare `pkg/api/handler_http.go` and `pkg/api/handler_tcp.go` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 70 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.
Duplicated block (11 lines × 2) pkg/api/handler_http.go:220— pkg/api/handler_http.go:220-230 | pkg/api/handler_tcp.go:215-225 — before extracting anything, compare `pkg/api/handler_http.go` and `pkg/api/handler_tcp.go` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 70 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.
Duplicated block (11 lines × 2) pkg/api/handler_tcp.go:158— pkg/api/handler_tcp.go:158-168 | pkg/api/handler_udp.go:137-147 — before extracting anything, compare `pkg/api/handler_tcp.go` and `pkg/api/handler_udp.go` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 59 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.
Duplicated block (11 lines × 2) pkg/middlewares/auth/forward.go:218— pkg/middlewares/auth/forward.go:218-228 | pkg/middlewares/ingressnginx/snippet/snippet.go:394-404 — 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 `pkg/middlewares/auth/forward.go:218` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (11 lines × 2) pkg/observability/tracing/tracing.go:98— pkg/observability/tracing/tracing.go:98-108 | pkg/observability/tracing/tracing.go:146-156 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 2) pkg/observability/types/logs.go:206— pkg/observability/types/logs.go:206-216 | pkg/observability/types/tracing.go:75-85 — 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 `pkg/observability/types/logs.go:206` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 2) pkg/provider/acme/provider.go:689— pkg/provider/acme/provider.go:689-699 | pkg/provider/acme/provider.go:737-747 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) pkg/provider/consulcatalog/config.go:279— pkg/provider/consulcatalog/config.go:279-289 | pkg/provider/nomad/config.go:248-258 — 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 `pkg/provider/consulcatalog/config.go:279` 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 (11 lines × 2) pkg/provider/docker/config.go:56— pkg/provider/docker/config.go:56-66 | pkg/provider/ecs/config.go:46-56 — `pkg/provider/docker/config.go` and `pkg/provider/ecs/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 7 separate duplicated blocks between them, totalling at least 80 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/docker/config.go:56` 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 (11 lines × 2) pkg/provider/kubernetes/crd/kubernetes.go:1175— pkg/provider/kubernetes/crd/kubernetes.go:1175-1185 | pkg/provider/kubernetes/crd/kubernetes.go:1222-1232 — 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 `pkg/provider/kubernetes/crd/kubernetes.go:1175` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) pkg/provider/kubernetes/crd/kubernetes_http.go:605— pkg/provider/kubernetes/crd/kubernetes_http.go:605-615 | pkg/provider/kubernetes/ingress/kubernetes.go:672-682 — 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 `pkg/provider/kubernetes/crd/kubernetes_http.go:605` 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 (11 lines × 2) pkg/provider/kubernetes/crd/kubernetes_http.go:835— pkg/provider/kubernetes/crd/kubernetes_http.go:835-845 | pkg/provider/kubernetes/crd/kubernetes_tcp.go:348-358 — before extracting anything, compare `pkg/provider/kubernetes/crd/kubernetes_http.go` and `pkg/provider/kubernetes/crd/kubernetes_tcp.go` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/kubernetes/crd/kubernetes_http.go:835` 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 (11 lines × 2) pkg/provider/kubernetes/ingress-nginx/client.go:292— pkg/provider/kubernetes/ingress-nginx/client.go:292-302 | pkg/provider/kubernetes/ingress/client.go:277-287 — `pkg/provider/kubernetes/ingress-nginx/client.go` and `pkg/provider/kubernetes/ingress/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 12 separate duplicated blocks between them, totalling at least 116 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/kubernetes/ingress-nginx/client.go:292` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (11 lines × 2) pkg/server/service/loadbalancer/p2c/p2c.go:166— pkg/server/service/loadbalancer/p2c/p2c.go:166-176 | pkg/server/service/loadbalancer/wrr/wrr.go:180-190 — `pkg/server/service/loadbalancer/p2c/p2c.go` and `pkg/server/service/loadbalancer/wrr/wrr.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 44 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/server/service/loadbalancer/p2c/p2c.go:166` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) pkg/provider/kubernetes/crd/kubernetes_tcp.go:63— pkg/provider/kubernetes/crd/kubernetes_tcp.go:63-73 | pkg/provider/kubernetes/crd/kubernetes_udp.go:40-50 — before extracting anything, compare `pkg/provider/kubernetes/crd/kubernetes_tcp.go` and `pkg/provider/kubernetes/crd/kubernetes_udp.go` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 90 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 `pkg/provider/kubernetes/crd/kubernetes_tcp.go:63` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) pkg/provider/kubernetes/crd/kubernetes_tcp.go:222— pkg/provider/kubernetes/crd/kubernetes_tcp.go:222-232 | pkg/provider/kubernetes/crd/kubernetes_udp.go:140-150 — before extracting anything, compare `pkg/provider/kubernetes/crd/kubernetes_tcp.go` and `pkg/provider/kubernetes/crd/kubernetes_udp.go` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 90 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 `pkg/provider/kubernetes/crd/kubernetes_tcp.go:222` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) pkg/provider/kubernetes/ingress-nginx/translator.go:248— pkg/provider/kubernetes/ingress-nginx/translator.go:248-258 | pkg/provider/kubernetes/ingress-nginx/translator.go:273-283 — 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 `pkg/provider/kubernetes/ingress-nginx/translator.go:248` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) pkg/api/sort.go:177— pkg/api/sort.go:177-189 | pkg/api/sort.go:298-310 — 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 `pkg/api/sort.go:177` 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) pkg/config/static/static_config.go:390— pkg/config/static/static_config.go:390-402 | pkg/config/static/static_config.go:429-441 — 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 `pkg/config/static/static_config.go:390` 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) pkg/healthcheck/healthcheck.go:73— pkg/healthcheck/healthcheck.go:73-86 | pkg/healthcheck/healthcheck_tcp.go:41-53 — 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 `pkg/healthcheck/healthcheck.go:73` 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) pkg/observability/metrics/otel.go:226— pkg/observability/metrics/otel.go:226-238 | pkg/observability/types/logs.go:215-228 — 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 `pkg/observability/metrics/otel.go:226` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) pkg/provider/consulcatalog/config.go:68— pkg/provider/consulcatalog/config.go:68-80 | pkg/provider/nomad/config.go:56-70 — 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 `pkg/provider/consulcatalog/config.go:68` 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) pkg/provider/docker/config.go:245— pkg/provider/docker/config.go:245-257 | pkg/provider/docker/config.go:271-283 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) pkg/provider/ecs/config.go:209— pkg/provider/ecs/config.go:209-221 | pkg/provider/ecs/config.go:235-247 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) pkg/provider/ecs/ecs.go:405— pkg/provider/ecs/ecs.go:405-418 | pkg/provider/ecs/ecs.go:469-481 — 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 `pkg/provider/ecs/ecs.go:405` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) pkg/provider/kubernetes/crd/kubernetes.go:388— pkg/provider/kubernetes/crd/kubernetes.go:388-400 | pkg/provider/kubernetes/crd/kubernetes.go:585-597 — 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 `pkg/provider/kubernetes/crd/kubernetes.go:388` 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) pkg/provider/nomad/nomad.go:328— pkg/provider/nomad/nomad.go:328-340 | pkg/provider/nomad/nomad.go:403-415 — 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 `pkg/provider/nomad/nomad.go:328` 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 (13 lines × 2) pkg/server/service/service.go:307— pkg/server/service/service.go:307-319 | pkg/server/service/service.go:382-394 — 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 `pkg/server/service/service.go:307` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) pkg/server/service/transport.go:68— pkg/server/service/transport.go:68-80 | pkg/server/service/transport.go:89-101 — 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 `pkg/server/service/transport.go:68` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) pkg/provider/kubernetes/crd/kubernetes_tcp.go:204— pkg/provider/kubernetes/crd/kubernetes_tcp.go:204-216 | pkg/provider/kubernetes/crd/kubernetes_udp.go:122-134 — before extracting anything, compare `pkg/provider/kubernetes/crd/kubernetes_tcp.go` and `pkg/provider/kubernetes/crd/kubernetes_udp.go` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 90 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.
Duplicated block (13 lines × 2) pkg/provider/kubernetes/crd/kubernetes_tcp.go:258— pkg/provider/kubernetes/crd/kubernetes_tcp.go:258-270 | pkg/provider/kubernetes/crd/kubernetes_udp.go:174-186 — before extracting anything, compare `pkg/provider/kubernetes/crd/kubernetes_tcp.go` and `pkg/provider/kubernetes/crd/kubernetes_udp.go` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 90 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 `pkg/provider/kubernetes/crd/kubernetes_tcp.go:258` 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. 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) pkg/provider/kubernetes/gateway/httproute.go:664— pkg/provider/kubernetes/gateway/httproute.go:664-676 | pkg/provider/kubernetes/gateway/tlsroute.go:500-512 — before extracting anything, compare `pkg/provider/kubernetes/gateway/httproute.go` and `pkg/provider/kubernetes/gateway/tlsroute.go` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 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 `pkg/provider/kubernetes/gateway/httproute.go:664` 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 first that the copies are not typed on the same thing: the declarations holding them bind `string` to `p *Provider) loadServersTransport(namespace` in one and `p *Provider) loadTCPServersTransport(namespace` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (13 lines × 2) pkg/provider/kubernetes/gateway/httproute.go:931— pkg/provider/kubernetes/gateway/httproute.go:931-943 | pkg/provider/kubernetes/gateway/httproute.go:965-977 — 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 `pkg/provider/kubernetes/gateway/httproute.go:931` 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (12 lines × 2) pkg/config/dynamic/http_config.go:134— pkg/config/dynamic/http_config.go:134-145 | pkg/middlewares/encodedcharacters/encoded_characters.go:89-100 — 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 `pkg/config/dynamic/http_config.go:134` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (12 lines × 2) pkg/provider/configuration.go:41— pkg/provider/configuration.go:41-52 | pkg/provider/configuration.go:112-123 — 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 `pkg/provider/configuration.go:41` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) pkg/provider/consulcatalog/config.go:245— pkg/provider/consulcatalog/config.go:245-256 | pkg/provider/nomad/config.go:214-225 — 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 `pkg/provider/consulcatalog/config.go:245` 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 (12 lines × 2) pkg/provider/consulcatalog/connect_tls.go:67— pkg/provider/consulcatalog/connect_tls.go:67-78 | pkg/provider/consulcatalog/connect_tls.go:94-105 — 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 `pkg/provider/consulcatalog/connect_tls.go:67` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (12 lines × 2) pkg/provider/docker/config.go:263— pkg/provider/docker/config.go:263-274 | pkg/provider/ecs/config.go:227-238 — `pkg/provider/docker/config.go` and `pkg/provider/ecs/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 7 separate duplicated blocks between them, totalling at least 80 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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 (12 lines × 2) pkg/provider/file/file.go:316— pkg/provider/file/file.go:316-327 | pkg/provider/file/file.go:358-369 — 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 `pkg/provider/file/file.go:316` 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 (12 lines × 2) pkg/provider/kubernetes/ingress-nginx/client.go:236— pkg/provider/kubernetes/ingress-nginx/client.go:236-247 | pkg/provider/kubernetes/ingress/client.go:228-239 — `pkg/provider/kubernetes/ingress-nginx/client.go` and `pkg/provider/kubernetes/ingress/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 12 separate duplicated blocks between them, totalling at least 116 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/kubernetes/ingress-nginx/client.go:236` 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 (12 lines × 2) pkg/provider/kubernetes/ingress-nginx/client.go:381— pkg/provider/kubernetes/ingress-nginx/client.go:381-392 | pkg/provider/kubernetes/ingress/client.go:303-314 — `pkg/provider/kubernetes/ingress-nginx/client.go` and `pkg/provider/kubernetes/ingress/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 12 separate duplicated blocks between them, totalling at least 116 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/kubernetes/ingress-nginx/client.go:381` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) pkg/provider/nomad/config.go:189— pkg/provider/nomad/config.go:189-200 | pkg/provider/nomad/config.go:218-229 — 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 `pkg/provider/nomad/config.go:189` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) pkg/provider/nomad/nomad.go:343— pkg/provider/nomad/nomad.go:343-354 | pkg/provider/nomad/nomad.go:433-444 — 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 `pkg/provider/nomad/nomad.go:343` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) pkg/server/service/transport.go:433— pkg/server/service/transport.go:433-444 | pkg/tcp/dialer.go:248-259 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) pkg/tcp/wrr_load_balancer.go:138— pkg/tcp/wrr_load_balancer.go:138-149 | pkg/udp/wrr_load_balancer.go:103-114 — 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 `pkg/tcp/wrr_load_balancer.go:138` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) pkg/middlewares/auth/connectionheader.go:27— pkg/middlewares/auth/connectionheader.go:27-38 | pkg/middlewares/ingressnginx/snippet/connectionheader.go:35-46 — 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 `pkg/middlewares/auth/connectionheader.go:27` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) pkg/provider/kubernetes/gateway/grpcroute.go:112— pkg/provider/kubernetes/gateway/grpcroute.go:112-123 | pkg/provider/kubernetes/gateway/httproute.go:116-127 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/httproute.go` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 119 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 `pkg/provider/kubernetes/gateway/grpcroute.go:112` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) pkg/provider/kubernetes/gateway/tcproute.go:119— pkg/provider/kubernetes/gateway/tcproute.go:119-130 | pkg/provider/kubernetes/gateway/tlsroute.go:122-133 — before extracting anything, compare `pkg/provider/kubernetes/gateway/tcproute.go` and `pkg/provider/kubernetes/gateway/tlsroute.go` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 117 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 `pkg/provider/kubernetes/gateway/tcproute.go:119` 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) pkg/config/runtime/runtime_http.go:29— pkg/config/runtime/runtime_http.go:29-37 | pkg/config/runtime/runtime_tcp.go:24-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 `pkg/config/runtime/runtime_http.go:29` 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) pkg/middlewares/auth/forward.go:300— pkg/middlewares/auth/forward.go:300-308 | pkg/middlewares/ingressnginx/snippet/snippet.go:465-473 — 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 `pkg/middlewares/auth/forward.go:300` 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 (9 lines × 2) pkg/middlewares/ingressnginx/snippet/collector.go:323— pkg/middlewares/ingressnginx/snippet/collector.go:323-331 | pkg/middlewares/ingressnginx/snippet/collector.go:335-343 — 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 `pkg/middlewares/ingressnginx/snippet/collector.go:323` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) pkg/observability/tracing/tracing.go:134— pkg/observability/tracing/tracing.go:134-142 | pkg/observability/tracing/tracing.go:177-185 — 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 `pkg/observability/tracing/tracing.go:134` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) pkg/provider/acme/challenge_tls.go:146— pkg/provider/acme/challenge_tls.go:146-154 | pkg/provider/acme/provider.go:887-895 — 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 `pkg/provider/acme/challenge_tls.go:146` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) pkg/provider/docker/pdocker.go:74— pkg/provider/docker/pdocker.go:74-82 | pkg/provider/docker/pswarm.go:78-86 — 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.
Duplicated block (9 lines × 2) pkg/provider/file/file.go:454— pkg/provider/file/file.go:454-462 | pkg/provider/http/http.go:209-217 — 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 `pkg/provider/file/file.go:454` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) pkg/provider/kubernetes/crd/kubernetes.go:699— pkg/provider/kubernetes/crd/kubernetes.go:699-707 | pkg/provider/kubernetes/crd/kubernetes_tcp.go:150-158 — 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 `pkg/provider/kubernetes/crd/kubernetes.go:699` 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. 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) pkg/provider/kubernetes/crd/kubernetes.go:744— pkg/provider/kubernetes/crd/kubernetes.go:744-752 | pkg/provider/kubernetes/ingress/kubernetes.go:920-928 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) pkg/provider/kubernetes/crd/kubernetes_http.go:40— pkg/provider/kubernetes/crd/kubernetes_http.go:40-48 | pkg/provider/kubernetes/crd/kubernetes_udp.go:26-34 — 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. 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) pkg/provider/kubernetes/ingress-nginx/build.go:234— pkg/provider/kubernetes/ingress-nginx/build.go:234-243 | pkg/provider/kubernetes/ingress-nginx/build.go:398-406 — 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 `pkg/provider/kubernetes/ingress-nginx/build.go:398` 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 (9 lines × 2) pkg/provider/kubernetes/ingress-nginx/build.go:487— pkg/provider/kubernetes/ingress-nginx/build.go:487-495 | pkg/provider/kubernetes/ingress-nginx/build.go:600-608 — 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 `pkg/provider/kubernetes/ingress-nginx/build.go:487` 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) pkg/server/service/tcp/service.go:77— pkg/server/service/tcp/service.go:77-85 | pkg/server/service/udp/service.go:56-64 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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) pkg/provider/kubernetes/gateway/tcproute.go:277— pkg/provider/kubernetes/gateway/tcproute.go:277-285 | pkg/provider/kubernetes/gateway/tlsroute.go:279-287 — before extracting anything, compare `pkg/provider/kubernetes/gateway/tcproute.go` and `pkg/provider/kubernetes/gateway/tlsroute.go` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 117 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 `pkg/provider/kubernetes/gateway/tcproute.go:277` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `p *Provider) loadTCPService(routerName` in one and `routerName` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 2) pkg/middlewares/auth/forward.go:321— pkg/middlewares/auth/forward.go:321-326 | pkg/middlewares/ingressnginx/snippet/snippet.go:487-492 — 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 `pkg/middlewares/auth/forward.go:321` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) pkg/middlewares/ingressnginx/snippet/action.go:921— pkg/middlewares/ingressnginx/snippet/action.go:921-926 | pkg/middlewares/ingressnginx/snippet/action.go:936-941 — 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 `pkg/middlewares/ingressnginx/snippet/action.go:921` 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 (6 lines × 2) pkg/muxer/http/matcher.go:46— pkg/muxer/http/matcher.go:46-51 | pkg/muxer/http/matcher_v2.go:144-149 — 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 `pkg/muxer/http/matcher.go:46` 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 (6 lines × 2) pkg/provider/kubernetes/crd/client.go:235— pkg/provider/kubernetes/crd/client.go:235-240 | pkg/provider/kubernetes/gateway/client.go:207-212 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) pkg/provider/kubernetes/crd/kubernetes_http.go:177— pkg/provider/kubernetes/crd/kubernetes_http.go:177-182 | pkg/provider/kubernetes/crd/kubernetes_tcp.go:145-150 — before extracting anything, compare `pkg/provider/kubernetes/crd/kubernetes_http.go` and `pkg/provider/kubernetes/crd/kubernetes_tcp.go` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/kubernetes/crd/kubernetes_http.go:177` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `ingRouteNamespace` in one and `ingRouteTCPNamespace` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 2) pkg/provider/kubernetes/gateway/kubernetes.go:467— pkg/provider/kubernetes/gateway/kubernetes.go:467-472 | pkg/provider/kubernetes/gateway/kubernetes.go:562-567 — 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 `pkg/provider/kubernetes/gateway/kubernetes.go:467` 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 (6 lines × 2) pkg/provider/traefik/internal.go:65— pkg/provider/traefik/internal.go:65-70 | pkg/server/aggregator.go:24-29 — 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 `pkg/provider/traefik/internal.go:65` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) pkg/server/router/router.go:242— pkg/server/router/router.go:242-247 | pkg/server/router/router.go:490-496 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) pkg/server/router/tcp/postgres.go:63— pkg/server/router/tcp/postgres.go:63-68 | pkg/server/router/tcp/router.go:170-175 — 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 `pkg/server/router/tcp/postgres.go:63` 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 (6 lines × 2) pkg/provider/kubernetes/gateway/grpcroute.go:469— pkg/provider/kubernetes/gateway/grpcroute.go:469-475 | pkg/provider/kubernetes/gateway/httproute.go:608-613 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/httproute.go` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 119 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 2) pkg/provider/kubernetes/gateway/tcproute.go:240— pkg/provider/kubernetes/gateway/tcproute.go:240-245 | pkg/provider/kubernetes/gateway/tlsroute.go:242-247 — before extracting anything, compare `pkg/provider/kubernetes/gateway/tcproute.go` and `pkg/provider/kubernetes/gateway/tlsroute.go` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 117 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 `pkg/provider/kubernetes/gateway/tcproute.go:240` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `p *Provider) loadTCPService(routerName` in one and `routerName` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 2) pkg/provider/kubernetes/ingress-nginx/translator.go:99— pkg/provider/kubernetes/ingress-nginx/translator.go:99-104 | pkg/provider/kubernetes/ingress-nginx/translator.go:147-152 — 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 `pkg/provider/kubernetes/ingress-nginx/translator.go:99` 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.
Medium: watchdog-discarded-close-flush-error-go pkg/api/handler_support_dump.go:53— This writer buffers, and its `Close` is what flushes the tail of the stream - the archive footer, the final compressed block, the padding. Deferring `Close` discards the error it returns, so a flush that fails cannot reach any return value and this function reports success over a truncated or corrupt stream. Close it on the success path and act on the error - `if err := w.Close(); err != nil { ... }` - or recover it through a named return, `defer func() { if cerr := w.Close(); cerr != nil && err == nil { err = cerr } }()`. Keep the deferred close as well when it is there to release the handle on the error paths. 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.
Medium: watchdog-discarded-close-flush-error-go pkg/api/handler_support_dump.go:57— This writer buffers, and its `Close` is what flushes the tail of the stream - the archive footer, the final compressed block, the padding. Deferring `Close` discards the error it returns, so a flush that fails cannot reach any return value and this function reports success over a truncated or corrupt stream. Close it on the success path and act on the error - `if err := w.Close(); err != nil { ... }` - or recover it through a named return, `defer func() { if cerr := w.Close(); cerr != nil && err == nil { err = cerr } }()`. Keep the deferred close as well when it is there to release the handle on the error paths. 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.
Medium: watchdog-unchecked-document-assert-go pkg/config/dynamic/plugins.go:35— This type assertion is the single-value form, so it PANICS - it does not return an error - when the value's dynamic type is not `map[string]any`. The target type is a bare `map[string]…`/`[]…` of empty interface, which is the shape a decoder produces for a document whose structure it was never told: JSON, YAML or TOML unmarshalled into `interface{}`. That means the dynamic type here was chosen by whoever authored the input, not by this program, and a document that writes a scalar or a list where this code assumes an object takes the process down. Use the comma-ok form - `v, ok := x.(map[string]interface{}); if !ok { … }` - and return a validation error for the shape you did not get. A malformed input document should be answered with a message naming the offending key, which is what callers of a config or workflow parser expect; a panic gives them a stack trace and no way to tell which line of their file was wrong. 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.
Medium: watchdog-unchecked-document-assert-go pkg/middlewares/ratelimiter/redis_limiter.go:113— This type assertion is the single-value form, so it PANICS - it does not return an error - when the value's dynamic type is not `[]any`. The target type is a bare `map[string]…`/`[]…` of empty interface, which is the shape a decoder produces for a document whose structure it was never told: JSON, YAML or TOML unmarshalled into `interface{}`. That means the dynamic type here was chosen by whoever authored the input, not by this program, and a document that writes a scalar or a list where this code assumes an object takes the process down. Use the comma-ok form - `v, ok := x.(map[string]interface{}); if !ok { … }` - and return a validation error for the shape you did not get. A malformed input document should be answered with a message naming the offending key, which is what callers of a config or workflow parser expect; a panic gives them a stack trace and no way to tell which line of their file was wrong. 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.
Medium: watchdog-decompression-bomb-zip-entry-go pkg/plugins/manager.go:301— This copy drains a ZIP entry's DECOMPRESSED stream with no bound on how many bytes it will write. A zip entry's expansion ratio is chosen by whoever built the archive, so a small file can expand until the disk fills or the process is killed - and the entry's declared `UncompressedSize64` is a claim from that same archive, not a measurement. The sibling `io.Copy` on this extractor's tar.gz path is already reported by `potential-dos-via-decompression-bomb`; the zip path reaches the same defect through `(*zip.File).Open()`, which that rule cannot see. Bound the copy - `io.CopyN(dst, src, max)`, or `io.Copy(dst, io.LimitReader(src, max))` - and fail the extraction when the limit is hit, rather than trusting the size the archive declares for itself.
Medium: use-of-sha1 pkg/provider/kubernetes/crd/kubernetes.go:1275— Detected SHA1 hash algorithm which is considered insecure. SHA1 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead. This is a semgrep security-AUDIT rule: it reports that a sensitive pattern is present, not that it is exploitable here. Confirm whether the flagged value reaches a security decision — a credential, token, nonce, key, salt or session id, or an externally reachable surface — and apply the change where it does; where it provably does not (cosmetic, simulation, or deliberately reproducible use), record the review and leave the code as it is.
Medium: use-of-sha1 pkg/server/cookie/cookie.go:26— Detected SHA1 hash algorithm which is considered insecure. SHA1 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead. This is a semgrep security-AUDIT rule: it reports that a sensitive pattern is present, not that it is exploitable here. Confirm whether the flagged value reaches a security decision — a credential, token, nonce, key, salt or session id, or an externally reachable surface — and apply the change where it does; where it provably does not (cosmetic, simulation, or deliberately reproducible use), record the review and leave the code as it is.
Medium: math-random-used pkg/server/service/loadbalancer/p2c/p2c.go:6— `math/rand` is not cryptographically secure — its stream is reproducible from its seed and predictable from observed output — so any value that must be unguessable (a token, nonce, key, salt, session id, password-reset or MFA code) has to come from `crypto/rand`. Where non-cryptographic randomness IS the intent — jitter, backoff, sampling, load spreading, simulation, test fixtures, or output that is deliberately reproducible from a seed — `math/rand` is the correct choice and no change is needed; a package that deliberately offers both should keep its security-sensitive callers on the `crypto/rand` path rather than drop the other one. This is a semgrep security-AUDIT rule: it reports that a sensitive pattern is present, not that it is exploitable here. Confirm whether the flagged value reaches a security decision — a credential, token, nonce, key, salt or session id, or an externally reachable surface — and apply the change where it does; where it provably does not (cosmetic, simulation, or deliberately reproducible use), record the review and leave the code as it is.
Medium: math-random-used pkg/server/service/service.go:8— `math/rand` is not cryptographically secure — its stream is reproducible from its seed and predictable from observed output — so any value that must be unguessable (a token, nonce, key, salt, session id, password-reset or MFA code) has to come from `crypto/rand`. Where non-cryptographic randomness IS the intent — jitter, backoff, sampling, load spreading, simulation, test fixtures, or output that is deliberately reproducible from a seed — `math/rand` is the correct choice and no change is needed; a package that deliberately offers both should keep its security-sensitive callers on the `crypto/rand` path rather than drop the other one. This is a semgrep security-AUDIT rule: it reports that a sensitive pattern is present, not that it is exploitable here. Confirm whether the flagged value reaches a security decision — a credential, token, nonce, key, salt or session id, or an externally reachable surface — and apply the change where it does; where it provably does not (cosmetic, simulation, or deliberately reproducible use), record the review and leave the code as it is.
Medium: math-random-used pkg/server/service/tcp/service.go:8— `math/rand` is not cryptographically secure — its stream is reproducible from its seed and predictable from observed output — so any value that must be unguessable (a token, nonce, key, salt, session id, password-reset or MFA code) has to come from `crypto/rand`. Where non-cryptographic randomness IS the intent — jitter, backoff, sampling, load spreading, simulation, test fixtures, or output that is deliberately reproducible from a seed — `math/rand` is the correct choice and no change is needed; a package that deliberately offers both should keep its security-sensitive callers on the `crypto/rand` path rather than drop the other one. This is a semgrep security-AUDIT rule: it reports that a sensitive pattern is present, not that it is exploitable here. Confirm whether the flagged value reaches a security decision — a credential, token, nonce, key, salt or session id, or an externally reachable surface — and apply the change where it does; where it provably does not (cosmetic, simulation, or deliberately reproducible use), record the review and leave the code as it is.
Medium: math-random-used pkg/server/service/udp/service.go:7— `math/rand` is not cryptographically secure — its stream is reproducible from its seed and predictable from observed output — so any value that must be unguessable (a token, nonce, key, salt, session id, password-reset or MFA code) has to come from `crypto/rand`. Where non-cryptographic randomness IS the intent — jitter, backoff, sampling, load spreading, simulation, test fixtures, or output that is deliberately reproducible from a seed — `math/rand` is the correct choice and no change is needed; a package that deliberately offers both should keep its security-sensitive callers on the `crypto/rand` path rather than drop the other one. This is a semgrep security-AUDIT rule: it reports that a sensitive pattern is present, not that it is exploitable here. Confirm whether the flagged value reaches a security decision — a credential, token, nonce, key, salt or session id, or an externally reachable surface — and apply the change where it does; where it provably does not (cosmetic, simulation, or deliberately reproducible use), record the review and leave the code as it is.
FileTooLong: crd/kubernetes.go pkg/provider/kubernetes/crd/kubernetes.go:0— FileTooLong — 1034 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: gateway/kubernetes.go pkg/provider/kubernetes/gateway/kubernetes.go:0— FileTooLong — 867 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: ingress-nginx/build.go pkg/provider/kubernetes/ingress-nginx/build.go:0— FileTooLong — 721 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: gateway/httproute.go pkg/provider/kubernetes/gateway/httproute.go:0— FileTooLong — 688 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: acme/provider.go pkg/provider/acme/provider.go:0— FileTooLong — 666 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: ingress/kubernetes.go pkg/provider/kubernetes/ingress/kubernetes.go:0— FileTooLong — 598 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: snippet/action.go pkg/middlewares/ingressnginx/snippet/action.go:0— FileTooLong — 586 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: server/server_entrypoint_tcp.go pkg/server/server_entrypoint_tcp.go:0— FileTooLong — 548 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: crd/kubernetes_http.go pkg/provider/kubernetes/crd/kubernetes_http.go:0— FileTooLong — 504 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.
Duplicated block (15 lines × 2) pkg/middlewares/gatewayapi/redirect/request_redirect.go:103— pkg/middlewares/gatewayapi/redirect/request_redirect.go:103-117 | pkg/middlewares/gatewayapi/urlrewrite/url_rewrite.go:55-69 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (15 lines × 2) pkg/provider/consulcatalog/consul_catalog.go:60— pkg/provider/consulcatalog/consul_catalog.go:60-74 | pkg/provider/nomad/nomad.go:69-83 — 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 `pkg/provider/consulcatalog/consul_catalog.go:60` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (15 lines × 2) pkg/provider/consulcatalog/consul_catalog.go:429— pkg/provider/consulcatalog/consul_catalog.go:429-443 | pkg/provider/consulcatalog/consul_catalog.go:482-496 — 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 `pkg/provider/consulcatalog/consul_catalog.go:429` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (15 lines × 2) pkg/provider/docker/config.go:308— pkg/provider/docker/config.go:308-322 | pkg/provider/ecs/config.go:272-286 — `pkg/provider/docker/config.go` and `pkg/provider/ecs/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 7 separate duplicated blocks between them, totalling at least 80 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (15 lines × 2) pkg/server/middleware/middlewares.go:84— pkg/server/middleware/middlewares.go:84-98 | pkg/server/middleware/tcp/middlewares.go:55-70 — 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 `pkg/server/middleware/middlewares.go:84` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) pkg/provider/kubernetes/gateway/grpcroute.go:79— pkg/provider/kubernetes/gateway/grpcroute.go:79-93 | pkg/provider/kubernetes/gateway/httproute.go:83-97 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/httproute.go` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 119 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 `pkg/provider/kubernetes/gateway/grpcroute.go:79` 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) pkg/provider/kubernetes/gateway/grpcroute.go:308— pkg/provider/kubernetes/gateway/grpcroute.go:308-322 | pkg/provider/kubernetes/gateway/httproute.go:431-445 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/httproute.go` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 119 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 `pkg/provider/kubernetes/gateway/grpcroute.go:308` 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 first that the copies are not typed on the same thing: the declarations holding them bind `string` to `routerName` in one and `parentName` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (15 lines × 2) pkg/provider/kubernetes/gateway/grpcroute.go:357— pkg/provider/kubernetes/gateway/grpcroute.go:357-371 | pkg/provider/kubernetes/gateway/httproute.go:496-510 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/httproute.go` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 119 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 `pkg/provider/kubernetes/gateway/grpcroute.go:357` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) pkg/middlewares/passtlsclientcert/pass_tls_client_cert.go:223— pkg/middlewares/passtlsclientcert/pass_tls_client_cert.go:223-236 | pkg/middlewares/passtlsclientcert/pass_tls_client_cert.go:265-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 `pkg/middlewares/passtlsclientcert/pass_tls_client_cert.go:223` 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) pkg/muxer/http/mux.go:249— pkg/muxer/http/mux.go:249-262 | pkg/muxer/tcp/mux.go:262-275 — 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 `pkg/muxer/http/mux.go:249` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) pkg/provider/consulcatalog/config.go:28— pkg/provider/consulcatalog/config.go:28-41 | pkg/provider/docker/config.go:39-52 — 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 `pkg/provider/consulcatalog/config.go:28` 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 (14 lines × 2) pkg/provider/consulcatalog/config.go:211— pkg/provider/consulcatalog/config.go:211-224 | pkg/provider/consulcatalog/config.go:249-262 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) pkg/provider/docker/config.go:77— pkg/provider/docker/config.go:77-90 | pkg/provider/ecs/config.go:67-80 — `pkg/provider/docker/config.go` and `pkg/provider/ecs/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 7 separate duplicated blocks between them, totalling at least 80 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/docker/config.go:77` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) pkg/provider/kubernetes/crd/kubernetes.go:403— pkg/provider/kubernetes/crd/kubernetes.go:403-416 | pkg/provider/kubernetes/crd/kubernetes.go:600-613 — 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 `pkg/provider/kubernetes/crd/kubernetes.go:403` 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) pkg/provider/kubernetes/crd/kubernetes_http.go:280— pkg/provider/kubernetes/crd/kubernetes_http.go:280-293 | pkg/provider/kubernetes/crd/kubernetes_http.go:727-740 — 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 `pkg/provider/kubernetes/crd/kubernetes_http.go:280` 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 (7 lines × 2) pkg/middlewares/accesslog/logger_formatters.go:23— pkg/middlewares/accesslog/logger_formatters.go:23-29 | pkg/middlewares/accesslog/logger_formatters.go:61-67 — 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 `pkg/middlewares/accesslog/logger_formatters.go:23` 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 (7 lines × 2) pkg/provider/kubernetes/crd/kubernetes_http.go:151— pkg/provider/kubernetes/crd/kubernetes_http.go:151-157 | pkg/provider/kubernetes/crd/kubernetes_tcp.go:121-127 — before extracting anything, compare `pkg/provider/kubernetes/crd/kubernetes_http.go` and `pkg/provider/kubernetes/crd/kubernetes_tcp.go` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/kubernetes/crd/kubernetes_http.go:151` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) pkg/provider/kubernetes/gateway/kubernetes.go:524— pkg/provider/kubernetes/gateway/kubernetes.go:524-530 | pkg/provider/kubernetes/gateway/kubernetes.go:539-545 — 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 `pkg/provider/kubernetes/gateway/kubernetes.go:524` 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 (7 lines × 2) pkg/provider/kubernetes/ingress/kubernetes.go:197— pkg/provider/kubernetes/ingress/kubernetes.go:197-203 | pkg/provider/kubernetes/knative/kubernetes.go:156-162 — 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 `pkg/provider/kubernetes/ingress/kubernetes.go:197` 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 (7 lines × 2) pkg/provider/kubernetes/ingress/kubernetes.go:357— pkg/provider/kubernetes/ingress/kubernetes.go:357-363 | pkg/provider/kubernetes/ingress/kubernetes.go:780-786 — 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 `pkg/provider/kubernetes/ingress/kubernetes.go:357` 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 (7 lines × 2) pkg/provider/merge.go:76— pkg/provider/merge.go:76-82 | pkg/server/aggregator.go:34-40 — 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 `pkg/provider/merge.go:76` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) pkg/tls/tlsmanager.go:143— pkg/tls/tlsmanager.go:143-149 | pkg/tls/tlsmanager.go:418-424 — 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 `pkg/tls/tlsmanager.go:143` 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) pkg/api/dashboard/dashboard.go:48— pkg/api/dashboard/dashboard.go:48-52 | pkg/api/dashboard/dashboard.go:113-117 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) pkg/middlewares/ingressnginx/snippet/action.go:146— pkg/middlewares/ingressnginx/snippet/action.go:146-152 | pkg/middlewares/ingressnginx/snippet/action.go:238-242 — 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 `pkg/middlewares/ingressnginx/snippet/action.go:146` 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) pkg/middlewares/ingressnginx/snippet/action.go:153— pkg/middlewares/ingressnginx/snippet/action.go:153-157 | pkg/middlewares/ingressnginx/snippet/action.go:243-247 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/middlewares/ingressnginx/snippet/action.go:153` 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) pkg/middlewares/ingressnginx/snippet/action.go:381— pkg/middlewares/ingressnginx/snippet/action.go:381-385 | pkg/middlewares/ingressnginx/snippet/action.go:836-840 — 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 `pkg/middlewares/ingressnginx/snippet/action.go:381` 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 (5 lines × 2) pkg/provider/kubernetes/crd/client.go:453— pkg/provider/kubernetes/crd/client.go:453-457 | pkg/provider/kubernetes/ingress/client.go:318-322 — `pkg/provider/kubernetes/crd/client.go` and `pkg/provider/kubernetes/ingress/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 7 separate duplicated blocks between them, totalling at least 64 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (5 lines × 2) pkg/provider/kubernetes/crd/client.go:477— pkg/provider/kubernetes/crd/client.go:477-481 | pkg/provider/kubernetes/ingress/client.go:342-346 — `pkg/provider/kubernetes/crd/client.go` and `pkg/provider/kubernetes/ingress/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 7 separate duplicated blocks between them, totalling at least 64 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (5 lines × 2) pkg/provider/kubernetes/ingress-nginx/client.go:280— pkg/provider/kubernetes/ingress-nginx/client.go:280-284 | pkg/provider/kubernetes/ingress/client.go:265-269 — `pkg/provider/kubernetes/ingress-nginx/client.go` and `pkg/provider/kubernetes/ingress/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 12 separate duplicated blocks between them, totalling at least 116 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D38 · OSV Dependency Vulnerabilities· Medium CVE · ×5
Medium CVE: GO-2026-4599 go.mod— stdlib 1.26.0 (crypto/x509): GO-2026-4599 — fixed in Go 1.26.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. (in 2 dependency files: go.mod, pkg/config/dynamic/ext/go.mod) This one row stands for the 33 advisories this scan raises against stdlib 1.26.0: GO-2026-4599, GO-2026-4600, GO-2026-4601, GO-2026-4602, GO-2026-4603, GO-2026-4864, GO-2026-4865, GO-2026-4866, 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-5026, GO-2026-5037, GO-2026-5038, GO-2026-5039, GO-2026-5856, GO-2026-5942, GO-2026-5972, GO-2026-6088, GO-2026-6089, GO-2026-6090, GO-2026-6091, GO-2026-6218.
Medium CVE: GO-2026-6179 go.mod— golang.org/x/mod 0.37.0 (golang.org/x/mod/sumdb/tlog): GO-2026-6179 — upgrade to 0.40.0. This one row stands for the 2 advisories this scan raises against golang.org/x/mod 0.37.0: GO-2026-6179, GO-2026-6180.
Medium CVE: [GHSA redacted] webui/yarn.lock— ajv 6.12.6: [GHSA redacted] — ajv is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin ajv to 6.14.0 with a `resolutions` entry).
Medium CVE: [GHSA redacted] webui/yarn.lock— react-router 6.30.4: [GHSA redacted] — react-router is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (— 7.18.0 is a MAJOR ahead of the resolved 6.30.4, so a `resolutions` pin would force a breaking version under a dependent written against 6.30.4; upgrading the declaring package is the remedy, and where no patched release exists in your major line, record the exposure instead). This one row stands for the 2 advisories this scan raises against react-router 6.30.4: [GHSA redacted], [GHSA redacted].
Medium CVE: [GHSA redacted] webui/yarn.lock— react-router-dom 6.30.4: [GHSA redacted] — no fixed version has been published yet. Track the advisory, and remove or replace react-router-dom if the exposure is not acceptable until one lands.
Duplicated block (6 lines × 2 locations) webui/src/components/resources/Status.tsx:38— webui/src/components/resources/Status.tsx:38 · webui/src/components/resources/Status.tsx:44 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (6 lines × 2 locations) webui/src/components/tables/AriaTableSkeleton.tsx:30— webui/src/components/tables/AriaTableSkeleton.tsx:30 · webui/src/components/tables/AriaTableSkeleton.tsx:38 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2 locations) webui/src/mocks/handlers.ts:20— webui/src/mocks/handlers.ts:20 · webui/src/mocks/handlers.ts:26 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2 locations) webui/src/pages/hub-demo/icons/api.tsx:1— webui/src/pages/hub-demo/icons/api.tsx:1 · webui/src/pages/hub-demo/icons/portal.tsx:1 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (6 lines × 2 locations) webui/src/pages/tcp/TcpRouters.tsx:79— webui/src/pages/tcp/TcpRouters.tsx:79 · webui/src/pages/udp/UdpRouters.tsx:63 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (14 lines × 3) pkg/provider/kubernetes/crd/client.go:161— pkg/provider/kubernetes/crd/client.go:161-174 | pkg/provider/kubernetes/gateway/client.go:131-144 | pkg/provider/kubernetes/ingress/client.go:142-155 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/kubernetes/crd/client.go:161` 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 (14 lines × 3) pkg/provider/kubernetes/crd/kubernetes.go:1560— pkg/provider/kubernetes/crd/kubernetes.go:1560-1573 | pkg/provider/kubernetes/gateway/kubernetes.go:1237-1250 | pkg/provider/kubernetes/ingress/kubernetes.go:869-882 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/kubernetes/crd/kubernetes.go:1560` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 3) pkg/provider/kubernetes/gateway/kubernetes.go:980— pkg/provider/kubernetes/gateway/kubernetes.go:980-993 | pkg/provider/kubernetes/crd/kubernetes_tcp.go:283-296 | pkg/provider/kubernetes/crd/kubernetes_udp.go:199-212 — before extracting anything, compare `pkg/provider/kubernetes/crd/kubernetes_tcp.go` and `pkg/provider/kubernetes/crd/kubernetes_udp.go` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 90 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 `pkg/provider/kubernetes/gateway/kubernetes.go:980` 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 × 3) pkg/server/service/loadbalancer/leasttime/leasttime.go:194— pkg/server/service/loadbalancer/leasttime/leasttime.go:194-207 | pkg/server/service/loadbalancer/p2c/p2c.go:146-159 | pkg/server/service/loadbalancer/wrr/wrr.go:160-173 — `pkg/server/service/loadbalancer/p2c/p2c.go` and `pkg/server/service/loadbalancer/wrr/wrr.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 44 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/server/service/loadbalancer/leasttime/leasttime.go:194` 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 (11 lines × 3) pkg/api/handler_http.go:86— pkg/api/handler_http.go:86-96 | pkg/api/handler_tcp.go:81-91 | pkg/api/handler_udp.go:60-70 — before extracting anything, compare `pkg/api/handler_http.go` and `pkg/api/handler_tcp.go` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 70 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.
Duplicated block (11 lines × 3) pkg/api/handler_http.go:106— pkg/api/handler_http.go:106-116 | pkg/api/handler_tcp.go:101-111 | pkg/api/handler_udp.go:80-90 — before extracting anything, compare `pkg/api/handler_http.go` and `pkg/api/handler_tcp.go` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 70 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.
Duplicated block (11 lines × 3) pkg/api/handler_http.go:143— pkg/api/handler_http.go:143-153 | pkg/api/handler_tcp.go:138-148 | pkg/api/handler_udp.go:117-127 — before extracting anything, compare `pkg/api/handler_http.go` and `pkg/api/handler_tcp.go` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 70 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.
Duplicated block (11 lines × 3) pkg/provider/kubernetes/crd/kubernetes_http.go:628— pkg/provider/kubernetes/crd/kubernetes_http.go:628-638 | pkg/provider/kubernetes/crd/kubernetes_tcp.go:279-289 | pkg/provider/kubernetes/crd/kubernetes_udp.go:195-205 — before extracting anything, compare `pkg/provider/kubernetes/crd/kubernetes_http.go` and `pkg/provider/kubernetes/crd/kubernetes_tcp.go` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/kubernetes/crd/kubernetes_http.go:628` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
R4 · Test Coverage· No test reaches this file · ×4
No test reaches this file webui/src/components/resources/ProviderIcon.tsx— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file webui/src/index.tsx— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file webui/src/hooks/use-previous.tsx— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file webui/src/utils/wait.ts— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
Balancer.ServeHTTP (cognitive 23) pkg/server/service/loadbalancer/leasttime/leasttime.go:184— Balancer.ServeHTTP has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (23 pts) (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.
Balancer.ServeHTTP (cognitive 23) pkg/server/service/loadbalancer/p2c/p2c.go:137— Balancer.ServeHTTP has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (23 pts) (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.
Balancer.ServeHTTP (cognitive 23) pkg/server/service/loadbalancer/wrr/wrr.go:151— Balancer.ServeHTTP has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (23 pts) (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.
Duplicated block (17 lines × 2) pkg/provider/kubernetes/crd/kubernetes.go:140— pkg/provider/kubernetes/crd/kubernetes.go:140-156 | pkg/provider/kubernetes/ingress/kubernetes.go:138-155 — 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 `pkg/provider/kubernetes/crd/kubernetes.go:140` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) pkg/provider/kubernetes/crd/kubernetes_tcp.go:78— pkg/provider/kubernetes/crd/kubernetes_tcp.go:78-94 | pkg/provider/kubernetes/crd/kubernetes_udp.go:55-71 — before extracting anything, compare `pkg/provider/kubernetes/crd/kubernetes_tcp.go` and `pkg/provider/kubernetes/crd/kubernetes_udp.go` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 90 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 `pkg/provider/kubernetes/crd/kubernetes_tcp.go:78` 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 (17 lines × 2) pkg/provider/kubernetes/gateway/tcproute.go:207— pkg/provider/kubernetes/gateway/tcproute.go:207-223 | pkg/provider/kubernetes/gateway/tlsroute.go:209-225 — before extracting anything, compare `pkg/provider/kubernetes/gateway/tcproute.go` and `pkg/provider/kubernetes/gateway/tlsroute.go` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 117 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 `pkg/provider/kubernetes/gateway/tcproute.go:207` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) pkg/middlewares/redirect/redirect_scheme.go:70— pkg/middlewares/redirect/redirect_scheme.go:70-85 | pkg/middlewares/redirect/redirect_regex.go:30-45 — 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 `pkg/middlewares/redirect/redirect_scheme.go:70` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) pkg/provider/kubernetes/ingress-nginx/convert.go:53— pkg/provider/kubernetes/ingress-nginx/convert.go:53-68 | pkg/provider/kubernetes/ingress/convert.go:53-68 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) pkg/provider/tailscale/provider.go:149— pkg/provider/tailscale/provider.go:149-164 | pkg/provider/tailscale/provider.go:176-191 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 4) pkg/middlewares/ingressnginx/snippet/collector.go:421— pkg/middlewares/ingressnginx/snippet/collector.go:421-429 | pkg/middlewares/ingressnginx/snippet/collector.go:433-441 | pkg/middlewares/ingressnginx/snippet/collector.go:445-453 | pkg/middlewares/ingressnginx/snippet/collector.go:457-465 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/middlewares/ingressnginx/snippet/collector.go:421` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 4) pkg/provider/kubernetes/crd/client.go:265— pkg/provider/kubernetes/crd/client.go:265-273 | pkg/provider/kubernetes/gateway/client.go:252-260 | pkg/provider/kubernetes/ingress-nginx/client.go:215-223 | pkg/provider/kubernetes/ingress/client.go:207-215 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/kubernetes/crd/client.go:265` 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 × 4) pkg/provider/kubernetes/crd/client.go:465— pkg/provider/kubernetes/crd/client.go:465-473 | pkg/provider/kubernetes/gateway/client.go:374-382 | pkg/provider/kubernetes/ingress-nginx/client.go:323-331 | pkg/provider/kubernetes/ingress/client.go:330-338 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/kubernetes/crd/client.go:465` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 3) integration/try/condition.go:23— integration/try/condition.go:23-31 | integration/try/condition.go:43-51 | integration/try/condition.go:63-71 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `integration/try/condition.go:23` 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 × 3) pkg/middlewares/ingressnginx/rewritetarget/rewrite_target.go:157— pkg/middlewares/ingressnginx/rewritetarget/rewrite_target.go:157-165 | pkg/middlewares/stripprefix/strip_prefix.go:69-77 | pkg/middlewares/stripprefixregex/strip_prefix_regex.go:70-78 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/middlewares/ingressnginx/rewritetarget/rewrite_target.go:157` 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 × 3) pkg/middlewares/ingressnginx/snippet/collector.go:349— pkg/middlewares/ingressnginx/snippet/collector.go:349-357 | pkg/middlewares/ingressnginx/snippet/collector.go:361-369 | pkg/middlewares/ingressnginx/snippet/collector.go:373-381 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/middlewares/ingressnginx/snippet/collector.go:349` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) pkg/provider/kubernetes/crd/kubernetes_http.go:334— pkg/provider/kubernetes/crd/kubernetes_http.go:334-341 | pkg/provider/kubernetes/crd/kubernetes_http.go:347-354 | pkg/provider/kubernetes/crd/kubernetes_http.go:726-733 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8 lines × 3) pkg/provider/kubernetes/gateway/grpcroute.go:258— pkg/provider/kubernetes/gateway/grpcroute.go:258-265 | pkg/provider/kubernetes/gateway/tcproute.go:281-288 | pkg/provider/kubernetes/gateway/tlsroute.go:283-290 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/tcproute.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 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 `pkg/provider/kubernetes/gateway/grpcroute.go:258` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `routerName` in one and `p *Provider) loadTCPService(routerName` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8 lines × 3) pkg/provider/kubernetes/gateway/httproute.go:164— pkg/provider/kubernetes/gateway/httproute.go:164-171 | pkg/provider/kubernetes/gateway/tcproute.go:153-160 | pkg/provider/kubernetes/gateway/tlsroute.go:155-162 — before extracting anything, compare `pkg/provider/kubernetes/gateway/httproute.go` and `pkg/provider/kubernetes/gateway/tcproute.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 61 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 `pkg/provider/kubernetes/gateway/httproute.go:164` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
AC3 · Page structure· Page without a main landmark · ×2
Page without a main landmark webui/index.dev.html:3— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it.
Page without a main landmark webui/index.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it.
Medium IaC: CKV_DOCKER_3 Dockerfile:1— Ensure that a user for the container has been created
Medium IaC: CKV_DOCKER_3 webui/buildx.Dockerfile:1— Ensure that a user for the container has been created
D38 · OSV Dependency Vulnerabilities· Medium vulnerability · ×2
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.
Medium vulnerabili...
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.