Public report of k3s-io/k3s, published 13 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.3). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 13 November 2026, 12:26 UTC · Survey ID cd_ca43558e4b574637a8b95adbad310e77
k3s-io/k3s
Measured 13 November 2026, 12:25 UTC, at code version 51d3b70
CAI scoreAt riskDown 1 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A medium codebase: 30,186 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 0.4 person-years · Weakest lens: Security and Compliance, 47
Findings by how serious they are
39 critical358 serious65 minor
29 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
13 November 2026, 12:25 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
49of 49 dimensions measured by tools.
432of 462 findings point to an exact file and line, so you can open each one in the code. The other 30 concern the repository as a whole, such as missing documentation.
49dimensions across 5 lenses, read from 30,186 lines of product code in 1 project.
k3s-io/k3s is rated At risk because critical security findings are open. Its score is held back because it has passwords or keys in the code's history and unsafe settings in infrastructure or container files. It scores 60 out of 100, which the At risk rating leaves unchanged.
Security and Compliance, at 47, is the weakest lens and counts most in the score. The best first step for the work it takes is fixing the product with no limit on what it can connect to, worth about 2 points. Replacing the 13 passwords or keys found in the code's history would lift Security and Compliance itself, worth about 4 points. Raising Security and Compliance to 70 would lift the score to about 70.
Sixteen passwords or keys are open to anyone who can read the repository. Fourteen settings leave the servers or containers unsafe, and two connections skip the certificate check, so they accept any server. Replacing each exposed password or key, correcting the unsafe settings and switching the certificate checks back on would close these risks. Passing outside input through environment variables would fix the two pipeline steps that put outside input straight into a shell command, and limiting each secret to its own step would deal with the two secrets exposed to more of the pipeline than needed.
The product code is 30,186 lines, about €58,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 41 findings
These 41 critical or serious findings were in the previous survey, on 24 October 2026, and are gone from this one.
Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
Dependency Vulnerabilities · Medium CVE: GO-2026-6179 REDACTED
Dependency Vulnerabilities · Medium CVE: GO-2026-6599 REDACTED
Dependency Vulnerabilities · Medium CVE: GO-2026-6603 REDACTED
Documentation (README) · README may be stale
Rebuild cost: about €58,000 · Estimate
Cost to rebuild
€19,000 to €97,000, for 320 to 1,016 hours of work, about 0.4 person-years for one engineer
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.8 at a score of 60. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Medium: 30,186 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 No network policy finding(s) in Network Egress Confinement.
Resolve the 13 REDACTED finding(s) in Secrets (history) — start with REDACTED (4), REDACTED (2), REDACTED.
Raises the score by about 4 points · Medium effort · Secrets (history)
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €58,000 to build again, about 0.4 person-years of work. Its weakest lens is Security and Compliance, at 47 (Weak). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first · First action
Resolve the 1 No network policy finding(s) in Network Egress Confinement. Of all the actions in this report, it raises the score most for the work it takes: about 2 points for low effort, because it clears the 1 Network Egress Confinement findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.6 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 4% to 8% on every change. The history of the code shows how much it changes: about 8,289 lines over the last 90 days, which is about 33,616 lines a year. At that pace, the extra work comes to an estimated 3 to 18.2 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
98 modules, with 88 dependencies between them. Every module uses only modules listed above it, so there are no loops.
The table shows the 40 modules with the most connections; 58 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
com/k3s-io/k3s/pkg/agent/containerd uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/agent/containerd, while a change to com/k3s-io/k3s/pkg/agent/containerd can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/agent/containerd uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/agent/cridockerd uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/agent/cridockerd, while a change to com/k3s-io/k3s/pkg/agent/cridockerd can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/agent/cridockerd uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/agent/flannel uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/agent/flannel, while a change to com/k3s-io/k3s/pkg/agent/flannel can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/agent/flannel uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/agent/https uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/agent/https, while a change to com/k3s-io/k3s/pkg/agent/https can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/agent/https uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/agent/https uses com/k3s-io/k3s/pkg/util/mux, so a change to com/k3s-io/k3s/pkg/util/mux can break com/k3s-io/k3s/pkg/agent/https, while a change to com/k3s-io/k3s/pkg/agent/https can't break com/k3s-io/k3s/pkg/util/mux.
Position
Below the diagonal: com/k3s-io/k3s/pkg/agent/https uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/agent/netpol uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/agent/netpol, while a change to com/k3s-io/k3s/pkg/agent/netpol can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/agent/netpol uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/agent/proxy uses com/k3s-io/k3s/pkg/agent/loadbalancer, so a change to com/k3s-io/k3s/pkg/agent/loadbalancer can break com/k3s-io/k3s/pkg/agent/proxy, while a change to com/k3s-io/k3s/pkg/agent/proxy can't break com/k3s-io/k3s/pkg/agent/loadbalancer.
Position
Below the diagonal: com/k3s-io/k3s/pkg/agent/proxy uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/bootstrap uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/bootstrap, while a change to com/k3s-io/k3s/pkg/bootstrap can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/bootstrap uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/cli/secretsencrypt uses com/k3s-io/k3s/pkg/cli/cmds, so a change to com/k3s-io/k3s/pkg/cli/cmds can break com/k3s-io/k3s/pkg/cli/secretsencrypt, while a change to com/k3s-io/k3s/pkg/cli/secretsencrypt can't break com/k3s-io/k3s/pkg/cli/cmds.
Position
Below the diagonal: com/k3s-io/k3s/pkg/cli/secretsencrypt uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/cli/secretsencrypt uses com/k3s-io/k3s/pkg/clientaccess, so a change to com/k3s-io/k3s/pkg/clientaccess can break com/k3s-io/k3s/pkg/cli/secretsencrypt, while a change to com/k3s-io/k3s/pkg/cli/secretsencrypt can't break com/k3s-io/k3s/pkg/clientaccess.
Position
Below the diagonal: com/k3s-io/k3s/pkg/cli/secretsencrypt uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/cli/token uses com/k3s-io/k3s/pkg/cli/cmds, so a change to com/k3s-io/k3s/pkg/cli/cmds can break com/k3s-io/k3s/pkg/cli/token, while a change to com/k3s-io/k3s/pkg/cli/token can't break com/k3s-io/k3s/pkg/cli/cmds.
Position
Below the diagonal: com/k3s-io/k3s/pkg/cli/token uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/cli/token uses com/k3s-io/k3s/pkg/clientaccess, so a change to com/k3s-io/k3s/pkg/clientaccess can break com/k3s-io/k3s/pkg/cli/token, while a change to com/k3s-io/k3s/pkg/cli/token can't break com/k3s-io/k3s/pkg/clientaccess.
Position
Below the diagonal: com/k3s-io/k3s/pkg/cli/token uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/cluster/managed uses com/k3s-io/k3s/pkg/clientaccess, so a change to com/k3s-io/k3s/pkg/clientaccess can break com/k3s-io/k3s/pkg/cluster/managed, while a change to com/k3s-io/k3s/pkg/cluster/managed can't break com/k3s-io/k3s/pkg/clientaccess.
Position
Below the diagonal: com/k3s-io/k3s/pkg/cluster/managed uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/cluster/managed uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/cluster/managed, while a change to com/k3s-io/k3s/pkg/cluster/managed can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/cluster/managed uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/daemons/control/deps uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/daemons/control/deps, while a change to com/k3s-io/k3s/pkg/daemons/control/deps can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/daemons/control/deps uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/daemons/executor uses com/k3s-io/k3s/pkg/cli/cmds, so a change to com/k3s-io/k3s/pkg/cli/cmds can break com/k3s-io/k3s/pkg/daemons/executor, while a change to com/k3s-io/k3s/pkg/daemons/executor can't break com/k3s-io/k3s/pkg/cli/cmds.
Position
Below the diagonal: com/k3s-io/k3s/pkg/daemons/executor uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/daemons/executor uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/daemons/executor, while a change to com/k3s-io/k3s/pkg/daemons/executor can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/daemons/executor uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/nodepassword uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/nodepassword, while a change to com/k3s-io/k3s/pkg/nodepassword can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/nodepassword uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/secretsencrypt uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/secretsencrypt, while a change to com/k3s-io/k3s/pkg/secretsencrypt can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/secretsencrypt uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/server uses com/k3s-io/k3s/pkg/cli/cmds, so a change to com/k3s-io/k3s/pkg/cli/cmds can break com/k3s-io/k3s/pkg/server, while a change to com/k3s-io/k3s/pkg/server can't break com/k3s-io/k3s/pkg/cli/cmds.
Position
Below the diagonal: com/k3s-io/k3s/pkg/server uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/server uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/server, while a change to com/k3s-io/k3s/pkg/server can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/server uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/server/auth uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/server/auth, while a change to com/k3s-io/k3s/pkg/server/auth can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/server/auth uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/server/auth uses com/k3s-io/k3s/pkg/util/mux, so a change to com/k3s-io/k3s/pkg/util/mux can break com/k3s-io/k3s/pkg/server/auth, while a change to com/k3s-io/k3s/pkg/server/auth can't break com/k3s-io/k3s/pkg/util/mux.
Position
Below the diagonal: com/k3s-io/k3s/pkg/server/auth uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/util uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/util, while a change to com/k3s-io/k3s/pkg/util can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/util uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/agent uses com/k3s-io/k3s/pkg/cli/cmds, so a change to com/k3s-io/k3s/pkg/cli/cmds can break com/k3s-io/k3s/pkg/agent, while a change to com/k3s-io/k3s/pkg/agent can't break com/k3s-io/k3s/pkg/cli/cmds.
Position
Below the diagonal: com/k3s-io/k3s/pkg/agent uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/agent uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/agent, while a change to com/k3s-io/k3s/pkg/agent can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/agent uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/agent uses com/k3s-io/k3s/pkg/agent/proxy, so a change to com/k3s-io/k3s/pkg/agent/proxy can break com/k3s-io/k3s/pkg/agent, while a change to com/k3s-io/k3s/pkg/agent can't break com/k3s-io/k3s/pkg/agent/proxy.
Position
Below the diagonal: com/k3s-io/k3s/pkg/agent uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/agent uses com/k3s-io/k3s/pkg/util, so a change to com/k3s-io/k3s/pkg/util can break com/k3s-io/k3s/pkg/agent, while a change to com/k3s-io/k3s/pkg/agent can't break com/k3s-io/k3s/pkg/util.
Position
Below the diagonal: com/k3s-io/k3s/pkg/agent uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/agent/config uses com/k3s-io/k3s/pkg/cli/cmds, so a change to com/k3s-io/k3s/pkg/cli/cmds can break com/k3s-io/k3s/pkg/agent/config, while a change to com/k3s-io/k3s/pkg/agent/config can't break com/k3s-io/k3s/pkg/cli/cmds.
Position
Below the diagonal: com/k3s-io/k3s/pkg/agent/config uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/agent/config uses com/k3s-io/k3s/pkg/clientaccess, so a change to com/k3s-io/k3s/pkg/clientaccess can break com/k3s-io/k3s/pkg/agent/config, while a change to com/k3s-io/k3s/pkg/agent/config can't break com/k3s-io/k3s/pkg/clientaccess.
Position
Below the diagonal: com/k3s-io/k3s/pkg/agent/config uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/agent/config uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/agent/config, while a change to com/k3s-io/k3s/pkg/agent/config can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/agent/config uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/agent/config uses com/k3s-io/k3s/pkg/agent/proxy, so a change to com/k3s-io/k3s/pkg/agent/proxy can break com/k3s-io/k3s/pkg/agent/config, while a change to com/k3s-io/k3s/pkg/agent/config can't break com/k3s-io/k3s/pkg/agent/proxy.
Position
Below the diagonal: com/k3s-io/k3s/pkg/agent/config uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/agent/tunnel uses com/k3s-io/k3s/pkg/agent/loadbalancer, so a change to com/k3s-io/k3s/pkg/agent/loadbalancer can break com/k3s-io/k3s/pkg/agent/tunnel, while a change to com/k3s-io/k3s/pkg/agent/tunnel can't break com/k3s-io/k3s/pkg/agent/loadbalancer.
Position
Below the diagonal: com/k3s-io/k3s/pkg/agent/tunnel uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/agent/tunnel uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/agent/tunnel, while a change to com/k3s-io/k3s/pkg/agent/tunnel can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/agent/tunnel uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/agent/tunnel uses com/k3s-io/k3s/pkg/agent/proxy, so a change to com/k3s-io/k3s/pkg/agent/proxy can break com/k3s-io/k3s/pkg/agent/tunnel, while a change to com/k3s-io/k3s/pkg/agent/tunnel can't break com/k3s-io/k3s/pkg/agent/proxy.
Position
Below the diagonal: com/k3s-io/k3s/pkg/agent/tunnel uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/cli/cert uses com/k3s-io/k3s/pkg/cli/cmds, so a change to com/k3s-io/k3s/pkg/cli/cmds can break com/k3s-io/k3s/pkg/cli/cert, while a change to com/k3s-io/k3s/pkg/cli/cert can't break com/k3s-io/k3s/pkg/cli/cmds.
Position
Below the diagonal: com/k3s-io/k3s/pkg/cli/cert uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/cli/cert uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/cli/cert, while a change to com/k3s-io/k3s/pkg/cli/cert can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/cli/cert uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/cli/cert uses com/k3s-io/k3s/pkg/server, so a change to com/k3s-io/k3s/pkg/server can break com/k3s-io/k3s/pkg/cli/cert, while a change to com/k3s-io/k3s/pkg/cli/cert can't break com/k3s-io/k3s/pkg/server.
Position
Below the diagonal: com/k3s-io/k3s/pkg/cli/cert uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/cli/server uses com/k3s-io/k3s/pkg/cli/cmds, so a change to com/k3s-io/k3s/pkg/cli/cmds can break com/k3s-io/k3s/pkg/cli/server, while a change to com/k3s-io/k3s/pkg/cli/server can't break com/k3s-io/k3s/pkg/cli/cmds.
Position
Below the diagonal: com/k3s-io/k3s/pkg/cli/server uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/cli/server uses com/k3s-io/k3s/pkg/server, so a change to com/k3s-io/k3s/pkg/server can break com/k3s-io/k3s/pkg/cli/server, while a change to com/k3s-io/k3s/pkg/cli/server can't break com/k3s-io/k3s/pkg/server.
Position
Below the diagonal: com/k3s-io/k3s/pkg/cli/server uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/daemons/agent uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/daemons/agent, while a change to com/k3s-io/k3s/pkg/daemons/agent can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/daemons/agent uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/daemons/agent uses com/k3s-io/k3s/pkg/agent/proxy, so a change to com/k3s-io/k3s/pkg/agent/proxy can break com/k3s-io/k3s/pkg/daemons/agent, while a change to com/k3s-io/k3s/pkg/daemons/agent can't break com/k3s-io/k3s/pkg/agent/proxy.
Position
Below the diagonal: com/k3s-io/k3s/pkg/daemons/agent uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/etcd/s3 uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/etcd/s3, while a change to com/k3s-io/k3s/pkg/etcd/s3 can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/etcd/s3 uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/etcd/s3 uses com/k3s-io/k3s/pkg/etcd/snapshot, so a change to com/k3s-io/k3s/pkg/etcd/snapshot can break com/k3s-io/k3s/pkg/etcd/s3, while a change to com/k3s-io/k3s/pkg/etcd/s3 can't break com/k3s-io/k3s/pkg/etcd/snapshot.
Position
Below the diagonal: com/k3s-io/k3s/pkg/etcd/s3 uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/etcd/s3 uses com/k3s-io/k3s/pkg/util, so a change to com/k3s-io/k3s/pkg/util can break com/k3s-io/k3s/pkg/etcd/s3, while a change to com/k3s-io/k3s/pkg/etcd/s3 can't break com/k3s-io/k3s/pkg/util.
Position
Below the diagonal: com/k3s-io/k3s/pkg/etcd/s3 uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/executor/embed uses com/k3s-io/k3s/pkg/cli/cmds, so a change to com/k3s-io/k3s/pkg/cli/cmds can break com/k3s-io/k3s/pkg/executor/embed, while a change to com/k3s-io/k3s/pkg/executor/embed can't break com/k3s-io/k3s/pkg/cli/cmds.
Position
Below the diagonal: com/k3s-io/k3s/pkg/executor/embed uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/executor/embed uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/executor/embed, while a change to com/k3s-io/k3s/pkg/executor/embed can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/executor/embed uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/executor/embed uses com/k3s-io/k3s/pkg/daemons/executor, so a change to com/k3s-io/k3s/pkg/daemons/executor can break com/k3s-io/k3s/pkg/executor/embed, while a change to com/k3s-io/k3s/pkg/executor/embed can't break com/k3s-io/k3s/pkg/daemons/executor.
Position
Below the diagonal: com/k3s-io/k3s/pkg/executor/embed uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/metrics uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/metrics, while a change to com/k3s-io/k3s/pkg/metrics can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/metrics uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/metrics uses com/k3s-io/k3s/pkg/agent/https, so a change to com/k3s-io/k3s/pkg/agent/https can break com/k3s-io/k3s/pkg/metrics, while a change to com/k3s-io/k3s/pkg/metrics can't break com/k3s-io/k3s/pkg/agent/https.
Position
Below the diagonal: com/k3s-io/k3s/pkg/metrics uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/nodeconfig uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/nodeconfig, while a change to com/k3s-io/k3s/pkg/nodeconfig can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/nodeconfig uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/nodeconfig uses com/k3s-io/k3s/pkg/util, so a change to com/k3s-io/k3s/pkg/util can break com/k3s-io/k3s/pkg/nodeconfig, while a change to com/k3s-io/k3s/pkg/nodeconfig can't break com/k3s-io/k3s/pkg/util.
Position
Below the diagonal: com/k3s-io/k3s/pkg/nodeconfig uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/profile uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/profile, while a change to com/k3s-io/k3s/pkg/profile can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/profile uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/profile uses com/k3s-io/k3s/pkg/agent/https, so a change to com/k3s-io/k3s/pkg/agent/https can break com/k3s-io/k3s/pkg/profile, while a change to com/k3s-io/k3s/pkg/profile can't break com/k3s-io/k3s/pkg/agent/https.
Position
Below the diagonal: com/k3s-io/k3s/pkg/profile uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/server/handlers uses com/k3s-io/k3s/pkg/cli/cmds, so a change to com/k3s-io/k3s/pkg/cli/cmds can break com/k3s-io/k3s/pkg/server/handlers, while a change to com/k3s-io/k3s/pkg/server/handlers can't break com/k3s-io/k3s/pkg/cli/cmds.
Position
Below the diagonal: com/k3s-io/k3s/pkg/server/handlers uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/server/handlers uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/server/handlers, while a change to com/k3s-io/k3s/pkg/server/handlers can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/server/handlers uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/server/handlers uses com/k3s-io/k3s/pkg/nodepassword, so a change to com/k3s-io/k3s/pkg/nodepassword can break com/k3s-io/k3s/pkg/server/handlers, while a change to com/k3s-io/k3s/pkg/server/handlers can't break com/k3s-io/k3s/pkg/nodepassword.
Position
Below the diagonal: com/k3s-io/k3s/pkg/server/handlers uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/server/handlers uses com/k3s-io/k3s/pkg/secretsencrypt, so a change to com/k3s-io/k3s/pkg/secretsencrypt can break com/k3s-io/k3s/pkg/server/handlers, while a change to com/k3s-io/k3s/pkg/server/handlers can't break com/k3s-io/k3s/pkg/secretsencrypt.
Position
Below the diagonal: com/k3s-io/k3s/pkg/server/handlers uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/spegel uses com/k3s-io/k3s/pkg/clientaccess, so a change to com/k3s-io/k3s/pkg/clientaccess can break com/k3s-io/k3s/pkg/spegel, while a change to com/k3s-io/k3s/pkg/spegel can't break com/k3s-io/k3s/pkg/clientaccess.
Position
Below the diagonal: com/k3s-io/k3s/pkg/spegel uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/spegel uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/spegel, while a change to com/k3s-io/k3s/pkg/spegel can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/spegel uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/spegel uses com/k3s-io/k3s/pkg/agent/https, so a change to com/k3s-io/k3s/pkg/agent/https can break com/k3s-io/k3s/pkg/spegel, while a change to com/k3s-io/k3s/pkg/spegel can't break com/k3s-io/k3s/pkg/agent/https.
Position
Below the diagonal: com/k3s-io/k3s/pkg/spegel uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/etcd uses com/k3s-io/k3s/pkg/agent/loadbalancer, so a change to com/k3s-io/k3s/pkg/agent/loadbalancer can break com/k3s-io/k3s/pkg/etcd, while a change to com/k3s-io/k3s/pkg/etcd can't break com/k3s-io/k3s/pkg/agent/loadbalancer.
Position
Below the diagonal: com/k3s-io/k3s/pkg/etcd uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/etcd uses com/k3s-io/k3s/pkg/clientaccess, so a change to com/k3s-io/k3s/pkg/clientaccess can break com/k3s-io/k3s/pkg/etcd, while a change to com/k3s-io/k3s/pkg/etcd can't break com/k3s-io/k3s/pkg/clientaccess.
Position
Below the diagonal: com/k3s-io/k3s/pkg/etcd uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/etcd uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/etcd, while a change to com/k3s-io/k3s/pkg/etcd can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/etcd uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/etcd uses com/k3s-io/k3s/pkg/etcd/snapshot, so a change to com/k3s-io/k3s/pkg/etcd/snapshot can break com/k3s-io/k3s/pkg/etcd, while a change to com/k3s-io/k3s/pkg/etcd can't break com/k3s-io/k3s/pkg/etcd/snapshot.
Position
Below the diagonal: com/k3s-io/k3s/pkg/etcd uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/etcd uses com/k3s-io/k3s/pkg/cluster/managed, so a change to com/k3s-io/k3s/pkg/cluster/managed can break com/k3s-io/k3s/pkg/etcd, while a change to com/k3s-io/k3s/pkg/etcd can't break com/k3s-io/k3s/pkg/cluster/managed.
Position
Below the diagonal: com/k3s-io/k3s/pkg/etcd uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/etcd uses com/k3s-io/k3s/pkg/daemons/executor, so a change to com/k3s-io/k3s/pkg/daemons/executor can break com/k3s-io/k3s/pkg/etcd, while a change to com/k3s-io/k3s/pkg/etcd can't break com/k3s-io/k3s/pkg/daemons/executor.
Position
Below the diagonal: com/k3s-io/k3s/pkg/etcd uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/etcd uses com/k3s-io/k3s/pkg/etcd/s3, so a change to com/k3s-io/k3s/pkg/etcd/s3 can break com/k3s-io/k3s/pkg/etcd, while a change to com/k3s-io/k3s/pkg/etcd can't break com/k3s-io/k3s/pkg/etcd/s3.
Position
Below the diagonal: com/k3s-io/k3s/pkg/etcd uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/cli/etcdsnapshot uses com/k3s-io/k3s/pkg/cli/cmds, so a change to com/k3s-io/k3s/pkg/cli/cmds can break com/k3s-io/k3s/pkg/cli/etcdsnapshot, while a change to com/k3s-io/k3s/pkg/cli/etcdsnapshot can't break com/k3s-io/k3s/pkg/cli/cmds.
Position
Below the diagonal: com/k3s-io/k3s/pkg/cli/etcdsnapshot uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/cli/etcdsnapshot uses com/k3s-io/k3s/pkg/etcd, so a change to com/k3s-io/k3s/pkg/etcd can break com/k3s-io/k3s/pkg/cli/etcdsnapshot, while a change to com/k3s-io/k3s/pkg/cli/etcdsnapshot can't break com/k3s-io/k3s/pkg/etcd.
Position
Below the diagonal: com/k3s-io/k3s/pkg/cli/etcdsnapshot uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/cluster uses com/k3s-io/k3s/pkg/clientaccess, so a change to com/k3s-io/k3s/pkg/clientaccess can break com/k3s-io/k3s/pkg/cluster, while a change to com/k3s-io/k3s/pkg/cluster can't break com/k3s-io/k3s/pkg/clientaccess.
Position
Below the diagonal: com/k3s-io/k3s/pkg/cluster uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/cluster uses com/k3s-io/k3s/pkg/daemons/config, so a change to com/k3s-io/k3s/pkg/daemons/config can break com/k3s-io/k3s/pkg/cluster, while a change to com/k3s-io/k3s/pkg/cluster can't break com/k3s-io/k3s/pkg/daemons/config.
Position
Below the diagonal: com/k3s-io/k3s/pkg/cluster uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/cluster uses com/k3s-io/k3s/pkg/bootstrap, so a change to com/k3s-io/k3s/pkg/bootstrap can break com/k3s-io/k3s/pkg/cluster, while a change to com/k3s-io/k3s/pkg/cluster can't break com/k3s-io/k3s/pkg/bootstrap.
Position
Below the diagonal: com/k3s-io/k3s/pkg/cluster uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/cluster uses com/k3s-io/k3s/pkg/cluster/managed, so a change to com/k3s-io/k3s/pkg/cluster/managed can break com/k3s-io/k3s/pkg/cluster, while a change to com/k3s-io/k3s/pkg/cluster can't break com/k3s-io/k3s/pkg/cluster/managed.
Position
Below the diagonal: com/k3s-io/k3s/pkg/cluster uses a module listed above it, which is the healthy direction.
com/k3s-io/k3s/pkg/cluster uses com/k3s-io/k3s/pkg/etcd, so a change to com/k3s-io/k3s/pkg/etcd can break com/k3s-io/k3s/pkg/cluster, while a change to com/k3s-io/k3s/pkg/cluster can't break com/k3s-io/k3s/pkg/etcd.
Position
Below the diagonal: com/k3s-io/k3s/pkg/cluster uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 69% · 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
A02:2025 — Security Misconfiguration
100
High / Critical
A05:2025 — Injection
31
High / Critical
A07:2025 — Authentication Failures
17
High / Critical
A03:2025 — Software Supply Chain Failures
13
High / Critical
Roadmap
Top priorities: Resolve the 13 REDACTED finding(s) in Secrets (history) — start with REDACTED (4), REDACTED (2), REDACTED; Resolve the 72 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (25), REDACTED (24), REDACTED (13); Resolve the 1 No network policy finding(s) in Network Egress Confinement.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 No network policy finding(s) in Network Egress Confinement.
Per-file score 0–10 — a quality signature. Of 116 files carrying findings, judged against the Production bar: 7% slop · 71% mixed · 22% near-clean.
File
Score
Band
Worst signal
REDACTED
0.0
Slop
IaC & Container Security: Critical IaC: REDACTED
REDACTED
1.6
Slop
IaC & Container Security: High IaC: REDACTED
REDACTED
3.0
Slop
Dependency Vulnerabilities: High CVE: REDACTED
REDACTED
3.2
Slop
Static Analysis (SAST): High: REDACTED
REDACTED
3.3
Slop
Static Analysis (SAST): High: REDACTED
REDACTED
3.7
Slop
IaC & Container Security: Critical IaC: REDACTED
REDACTED
3.7
Slop
IaC & Container Security: Critical IaC: REDACTED
REDACTED
3.7
Slop
IaC & Container Security: High IaC: REDACTED
REDACTED
4.0
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
4.1
Mixed
IaC & Container Security: High IaC: REDACTED
REDACTED
4.4
Mixed
IaC & Container Security: Medium IaC: REDACTED
REDACTED
4.6
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
5.0
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
5.1
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
5.1
Mixed
Static Analysis (SAST): High: REDACTED
REDACTED
5.1
Mixed
IaC & Container Security: High IaC: REDACTED
REDACTED
5.3
Mixed
Static Analysis (SAST): Medium: REDACTED
pkg/executor/embed/embed.go
5.5
Mixed
Cyclomatic Complexity: embed.New (cyclomatic 17)
REDACTED
5.8
Mixed
Secrets (history): High secret: REDACTED
REDACTED
5.8
Mixed
Secrets (history): REDACTED: REDACTED
How the grades work
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 39
A definite problem that already costs you something and drags the score down: a
missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here
tends to cause failures elsewhere.
Serious — 358
Likely wrong, but not failing yet. It degrades
the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to
carry for two years either.
Minor — 65
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 29
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey 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. All 49 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two 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. 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.
What we checked — 49 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, 432 of 462 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 or a scanner, 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.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT READ here — but this repository measures it: a Codecov configuration (.github/.codecov.yml) and a coverage step in CI (`codecov/codecov-action`) shows that coverage is collected and tracked in your own CI. The built-in collector has no runner for this ecosystem (.go), so the analyzer could not read the number — a gap in the analyzer's language coverage, not an unmeasured repo. Not scored.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (REDACTED), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D26 Project Cohesion — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `(repository root)` (30186 LoC, 214 module-visible types across 98 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DockerCompose (REDACTED). compose up failed (exit 15 — the compose project is invalid) — error while interpolating services.server.environment.[]: required variable K3S_TOKEN is missing a value: err; runtime evidence skipped.
C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
C5 Data-Subject Rights — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's Go is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala was found, and this repository's Go is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X1 Async correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X13 Undrained process stream — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X17 Uncapped recursion over a caller-supplied document — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X18 Disposal-pattern correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X19 Unrestored process-global state — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X22 Contradicted release guard — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, TypeScript/JavaScript, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded, and this repository's Go is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X23 Unguarded diagnostic materialisation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X25 Inert configuration knob — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart and Ruby source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart or Ruby was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded, no Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala or Kotlin was found, and this repository's Go is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X29 Per-element action decided by a fixed element — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript (Vue and Svelte components included), Java, Rust, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, Rust, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala or Rust was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
D11 Test Reliability: Flakiness is inferred from history/markers — we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D40 Network Egress Confinement: Egress confinement is read from committed Kubernetes manifests — a policy applied out-of-band (cluster-default deny, a service mesh, or a cloud firewall/security group off-repo) is invisible, and a present NetworkPolicy is declared config, not proof the cluster admission-controller actually enforces it at runtime.
D41 Kernel & Syscall Confinement: Syscall/MAC confinement is read from committed manifests — a profile applied by a cluster-wide PodSecurity default or a mutating webhook off-repo isn't seen, and a declared seccomp/AppArmor profile is config presence, not proof the node's kernel actually loaded and enforced it.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (REDACTED, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
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.
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.
+ 33 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 60 down to 60 or less in Cyclomatic Complexity — start with server.run (cyclomatic 107). — Refactoring it lifts Cyclomatic Complexity from 5.1 to about 5.9/10.
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.
+ 88 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 60 down to 60 or less in Cognitive Complexity — start with server.run (cognitive 180), config.get (cognitive 66), ETCD.reconcileSnapshotData (cognitive 64). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 3 together lifts Cognitive Complexity from 2.0 to about 3.2/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.3 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 6 FileTooLong finding(s) in God Classes — start with REDACTED, REDACTED, server.go. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 5 TooManyFields finding(s) in God Classes — start with types.go (3), server.go, agent.go. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 4 MethodTooLong finding(s) in God Classes — start with REDACTED (2), REDACTED, REDACTED. — One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
37 duplicated block group(s) detected. A further 29 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
Edited copy of a member (15 corresponding lines) · ×3pkg/server/handlers/cert.go:31
Edited copy of a member (13 corresponding lines) · ×3pkg/agent/config/config.go:191
+ 38 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 5 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with run.go, passwordfile.go, etcd_snapshot.go. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 4 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with REDACTED, dataverify.go, main.go. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 4 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with secrets-encrypt.go, flannel.go, REDACTED. — One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
What it measures: Whether the code respects its intended layering / architecture rules.
Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.
No mechanizable ADR was identified, so enforcement is not measured. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).
Detailed fixes: d7_recommendation.md.
Do you agree with this assessment?
D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests pass reliably, with no flakiness.
Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
16 outdated, 0 author-deprecated direct Go module(s), 2 pinning or checksum defect(s). 62 of 62 direct requirement(s) were graded against proxy.golang.org (0 not served there, 6 publishing no tagged release to be behind). Whether any of these modules is UNMAINTAINED is not graded — proxy.golang.org publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, not a registry one. Known CVEs in this module graph are D30's question, read from REDACTED and go.sum there.
Dependency pinned to a stale untagged commit: github.com/erikdubbelboer/gspt · ×2
Resolve the 2 Dependency pinned to a stale untagged commit finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d12_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.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 423 required Go module(s) use a banned license. Licences were read per module version from the licence files pkg.go.dev detects (via api.deps.dev), over every module this repository's REDACTED requires, direct and indirect, at the version the build uses. Go records no test-only scope at module level, so modules only this repository's own tests import are included. 1 of them carry no licence file that matches a known SPDX licence; that is missing data, not a violation, and none of them is charged. A further 42 module(s) are not known to the public Go module index (private modules, or pins the public proxy never served) and are outside this verdict.
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.
Resolve the 3 Hotspot finding(s) in Churn × Complexity Hotspots — start with server.go, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor7.6 / 10Strong✓ 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.
24 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is pkg/agent/tunnel/tunnel.go. Counted over 100 of the 236 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1
What to do
Resolve the 1 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
6 deducted task-comment markers across 30186 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
TodoComment · ×5tests/docker/test-helpers.go:667
HackCommentpkg/cli/cmds/root.go:27
What to do
Resolve the 5 TodoComment finding(s) in Explicit Debt — start with test-helpers.go, cacerts_test.go, REDACTED. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 1 HackComment finding(s) in Explicit Debt — start with root.go. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d17_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: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 1 documentation facets pass in full. 28 document(s) read across 1 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality9.6 / 10Exemplary✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
3 of 26 evaluated ADRs have a defect readable from the log itself (a missing or empty section, no title, a single option, consequences with no cost, no status, a missing enforcement field, a status the log contradicts, a dangling link, an unlinked second decision on one question, a date that is no calendar day). How well each record argues its case is not measured.
ADR Consequences section is emptydocs/adrs/flannel-options.md:117detected by adr-integrity
ADR has no Consequences sectiondocs/adrs/multus.md:1detected by adr-integrity
ADR decides a question another record already decideddocs/adrs/record-architecture-decisions.md:1detected by adr-integrity
✓ On the Gold path — maintain.
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D27 · Navigability8.1 / 10Strong✓ Tool-verified
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
58 % of calls cross a namespace and 3 % go through an interface, but 38 % of collaborators are co-located — so following a call takes several hops. Baseline: small — navigation cost is tolerated.
Scattered collaborators
What to do
Resolve the 1 Scattered collaborators finding(s) in Navigability. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d27_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: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
16 finding(s): 0 critical, 16 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
REDACTED
What to do
Resolve the 13 REDACTED finding(s) in Secrets (history) — start with REDACTED (4), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (13 issue-level).
Resolve the 3 High secret finding(s) in Secrets (history) — start with REDACTED (2), REDACTED. — 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, 16 medium, 7 low. semgrep hit a parse error in 4 file(s) — `install.sh` (lines 173–1218), `manifests/coredns.yaml`, `package/rpm/install.sh` (lines 155–814), `scripts/validate-artifacts` (line 30, line 31) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 8 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 13 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 1 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 5 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (5). — One of this dimension's main actionable groups (5 warning-level).
Resolve the 2 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 72 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (25), REDACTED (24), REDACTED (13). — One of this dimension's main actionable groups (72 warning-level).
Resolve the 10 High IaC finding(s) in IaC & Container Security — start with REDACTED (3), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (10 issue-level).
Resolve the 4 Critical IaC finding(s) in IaC & Container Security — start with REDACTED (2), REDACTED, REDACTED. — One of this dimension's main actionable groups (4 issue-level).
Detailed fixes: d31_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.
5 of 100 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is REDACTED. Counted over 100 of the 236 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Orphaned file · ×5REDACTED:1
Orphaned files with no living knowledge
✓ 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. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
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 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED 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 Kubernetes workloads restrict network EGRESS with a NetworkPolicy (or Cilium policy), limiting where a compromised pod can send data or reach a command-and-control server. Presence of committed egress-restricting policy, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn — language-agnostic): Kubernetes workloads gate applicability; credits a NetworkPolicy / Cilium policy that restricts egress (policyTypes: [Egress] / egress rules). Reward-leaning (neutral floor climbing to 10, never a deduction — baseline misconfigs stay with D31). Deterministic.
What it measures: Whether Kubernetes workloads confine the kernel boundary — a seccomp profile (RuntimeDefault/Localhost) plus an AppArmor/SELinux mandatory-access-control layer — shrinking the syscall attack surface a container escape would use. Presence of committed confinement config, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn): on Kubernetes workloads, credits a seccomp profile (RuntimeDefault/Localhost) and an AppArmor/SELinux MAC layer. Reward-leaning (neutral floor climbing to 10); NotApplicable without workloads. Deterministic.
0/4 workload(s) run every container under a seccomp profile; 0/4 declare an AppArmor/SELinux profile.
No seccomp profile · ×4manifests/coredns.yaml:82
What to do
Resolve the 4 No seccomp profile finding(s) in Kernel & Syscall Confinement — start with coredns.yaml, REDACTED, REDACTED. — One of this dimension's main actionable groups (4 recommendation-level).
Detailed fixes: d41_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.
Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.
Package `handlers` serves requests (request-handler function literals run on a goroutine per request, and every one sees the same package variables and captured values) but writes that shared state outside any lock (ca, control.DisableKubeProxy; e.g. `ca` in `CACerts` at line 41). Unsynchronised concurrent writes are a data race in Go: an update is lost or a value tears, and a concurrent map write aborts the process. — pkg/server/handlers/handlers.go:41
`ETCD` is shared by every request (`getS3Client` is called per request from the net/http handler `ETCD.handleList`, on the one `ETCD` value that handler's shared receiver holds) but writes its fields outside any lock (s3; e.g. `s3` in `getS3Client` at line 478). Unsynchronised concurrent writes are a data race in Go: an update is lost or a value tears, and a concurrent map write aborts the process. — REDACTED:109
What to do
Go: guard the state handlers share with a sync.Mutex held for the whole update (`mu.Lock(); defer mu.Unlock()`), make counters sync/atomic types (atomic.Int64) and caches a sync.Map, or keep per-request data in locals and the request context. `go test -race` over a handler test confirms the race and then its fix.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
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
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
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.
`REDACTED` schedules updates, but no `package-ecosystem` entry covers `gomod`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the `updates:` list. — REDACTED:2
What to do
Dependabot is configured but does not watch `gomod` — add that `package-ecosystem` entry to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
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.
Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it.
What to do
Add an approval/environment gate (required reviewers / protection rules) before production promotion.
Do you agree with this assessment?
P5 · DR & Backup7.0 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
What to do
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`http.Get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — pkg/configfilearg/parser.go:341
What to do
Give every `http.Client` an explicit `Timeout` (never call `http.Get`/`http.Post` or `http.DefaultClient`, which have none), or build each request with `http.NewRequestWithContext` under a `context.WithTimeout`; add retry with back-off (`hashicorp/go-retryablehttp`) and a breaker (`sony/gobreaker`) around dependencies that fail.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether functions that make a cancellable request accept or pass on a context.Context (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 2/7 functions that make a cancellable request (net/http, net.Dial) accept a context.Context or pass one on, so a request keeps running after whatever wanted it has given up — a cancelled request, a shutdown, an expired deadline. Take `ctx context.Context` as the first parameter and build the request with it (`http.NewRequestWithContext`, `DialContext`); where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
`readConfigFileData` calls `http.Get(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — pkg/configfilearg/parser.go:333
`get` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — REDACTED:485
`put` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — REDACTED:513
`post` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — REDACTED:542
`getNodeNamedCrt` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — pkg/agent/config/config.go:138
What to do
Thread a context.Context through functions that make requests, so the work stops when its caller gives up.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×20) — pkg/util/metrics/metrics.go:11, REDACTED:342, pkg/etcd/resolver.go:60, …
`if _, err := os.Stat(dir); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — REDACTED:1565
`if err := nodepassword.Hasher.VerifyHash(user.hash, password); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — pkg/authenticator/passwordfile/passwordfile.go:95
`if err := scanner.Err(); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — pkg/agent/config/config.go:398
What to do
Swallowed exception (caught, then discarded)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Unscored — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
P12 CI test-gate honesty — 1 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
X10 Duplicated predicate — 5 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
Not included — 63 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — Not applicable: this repository's Go imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
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 — no test/production split to check
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.
AXR1 Runtime accessibility — compose up failed (exit 15 — the compose project is invalid) — error while interpolating services.server.environment.[]: required variable K3S_TOKEN is missing a value: err; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D10 Test Quality — ~23972 lines of test source are present (.go) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
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.
D21 Naming Consistency — Naming consistency is measured on C# and TypeScript only; Go not measured.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .go, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D25 ADR Conformance — None of 24 binding record(s) states a rule in checkable form (a backticked element with a prohibition, or an `adr-rules` block), so conformance cannot be read from the code. Write the rule as an `adr-rules` block (`forbid:` a symbol, a package or a dependency) to make it checkable.
D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
D42 Runtime Threat Enforcement — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.
D5 Coupling — Not applicable — this Go build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
D8 Code Coverage — Coverage not included — suite not readable by the collector
DM1 Domain Modelling — not scored — this repository shows none of the 2 signals this lens looks for
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for a `func BenchmarkXxx(b *testing.B)` in any `_test.go` file, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
PF3 Async & latency hygiene — Not applicable: Go has no async/await function colour, so there is no asynchronous code for a blocking call to stall.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X12 Unreachable branch — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X13 Undrained process stream — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X17 Uncapped recursion over a caller-supplied document — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X18 Disposal-pattern correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X19 Unrestored process-global state — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X21 Side-effecting pattern guard — Not applicable: this check looks for a pattern guard or `case` label that increments, decrements or assigns while the switch is deciding whether it matches, and in this repository's languages none can. Go's `++`, `--` and assignments are STATEMENTS, not expressions, so none of them can appear in a `case` expression or anywhere else in a condition, and a type switch's cases are types. Not a gap in the analyzer and not a finding about your code.
X22 Contradicted release guard — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X23 Unguarded diagnostic materialisation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X24 Document value interpolated into markup unescaped — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X25 Inert configuration knob — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X27 Collection changed while being enumerated — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X29 Per-element action decided by a fixed element — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X5 Nullable reference types — Not applicable: this check asks whether the null-typed discipline a language offers is switched on, and how much of that the assertion operator takes back, and in this repository's languages there is no such switch and no such operator. Go's type system has no nullable and non-nullable types — every pointer, map, slice and interface is nil-able at every position, there is no switch that turns null checking on, and the compiler produces no nullability warning for an operator to silence. Not a gap in the analyzer and not a finding about your code.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Swallowed exception (caught, then discarded) pkg/util/metrics/metrics.go:11— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:342— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:1565— `if _, err := os.Stat(dir); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/etcd/resolver.go:60— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/configfilearg/parser.go:195— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/configfilearg/parser.go:204— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:77— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:203— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:224— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:415— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:87— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/cgroups/cgroups_linux.go:84— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/cgroups/cgroups_linux.go:88— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/cgroups/cgroups_linux.go:98— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/cgroups/cgroups_linux.go:152— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:19— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/authenticator/passwordfile/passwordfile.go:95— `if err := nodepassword.Hasher.VerifyHash(user.hash, password); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/agent/templates/templates_windows.go:18— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:165— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/agent/containerd/config.go:133— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/agent/config/config.go:230— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/agent/config/config.go:381— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/agent/config/config.go:398— `if err := scanner.Err(); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
FileTooLong: REDACTED REDACTED— FileTooLong — 986 significant lines (blank, comment-only and punctuation-only lines excluded), about 73% of them inside a single declaration: ETCD (42 blocks, 109-1684). The bar is 500 significant lines; this is 486 over it, 1.97× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: REDACTED REDACTED— FileTooLong — 601 significant lines (blank, comment-only and punctuation-only lines excluded), about 80% of them inside a single declaration: ETCD (16 blocks, 112-933). The bar is 500 significant lines; this is 101 over it, 1.20× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: cmds/server.go pkg/cli/cmds/server.go— FileTooLong — 570 significant lines (blank, comment-only and punctuation-only lines excluded), about 70% of them inside a single declaration: ServerFlags (192-671). The bar is 500 significant lines; this is 70 over it, 1.14× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: deps/deps.go pkg/daemons/control/deps/deps.go— FileTooLong — 551 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 51 over it, 1.10× the bar. 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: config/config.go pkg/agent/config/config.go— FileTooLong — 524 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 24 over it, 1.05× the bar. 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: REDACTED REDACTED— FileTooLong — 508 significant lines (blank, comment-only and punctuation-only lines excluded), about 77% of them inside a single declaration: k3s (26 blocks, 71-843). The bar is 500 significant lines; this is 8 over it, 1.02× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
TodoComment tests/docker/test-helpers.go:667— // TODO the below functions are replicated from e2e test utils. Consider combining into commmon package — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/docker/cacerts/cacerts_test.go:31— // TODO determine if the below is still true — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment REDACTED:22— // TODO(bradfitz): this was copied from x/build/cmd/buildlet/buildlet.go — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment pkg/kubeadm/utils.go:79— // TODO: This maybe should be a helper function in bootstraputil? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment pkg/agent/containerd/config.go:182— // TODO: rewrites are currently copied from the mirror settings into each endpoint. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TooManyFields: Server pkg/cli/cmds/server.go:26— TooManyFields — 90 stored fields. The bar is 30 stored fields; this is 60 over it, 3.00× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: Control pkg/daemons/config/types.go:195— TooManyFields — 66 stored fields beside 2 methods. The bar is 30 stored fields; this is 36 over it, 2.20× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: Agent pkg/daemons/config/types.go:107— TooManyFields — 60 stored fields. The bar is 30 stored fields; this is 30 over it, 2.00× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: ControlRuntime pkg/daemons/config/types.go:321— TooManyFields — 60 stored fields. The bar is 30 stored fields; this is 30 over it, 2.00× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: Agent pkg/cli/cmds/agent.go:11— TooManyFields — 47 stored fields. The bar is 30 stored fields; this is 17 over it, 1.57× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
Duplicated block (11 lines × 2) pkg/agent/run.go:127— pkg/agent/run.go:127-137 | pkg/agent/run.go:284-294 — 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/authenticator/passwordfile/passwordfile.go:55— pkg/authenticator/passwordfile/passwordfile.go:55-65 | pkg/passwd/passwd.go:37-47 — 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/authenticator/passwordfile/passwordfile.go:55` 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/cli/etcdsnapshot/etcd_snapshot.go:58— pkg/cli/etcdsnapshot/etcd_snapshot.go:58-68 | pkg/cli/server/server.go:252-262 — 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 (11 lines × 2) REDACTED:316— REDACTED:316-326 | REDACTED:348-358 — 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/etcd/snapshot_controller.go:119— pkg/etcd/snapshot_controller.go:119-129 | pkg/etcd/snapshot_controller.go:314-324 — 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/etcd/snapshot_controller.go:119` 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.
X2 · Cancellation propagation· Function without context.Context · ×5
Function without context.Context: readConfigFileData pkg/configfilearg/parser.go:333— `readConfigFileData` calls `http.Get(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: get REDACTED:485— `get` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: put REDACTED:513— `put` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: post REDACTED:542— `post` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: getNodeNamedCrt pkg/agent/config/config.go:138— `getNodeNamedCrt` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
MethodTooLong: Config.Start REDACTED:119— MethodTooLong — Start runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ETCD.snapshot REDACTED:226— MethodTooLong — snapshot runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ETCD.reconcileSnapshotData REDACTED:723— MethodTooLong — reconcileSnapshotData runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: k3s.newDaemonSet REDACTED:515— MethodTooLong — newDaemonSet runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Duplicated block (10 lines × 2) pkg/agent/config/config.go:192— pkg/agent/config/config.go:192-201 | pkg/agent/config/config.go:206-215 — 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 (10 lines × 2) pkg/dataverify/dataverify.go:35— pkg/dataverify/dataverify.go:35-44 | pkg/dataverify/dataverify.go:61-70 — 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/dataverify/dataverify.go:35` 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) cmd/server/main.go:39— cmd/server/main.go:39-48 | main.go:24-33 — before extracting anything, compare `cmd/server/main.go` and `main.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) pkg/nodepassword/validate.go:157— pkg/nodepassword/validate.go:157-166 | pkg/nodepassword/validate.go:172-181 — 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/nodepassword/validate.go:157` 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (6 lines × 2) pkg/server/handlers/secrets-encrypt.go:536— pkg/server/handlers/secrets-encrypt.go:536-541 | pkg/server/handlers/secrets-encrypt.go:563-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/server/handlers/secrets-encrypt.go:536` 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/agent/flannel/flannel.go:240— pkg/agent/flannel/flannel.go:240-245 | pkg/agent/flannel/flannel.go:274-279 — 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/agent/flannel/flannel.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.
Duplicated block (6 lines × 2) REDACTED:449— REDACTED:449-454 | REDACTED:461-466 — 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/agent/containerd/config_linux.go:138— pkg/agent/containerd/config_linux.go:138-143 | pkg/containerd/utility_linux.go:27-32 — before extracting anything, compare `pkg/agent/containerd/config_linux.go` and `pkg/containerd/utility_linux.go` as WHOLE FILES: 89% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Hotspot: pkg/cli/server/server.go pkg/cli/server/server.go:61— pkg/cli/server/server.go changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 107 in server.run at line 61. 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. Counted over 2026-08-11..2026-11-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-11 20:18:15 -08:00' --until='2026-11-09 20:18:15 -08:00' --full-history --no-merges -- pkg/cli/server/server.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: pkg/agent/config/config.go pkg/agent/config/config.go:439— pkg/agent/config/config.go changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in config.get at line 439. 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. Counted over 2026-08-11..2026-11-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-11 20:18:15 -08:00' --until='2026-11-09 20:18:15 -08:00' --full-history --no-merges -- pkg/agent/config/config.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:114— REDACTED changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in watchqueue.processImageEvent at line 114. 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. Counted over 2026-08-11..2026-11-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-11 20:18:15 -08:00' --until='2026-11-09 20:18:15 -08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×3
Edited copy of a member (15 corresponding lines) pkg/server/handlers/cert.go:31— pkg/server/handlers/cert.go:31-45 | pkg/server/handlers/token.go:35-54 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) REDACTED:94— REDACTED:94-108 | REDACTED:111-126 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) pkg/util/patch.go:67— pkg/util/patch.go:67-82 | pkg/util/patch.go:85-99 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×3
Edited copy of a member (13 corresponding lines) pkg/agent/config/config.go:191— pkg/agent/config/config.go:191-203 | pkg/agent/config/config.go:205-226 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) pkg/util/api.go:221— pkg/util/api.go:221-233 | pkg/util/api.go:237-251 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) pkg/util/net.go:62— pkg/util/net.go:62-74 | pkg/util/net.go:111-123 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×3
Edited copy of a member (8 corresponding lines) pkg/server/handlers/handlers.go:108— pkg/server/handlers/handlers.go:108-115 | pkg/server/handlers/handlers.go:117-124 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) pkg/agent/flannel/setup_linux.go:7— pkg/agent/flannel/setup_linux.go:7-14 | pkg/agent/flannel/setup_windows.go:7-14 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) pkg/agent/containerd/config_linux.go:117— pkg/agent/containerd/config_linux.go:117-124 | pkg/agent/containerd/config_windows.go:59-66 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (5 lines × 2) pkg/agent/tunnel/tunnel.go:322— pkg/agent/tunnel/tunnel.go:322-326 | pkg/etcd/apiaddresses_controller.go:60-64 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/agent/tunnel/tunnel.go:322` 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) REDACTED:361— REDACTED:361-365 | REDACTED:747-751 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:361` 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) REDACTED:430— REDACTED:430-434 | REDACTED:950-954 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:949` calls `HasPrefix`, `Name` and `REDACTED:428` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D12 · Dependency Hygiene· Dependency pinned to a stale untagged commit · ×2
Dependency pinned to a stale untagged commit: github.com/erikdubbelboer/gspt — Direct dependency `github.com/erikdubbelboer/gspt` is required at `v0.0.0-20210805194459-ce36a5128377` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2021-08-05, 5.3 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/erikdubbelboer/gspt` and has not moved this requirement in 5.3 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/erikdubbelboer/gspt` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
Dependency pinned to a stale untagged commit: github.com/mwitkow/go-http-dialer — Direct dependency `github.com/mwitkow/go-http-dialer` is required at `v0.0.0-20161116154839-378f744fb2b8` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2016-11-16, 10 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/mwitkow/go-http-dialer` and has not moved this requirement in 10 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/mwitkow/go-http-dialer` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
FunctionTooLong: server.run pkg/cli/server/server.go:61— FunctionTooLong — run runs 399 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 299 over it, 3.99× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: config.get pkg/agent/config/config.go:439— FunctionTooLong — get runs 228 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 128 over it, 2.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
TooManyMethods: ETCD REDACTED:109— TooManyMethods — 65 methods, declared across 3 files: REDACTED (41), REDACTED (16), etcd/snapshot_handler.go (8). The bar is 30 methods; this is 35 over it, 2.17× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: k3s pkg/cloudprovider/cloudprovider.go:41— TooManyMethods — 43 methods, declared across 4 files: REDACTED (26), cloudprovider/cloudprovider.go (9), cloudprovider/loadbalancer.go (5), cloudprovider/instances.go (3). The bar is 30 methods; this is 13 over it, 1.43× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×2
REDACTED
REDACTED
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×2
Edited copy of a member (26 corresponding lines) pkg/agent/config/config.go:247— pkg/agent/config/config.go:247-272 | pkg/agent/config/config.go:352-377 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) pkg/agent/run_linux.go:20— pkg/agent/run_linux.go:20-49 | pkg/agent/run_windows.go:21-46 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×2
Edited copy of a member (12 corresponding lines) pkg/server/handlers/handlers.go:161— pkg/server/handlers/handlers.go:161-172 | pkg/server/handlers/handlers.go:174-186 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) pkg/etcd/member_controller.go:17— pkg/etcd/member_controller.go:17-28 | pkg/etcd/metadata_controller.go:20-31 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (9 lines × 2) pkg/etcd/member_controller.go:53— pkg/etcd/member_controller.go:53-61 | pkg/etcd/member_controller.go:123-131 — 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 × 2) pkg/executor/embed/embed.go:199— pkg/executor/embed/embed.go:199-207 | pkg/executor/embed/embed.go:296-304 — 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/executor/embed/embed.go:199` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (7 lines × 3) pkg/etcd/snapshot_handler.go:96— pkg/etcd/snapshot_handler.go:96-102 | pkg/etcd/snapshot_handler.go:113-119 | pkg/etcd/snapshot_handler.go:136-142 — 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 (7 lines × 3) pkg/executor/embed/embed.go:201— pkg/executor/embed/embed.go:201-207 | pkg/executor/embed/embed.go:222-228 | pkg/executor/embed/embed.go:298-304 — 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/executor/embed/embed.go:201` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (7 lines × 2) cmd/server/main.go:58— cmd/server/main.go:58-64 | main.go:36-42 — before extracting anything, compare `cmd/server/main.go` and `main.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/server/main.go:58` 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/executor/embed/embed.go:278— pkg/executor/embed/embed.go:278-284 | pkg/executor/embed/embed.go:344-350 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `pkg/executor/embed/embed.go:277` calls `APIServerReadyChan` and `pkg/executor/embed/embed.go:343` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Stateful package: handlers pkg/server/handlers/handlers.go:41— Package `handlers` serves requests (request-handler function literals run on a goroutine per request, and every one sees the same package variables and captured values) but writes that shared state outside any lock (ca, control.DisableKubeProxy; e.g. `ca` in `CACerts` at line 41). Unsynchronised concurrent writes are a data race in Go: an update is lost or a value tears, and a concurrent map write aborts the process.
Stateful handler dependency: ETCD REDACTED:109— `ETCD` is shared by every request (`getS3Client` is called per request from the net/http handler `ETCD.handleList`, on the one `ETCD` value that handler's shared receiver holds) but writes its fields outside any lock (s3; e.g. `s3` in `getS3Client` at line 478). Unsynchronised concurrent writes are a data race in Go: an update is lost or a value tears, and a concurrent map write aborts the process.
server.run (cyclomatic 107) pkg/cli/server/server.go:61— server.run has cyclomatic complexity 107 (threshold 15). Of this number, 103 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
config.get (cyclomatic 53) pkg/agent/config/config.go:439— config.get has cyclomatic complexity 53 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ETCD.reconcileSnapshotData (cyclomatic 40) REDACTED:723— ETCD.reconcileSnapshotData has cyclomatic complexity 40 (threshold 15). Of this number, 26 points are the body's own statements and 14 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
agent.run (cyclomatic 36) pkg/agent/run.go:55— agent.run has cyclomatic complexity 36 (threshold 15). Of this number, 33 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Cluster.ReconcileBootstrapData (cyclomatic 34) pkg/cluster/bootstrap.go:248— Cluster.ReconcileBootstrapData has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Config.Start (cyclomatic 34) REDACTED:119— Config.Start has cyclomatic complexity 34 (threshold 15). Of this number, 29 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
etcdSnapshotHandler.reconcile (cyclomatic 32) pkg/etcd/snapshot_controller.go:173— etcdSnapshotHandler.reconcile has cyclomatic complexity 32 (threshold 15). Of this number, 26 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ETCD.Reset (cyclomatic 28) REDACTED:320— ETCD.Reset has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 13 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 323). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
handler.updateCoreDNSConfigMap (cyclomatic 28) pkg/node/controller.go:77— handler.updateCoreDNSConfigMap has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
handlers.encryptionEnable (cyclomatic 27) pkg/server/handlers/secrets-encrypt.go:139— handlers.encryptionEnable has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ETCD.snapshot (cyclomatic 26) REDACTED:226— ETCD.snapshot has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
flannel.createFlannelConf (cyclomatic 25) pkg/agent/flannel/setup.go:186— flannel.createFlannelConf has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
deps.genClientCerts (cyclomatic 25) pkg/daemons/control/deps/deps.go:330— deps.genClientCerts has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
main.extract (cyclomatic 24) cmd/k3s/main.go:259— main.extract has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
handlers.encryptionStatus (cyclomatic 24) pkg/server/handlers/secrets-encrypt.go:77— handlers.encryptionStatus has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
cgroups.CheckCgroups (cyclomatic 23) pkg/cgroups/cgroups_linux.go:76— cgroups.CheckCgroups has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ETCD.manageLearners (cyclomatic 23) REDACTED:1142— ETCD.manageLearners has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 1151). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Controller.GetClient (cyclomatic 21) REDACTED:124— Controller.GetClient has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ETCD.applySnapshotRestrictions (cyclomatic 20) pkg/etcd/snapshot_handler.go:279— ETCD.applySnapshotRestrictions has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
containerd.getHostConfigs (cyclomatic 19) pkg/agent/containerd/config.go:146— containerd.getHostConfigs has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
k3s.InstanceMetadata (cyclomatic 19) pkg/cloudprovider/instances.go:38— k3s.InstanceMetadata has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ETCD.join (cyclomatic 19) REDACTED:562— ETCD.join has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
serverList.recordSuccess (cyclomatic 18) pkg/agent/loadbalancer/servers.go:200— serverList.recordSuccess has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
netpol.Run (cyclomatic 18) REDACTED:58— netpol.Run has cyclomatic complexity 18 (threshold 15). Of this number, 11 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Cluster.storageBootstrap (cyclomatic 18) pkg/cluster/storage.go:149— Cluster.storageBootstrap has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ETCD.RemovePeer (cyclomatic 18) REDACTED:1078— ETCD.RemovePeer has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Controller.getConfigFromSecret (cyclomatic 18) pkg/etcd/s3/config_secret.go:32— Controller.getConfigFromSecret has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
watchqueue.processImageEvent (cyclomatic 17) REDACTED:114— watchqueue.processImageEvent has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Cluster.Start (cyclomatic 17) pkg/cluster/cluster.go:46— Cluster.Start has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ETCDConfig.ToConfigFile (cyclomatic 17) pkg/daemons/executor/executor.go:104— ETCDConfig.ToConfigFile has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
embed.New (cyclomatic 17) pkg/executor/embed/embed.go:70— embed.New has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
k3s.podIPs (cyclomatic 16) REDACTED:410— k3s.podIPs has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
configfilearg.readConfigFile (cyclomatic 16) pkg/configfilearg/parser.go:245— configfilearg.readConfigFile has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
etcdSnapshotHandler.sync (cyclomatic 16) pkg/etcd/snapshot_controller.go:71— etcdSnapshotHandler.sync has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rootless.createParentOpt (cyclomatic 16) pkg/rootless/rootless.go:136— rootless.createParentOpt has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
secretsencrypt.GetEncryptionConfigMetrics (cyclomatic 16) pkg/secretsencrypt/config.go:320— secretsencrypt.GetEncryptionConfigMetrics has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 338). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
server.printTokens (cyclomatic 16) pkg/server/server.go:352— server.printTokens has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
handlers.reencryptAndRemoveKey (cyclomatic 16) pkg/server/handlers/secrets-encrypt.go:394— handlers.reencryptAndRemoveKey has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HackComment pkg/cli/cmds/root.go:27— // hack - force "file,dns" lookup order if go dns is used — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
server.run (cognitive 180) pkg/cli/server/server.go:61— server.run has cognitive complexity 180 (threshold 15). Drivers by points: if/else 94 (155 pts), boolean chains 14, loops 8 (11 pts) (nesting depth added 64). Of this number, 175 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.get (cognitive 66) pkg/agent/config/config.go:439— config.get has cognitive complexity 66 (threshold 15). Drivers by points: if/else 51 (62 pts), boolean chains 2, loops 2 (nesting depth added 11). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ETCD.reconcileSnapshotData (cognitive 64) REDACTED:723— ETCD.reconcileSnapshotData has cognitive complexity 64 (threshold 15). Drivers by points: if/else 32 (50 pts), loops 5 (9 pts), boolean chains 5 (nesting depth added 22). Of this number, 41 points are the body's own statements and 23 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cluster.ReconcileBootstrapData (cognitive 57) pkg/cluster/bootstrap.go:248— Cluster.ReconcileBootstrapData has cognitive complexity 57 (threshold 15). Drivers by points: if/else 27 (51 pts), boolean chains 5, loops 1 (nesting depth added 24). 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.
ETCD.snapshot (cognitive 54) REDACTED:226— ETCD.snapshot has cognitive complexity 54 (threshold 15). Drivers by points: if/else 28 (53 pts), boolean chains 1 (nesting depth added 25). 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.
agentTunnel.watchPods (cognitive 52) pkg/agent/tunnel/tunnel.go:232— agentTunnel.watchPods has cognitive complexity 52 (threshold 15). Drivers by points: if/else 10 (35 pts), loops 5 (15 pts), match/switch 1 (2 pts) (nesting depth added 36). 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.
etcdSnapshotHandler.reconcile (cognitive 52) pkg/etcd/snapshot_controller.go:173— etcdSnapshotHandler.reconcile has cognitive complexity 52 (threshold 15). Drivers by points: if/else 24 (42 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 20). Of this number, 44 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ETCD.Reset (cognitive 50) REDACTED:320— ETCD.Reset has cognitive complexity 50 (threshold 15). Drivers by points: if/else 24 (47 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 24). Of this number, 25 points are the body's own statements and 25 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cgroups.CheckCgroups (cognitive 47) pkg/cgroups/cgroups_linux.go:76— cgroups.CheckCgroups has cognitive complexity 47 (threshold 15). Drivers by points: if/else 12 (31 pts), loops 5 (10 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ETCD.RemovePeer (cognitive 44) REDACTED:1078— ETCD.RemovePeer has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (38 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 27). 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.
Config.Start (cognitive 44) REDACTED:119— Config.Start has cognitive complexity 44 (threshold 15). Drivers by points: if/else 32 (39 pts), boolean chains 3, loops 2 (nesting depth added 7). Of this number, 35 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
flannel.createFlannelConf (cognitive 41) pkg/agent/flannel/setup.go:186— flannel.createFlannelConf has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (28 pts), loops 4 (9 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
containerd.getHostConfigs (cognitive 40) pkg/agent/containerd/config.go:146— containerd.getHostConfigs has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (33 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
handler.updateCoreDNSConfigMap (cognitive 40) pkg/node/controller.go:77— handler.updateCoreDNSConfigMap has cognitive complexity 40 (threshold 15). Drivers by points: if/else 23 (35 pts), loops 3, boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
main.extract (cognitive 39) cmd/k3s/main.go:259— main.extract has cognitive complexity 39 (threshold 15). Drivers by points: if/else 21 (36 pts), boolean chains 2, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
handlers.encryptionStatus (cognitive 38) pkg/server/handlers/secrets-encrypt.go:77— handlers.encryptionStatus has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 7, loops 3 (7 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
agent.run (cognitive 37) pkg/agent/run.go:55— agent.run has cognitive complexity 37 (threshold 15). Drivers by points: if/else 21 (25 pts), boolean chains 12 (nesting depth added 4). Of this number, 34 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
server.printTokens (cognitive 37) pkg/server/server.go:352— server.printTokens has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (37 pts) (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ETCD.join (cognitive 35) REDACTED:562— ETCD.join has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Client.ListSnapshots (cognitive 35) REDACTED:476— Client.ListSnapshots has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (33 pts), loops 2 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Cluster.Start (cognitive 34) pkg/cluster/cluster.go:46— Cluster.Start has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (28 pts), match/switch 1 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 19). Most of this is not in the body itself: 10 of the 34 points are its own statements and the rest belongs to one function literal inside it that branches (line 80). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
ETCD.manageLearners (cognitive 34) REDACTED:1142— ETCD.manageLearners has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (27 pts), loops 4 (5 pts), match/switch 1 (2 pts) (nesting depth added 13). Most of this is not in the body itself: 3 of the 34 points are its own statements and the rest belongs to one function literal inside it that branches (line 1151). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
embed.New (cognitive 33) pkg/executor/embed/embed.go:70— embed.New has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
serverList.recordSuccess (cognitive 31) pkg/agent/loadbalancer/servers.go:200— serverList.recordSuccess has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (25 pts), match/switch 2 (4 pts), loops 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cluster.storageBootstrap (cognitive 31) pkg/cluster/storage.go:149— Cluster.storageBootstrap has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (31 pts) (nesting depth added 12). Of this number, 16 points are the body's own statements and 15 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TunnelServer.onChangePod (cognitive 31) pkg/daemons/control/tunnel.go:143— TunnelServer.onChangePod has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (26 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Controller.getConfigFromSecret (cognitive 31) pkg/etcd/s3/config_secret.go:32— Controller.getConfigFromSecret has cognitive complexity 31 (threshold 15). Drivers by points: if/else 20 (25 pts), loops 2 (6 pts) (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
handlers.encryptionEnable (cognitive 31) pkg/server/handlers/secrets-encrypt.go:139— handlers.encryptionEnable has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 8, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
configfilearg.readConfigFile (cognitive 30) pkg/configfilearg/parser.go:245— configfilearg.readConfigFile has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 4 (7 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
deps.genClientCerts (cognitive 30) pkg/daemons/control/deps/deps.go:330— deps.genClientCerts has cognitive complexity 30 (threshold 15). Drivers by points: if/else 24 (30 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
Controller.GetClient (cognitive 30) REDACTED:124— Controller.GetClient has cognitive complexity 30 (threshold 15). Drivers by points: if/else 20 (29 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
handler.toBindPorts (cognitive 30) pkg/rootlessports/controller.go:128— handler.toBindPorts has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 4 (10 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TunnelServer.dialBackend (cognitive 27) pkg/daemons/control/tunnel.go:206— TunnelServer.dialBackend has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ETCD.applySnapshotRestrictions (cognitive 27) pkg/etcd/snapshot_handler.go:279— ETCD.applySnapshotRestrictions has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 5, loops 1 (2 pts), match/switch 1 (nesting depth added 11). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
util.GetArgs (cognitive 27) pkg/util/args.go:27— util.GetArgs has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 5 (6 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ETCDConfig.ToConfigFile (cognitive 26) pkg/daemons/executor/executor.go:104— ETCDConfig.ToConfigFile has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 1 (5 pts), boolean chains 2, loops 1 (2 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.
ETCD.DeleteSnapshots (cognitive 26) REDACTED:559— ETCD.DeleteSnapshots has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
containerd.prePullImages (cognitive 24) pkg/agent/containerd/containerd.go:461— containerd.prePullImages has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
watchqueue.processImageEvent (cognitive 24) REDACTED:114— watchqueue.processImageEvent has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (19 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
agentTunnel.startWatches (cognitive 24) pkg/agent/tunnel/tunnel.go:110— agentTunnel.startWatches has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 10). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body 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.
k3s.InstanceMetadata (cognitive 24) pkg/cloudprovider/instances.go:38— k3s.InstanceMetadata has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15, loops 4 (8 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Parser.findStart (cognitive 24) pkg/configfilearg/parser.go:188— Parser.findStart has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
etcdSnapshotHandler.sync (cognitive 24) pkg/etcd/snapshot_controller.go:71— etcdSnapshotHandler.sync has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 1 (nesting depth added 9). Of this number, 13 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rootless.createParentOpt (cognitive 24) pkg/rootless/rootless.go:136— rootless.createParentOpt has cognitive complexity 24 (threshold 15). Drivers by points: if/else 20 (24 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
serverBootstrapper.Get (cognitive 24) pkg/spegel/bootstrap.go:198— serverBootstrapper.Get has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cert.rotate (cognitive 23) pkg/cli/cert/cert.go:258— cert.rotate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 3 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
k3s.podIPs (cognitive 23) REDACTED:410— k3s.podIPs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cluster.Bootstrap (cognitive 22) pkg/cluster/bootstrap.go:37— Cluster.Bootstrap has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
containerd.watchImages (cognitive 21) REDACTED:309— containerd.watchImages has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 3 (10 pts), loops 1 (nesting depth added 13). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to one function literal inside it that branches (line 333). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
cluster.Save (cognitive 21) pkg/cluster/storage.go:65— cluster.Save has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.FindString (cognitive 21) pkg/configfilearg/parser.go:105— Parser.FindString has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
etcd.ClientURLs (cognitive 21) REDACTED:1460— etcd.ClientURLs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 1 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
etcdMemberHandler.sync (cognitive 21) pkg/etcd/member_controller.go:41— etcdMemberHandler.sync has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (21 pts) (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
clientaccess.appendCertsFromPEM (cognitive 20) REDACTED:413— clientaccess.appendCertsFromPEM has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
watcher.listFilesIn (cognitive 20) pkg/deploy/controller.go:127— watcher.listFilesIn has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
handler.watchEndpointSlice (cognitive 20) pkg/etcd/apiaddresses_controller.go:50— handler.watchEndpointSlice has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (4 pts), match/switch 1 (2 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.
File.ToETCDSnapshotFile (cognitive 20) pkg/etcd/snapshot/types.go:182— File.ToETCDSnapshotFile has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16 (20 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
server.writeKubeConfig (cognitive 20) pkg/server/server.go:408— server.writeKubeConfig has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16 (20 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
flannel.LookupExtInterface (cognitive 19) pkg/agent/flannel/flannel.go:132— flannel.LookupExtInterface has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (19 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
netpol.Run (cognitive 19) REDACTED:58— netpol.Run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (15 pts), loops 3, boolean chains 1 (nesting depth added 2). Of this number, 10 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
agentTunnel.authorized (cognitive 19) pkg/agent/tunnel/tunnel.go:348— agentTunnel.authorized has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (17 pts), boolean chains 2 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
agent.extractConfigArgs (cognitive 19) pkg/daemons/agent/agent.go:103— agent.extractConfigArgs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
agent.kubeletArgsAndConfig (cognitive 19) pkg/daemons/agent/agent_linux.go:72— agent.kubeletArgsAndConfig has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ETCD.Register (cognitive 19) REDACTED:649— ETCD.Register has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (19 pts) (nesting depth added 10). Of this number, 12 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
handler.serviceChanged (cognitive 19) pkg/rootlessports/controller.go:69— handler.serviceChanged has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 5 (7 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
util.getIPFromInterface (cognitive 19) pkg/util/net.go:292— util.getIPFromInterface has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
agent.waitForAPIServerAddresses (cognitive 18) pkg/agent/run.go:495— agent.waitForAPIServerAddresses has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
agent.Run (cognitive 18) pkg/cli/agent/agent.go:31— agent.Run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 2 (nesting depth added 3). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
secretsencrypt.Status (cognitive 18) pkg/cli/secretsencrypt/secrets_encrypt.go:88— secretsencrypt.Status has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (15 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
k3s.getStatus (cognitive 18) REDACTED:342— k3s.getStatus has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
etcd.backupDirWithRetention (cognitive 18) REDACTED:1563— etcd.backupDirWithRetention has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ETCD.Test (cognitive 18) REDACTED:198— ETCD.Test has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
auth.NewNonResourceGroupAuthorizer (cognitive 18) pkg/server/auth/auth.go:166— auth.NewNonResourceGroupAuthorizer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (3 pts) (nesting depth added 7). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 185). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
handlers.reencryptAndRemoveKey (cognitive 18) pkg/server/handlers/secrets-encrypt.go:394— handlers.reencryptAndRemoveKey has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 4, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
containerd.labelContent (cognitive 17) pkg/agent/containerd/containerd.go:369— containerd.labelContent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
flannel.syncAnnotations (cognitive 17) pkg/agent/flannel/setup.go:306— flannel.syncAnnotations has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cluster.shouldBootstrapLoad (cognitive 17) pkg/cluster/bootstrap.go:91— Cluster.shouldBootstrapLoad has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TunnelServer.onChangeNode (cognitive 17) pkg/daemons/control/tunnel.go:118— TunnelServer.onChangeNode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
deploy.Stage (cognitive 17) pkg/deploy/stage.go:22— deploy.Stage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (5 pts), jumps 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ETCD.Start (cognitive 17) REDACTED:434— ETCD.Start has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 1 (2 pts) (nesting depth added 6). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
File.FromETCDSnapshotFile (cognitive 17) pkg/etcd/snapshot/types.go:118— File.FromETCDSnapshotFile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
secretsencrypt.GetEncryptionConfigMetrics (cognitive 17) pkg/secretsencrypt/config.go:320— secretsencrypt.GetEncryptionConfigMetrics has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 3). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 338). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
containerd.getDigests (cognitive 16) pkg/agent/containerd/containerd.go:407— containerd.getDigests has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
serverList.setAddresses (cognitive 16) pkg/agent/loadbalancer/servers.go:39— serverList.setAddresses has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3, boolean chains 2 (nesting depth added 4). Of this number, 13 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cert.backupCertificates (cognitive 16) pkg/cli/cert/cert.go:324— cert.backupCertificates has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
token.list (cognitive 16) pkg/cli/token/token.go:199— token.list has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (3 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clientaccess.hashCA (cognitive 16) REDACTED:166— clientaccess.hashCA has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
deploy.walkFiles (cognitive 16) pkg/deploy/controller.go:178— deploy.walkFiles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (16 pts) (nesting depth added 8). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 180). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
watcher.delete (cognitive 16) pkg/deploy/controller.go:300— watcher.delete has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 1, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Embedded.Bootstrap (cognitive 16) pkg/executor/embed/embed.go:137— Embedded.Bootstrap has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 7). Of this number, 13 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
handlers.validateBootstrap (cognitive 16) pkg/server/handlers/cert.go:134— handlers.validateBootstrap has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
handlers.validateCA (cognitive 16) pkg/server/handlers/cert.go:172— handlers.validateCA has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
util.GetAddressesFromSlices (cognitive 16) pkg/util/api.go:55— util.GetAddressesFromSlices has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClassTooLong: ETCD REDACTED:109— ClassTooLong — 715 significant lines (blank, comment-only and punctuation-only lines excluded), 65 methods, 42 blocks, lines 109-1684. The bar is 400 significant lines; this is 315 over it, 1.79× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (4 members, 50+ identical tokens) pkg/etcd/snapshot_handler.go:78— pkg/etcd/snapshot_handler.go:78-93 | pkg/etcd/snapshot_handler.go:95-110 | pkg/etcd/snapshot_handler.go:112-127 | pkg/etcd/snapshot_handler.go:129-150 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (38 corresponding lines) · ×1
Edited copy of a member (38 corresponding lines) cmd/server/main.go:50— cmd/server/main.go:50-102 | main.go:35-72 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×1
Edited copy of a member (20 corresponding lines) pkg/agent/flannel/flannel.go:238— pkg/agent/flannel/flannel.go:238-257 | pkg/agent/flannel/flannel.go:272-291 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (36 corresponding lines) · ×1
Edited copy of a member (36 corresponding lines) pkg/cli/etcdsnapshot/etcd_snapshot.go:111— pkg/cli/etcdsnapshot/etcd_snapshot.go:111-146 | pkg/cli/etcdsnapshot/etcd_snapshot.go:155-192 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×1
Edited copy of a member (16 corresponding lines) pkg/agent/flannel/setup.go:142— pkg/agent/flannel/setup.go:142-157 | pkg/daemons/control/server.go:453-472 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×1
Edited copy of a member (24 corresponding lines) pkg/dataverify/dataverify.go:34— pkg/dataverify/dataverify.go:34-57 | pkg/dataverify/dataverify.go:60-83 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 20+ corresponding lines) · ×1
Edited copies of one member (4 members, 20+ corresponding lines) pkg/executor/embed/embed.go:197— pkg/executor/embed/embed.go:197-216 | pkg/executor/embed/embed.go:218-237 | pkg/executor/embed/embed.go:272-292 | pkg/executor/embed/embed.go:294-313 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×1
Edited copy of a member (19 corresponding lines) pkg/cli/secretsencrypt/secrets_encrypt.go:25— pkg/cli/secretsencrypt/secrets_encrypt.go:25-44 | pkg/cli/token/token.go:172-190 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 14+ corresponding lines) · ×1
Edited copies of one member (3 members, 14+ corresponding lines) REDACTED:315— REDACTED:315-328 | REDACTED:331-344 | REDACTED:347-360 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×1
Edited copy of a member (21 corresponding lines) REDACTED:231— REDACTED:231-251 | REDACTED:255-281 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 18+ corresponding lines) · ×1
Edited copies of one member (6 members, 18+ corresponding lines) pkg/cli/secretsencrypt/secrets_encrypt.go:50— pkg/cli/secretsencrypt/secrets_encrypt.go:50-67 | pkg/cli/secretsencrypt/secrets_encrypt.go:69-86 | pkg/cli/secretsencrypt/secrets_encrypt.go:152-172 | pkg/cli/secretsencrypt/secrets_encrypt.go:174-194 | pkg/cli/secretsencrypt/secrets_encrypt.go:196-217 | pkg/cli/secretsencrypt/secrets_encrypt.go:219-239 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×1
Edited copy of a member (11 corresponding lines) pkg/agent/flannel/flannel.go:226— pkg/agent/flannel/flannel.go:226-236 | pkg/agent/flannel/flannel.go:260-270 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×1
Edited copy of a member (9 corresponding lines) pkg/server/handlers/handlers.go:52— pkg/server/handlers/handlers.go:52-60 | pkg/server/handlers/handlers.go:188-200 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 14+ corresponding lines) · ×1
Edited copies of one member (4 members, 14+ corresponding lines) cmd/cert/main.go:15— cmd/cert/main.go:15-28 | cmd/encrypt/main.go:15-32 | cmd/etcdsnapshot/main.go:15-29 | cmd/token/main.go:15-30 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×1
Edited copy of a member (7 corresponding lines) REDACTED:366— REDACTED:366-372 | REDACTED:376-386 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×1
Edited copies of one member (3 members, 13+ corresponding lines) pkg/etcd/store/store.go:112— pkg/etcd/store/store.go:112-124 | pkg/etcd/store/store.go:126-139 | pkg/etcd/store/store.go:141-154 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (31–32 lines × 2) pkg/daemons/agent/agent_linux.go:99— pkg/daemons/agent/agent_linux.go:99-130 | pkg/daemons/agent/agent_windows.go:63-93 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/daemons/agent/agent_linux.go:99` 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 (27–28 lines × 2) cmd/server/main.go:72— cmd/server/main.go:72-99 | main.go:43-69 — before extracting anything, compare `cmd/server/main.go` and `main.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/server/main.go:72` 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 (23 lines × 2) REDACTED:487— REDACTED:487-509 | REDACTED:544-566 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:487` 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 (19 lines × 2) pkg/agent/config/config.go:248— pkg/agent/config/config.go:248-266 | pkg/agent/config/config.go:353-371 — 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/agent/config/config.go:248` 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 (18 lines × 3) pkg/agent/config/config.go:255— pkg/agent/config/config.go:255-272 | pkg/agent/config/config.go:299-316 | pkg/agent/config/config.go:360-377 — 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/agent/config/config.go:255` 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 (17–18 lines × 2) pkg/daemons/agent/agent_linux.go:73— pkg/daemons/agent/agent_linux.go:73-90 | pkg/daemons/agent/agent_windows.go:45-61 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/daemons/agent/agent_linux.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 (17 lines × 2) pkg/cli/cert/cert.go:203— pkg/cli/cert/cert.go:203-219 | pkg/cli/cert/cert.go:262-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/cli/cert/cert.go:203` 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 (16 lines × 3) pkg/daemons/control/deps/deps.go:829— pkg/daemons/control/deps/deps.go:829-844 | pkg/secretsencrypt/config.go:159-174 | pkg/secretsencrypt/config.go:188-203 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. 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) REDACTED:117— REDACTED:117-132 | REDACTED:167-182 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (14 lines × 3) REDACTED:491— REDACTED:491-504 | REDACTED:519-532 | REDACTED:548-561 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:491` 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 × 3) pkg/cli/etcdsnapshot/etcd_snapshot.go:128— pkg/cli/etcdsnapshot/etcd_snapshot.go:128-139 | pkg/cli/etcdsnapshot/etcd_snapshot.go:169-180 | pkg/cli/etcdsnapshot/etcd_snapshot.go:287-298 — 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. 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/cli/secretsencrypt/secrets_encrypt.go:31— pkg/cli/secretsencrypt/secrets_encrypt.go:31-42 | pkg/cli/token/token.go:177-188 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) pkg/util/patch.go:68— pkg/util/patch.go:68-75 | pkg/util/patch.go:86-93 — 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/util/patch.go:68` 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 × 4) pkg/etcd/snapshot_handler.go:80— pkg/etcd/snapshot_handler.go:80-85 | pkg/etcd/snapshot_handler.go:97-102 | pkg/etcd/snapshot_handler.go:114-119 | pkg/etcd/snapshot_handler.go:137-142 — 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/etcd/snapshot_handler.go:80` 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 × 7) pkg/agent/cridockerd/cridockerd.go:36— pkg/agent/cridockerd/cridockerd.go:36-41 | pkg/executor/embed/embed.go:203-208 | pkg/executor/embed/embed.go:224-229 | pkg/executor/embed/embed.go:257-262 | pkg/executor/embed/embed.go:279-284 | pkg/executor/embed/embed.go:300-305 | pkg/executor/embed/embed.go:345-350 — there are 7 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `pkg/executor/embed/embed.go:277` calls `APIServerReadyChan` and `pkg/executor/embed/embed.go:343` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Low cohesion: Embedded (LCOM4 4) pkg/executor/embed/embed.go:60— Embedded's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
P12 · CI test-gate honesty· Coverage collected but not gated · ×1
Coverage collected but not gated — CI collects a coverage report but no step enforces a minimum — coverage could halve and CI stays green. Add a step that fails the build when coverage drops below a floor (your coverage tool's minimum-threshold flag, or a coverage-gate action) so the number guards something. What was searched, so you can tell an absence from a miss: this repository's CI files AND its coverage configuration — the well-known coverage and test-runner config files, read at the repository root and inside workspace package directories two levels down, so a floor declared beside the tests rather than in the pipeline is credited — matched against the threshold settings this check knows by name. A floor set in your coverage service's web UI rather than in a committed file, or under a setting whose name is not one of those, is not seen here.
Outbound HTTP without resilience pkg/configfilearg/parser.go:341— `http.Get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Orphaned file REDACTED:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/dataverify/dataverify.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/authenticator/passwordfile/passwordfile.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/rootless/mounts.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/passwd/passwd.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Duplicated predicate pkg/cli/etcdsnapshot/etcd_snapshot.go:54— `!app.IsSet("etcd-s3-retention") && app.IsSet("etcd-snapshot-retention")` appears character-identically in 2 files — pkg/cli/etcdsnapshot/etcd_snapshot.go, pkg/cli/server/server.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate pkg/cli/agent/agent.go:90— `cmds.AgentConfig.FlannelIface != "" && len(cmds.AgentConfig.NodeIP.Value()) == 0` appears character-identically in 2 files — pkg/cli/agent/agent.go, pkg/cli/server/server.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:93— `cond.Type == v1.NodeReady && cond.Status == v1.ConditionTrue` appears character-identically in 2 files — REDACTED, pkg/agent/tunnel/tunnel.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate pkg/agent/containerd/containerd.go:112— `err != nil && !errors.Is(err, context.Canceled)` appears character-identically in 5 files — pkg/agent/containerd/containerd.go, pkg/agent/cridockerd/cridockerd.go, pkg/agent/flannel/setup.go, pkg/agent/tunnel/tunnel.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:179— `len(cert.AuthorityKeyId) == 0 || bytes.Equal(cert.AuthorityKeyId, cert.SubjectKeyId)` appears character-identically in 2 files — REDACTED, pkg/server/handlers/cert.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
No seccomp profile manifests/coredns.yaml:82— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
No seccomp profile REDACTED:39— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
No seccomp profile REDACTED:9— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
No seccomp profile REDACTED:15— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 24 significant file(s) lose their only recent owner: pkg/agent/tunnel/tunnel.go, pkg/cluster/bootstrap.go, REDACTED, pkg/agent/loadbalancer/servers.go, pkg/etcd/snapshot_controller.go, pkg/util/api.go, pkg/daemons/agent/agent.go, pkg/configfilearg/parser.go (+16 more). Pair on, review, or document these before any departure.
ADR Consequences section is empty docs/adrs/flannel-options.md:117— docs/adrs/flannel-options.md:117 heads a Consequences section with nothing under it but a placeholder. A decision record states the context that forced it, the decision and its consequences; write what this one's consequences are.
D20 · ADR Quality· ADR has no Consequences section · ×1
ADR has no Consequences section docs/adrs/multus.md:1— docs/adrs/multus.md has no Consequences section (a heading such as `## Consequences`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
D20 · ADR Quality· ADR decides a question another record already decided · ×1
ADR decides a question another record already decided docs/adrs/record-architecture-decisions.md:1— docs/adrs/record-architecture-decisions.md and docs/adrs/flannel-options.md are both in force and decide the same question ("Record architecture decisions"), and neither names the other. If this record replaces the earlier one, say so ("Supersedes …") and mark the earlier one superseded; if both hold, state how they relate.
Scattered collaborators — 58 % of calls cross a namespace and only 38 % of collaborators are co-located — group each feature's code into a vertical slice so a call's collaborators sit together.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 5 of 100 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 100 of the 236 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: REDACTED, pkg/dataverify/dataverify.go, pkg/authenticator/passwordfile/passwordfile.go, pkg/rootless/mounts.go, pkg/passwd/passwd.go. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D40 · Network Egress Confinement· No network policy · ×1
No network policy — No Kubernetes NetworkPolicy (or Cilium policy) found. Without one, every pod can talk to every other pod and reach out to the internet by default. Add a default-deny policy and open only the flows you need.
P3 · Security & performance tooling· Dependabot does not watch gomod · ×1
Dependabot does not watch gomod REDACTED:2— `REDACTED` schedules updates, but no `package-ecosystem` entry covers `gomod`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the `updates:` list.
No release approval gate — Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it.
X2 · Cancellation propagation· Not all functions that make a request accept a context.Context · ×1
Not all functions that make a request accept a context.Context — Only 2/7 functions that make a cancellable request (net/http, net.Dial) accept a context.Context or pass one on, so a request keeps running after whatever wanted it has given up — a cancelled request, a shutdown, an expired deadline. Take `ctx context.Context` as the first parameter and build the request with it (`http.NewRequestWithContext`, `DialContext`); where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
Outdated: github.com/containerd/stargz-snapshotter — `github.com/containerd/stargz-snapshotter` is required at v0.18.2 in REDACTED, but v0.19.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/containerd/stargz-snapshotter@v0.19.1 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/go-test/deep — `github.com/go-test/deep` is required at v1.0.7 in REDACTED, but v1.1.2 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/go-test/deep@v1.1.2 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/google/go-containerregistry — `github.com/google/go-containerregistry` is required at v0.20.2 in REDACTED, but v0.22.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/google/go-containerregistry@v0.22.1 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/ipfs/go-ds-leveldb — `github.com/ipfs/go-ds-leveldb` is required at v0.5.0 in REDACTED, but v0.5.3 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/ipfs/go-ds-leveldb@v0.5.3 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/klauspost/compress — `github.com/klauspost/compress` is required at v1.20.3 in REDACTED, but v1.20.4 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/klauspost/compress@v1.20.4 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/libp2p/go-libp2p — `github.com/libp2p/go-libp2p` is required at v0.50.0 in REDACTED, but v0.51.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/libp2p/go-libp2p@v0.51.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/minio/minio-go/v7 — `github.com/minio/minio-go/v7` is required at v7.3.0 in REDACTED, but v7.4.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/minio/minio-go/v7@v7.4.1 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/onsi/ginkgo/v2 — `github.com/onsi/ginkgo/v2` is required at v2.33.0 in REDACTED, but v2.34.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/onsi/ginkgo/v2@v2.34.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/opencontainers/cgroups — `github.com/opencontainers/cgroups` is required at v0.0.7 in REDACTED, but v0.1.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/opencontainers/cgroups@v0.1.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/rancher/dynamiclistener — `github.com/rancher/dynamiclistener` is required at v0.9.1-0.20260710234258-e4a1908ede0d in REDACTED, but v0.10.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/rancher/dynamiclistener@v0.10.1 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/rancher/lasso — `github.com/rancher/lasso` is required at v0.2.9 in REDACTED, but v0.2.10 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/rancher/lasso@v0.2.10 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/rancher/remotedialer — `github.com/rancher/remotedialer` is required at v0.6.0-rc.1.0.20250916111157-f160aa32568d in REDACTED, but v0.6.2 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/rancher/remotedialer@v0.6.2 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/rancher/wrangler/v3 — `github.com/rancher/wrangler/v3` is required at v3.7.0 in REDACTED, but v3.8.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/rancher/wrangler/v3@v3.8.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/rootless-containers/rootlesskit/v3 — `github.com/rootless-containers/rootlesskit/v3` is required at v3.2.0 in REDACTED, but v3.3.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/rootless-containers/rootlesskit/v3@v3.3.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: golang.org/x/mod — `golang.org/x/mod` is required at v0.42.0 in REDACTED, but v0.43.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/mod@v0.43.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: golang.org/x/sync — `golang.org/x/sync` is required at v0.24.0 in REDACTED, but v0.25.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/sync@v0.25.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
runtime-hardening: not applicable — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.
Run 01a1d4df-1115-71d7-9efe-129d3d5112b6 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 39 · Warnings: 358 · Recommendations: 49 · Info: 16 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 13-11-2026 @ 12:25 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.