Public report of slimtoolkit/slim, 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:54 UTC · Survey ID cd_7de17c33d7fa47e6a9c44a7ae562de22
slimtoolkit/slim
Measured 13 November 2026, 12:54 UTC, at code version 9768052
CAI scoreAt riskUp 3 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: 51,576 lines of product code in 2 projects, tests not counted · Estimated rebuild effort: about 0.5 person-years · Weakest lens: Production Readiness, 57
Findings by how serious they are
20 critical702 serious175 minor
32 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:54 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 ▸
42of 42 dimensions measured by tools.
848of 897 findings point to an exact file and line, so you can open each one in the code. The other 49 concern the repository as a whole, such as missing documentation.
42dimensions across 5 lenses, read from 51,576 lines of product code in 2 projects.
slimtoolkit/slim is rated At risk because critical security findings are open, most of them in the packages it uses. Its score is held back because we found no working pipeline that builds or tests changes to the code. It scores 63 out of 100, which the At risk rating leaves unchanged.
Production Readiness, at 57, is the weakest lens and counts most in the score. The best first step is pinning the dependencies to tagged releases, worth about 6 points. Adding an automated build and test pipeline would lift Production Readiness itself, worth about 5 points. Raising Production Readiness to 70 would lift the score to about 67.
Twelve known security holes in the packages the code depends on can be used by attackers. Two connections skip the certificate check, so they accept any server, and two passwords or keys are open to anyone who can read the repository. Updating the vulnerable packages, switching the certificate checks back on and replacing each exposed password or key would close these risks. Setting a waiting period for automatic updates would fix the automatic dependency update that takes a new release at once, and the two unsafe settings in infrastructure or container files need changing to safe values.
The product code is 51,576 lines, about €73,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.
If Production Readiness rose from 57 to 70, the lowest score rated Strong, the score would rise from 63 to about 67.
Code composition: what the lines of code are
Product code 96%Tests 4%
New since the last survey: 50 findings
These 50 critical or serious findings weren't in the previous survey, on 24 October 2026.
Code Duplication · Edited copy of a member (84 corresponding lines) pkg/docker/dockerfile/ast/line_parsers.go
Code Duplication · Edited copy of a member (42 corresponding lines) pkg/app/master/command/debug/handle_kubernetes_runtime.go
Code Duplication · Edited copy of a member (41 corresponding lines) pkg/app/execontext.go
Code Duplication · Edited copies of one member (3 members, 44+ corresponding lines) pkg/app/master/command/xray/cli.go
Code Duplication · Edited copy of a member (32 corresponding lines) pkg/app/master/command/clifvparser.go
Code Duplication · Edited copy of a member (30 corresponding lines) pkg/pdiscover/pevents_linux.go
Code Duplication · Edited copy of a member (37 corresponding lines) pkg/app/master/command/debug/prompt.go
Code Duplication · Edited copies of one member (5 members, 34+ corresponding lines) pkg/docker/linter/check/id20010.go
Code Duplication · Edited copies of one member (3 members, 36+ corresponding lines) pkg/app/master/command/containerize/cli.go
Code Duplication · Edited copy of a member (28 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (36 corresponding lines) pkg/app/master/probe/http/swagger.go
Code Duplication · Edited copy of a member (28 corresponding lines) pkg/launcher/launcher.go
Code Duplication · Edited copy of a member (35 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (38 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (24 corresponding lines) pkg/app/master/command/install/cli.go
Code Duplication · Edited copy of a member (35 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (24 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (30 corresponding lines) pkg/pdiscover/pevents_linux.go
Code Duplication · Edited copy of a member (31 corresponding lines) pkg/app/master/command/common.go
Code Duplication · Edited copy of a member (31 corresponding lines) pkg/docker/linter/check/id20004.go
Code Duplication · Edited copy of a member (24 corresponding lines) pkg/app/master/command/registry/handler_push.go
Code Duplication · Edited copies of one member (3 members, 27+ corresponding lines) pkg/app/execontext.go
Code Duplication · Edited copy of a member (23 corresponding lines) pkg/app/master/compose/execution.go
Code Duplication · Edited copy of a member (21 corresponding lines) pkg/vulnerability/epss/api/api.go
Code Duplication · Edited copies of one member (5 members, 26+ corresponding lines) pkg/docker/linter/check/id20003.go
Code Duplication · Edited copy of a member (20 corresponding lines) pkg/pdiscover/pevents.go
Code Duplication · Edited copies of one member (3 members, 19+ corresponding lines) pkg/vulnerability/epss/client/client.go
Code Duplication · Edited copy of a member (18 corresponding lines) pkg/app/master/command/vulnerability/handler_tool_epss.go
Code Duplication · Edited copy of a member (17 corresponding lines) pkg/app/master/command/images/handler.go
Code Duplication · Edited copy of a member (21 corresponding lines) pkg/app/master/command/install/handler.go
Code Duplication · Edited copy of a member (18 corresponding lines) pkg/app/master/command/cliprompt.go
Code Duplication · Edited copy of a member (17 corresponding lines) pkg/app/master/command/debug/handle_kubernetes_runtime.go
Code Duplication · Edited copies of one member (4 members, 24+ corresponding lines) pkg/app/master/command/appbom/cli.go
Code Duplication · Edited copies of one member (3 members, 19+ corresponding lines) pkg/sysidentity/sysidentity.go
Code Duplication · Edited copy of a member (23 corresponding lines) pkg/app/sensor/monitor/fanotify/monitor.go
Code Duplication · Edited copy of a member (20 corresponding lines) pkg/app/master/command/install/handler.go
Code Duplication · Edited copy of a member (17 corresponding lines) pkg/app/master/command/debug/handle_kubernetes_runtime.go
Code Duplication · Edited copy of a member (18 corresponding lines) pkg/app/master/inspectors/container/container_inspector.go
Code Duplication · Edited copy of a member (16 corresponding lines) pkg/monitor/ptrace/ptrace.go
Code Duplication · Edited copy of a member (17 corresponding lines) pkg/app/execontext.go
Code Duplication · Edited copy of a member (14 corresponding lines) pkg/vulnerability/epss/client/client.go
Code Duplication · Edited copy of a member (13 corresponding lines) pkg/app/master/command/install/prompt.go
Code Duplication · Edited copy of a member (17 corresponding lines) pkg/app/sensor/controlled/controlled.go
Code Duplication · Edited copy of a member (18 corresponding lines) pkg/app/master/command/clifvparser.go
Code Duplication · Edited copy of a member (14 corresponding lines) pkg/app/master/compose/execution.go
Code Duplication · Edited copy of a member (12 corresponding lines) pkg/app/master/inspectors/container/container_inspector.go
Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) pkg/docker/linter/check/id10002.go
Code Duplication · Edited copy of a member (8 corresponding lines) pkg/sysidentity/sysidentity.go
Code Duplication · Edited copy of a member (11 corresponding lines) pkg/app/sensor/controlled/controlled.go
Explicit Debt · TodoComment repeated across 12 files REDACTED
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: 5 findings
These 5 critical or serious findings were in the previous survey, on 24 October 2026, and are gone from this one.
€24,000 to €120,000, for 405 to 1,284 hours of work, about 0.5 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.9 at a score of 63. 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: 51,576 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 6 Dependency pinned to a stale untagged commit finding(s) in Dependency Hygiene.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with main.go.
Raises the score by about 3 points · Low effort · ADR Quality
3
Add a CI workflow that builds and runs the test suite on every push/PR.
Raises the score by about 5 points · Medium effort · CI/CD gates
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 €73,000 to build again, about 0.5 person-years of work. Its weakest lens is Production Readiness, at 57 (Adequate). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 6 Dependency pinned to a stale untagged commit finding(s) in Dependency Hygiene. Of all the actions in this report, it raises the score most for the work it takes: about 6 points for low effort, because it clears the 6 Dependency Hygiene 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 5.7 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 6% to 13% on every change. The history of the code shows how much it changes: about 47 lines over the last 90 days, which is about 191 lines a year. At that pace, the extra work comes to an estimated 0 to 0.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 — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
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.
121 modules, with 143 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; 81 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/slimtoolkit/slim/pkg/app/master/command uses com/slimtoolkit/slim/pkg/app, so a change to com/slimtoolkit/slim/pkg/app can break com/slimtoolkit/slim/pkg/app/master/command, while a change to com/slimtoolkit/slim/pkg/app/master/command can't break com/slimtoolkit/slim/pkg/app.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command uses com/slimtoolkit/slim/pkg/app/master/config, so a change to com/slimtoolkit/slim/pkg/app/master/config can break com/slimtoolkit/slim/pkg/app/master/command, while a change to com/slimtoolkit/slim/pkg/app/master/command can't break com/slimtoolkit/slim/pkg/app/master/config.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command uses com/slimtoolkit/slim/pkg/util/fsutil, so a change to com/slimtoolkit/slim/pkg/util/fsutil can break com/slimtoolkit/slim/pkg/app/master/command, while a change to com/slimtoolkit/slim/pkg/app/master/command can't break com/slimtoolkit/slim/pkg/util/fsutil.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/kubernetes uses com/slimtoolkit/slim/pkg/app/master/config, so a change to com/slimtoolkit/slim/pkg/app/master/config can break com/slimtoolkit/slim/pkg/app/master/kubernetes, while a change to com/slimtoolkit/slim/pkg/app/master/kubernetes can't break com/slimtoolkit/slim/pkg/app/master/config.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/kubernetes uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/docker/linter uses com/slimtoolkit/slim/pkg/docker/linter/check, so a change to com/slimtoolkit/slim/pkg/docker/linter/check can break com/slimtoolkit/slim/pkg/docker/linter, while a change to com/slimtoolkit/slim/pkg/docker/linter can't break com/slimtoolkit/slim/pkg/docker/linter/check.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/docker/linter uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/ipc/command uses com/slimtoolkit/slim/pkg/util/fsutil, so a change to com/slimtoolkit/slim/pkg/util/fsutil can break com/slimtoolkit/slim/pkg/ipc/command, while a change to com/slimtoolkit/slim/pkg/ipc/command can't break com/slimtoolkit/slim/pkg/util/fsutil.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/ipc/command uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/report uses com/slimtoolkit/slim/pkg/command, so a change to com/slimtoolkit/slim/pkg/command can break com/slimtoolkit/slim/pkg/report, while a change to com/slimtoolkit/slim/pkg/report can't break com/slimtoolkit/slim/pkg/command.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/report uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/report uses com/slimtoolkit/slim/pkg/docker/dockerimage, so a change to com/slimtoolkit/slim/pkg/docker/dockerimage can break com/slimtoolkit/slim/pkg/report, while a change to com/slimtoolkit/slim/pkg/report can't break com/slimtoolkit/slim/pkg/docker/dockerimage.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/report uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/report uses com/slimtoolkit/slim/pkg/docker/linter/check, so a change to com/slimtoolkit/slim/pkg/docker/linter/check can break com/slimtoolkit/slim/pkg/report, while a change to com/slimtoolkit/slim/pkg/report can't break com/slimtoolkit/slim/pkg/docker/linter/check.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/report uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/appbom uses com/slimtoolkit/slim/pkg/app, so a change to com/slimtoolkit/slim/pkg/app can break com/slimtoolkit/slim/pkg/app/master/command/appbom, while a change to com/slimtoolkit/slim/pkg/app/master/command/appbom can't break com/slimtoolkit/slim/pkg/app.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/appbom uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/appbom uses com/slimtoolkit/slim/pkg/app/master/command, so a change to com/slimtoolkit/slim/pkg/app/master/command can break com/slimtoolkit/slim/pkg/app/master/command/appbom, while a change to com/slimtoolkit/slim/pkg/app/master/command/appbom can't break com/slimtoolkit/slim/pkg/app/master/command.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/appbom uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/images uses com/slimtoolkit/slim/pkg/app, so a change to com/slimtoolkit/slim/pkg/app can break com/slimtoolkit/slim/pkg/app/master/command/images, while a change to com/slimtoolkit/slim/pkg/app/master/command/images can't break com/slimtoolkit/slim/pkg/app.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/images uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/images uses com/slimtoolkit/slim/pkg/app/master/command, so a change to com/slimtoolkit/slim/pkg/app/master/command can break com/slimtoolkit/slim/pkg/app/master/command/images, while a change to com/slimtoolkit/slim/pkg/app/master/command/images can't break com/slimtoolkit/slim/pkg/app/master/command.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/images uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/lint uses com/slimtoolkit/slim/pkg/app, so a change to com/slimtoolkit/slim/pkg/app can break com/slimtoolkit/slim/pkg/app/master/command/lint, while a change to com/slimtoolkit/slim/pkg/app/master/command/lint can't break com/slimtoolkit/slim/pkg/app.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/lint uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/lint uses com/slimtoolkit/slim/pkg/command, so a change to com/slimtoolkit/slim/pkg/command can break com/slimtoolkit/slim/pkg/app/master/command/lint, while a change to com/slimtoolkit/slim/pkg/app/master/command/lint can't break com/slimtoolkit/slim/pkg/command.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/lint uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/lint uses com/slimtoolkit/slim/pkg/docker/linter/check, so a change to com/slimtoolkit/slim/pkg/docker/linter/check can break com/slimtoolkit/slim/pkg/app/master/command/lint, while a change to com/slimtoolkit/slim/pkg/app/master/command/lint can't break com/slimtoolkit/slim/pkg/docker/linter/check.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/lint uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/lint uses com/slimtoolkit/slim/pkg/app/master/command, so a change to com/slimtoolkit/slim/pkg/app/master/command can break com/slimtoolkit/slim/pkg/app/master/command/lint, while a change to com/slimtoolkit/slim/pkg/app/master/command/lint can't break com/slimtoolkit/slim/pkg/app/master/command.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/lint uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/lint uses com/slimtoolkit/slim/pkg/docker/linter, so a change to com/slimtoolkit/slim/pkg/docker/linter can break com/slimtoolkit/slim/pkg/app/master/command/lint, while a change to com/slimtoolkit/slim/pkg/app/master/command/lint can't break com/slimtoolkit/slim/pkg/docker/linter.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/lint uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/lint uses com/slimtoolkit/slim/pkg/report, so a change to com/slimtoolkit/slim/pkg/report can break com/slimtoolkit/slim/pkg/app/master/command/lint, while a change to com/slimtoolkit/slim/pkg/app/master/command/lint can't break com/slimtoolkit/slim/pkg/report.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/lint uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/probe uses com/slimtoolkit/slim/pkg/app, so a change to com/slimtoolkit/slim/pkg/app can break com/slimtoolkit/slim/pkg/app/master/command/probe, while a change to com/slimtoolkit/slim/pkg/app/master/command/probe can't break com/slimtoolkit/slim/pkg/app.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/probe uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/probe uses com/slimtoolkit/slim/pkg/app/master/config, so a change to com/slimtoolkit/slim/pkg/app/master/config can break com/slimtoolkit/slim/pkg/app/master/command/probe, while a change to com/slimtoolkit/slim/pkg/app/master/command/probe can't break com/slimtoolkit/slim/pkg/app/master/config.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/probe uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/probe uses com/slimtoolkit/slim/pkg/app/master/command, so a change to com/slimtoolkit/slim/pkg/app/master/command can break com/slimtoolkit/slim/pkg/app/master/command/probe, while a change to com/slimtoolkit/slim/pkg/app/master/command/probe can't break com/slimtoolkit/slim/pkg/app/master/command.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/probe uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/profile uses com/slimtoolkit/slim/pkg/app, so a change to com/slimtoolkit/slim/pkg/app can break com/slimtoolkit/slim/pkg/app/master/command/profile, while a change to com/slimtoolkit/slim/pkg/app/master/command/profile can't break com/slimtoolkit/slim/pkg/app.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/profile uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/profile uses com/slimtoolkit/slim/pkg/app/master/config, so a change to com/slimtoolkit/slim/pkg/app/master/config can break com/slimtoolkit/slim/pkg/app/master/command/profile, while a change to com/slimtoolkit/slim/pkg/app/master/command/profile can't break com/slimtoolkit/slim/pkg/app/master/config.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/profile uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/profile uses com/slimtoolkit/slim/pkg/app/master/command, so a change to com/slimtoolkit/slim/pkg/app/master/command can break com/slimtoolkit/slim/pkg/app/master/command/profile, while a change to com/slimtoolkit/slim/pkg/app/master/command/profile can't break com/slimtoolkit/slim/pkg/app/master/command.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/profile uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/run uses com/slimtoolkit/slim/pkg/app, so a change to com/slimtoolkit/slim/pkg/app can break com/slimtoolkit/slim/pkg/app/master/command/run, while a change to com/slimtoolkit/slim/pkg/app/master/command/run can't break com/slimtoolkit/slim/pkg/app.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/run uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/run uses com/slimtoolkit/slim/pkg/app/master/config, so a change to com/slimtoolkit/slim/pkg/app/master/config can break com/slimtoolkit/slim/pkg/app/master/command/run, while a change to com/slimtoolkit/slim/pkg/app/master/command/run can't break com/slimtoolkit/slim/pkg/app/master/config.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/run uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/run uses com/slimtoolkit/slim/pkg/app/master/command, so a change to com/slimtoolkit/slim/pkg/app/master/command can break com/slimtoolkit/slim/pkg/app/master/command/run, while a change to com/slimtoolkit/slim/pkg/app/master/command/run can't break com/slimtoolkit/slim/pkg/app/master/command.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/run uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/vulnerability uses com/slimtoolkit/slim/pkg/app, so a change to com/slimtoolkit/slim/pkg/app can break com/slimtoolkit/slim/pkg/app/master/command/vulnerability, while a change to com/slimtoolkit/slim/pkg/app/master/command/vulnerability can't break com/slimtoolkit/slim/pkg/app.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/vulnerability uses a module listed above it, which is the healthy direction.
5 pairs of types, where a type in com/slimtoolkit/slim/pkg/app/master/command/vulnerability uses a type in com/slimtoolkit/slim/pkg/vulnerability/epss.
com/slimtoolkit/slim/pkg/app/master/command/vulnerability uses com/slimtoolkit/slim/pkg/vulnerability/epss, so a change to com/slimtoolkit/slim/pkg/vulnerability/epss can break com/slimtoolkit/slim/pkg/app/master/command/vulnerability, while a change to com/slimtoolkit/slim/pkg/app/master/command/vulnerability can't break com/slimtoolkit/slim/pkg/vulnerability/epss.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/vulnerability uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/vulnerability uses com/slimtoolkit/slim/pkg/app/master/command, so a change to com/slimtoolkit/slim/pkg/app/master/command can break com/slimtoolkit/slim/pkg/app/master/command/vulnerability, while a change to com/slimtoolkit/slim/pkg/app/master/command/vulnerability can't break com/slimtoolkit/slim/pkg/app/master/command.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/vulnerability uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/xray uses com/slimtoolkit/slim/pkg/app, so a change to com/slimtoolkit/slim/pkg/app can break com/slimtoolkit/slim/pkg/app/master/command/xray, while a change to com/slimtoolkit/slim/pkg/app/master/command/xray can't break com/slimtoolkit/slim/pkg/app.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/xray uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/xray uses com/slimtoolkit/slim/pkg/command, so a change to com/slimtoolkit/slim/pkg/command can break com/slimtoolkit/slim/pkg/app/master/command/xray, while a change to com/slimtoolkit/slim/pkg/app/master/command/xray can't break com/slimtoolkit/slim/pkg/command.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/xray uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/xray uses com/slimtoolkit/slim/pkg/docker/dockerimage, so a change to com/slimtoolkit/slim/pkg/docker/dockerimage can break com/slimtoolkit/slim/pkg/app/master/command/xray, while a change to com/slimtoolkit/slim/pkg/app/master/command/xray can't break com/slimtoolkit/slim/pkg/docker/dockerimage.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/xray uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/xray uses com/slimtoolkit/slim/pkg/app/master/command, so a change to com/slimtoolkit/slim/pkg/app/master/command can break com/slimtoolkit/slim/pkg/app/master/command/xray, while a change to com/slimtoolkit/slim/pkg/app/master/command/xray can't break com/slimtoolkit/slim/pkg/app/master/command.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/xray uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/xray uses com/slimtoolkit/slim/pkg/report, so a change to com/slimtoolkit/slim/pkg/report can break com/slimtoolkit/slim/pkg/app/master/command/xray, while a change to com/slimtoolkit/slim/pkg/app/master/command/xray can't break com/slimtoolkit/slim/pkg/report.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/xray uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/inspectors/ipc uses com/slimtoolkit/slim/pkg/ipc/event, so a change to com/slimtoolkit/slim/pkg/ipc/event can break com/slimtoolkit/slim/pkg/app/master/inspectors/ipc, while a change to com/slimtoolkit/slim/pkg/app/master/inspectors/ipc can't break com/slimtoolkit/slim/pkg/ipc/event.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/inspectors/ipc uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/inspectors/ipc uses com/slimtoolkit/slim/pkg/ipc/command, so a change to com/slimtoolkit/slim/pkg/ipc/command can break com/slimtoolkit/slim/pkg/app/master/inspectors/ipc, while a change to com/slimtoolkit/slim/pkg/app/master/inspectors/ipc can't break com/slimtoolkit/slim/pkg/ipc/command.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/inspectors/ipc uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/artifact uses com/slimtoolkit/slim/pkg/util/fsutil, so a change to com/slimtoolkit/slim/pkg/util/fsutil can break com/slimtoolkit/slim/pkg/app/sensor/artifact, while a change to com/slimtoolkit/slim/pkg/app/sensor/artifact can't break com/slimtoolkit/slim/pkg/util/fsutil.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/artifact uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/artifact uses com/slimtoolkit/slim/pkg/ipc/command, so a change to com/slimtoolkit/slim/pkg/ipc/command can break com/slimtoolkit/slim/pkg/app/sensor/artifact, while a change to com/slimtoolkit/slim/pkg/app/sensor/artifact can't break com/slimtoolkit/slim/pkg/ipc/command.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/artifact uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/artifact uses com/slimtoolkit/slim/pkg/report, so a change to com/slimtoolkit/slim/pkg/report can break com/slimtoolkit/slim/pkg/app/sensor/artifact, while a change to com/slimtoolkit/slim/pkg/app/sensor/artifact can't break com/slimtoolkit/slim/pkg/report.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/artifact uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/ipc uses com/slimtoolkit/slim/pkg/ipc/event, so a change to com/slimtoolkit/slim/pkg/ipc/event can break com/slimtoolkit/slim/pkg/app/sensor/ipc, while a change to com/slimtoolkit/slim/pkg/app/sensor/ipc can't break com/slimtoolkit/slim/pkg/ipc/event.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/ipc uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/ipc uses com/slimtoolkit/slim/pkg/ipc/command, so a change to com/slimtoolkit/slim/pkg/ipc/command can break com/slimtoolkit/slim/pkg/app/sensor/ipc, while a change to com/slimtoolkit/slim/pkg/app/sensor/ipc can't break com/slimtoolkit/slim/pkg/ipc/command.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/ipc uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/mondel uses com/slimtoolkit/slim/pkg/acounter, so a change to com/slimtoolkit/slim/pkg/acounter can break com/slimtoolkit/slim/pkg/mondel, while a change to com/slimtoolkit/slim/pkg/mondel can't break com/slimtoolkit/slim/pkg/acounter.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/mondel uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/mondel uses com/slimtoolkit/slim/pkg/report, so a change to com/slimtoolkit/slim/pkg/report can break com/slimtoolkit/slim/pkg/mondel, while a change to com/slimtoolkit/slim/pkg/mondel can't break com/slimtoolkit/slim/pkg/report.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/mondel uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/inspectors/container uses com/slimtoolkit/slim/pkg/app, so a change to com/slimtoolkit/slim/pkg/app can break com/slimtoolkit/slim/pkg/app/master/inspectors/container, while a change to com/slimtoolkit/slim/pkg/app/master/inspectors/container can't break com/slimtoolkit/slim/pkg/app.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/inspectors/container uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/inspectors/container uses com/slimtoolkit/slim/pkg/app/master/config, so a change to com/slimtoolkit/slim/pkg/app/master/config can break com/slimtoolkit/slim/pkg/app/master/inspectors/container, while a change to com/slimtoolkit/slim/pkg/app/master/inspectors/container can't break com/slimtoolkit/slim/pkg/app/master/config.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/inspectors/container uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in com/slimtoolkit/slim/pkg/app/master/inspectors/container uses a type in com/slimtoolkit/slim/pkg/app/master/inspectors/image.
com/slimtoolkit/slim/pkg/app/master/inspectors/container uses com/slimtoolkit/slim/pkg/app/master/inspectors/image, so a change to com/slimtoolkit/slim/pkg/app/master/inspectors/image can break com/slimtoolkit/slim/pkg/app/master/inspectors/container, while a change to com/slimtoolkit/slim/pkg/app/master/inspectors/container can't break com/slimtoolkit/slim/pkg/app/master/inspectors/image.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/inspectors/container uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/inspectors/container uses com/slimtoolkit/slim/pkg/util/fsutil, so a change to com/slimtoolkit/slim/pkg/util/fsutil can break com/slimtoolkit/slim/pkg/app/master/inspectors/container, while a change to com/slimtoolkit/slim/pkg/app/master/inspectors/container can't break com/slimtoolkit/slim/pkg/util/fsutil.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/inspectors/container uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in com/slimtoolkit/slim/pkg/app/master/inspectors/container uses a type in com/slimtoolkit/slim/pkg/app/master/inspectors/ipc.
com/slimtoolkit/slim/pkg/app/master/inspectors/container uses com/slimtoolkit/slim/pkg/app/master/inspectors/ipc, so a change to com/slimtoolkit/slim/pkg/app/master/inspectors/ipc can break com/slimtoolkit/slim/pkg/app/master/inspectors/container, while a change to com/slimtoolkit/slim/pkg/app/master/inspectors/container can't break com/slimtoolkit/slim/pkg/app/master/inspectors/ipc.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/inspectors/container uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/inspectors/pod uses com/slimtoolkit/slim/pkg/app, so a change to com/slimtoolkit/slim/pkg/app can break com/slimtoolkit/slim/pkg/app/master/inspectors/pod, while a change to com/slimtoolkit/slim/pkg/app/master/inspectors/pod can't break com/slimtoolkit/slim/pkg/app.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/inspectors/pod uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/inspectors/pod uses com/slimtoolkit/slim/pkg/app/master/config, so a change to com/slimtoolkit/slim/pkg/app/master/config can break com/slimtoolkit/slim/pkg/app/master/inspectors/pod, while a change to com/slimtoolkit/slim/pkg/app/master/inspectors/pod can't break com/slimtoolkit/slim/pkg/app/master/config.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/inspectors/pod uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in com/slimtoolkit/slim/pkg/app/master/inspectors/pod uses a type in com/slimtoolkit/slim/pkg/app/master/inspectors/image.
com/slimtoolkit/slim/pkg/app/master/inspectors/pod uses com/slimtoolkit/slim/pkg/app/master/inspectors/image, so a change to com/slimtoolkit/slim/pkg/app/master/inspectors/image can break com/slimtoolkit/slim/pkg/app/master/inspectors/pod, while a change to com/slimtoolkit/slim/pkg/app/master/inspectors/pod can't break com/slimtoolkit/slim/pkg/app/master/inspectors/image.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/inspectors/pod uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/inspectors/pod uses com/slimtoolkit/slim/pkg/util/fsutil, so a change to com/slimtoolkit/slim/pkg/util/fsutil can break com/slimtoolkit/slim/pkg/app/master/inspectors/pod, while a change to com/slimtoolkit/slim/pkg/app/master/inspectors/pod can't break com/slimtoolkit/slim/pkg/util/fsutil.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/inspectors/pod uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/inspectors/pod uses com/slimtoolkit/slim/pkg/app/master/kubernetes, so a change to com/slimtoolkit/slim/pkg/app/master/kubernetes can break com/slimtoolkit/slim/pkg/app/master/inspectors/pod, while a change to com/slimtoolkit/slim/pkg/app/master/inspectors/pod can't break com/slimtoolkit/slim/pkg/app/master/kubernetes.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/inspectors/pod uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/inspectors/pod uses com/slimtoolkit/slim/pkg/app/master/inspectors/ipc, so a change to com/slimtoolkit/slim/pkg/app/master/inspectors/ipc can break com/slimtoolkit/slim/pkg/app/master/inspectors/pod, while a change to com/slimtoolkit/slim/pkg/app/master/inspectors/pod can't break com/slimtoolkit/slim/pkg/app/master/inspectors/ipc.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/inspectors/pod uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/execution uses com/slimtoolkit/slim/pkg/acounter, so a change to com/slimtoolkit/slim/pkg/acounter can break com/slimtoolkit/slim/pkg/app/sensor/execution, while a change to com/slimtoolkit/slim/pkg/app/sensor/execution can't break com/slimtoolkit/slim/pkg/acounter.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/execution uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/execution uses com/slimtoolkit/slim/pkg/ipc/event, so a change to com/slimtoolkit/slim/pkg/ipc/event can break com/slimtoolkit/slim/pkg/app/sensor/execution, while a change to com/slimtoolkit/slim/pkg/app/sensor/execution can't break com/slimtoolkit/slim/pkg/ipc/event.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/execution uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/execution uses com/slimtoolkit/slim/pkg/ipc/command, so a change to com/slimtoolkit/slim/pkg/ipc/command can break com/slimtoolkit/slim/pkg/app/sensor/execution, while a change to com/slimtoolkit/slim/pkg/app/sensor/execution can't break com/slimtoolkit/slim/pkg/ipc/command.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/execution uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/execution uses com/slimtoolkit/slim/pkg/app/sensor/ipc, so a change to com/slimtoolkit/slim/pkg/app/sensor/ipc can break com/slimtoolkit/slim/pkg/app/sensor/execution, while a change to com/slimtoolkit/slim/pkg/app/sensor/execution can't break com/slimtoolkit/slim/pkg/app/sensor/ipc.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/execution uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/monitor/fanotify uses com/slimtoolkit/slim/pkg/report, so a change to com/slimtoolkit/slim/pkg/report can break com/slimtoolkit/slim/pkg/app/sensor/monitor/fanotify, while a change to com/slimtoolkit/slim/pkg/app/sensor/monitor/fanotify can't break com/slimtoolkit/slim/pkg/report.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/monitor/fanotify uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/monitor/fanotify uses com/slimtoolkit/slim/pkg/mondel, so a change to com/slimtoolkit/slim/pkg/mondel can break com/slimtoolkit/slim/pkg/app/sensor/monitor/fanotify, while a change to com/slimtoolkit/slim/pkg/app/sensor/monitor/fanotify can't break com/slimtoolkit/slim/pkg/mondel.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/monitor/fanotify uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/monitor/ptrace uses com/slimtoolkit/slim/pkg/report, so a change to com/slimtoolkit/slim/pkg/report can break com/slimtoolkit/slim/pkg/monitor/ptrace, while a change to com/slimtoolkit/slim/pkg/monitor/ptrace can't break com/slimtoolkit/slim/pkg/report.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/monitor/ptrace uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/monitor/ptrace uses com/slimtoolkit/slim/pkg/mondel, so a change to com/slimtoolkit/slim/pkg/mondel can break com/slimtoolkit/slim/pkg/monitor/ptrace, while a change to com/slimtoolkit/slim/pkg/monitor/ptrace can't break com/slimtoolkit/slim/pkg/mondel.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/monitor/ptrace uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/build uses com/slimtoolkit/slim/pkg/app, so a change to com/slimtoolkit/slim/pkg/app can break com/slimtoolkit/slim/pkg/app/master/command/build, while a change to com/slimtoolkit/slim/pkg/app/master/command/build can't break com/slimtoolkit/slim/pkg/app.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/build uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/build uses com/slimtoolkit/slim/pkg/app/master/config, so a change to com/slimtoolkit/slim/pkg/app/master/config can break com/slimtoolkit/slim/pkg/app/master/command/build, while a change to com/slimtoolkit/slim/pkg/app/master/command/build can't break com/slimtoolkit/slim/pkg/app/master/config.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/build uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in com/slimtoolkit/slim/pkg/app/master/command/build uses a type in com/slimtoolkit/slim/pkg/app/master/inspectors/image.
com/slimtoolkit/slim/pkg/app/master/command/build uses com/slimtoolkit/slim/pkg/app/master/inspectors/image, so a change to com/slimtoolkit/slim/pkg/app/master/inspectors/image can break com/slimtoolkit/slim/pkg/app/master/command/build, while a change to com/slimtoolkit/slim/pkg/app/master/command/build can't break com/slimtoolkit/slim/pkg/app/master/inspectors/image.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/build uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/build uses com/slimtoolkit/slim/pkg/imagebuilder, so a change to com/slimtoolkit/slim/pkg/imagebuilder can break com/slimtoolkit/slim/pkg/app/master/command/build, while a change to com/slimtoolkit/slim/pkg/app/master/command/build can't break com/slimtoolkit/slim/pkg/imagebuilder.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/build uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/build uses com/slimtoolkit/slim/pkg/util/fsutil, so a change to com/slimtoolkit/slim/pkg/util/fsutil can break com/slimtoolkit/slim/pkg/app/master/command/build, while a change to com/slimtoolkit/slim/pkg/app/master/command/build can't break com/slimtoolkit/slim/pkg/util/fsutil.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/build uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/build uses com/slimtoolkit/slim/pkg/app/master/command, so a change to com/slimtoolkit/slim/pkg/app/master/command can break com/slimtoolkit/slim/pkg/app/master/command/build, while a change to com/slimtoolkit/slim/pkg/app/master/command/build can't break com/slimtoolkit/slim/pkg/app/master/command.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/build uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/build uses com/slimtoolkit/slim/pkg/app/master/kubernetes, so a change to com/slimtoolkit/slim/pkg/app/master/kubernetes can break com/slimtoolkit/slim/pkg/app/master/command/build, while a change to com/slimtoolkit/slim/pkg/app/master/command/build can't break com/slimtoolkit/slim/pkg/app/master/kubernetes.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/build uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/build uses com/slimtoolkit/slim/pkg/report, so a change to com/slimtoolkit/slim/pkg/report can break com/slimtoolkit/slim/pkg/app/master/command/build, while a change to com/slimtoolkit/slim/pkg/app/master/command/build can't break com/slimtoolkit/slim/pkg/report.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/build uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in com/slimtoolkit/slim/pkg/app/master/command/build uses a type in com/slimtoolkit/slim/pkg/app/master/inspectors/container.
com/slimtoolkit/slim/pkg/app/master/command/build uses com/slimtoolkit/slim/pkg/app/master/inspectors/container, so a change to com/slimtoolkit/slim/pkg/app/master/inspectors/container can break com/slimtoolkit/slim/pkg/app/master/command/build, while a change to com/slimtoolkit/slim/pkg/app/master/command/build can't break com/slimtoolkit/slim/pkg/app/master/inspectors/container.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/build uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/command/build uses com/slimtoolkit/slim/pkg/app/master/inspectors/pod, so a change to com/slimtoolkit/slim/pkg/app/master/inspectors/pod can break com/slimtoolkit/slim/pkg/app/master/command/build, while a change to com/slimtoolkit/slim/pkg/app/master/command/build can't break com/slimtoolkit/slim/pkg/app/master/inspectors/pod.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/command/build uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/probe/http uses com/slimtoolkit/slim/pkg/acounter, so a change to com/slimtoolkit/slim/pkg/acounter can break com/slimtoolkit/slim/pkg/app/master/probe/http, while a change to com/slimtoolkit/slim/pkg/app/master/probe/http can't break com/slimtoolkit/slim/pkg/acounter.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/probe/http uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/probe/http uses com/slimtoolkit/slim/pkg/app, so a change to com/slimtoolkit/slim/pkg/app can break com/slimtoolkit/slim/pkg/app/master/probe/http, while a change to com/slimtoolkit/slim/pkg/app/master/probe/http can't break com/slimtoolkit/slim/pkg/app.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/probe/http uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/probe/http uses com/slimtoolkit/slim/pkg/app/master/config, so a change to com/slimtoolkit/slim/pkg/app/master/config can break com/slimtoolkit/slim/pkg/app/master/probe/http, while a change to com/slimtoolkit/slim/pkg/app/master/probe/http can't break com/slimtoolkit/slim/pkg/app/master/config.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/probe/http uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in com/slimtoolkit/slim/pkg/app/master/probe/http uses a type in com/slimtoolkit/slim/pkg/app/master/inspectors/container.
com/slimtoolkit/slim/pkg/app/master/probe/http uses com/slimtoolkit/slim/pkg/app/master/inspectors/container, so a change to com/slimtoolkit/slim/pkg/app/master/inspectors/container can break com/slimtoolkit/slim/pkg/app/master/probe/http, while a change to com/slimtoolkit/slim/pkg/app/master/probe/http can't break com/slimtoolkit/slim/pkg/app/master/inspectors/container.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/probe/http uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/master/probe/http uses com/slimtoolkit/slim/pkg/app/master/inspectors/pod, so a change to com/slimtoolkit/slim/pkg/app/master/inspectors/pod can break com/slimtoolkit/slim/pkg/app/master/probe/http, while a change to com/slimtoolkit/slim/pkg/app/master/probe/http can't break com/slimtoolkit/slim/pkg/app/master/inspectors/pod.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/master/probe/http uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor uses com/slimtoolkit/slim/pkg/app/sensor/artifact, so a change to com/slimtoolkit/slim/pkg/app/sensor/artifact can break com/slimtoolkit/slim/pkg/app/sensor, while a change to com/slimtoolkit/slim/pkg/app/sensor can't break com/slimtoolkit/slim/pkg/app/sensor/artifact.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor uses com/slimtoolkit/slim/pkg/mondel, so a change to com/slimtoolkit/slim/pkg/mondel can break com/slimtoolkit/slim/pkg/app/sensor, while a change to com/slimtoolkit/slim/pkg/app/sensor can't break com/slimtoolkit/slim/pkg/mondel.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor uses com/slimtoolkit/slim/pkg/app/sensor/execution, so a change to com/slimtoolkit/slim/pkg/app/sensor/execution can break com/slimtoolkit/slim/pkg/app/sensor, while a change to com/slimtoolkit/slim/pkg/app/sensor can't break com/slimtoolkit/slim/pkg/app/sensor/execution.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/monitor/ptrace uses com/slimtoolkit/slim/pkg/report, so a change to com/slimtoolkit/slim/pkg/report can break com/slimtoolkit/slim/pkg/app/sensor/monitor/ptrace, while a change to com/slimtoolkit/slim/pkg/app/sensor/monitor/ptrace can't break com/slimtoolkit/slim/pkg/report.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/monitor/ptrace uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/monitor/ptrace uses com/slimtoolkit/slim/pkg/mondel, so a change to com/slimtoolkit/slim/pkg/mondel can break com/slimtoolkit/slim/pkg/app/sensor/monitor/ptrace, while a change to com/slimtoolkit/slim/pkg/app/sensor/monitor/ptrace can't break com/slimtoolkit/slim/pkg/mondel.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/monitor/ptrace uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/monitor/ptrace uses com/slimtoolkit/slim/pkg/monitor/ptrace, so a change to com/slimtoolkit/slim/pkg/monitor/ptrace can break com/slimtoolkit/slim/pkg/app/sensor/monitor/ptrace, while a change to com/slimtoolkit/slim/pkg/app/sensor/monitor/ptrace can't break com/slimtoolkit/slim/pkg/monitor/ptrace.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/monitor/ptrace uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/monitor uses com/slimtoolkit/slim/pkg/ipc/command, so a change to com/slimtoolkit/slim/pkg/ipc/command can break com/slimtoolkit/slim/pkg/app/sensor/monitor, while a change to com/slimtoolkit/slim/pkg/app/sensor/monitor can't break com/slimtoolkit/slim/pkg/ipc/command.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/monitor uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/monitor uses com/slimtoolkit/slim/pkg/report, so a change to com/slimtoolkit/slim/pkg/report can break com/slimtoolkit/slim/pkg/app/sensor/monitor, while a change to com/slimtoolkit/slim/pkg/app/sensor/monitor can't break com/slimtoolkit/slim/pkg/report.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/monitor uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/monitor uses com/slimtoolkit/slim/pkg/mondel, so a change to com/slimtoolkit/slim/pkg/mondel can break com/slimtoolkit/slim/pkg/app/sensor/monitor, while a change to com/slimtoolkit/slim/pkg/app/sensor/monitor can't break com/slimtoolkit/slim/pkg/mondel.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/monitor uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/monitor uses com/slimtoolkit/slim/pkg/app/sensor/monitor/fanotify, so a change to com/slimtoolkit/slim/pkg/app/sensor/monitor/fanotify can break com/slimtoolkit/slim/pkg/app/sensor/monitor, while a change to com/slimtoolkit/slim/pkg/app/sensor/monitor can't break com/slimtoolkit/slim/pkg/app/sensor/monitor/fanotify.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/monitor uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/monitor uses com/slimtoolkit/slim/pkg/app/sensor/monitor/ptrace, so a change to com/slimtoolkit/slim/pkg/app/sensor/monitor/ptrace can break com/slimtoolkit/slim/pkg/app/sensor/monitor, while a change to com/slimtoolkit/slim/pkg/app/sensor/monitor can't break com/slimtoolkit/slim/pkg/app/sensor/monitor/ptrace.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/monitor uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/controlled uses com/slimtoolkit/slim/pkg/ipc/command, so a change to com/slimtoolkit/slim/pkg/ipc/command can break com/slimtoolkit/slim/pkg/app/sensor/controlled, while a change to com/slimtoolkit/slim/pkg/app/sensor/controlled can't break com/slimtoolkit/slim/pkg/ipc/command.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/controlled uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/controlled uses com/slimtoolkit/slim/pkg/app/sensor/artifact, so a change to com/slimtoolkit/slim/pkg/app/sensor/artifact can break com/slimtoolkit/slim/pkg/app/sensor/controlled, while a change to com/slimtoolkit/slim/pkg/app/sensor/controlled can't break com/slimtoolkit/slim/pkg/app/sensor/artifact.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/controlled uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/controlled uses com/slimtoolkit/slim/pkg/mondel, so a change to com/slimtoolkit/slim/pkg/mondel can break com/slimtoolkit/slim/pkg/app/sensor/controlled, while a change to com/slimtoolkit/slim/pkg/app/sensor/controlled can't break com/slimtoolkit/slim/pkg/mondel.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/controlled uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/controlled uses com/slimtoolkit/slim/pkg/app/sensor/execution, so a change to com/slimtoolkit/slim/pkg/app/sensor/execution can break com/slimtoolkit/slim/pkg/app/sensor/controlled, while a change to com/slimtoolkit/slim/pkg/app/sensor/controlled can't break com/slimtoolkit/slim/pkg/app/sensor/execution.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/controlled uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/controlled uses com/slimtoolkit/slim/pkg/app/sensor/monitor, so a change to com/slimtoolkit/slim/pkg/app/sensor/monitor can break com/slimtoolkit/slim/pkg/app/sensor/controlled, while a change to com/slimtoolkit/slim/pkg/app/sensor/controlled can't break com/slimtoolkit/slim/pkg/app/sensor/monitor.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/controlled uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/standalone uses com/slimtoolkit/slim/pkg/app/sensor/artifact, so a change to com/slimtoolkit/slim/pkg/app/sensor/artifact can break com/slimtoolkit/slim/pkg/app/sensor/standalone, while a change to com/slimtoolkit/slim/pkg/app/sensor/standalone can't break com/slimtoolkit/slim/pkg/app/sensor/artifact.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/standalone uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/standalone uses com/slimtoolkit/slim/pkg/mondel, so a change to com/slimtoolkit/slim/pkg/mondel can break com/slimtoolkit/slim/pkg/app/sensor/standalone, while a change to com/slimtoolkit/slim/pkg/app/sensor/standalone can't break com/slimtoolkit/slim/pkg/mondel.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/standalone uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/standalone uses com/slimtoolkit/slim/pkg/app/sensor/execution, so a change to com/slimtoolkit/slim/pkg/app/sensor/execution can break com/slimtoolkit/slim/pkg/app/sensor/standalone, while a change to com/slimtoolkit/slim/pkg/app/sensor/standalone can't break com/slimtoolkit/slim/pkg/app/sensor/execution.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/standalone uses a module listed above it, which is the healthy direction.
com/slimtoolkit/slim/pkg/app/sensor/standalone uses com/slimtoolkit/slim/pkg/app/sensor/monitor, so a change to com/slimtoolkit/slim/pkg/app/sensor/monitor can break com/slimtoolkit/slim/pkg/app/sensor/standalone, while a change to com/slimtoolkit/slim/pkg/app/sensor/standalone can't break com/slimtoolkit/slim/pkg/app/sensor/monitor.
Position
Below the diagonal: com/slimtoolkit/slim/pkg/app/sensor/standalone uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 63% · Adequate · gated by D1, D2 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
27
High / Critical
A03:2025 — Software Supply Chain Failures
22
High / Critical
A02:2025 — Security Misconfiguration
5
High / Critical
A07:2025 — Authentication Failures
3
High / Critical
Roadmap
Top priorities: Resolve the 6 Dependency pinned to a stale untagged commit finding(s) in Dependency Hygiene; Add a CI workflow that builds and runs the test suite on every push/PR; Resolve the 1 No ADRs found finding(s) in ADR Quality — start with main.go.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 6 Dependency pinned to a stale untagged commit finding(s) in Dependency Hygiene.
Your ecosystem's static analyzer is declared as a dependency but is not wired into CI — run it as a required step on push/PR (e.g. `composer phpstan` / `mix sobelow` / `bundle exec brakeman` / the spotbugs Gradle task / `sbt scalafixAll --check` / `golangci-lint run` / `rebar3 lint`) so a regression fails the build instead of relying on someone running it locally.
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Bring the 138 bodies over 15 down to 15 or less in Cognitive Complexity — start with dockerimage.LoadPackage (cognitive 538), store.saveArtifacts (cognitive 513), xray.printImagePackage (cognitive 400).
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 — 20
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 — 702
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 — 175
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 32
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 42 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.8, 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 — 42 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, 848 of 897 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 MEASURED: test source is present (.go) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo.
D14 License Compliance — 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. Not scored — this repository's REDACTED declares a Go language version older than 1.17 (or none), and before 1.17 a REDACTED lists only the modules version selection needs, not every module the build compiles. The licences are resolved per module version, so grading the modules that file happens to list would be a verdict over part of the dependency graph. NOT a finding that this repository's licences are compliant: this dimension asserts nothing about its licensing in either direction.
D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (72 contributor(s) across 1140 commit(s) sampled, automation and bot accounts excluded). One of them holds 81% of the history; the other 71 hold 0.3% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
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)` (51576 LoC, 480 module-visible types across 121 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 REDACTED (pkg/third_party/compose-go/scripts/validate/template/dockerfile.txt). docker build failed (exit 1) — #1 [internal] load build definition from dockerfile.txt #1 transferring dockerfile: 659B done #1 DONE 0.0s dockerfile.txt:14 -------------------- 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | >>> 15 | -------------------- ERROR: failed to solve: file with no instructions; 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.
ED5 Idempotency — 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 decides whether a handler's mutation is safe to re-run by recognising its persistence writes (a database save, a repository write, an event publish) and its guards. Those markers are .NET member names, so in this repository's language a write such as `repository.save(order)` is not recognised and a same-named call on an unrelated library type could be. The handlers were found; their idempotency was neither confirmed nor ruled out.
GD1 Unfinished & placeholder code — not measured this run — 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.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
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: 1 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
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.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
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").
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality 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.
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".
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.
+ 72 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 11 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with store.saveArtifacts (cyclomatic 191), dockerimage.LoadPackage (cyclomatic 173), build.OnCommand (cyclomatic 133). — 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 11 together lifts Cyclomatic Complexity from 2.0 to about 4.3/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
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.
+ 133 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 138 bodies over 15 down to 15 or less in Cognitive Complexity — start with dockerimage.LoadPackage (cognitive 538), store.saveArtifacts (cognitive 513), xray.printImagePackage (cognitive 400). — 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 138 together lifts Cognitive Complexity from 2.0 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes7.7 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 12 FileTooLong finding(s) in God Classes — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (12 warning-level).
Resolve the 11 FunctionTooLong finding(s) in God Classes — start with REDACTED (2), REDACTED (2), handle_kubernetes_runtime.go. — One of this dimension's main actionable groups (11 warning-level).
Resolve the 6 MethodTooLong finding(s) in God Classes — start with container_inspector.go, custom_probe.go, ptrace.go. — One of this dimension's main actionable groups (6 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.
136 duplicated block group(s) detected. A further 56 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
+ 97 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 13 Duplicated block (13 lines × 2) finding(s) in Code Duplication — start with prompt.go (2), controlled.go (2), REDACTED (2). — One of this dimension's main actionable groups (13 warning-level).
Resolve the 12 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with REDACTED (4), prompt.go, REDACTED. — One of this dimension's main actionable groups (12 warning-level).
Resolve the 7 Duplicated block (14 lines × 2) finding(s) in Code Duplication — start with REDACTED (2), REDACTED (2), cliprompt.go. — One of this dimension's main actionable groups (7 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
2 production modules (Go), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 0 module(s) off the main sequence, with abstractness counted on 1 of the 2 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
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.
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.
37 outdated, 0 author-deprecated direct Go module(s), 6 pinning or checksum defect(s). 51 of 51 direct requirement(s) were graded against proxy.golang.org (0 not served there, 4 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/c4milo/unpackit · ×6
Outdated: github.com/c-bata/go-prompt · ×37
What to do
Resolve the 6 Dependency pinned to a stale untagged commit finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (6 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: 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.
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.
215 deducted task-comment markers across 51576 LoC (0.4/KLoC) → score 9.2. 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.
Resolve the 195 TodoComment finding(s) in Explicit Debt — start with REDACTED (19), REDACTED (14), cli.go (12). — One of this dimension's main actionable groups (195 warning-level).
Resolve the 2 HackComment finding(s) in Explicit Debt — start with REDACTED, main.go. — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 TodoComment repeated across 12 files finding(s) in Explicit Debt — start with REDACTED. — 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. 2 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 Quality0.0 / 10Critical✓ 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.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with main.go. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D27 · Navigability8.3 / 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.
82 % of calls cross a namespace and 0 % go through an interface, but 58 % 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.
2 finding(s): 0 critical, 2 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 2 REDACTED finding(s) in Secrets (history) — start with REDACTED (2). — One of this dimension's main actionable groups (2 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).
27 finding(s): 0 critical, 4 high, 18 medium, 5 low. Separately, one or more rules could not re-parse an embedded snippet in 1 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
+ 9 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 (2). — 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).
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 10 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (10). — One of this dimension's main actionable groups (10 issue-level).
Resolve the 9 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (9). — One of this dimension's main actionable groups (9 warning-level).
Resolve the 2 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 2 High IaC finding(s) in IaC & Container Security — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 3 Medium IaC finding(s) in IaC & Container Security — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 warning-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.
119 of 120 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 120 of the 283 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 116 Orphaned file finding(s) in Knowledge Freshness — start with REDACTED (10), cli.go (9), flags.go (5). — One of this dimension's main actionable groups (116 recommendation-level).
Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 recommendation-level).
Resolve the 1 Concentrated knowledge decay finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
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 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 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 2 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 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 the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.
Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.
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 key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
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.
Do you agree with this assessment?
P1 · CI/CD gates0.0 / 10Critical✓ Tool-verified
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
What to do
Add a CI workflow that builds and runs the test suite on every push/PR.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
What to do
Your ecosystem's static analyzer is declared as a dependency but is not wired into CI — run it as a required step on push/PR (e.g. `composer phpstan` / `mix sobelow` / `bundle exec brakeman` / the spotbugs Gradle task / `sbt scalafixAll --check` / `golangci-lint run` / `rebar3 lint`) so a regression fails the build instead of relying on someone running it locally.
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.
What to do
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
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.
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/9 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.
`NewClient` calls `net.DialTimeout(…)` 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:282
`Check` 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:156
`downloadRelease` 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/app/master/update/update.go:148
`isGoodDownloadSource` 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/app/master/update/update.go:219
`getHTTP2Client` calls `net.Dial(…)` 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:31
`loadAPISpecFromEndpoint` 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/app/master/probe/http/swagger.go:97
`apiSpecEndpointCall` 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/app/master/probe/http/swagger.go:311
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 := os.Stat(target); 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:212
`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. (×16) — REDACTED:231, REDACTED:241, REDACTED:251, …
`if err := syscall.Uname(&unameInfo); 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/system/system_linux.go:13
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 — 1 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.
X10 Duplicated predicate — 8 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 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.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 70 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — 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.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No Go request handler (a net/http, Gin, Echo, Fiber or fasthttp handler, or a gRPC service method) is declared as a method or function, and no handler function literal writes a value captured from outside it, so no state is shared between request goroutines.
AX4 Dependency direction — not applicable to a CQRS architecture (the inward-dependency rule is for layered/clean styles)
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 — docker build failed (exit 1) — #1 [internal] load build definition from dockerfile.txt #1 transferring dockerfile: 659B done #1 DONE 0.0s dockerfile.txt:14 -------------------- 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | >>> 15 | -------------------- ERROR: failed to solve: file with no instructions; 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 — ~2242 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.
D14 License Compliance — Go module licences not graded — a REDACTED predates Go 1.17 and does not list its whole module graph
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
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. Aggregate roots were found in only one source directory (pkg), which is a layered codebase, not two contexts. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — 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 — no ADRs to check
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.
D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
DM1 Domain Modelling — applicable but not scored (1 of 2 signals for this style — below the bar we score at): 1 aggregate root(s) (types guarding their own state behind command methods — this language has no AggregateRoot base to inherit)
ED1 Event-Driven — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 5 CQRS handler(s); 2 event-sourced shape(s) (event folds / event-recording aggregates)
ED5 Idempotency — Not assessed, and this one is on us: 5 command handler(s) or message consumer(s) were found here, but this check does not yet recognise persistence writes in this repository's language. Idempotency was neither confirmed nor ruled out — this is a limit of the analyzer, not a finding about your code.
ES1 Event Sourcing — not scored — this repository shows only 1 of the 3 signals this lens looks for (2 Go aggregate(s) recording domain events (own events-slice append / raise-record))
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — no CI workflow found
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.
TodoComment pkg/vulnerability/epss/api/api.go:473— //todo: add field name validation — 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:874— //todo: refactor — 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:920— //todo: refactor — 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:941— //todo: refactor — 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:947— //TODO: should call CopySymlinkFile() here (instead of using os.Readlink/os.Symlink directly) — 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:949— //TODO: (add a flag) — 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:1004— //TODO: better symlink support — 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:1077— //TODO: better symlink support — 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:1093— //TODO: should clone directory permission, ownership and timestamps info — 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/test/e2e/sensor/sensor.go:229— // TODO: Refactor the IPC code to use context with a deadline. — 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/test/e2e/sensor/sensor.go:279— // TODO: Make sure we never pass 0s. — 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/test/e2e/sensor/sensor.go:351— // TODO: Use timeout from ctx. — 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/system/kernel_linux.go:147— //todo: extract section metadata from comments — 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/system/os_release.go:114— //TODO: Add LSB Release and Issue file parsers — 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/sysidentity/sysidentity.go:25— //todo: move to one of the runtime detection packages — 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/sysidentity/sysidentity.go:164— //todo: get the actual password infor from gshadow (if any) — 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/sysidentity/sysidentity.go:277— //todo: have an option to skip bad records — 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/sysidentity/sysidentity.go:476— //todo: have an option to skip bad records — 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/sysidentity/sysidentity.go:581— //todo: have an option to skip bad records — 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/report/container_report.go:120— //todo — 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/report/container_report.go:122— //todo — 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/report/container_report.go:130— //todo — 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/monitor/ptrace/ptrace.go:47— // TODO(ivan): includeNew & origPaths logic should be applied at the artifact dumping stage. — 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/monitor/ptrace/ptrace.go:277— //todo: filter "/proc/", "/sys/", "/dev/" externally — 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/monitor/ptrace/ptrace.go:739— // TODO(ivan): Investigate if this code branch leads to sensor becoming stuck. — 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.
Swallowed exception (caught, then discarded) REDACTED:212— `if _, err := os.Stat(target); 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:231— `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:241— `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:251— `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/system/system_linux.go:13— `if err := syscall.Uname(&unameInfo); 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/system/system_linux.go:43— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/pdiscover/pinfo_linux.go:21— `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/pdiscover/pinfo_linux.go:31— `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:340— `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/imagebuilder/internalbuilder/engine.go:282— `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/docker/dockerfile/reverse/reverse.go:699— `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/docker/dockerfile/reverse/reverse.go:707— `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:349— `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:1257— `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:2319— `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/app/master/docker/dockerhost/host.go:40— `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/app/master/docker/dockerhost/host.go:49— `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:638— `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.
Duplicated block (13 lines × 2) pkg/app/master/command/debug/prompt.go:114— pkg/app/master/command/debug/prompt.go:114-126 | pkg/app/master/command/debug/prompt.go:147-159 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) pkg/app/master/command/registry/cli.go:203— pkg/app/master/command/registry/cli.go:203-215 | pkg/app/master/command/run/cli.go:109-121 — 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 (13 lines × 2) pkg/app/master/command/registry/handler_pull.go:42— pkg/app/master/command/registry/handler_pull.go:42-54 | pkg/app/master/command/run/handler.go:42-54 — before extracting anything, compare `pkg/app/master/command/registry/handler_pull.go` and `pkg/app/master/command/run/handler.go` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `pkg/app/master/command/registry/handler_pull.go:42` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) pkg/app/master/probe/http/custom_probe.go:407— pkg/app/master/probe/http/custom_probe.go:407-419 | pkg/app/master/probe/http/swagger.go:312-324 — 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.
Duplicated block (13 lines × 2) pkg/app/sensor/controlled/controlled.go:66— pkg/app/sensor/controlled/controlled.go:66-78 | pkg/app/sensor/standalone/standalone.go:66-78 — `pkg/app/sensor/controlled/controlled.go` and `pkg/app/sensor/standalone/standalone.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 39 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (13 lines × 2) pkg/app/sensor/controlled/controlled.go:153— pkg/app/sensor/controlled/controlled.go:153-165 | pkg/app/sensor/standalone/standalone.go:139-151 — `pkg/app/sensor/controlled/controlled.go` and `pkg/app/sensor/standalone/standalone.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 39 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/app/sensor/controlled/controlled.go:153` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) pkg/pdiscover/pevents_linux.go:186— pkg/pdiscover/pevents_linux.go:186-198 | pkg/pdiscover/pevents_linux.go:230-242 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/pdiscover/pevents_linux.go:186` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) REDACTED:674— REDACTED:674-686 | REDACTED:718-730 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) pkg/app/master/command/registry/prompt.go:9— pkg/app/master/command/registry/prompt.go:9-26 | pkg/app/master/command/vulnerability/prompt.go:9-21 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13 lines × 2) REDACTED:958— REDACTED:958-970 | REDACTED:1424-1436 — 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 (13 lines × 2) pkg/app/master/inspectors/ipc/ipc.go:81— pkg/app/master/inspectors/ipc/ipc.go:81-93 | pkg/app/sensor/ipc/ipc.go:47-59 — 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 (13 lines × 2) pkg/app/master/command/profile/handler.go:164— pkg/app/master/command/profile/handler.go:164-176 | pkg/app/master/command/xray/handler.go:188-200 — 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/app/master/command/profile/handler.go:164` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) pkg/app/master/command/profile/handler.go:129— pkg/app/master/command/profile/handler.go:129-141 | pkg/app/master/command/profile/handler.go:146-158 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/app/master/command/profile/handler.go:129` 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.
FileTooLong: REDACTED REDACTED— FileTooLong — 2151 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1651 over it, 4.30× 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 — 1498 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 998 over it, 3.00× 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: compose/execution.go pkg/app/master/compose/execution.go— FileTooLong — 1116 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 616 over it, 2.23× 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: ptrace/ptrace.go pkg/monitor/ptrace/ptrace.go— FileTooLong — 962 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 462 over it, 1.92× 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: container/container_inspector.go pkg/app/master/inspectors/container/container_inspector.go— FileTooLong — 961 significant lines (blank, comment-only and punctuation-only lines excluded), about 75% of them inside a single declaration: Inspector (13 blocks, 81-1425). The bar is 500 significant lines; this is 461 over it, 1.92× 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: xray/handler.go pkg/app/master/command/xray/handler.go— FileTooLong — 919 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 419 over it, 1.84× 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 — 883 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 383 over it, 1.77× 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: debug/handle_kubernetes_runtime.go pkg/app/master/command/debug/handle_kubernetes_runtime.go— FileTooLong — 829 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 329 over it, 1.66× 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: command/cliflags.go pkg/app/master/command/cliflags.go— FileTooLong — 767 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 267 over it, 1.53× 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 — 653 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 153 over it, 1.31× 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: reverse/reverse.go pkg/docker/dockerfile/reverse/reverse.go— FileTooLong — 610 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 110 over it, 1.22× 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: command/clifvparser.go pkg/app/master/command/clifvparser.go— FileTooLong — 521 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 21 over it, 1.04× 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.
Duplicated block (9 lines × 2) pkg/app/master/command/debug/prompt.go:144— pkg/app/master/command/debug/prompt.go:144-152 | pkg/app/master/command/debug/prompt.go:203-211 — 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/app/master/command/debug/prompt.go:144` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `pkg/app/master/command/debug/prompt.go:201` calls `GetCFValue` and `pkg/app/master/command/debug/prompt.go:143` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) pkg/app/master/command/probe/handler.go:64— pkg/app/master/command/probe/handler.go:64-72 | pkg/app/master/command/xray/handler.go:174-182 — 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/app/master/command/probe/handler.go:64` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) pkg/app/master/command/registry/handler_push.go:128— pkg/app/master/command/registry/handler_push.go:128-136 | pkg/app/master/command/registry/handler_push.go:158-166 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. 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 (9 lines × 2) pkg/app/master/update/update.go:234— pkg/app/master/update/update.go:234-242 | REDACTED:186-194 — 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/app/master/update/update.go:234` 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 (9 lines × 2) REDACTED:1359— REDACTED:1359-1367 | REDACTED:1450-1458 — 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:1359` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:1358` calls `Debugf` and `REDACTED:1448` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) REDACTED:2830— REDACTED:2830-2838 | pkg/app/sensor/detector/filetype/filetype.go:51-59 — 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 `REDACTED:2830` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) pkg/docker/dockerfile/parser/parser.go:119— pkg/docker/dockerfile/parser/parser.go:119-127 | pkg/docker/dockerfile/parser/parser.go:160-168 — 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/docker/dockerfile/parser/parser.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.
Duplicated block (9 lines × 2) REDACTED:695— REDACTED:695-703 | REDACTED:832-840 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) REDACTED:247— REDACTED:247-255 | pkg/app/sensor/detector/filetype/filetype.go:22-30 — 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 (9 lines × 2) pkg/app/master/inspectors/container/container_inspector.go:1417— pkg/app/master/inspectors/container/container_inspector.go:1417-1425 | REDACTED:291-299 — 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 (9 lines × 2) REDACTED:139— REDACTED:139-148 | REDACTED:152-160 — 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:139` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) REDACTED:2820— REDACTED:2820-2828 | pkg/app/sensor/detector/filetype/filetype.go:41-49 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2820` 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.
FunctionTooLong: dockerimage.LoadPackage REDACTED:518— FunctionTooLong — LoadPackage runs 582 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 482 over it, 5.82× 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: debug.HandleKubernetesRuntime pkg/app/master/command/debug/handle_kubernetes_runtime.go:30— FunctionTooLong — HandleKubernetesRuntime runs 378 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 278 over it, 3.78× 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: profile.OnCommand pkg/app/master/command/profile/handler.go:44— FunctionTooLong — OnCommand runs 340 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 240 over it, 3.40× 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: parser.FromFile pkg/docker/dockerfile/parser/parser.go:24— FunctionTooLong — FromFile runs 206 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 106 over it, 2.06× 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: dockerimage.layerFromStream REDACTED:1438— FunctionTooLong — layerFromStream runs 172 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 72 over it, 1.72× 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: appbom.Get pkg/appbom/appbom.go:158— FunctionTooLong — Get runs 167 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 67 over it, 1.67× 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: debug.HandleDockerRuntime REDACTED:22— FunctionTooLong — HandleDockerRuntime runs 164 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 64 over it, 1.64× 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: builder.NewImageBuilder pkg/app/master/builder/image_builder.go:139— FunctionTooLong — NewImageBuilder runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× 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: registry.OnImageIndexCreateCommand pkg/app/master/command/registry/handler_image_index.go:30— FunctionTooLong — OnImageIndexCreateCommand runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: run.OnCommand pkg/app/master/command/run/handler.go:33— FunctionTooLong — OnCommand runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× 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: linter.Execute pkg/docker/linter/linter.go:91— FunctionTooLong — Execute runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× 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 (14 lines × 2) pkg/app/master/command/cliprompt.go:477— pkg/app/master/command/cliprompt.go:477-490 | pkg/app/master/command/cliprompt.go:496-509 — 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/app/master/command/cliprompt.go:477` 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 (14 lines × 2) pkg/app/master/command/install/handler.go:140— pkg/app/master/command/install/handler.go:140-153 | pkg/app/master/update/update.go:318-331 — 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/app/master/command/install/handler.go:140` 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 (14 lines × 2) pkg/app/master/command/registry/handler_pull.go:74— pkg/app/master/command/registry/handler_pull.go:74-87 | pkg/app/master/command/registry/handler_push.go:64-77 — before extracting anything, compare `pkg/app/master/command/registry/handler_pull.go` and `pkg/app/master/command/registry/handler_push.go` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) REDACTED:329— REDACTED:329-343 | REDACTED:769-782 — 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:329` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) pkg/app/execontext.go:177— pkg/app/execontext.go:177-190 | pkg/app/execontext.go:234-247 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/app/execontext.go:177` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `ref *Output) Prompt(data` in one and `ref *Output) Message(data` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (14 lines × 2) REDACTED:314— REDACTED:314-327 | REDACTED:754-767 — 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:314` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) pkg/app/master/command/xray/handler.go:1097— pkg/app/master/command/xray/handler.go:1097-1110 | pkg/app/master/command/xray/handler.go:1160-1173 — 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/app/master/command/xray/handler.go:1097` 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.
X2 · Cancellation propagation· Function without context.Context · ×7
Function without context.Context: NewClient REDACTED:282— `NewClient` calls `net.DialTimeout(…)` 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: Check REDACTED:156— `Check` 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: downloadRelease pkg/app/master/update/update.go:148— `downloadRelease` 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: isGoodDownloadSource pkg/app/master/update/update.go:219— `isGoodDownloadSource` 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: getHTTP2Client REDACTED:31— `getHTTP2Client` calls `net.Dial(…)` 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: loadAPISpecFromEndpoint pkg/app/master/probe/http/swagger.go:97— `loadAPISpecFromEndpoint` 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: apiSpecEndpointCall pkg/app/master/probe/http/swagger.go:311— `apiSpecEndpointCall` 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, …)`.
D12 · Dependency Hygiene· Dependency pinned to a stale untagged commit · ×6
Dependency pinned to a stale untagged commit: github.com/c4milo/unpackit — Direct dependency `github.com/c4milo/unpackit` is required at `v0.0.0-20170704181138-4ed373e9ef1c` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2017-07-04, 9.4 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/c4milo/unpackit` and has not moved this requirement in 9.4 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/c4milo/unpackit` 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/google/shlex — Direct dependency `github.com/google/shlex` is required at `v0.0.0-20191202100458-e7afc7fbc510` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2019-12-02, 6.9 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/google/shlex` and has not moved this requirement in 6.9 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/google/shlex` 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/syndtr/gocapability — Direct dependency `github.com/syndtr/gocapability` is required at `v0.0.0-20200815063812-42c35b437635` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2020-08-15, 6.2 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/syndtr/gocapability` and has not moved this requirement in 6.2 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/syndtr/gocapability` 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/distribution/distribution/v3 — Direct dependency `github.com/distribution/distribution/v3` is required at `v3.0.0-20210316161203-a01c71e2477e` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2021-03-16, 5.7 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/distribution/distribution/v3` and has not moved this requirement in 5.7 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/distribution/distribution/v3` 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/ulyssessouza/godotenv — Direct dependency `github.com/ulyssessouza/godotenv` is required at `v1.3.1-0.20210806120901-e417b721114e` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2021-08-06, 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/ulyssessouza/godotenv` 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/ulyssessouza/godotenv` 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: golang.org/x/sync — Direct dependency `golang.org/x/sync` is required at `v0.0.0-20210220032951-036812b2e83c` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2021-02-20, 5.7 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `golang.org/x/sync` and has not moved this requirement in 5.7 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `golang.org/x/sync` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
MethodTooLong: Inspector.RunContainer pkg/app/master/inspectors/container/container_inspector.go:315— MethodTooLong — RunContainer runs 365 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 265 over it, 3.65× 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: CustomProbe.Start pkg/app/master/probe/http/custom_probe.go:263— MethodTooLong — Start runs 225 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 125 over it, 2.25× 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: App.collect pkg/monitor/ptrace/ptrace.go:660— MethodTooLong — collect runs 196 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 96 over it, 1.96× 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: Engine.Build pkg/imagebuilder/internalbuilder/engine.go:51— MethodTooLong — Build runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× 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: Execution.Start REDACTED:158— MethodTooLong — Start runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× 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: Instance.call pkg/vulnerability/epss/api/api.go:380— MethodTooLong — call runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× 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 (11 lines × 2) pkg/app/master/command/clifvparser.go:604— pkg/app/master/command/clifvparser.go:604-614 | pkg/app/master/command/clifvparser.go:622-632 — 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) REDACTED:1312— REDACTED:1312-1322 | REDACTED:1445-1455 — 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:1312` 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) REDACTED:1858— REDACTED:1858-1868 | REDACTED:1877-1887 — 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:1858` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) pkg/app/master/probe/http/custom_probe.go:520— pkg/app/master/probe/http/custom_probe.go:520-533 | pkg/app/master/probe/http/swagger.go:346-356 — 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/app/master/probe/http/custom_probe.go:520` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) pkg/app/master/command/probe/handler.go:42— pkg/app/master/command/probe/handler.go:42-52 | pkg/app/master/command/profile/handler.go:94-104 — 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/app/master/command/probe/handler.go:42` 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/app/master/command/xray/cli.go:432— pkg/app/master/command/xray/cli.go:432-442 | pkg/app/master/command/xray/cli.go:480-490 — 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/app/master/command/xray/cli.go:432` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) pkg/app/master/command/debug/handle_kubernetes_runtime.go:306— pkg/app/master/command/debug/handle_kubernetes_runtime.go:306-313 | pkg/app/master/command/debug/handle_kubernetes_runtime.go:545-552 — 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/app/master/command/debug/handle_kubernetes_runtime.go:306` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) pkg/app/master/command/debug/handle_kubernetes_runtime.go:968— pkg/app/master/command/debug/handle_kubernetes_runtime.go:968-975 | pkg/app/master/command/debug/handle_kubernetes_runtime.go:1015-1022 — 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/app/master/command/debug/handle_kubernetes_runtime.go:968` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) pkg/app/master/probe/http/custom_probe.go:103— pkg/app/master/probe/http/custom_probe.go:103-110 | pkg/app/master/probe/http/custom_probe.go:184-191 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/app/master/probe/http/custom_probe.go:103` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) pkg/docker/linter/check/id20014.go:37— pkg/docker/linter/check/id20014.go:37-44 | pkg/docker/linter/check/id20015.go:37-44 — before extracting anything, compare `pkg/docker/linter/check/id20014.go` and `pkg/docker/linter/check/id20015.go` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/docker/linter/check/id20014.go:37` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) pkg/pdiscover/pevents.go:52— pkg/pdiscover/pevents.go:52-59 | pkg/pdiscover/pevents.go:74-81 — 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/pdiscover/pevents.go:52` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) REDACTED:835— REDACTED:835-842 | REDACTED:3503-3510 — 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:835` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×5
Edited copy of a member (17 corresponding lines) pkg/app/master/command/images/handler.go:112— pkg/app/master/command/images/handler.go:112-128 | pkg/app/master/command/vulnerability/handler_tool_epss.go:175-191 — These two members are one piece of code written twice and then edited apart: 17 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 (17 corresponding lines) pkg/app/master/command/debug/handle_kubernetes_runtime.go:592— pkg/app/master/command/debug/handle_kubernetes_runtime.go:592-608 | pkg/app/master/command/debug/handle_kubernetes_runtime.go:654-673 — These two members are one piece of code written twice and then edited apart: 17 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 (17 corresponding lines) pkg/app/master/command/debug/handle_kubernetes_runtime.go:610— pkg/app/master/command/debug/handle_kubernetes_runtime.go:610-626 | pkg/app/master/command/debug/handle_kubernetes_runtime.go:675-691 — These two members are one piece of code written twice and then edited apart: 17 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 (17 corresponding lines) pkg/app/execontext.go:53— pkg/app/execontext.go:53-69 | pkg/app/execontext.go:71-87 — These two members are one piece of code written twice and then edited apart: 17 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 (17 corresponding lines) pkg/app/sensor/controlled/controlled.go:65— pkg/app/sensor/controlled/controlled.go:65-81 | pkg/app/sensor/standalone/standalone.go:65-98 — These two members are one piece of code written twice and then edited apart: 17 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 (15 lines × 2) pkg/app/master/command/edit/cli.go:22— pkg/app/master/command/edit/cli.go:22-36 | pkg/app/master/command/profile/cli.go:91-105 — `pkg/app/master/command/edit/cli.go` and `pkg/app/master/command/profile/cli.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 34 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (15 lines × 2) pkg/app/master/probe/http/custom_probe.go:568— pkg/app/master/probe/http/custom_probe.go:568-582 | pkg/app/master/probe/http/swagger.go:374-388 — 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/app/master/probe/http/custom_probe.go:568` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) pkg/app/master/security/apparmor/apparmor.go:45— pkg/app/master/security/apparmor/apparmor.go:45-59 | pkg/app/master/security/seccomp/seccomp.go:67-81 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (15 lines × 2) REDACTED:1624— REDACTED:1624-1638 | REDACTED:1644-1658 — 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:1624` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:1618` calls `copyDirs`, `CertDirList`, `CACertDirList` and `REDACTED:1642` 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.
Duplicated block (15 lines × 2) pkg/app/sensor/monitor/fanotify/monitor.go:90— pkg/app/sensor/monitor/fanotify/monitor.go:90-104 | pkg/app/sensor/monitor/ptrace/monitor.go:60-76 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/app/sensor/monitor/fanotify/monitor.go:90` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×4
Edited copy of a member (18 corresponding lines) pkg/app/master/command/vulnerability/handler_tool_epss.go:156— pkg/app/master/command/vulnerability/handler_tool_epss.go:156-173 | pkg/app/master/command/vulnerability/handler_tool_epss.go:224-245 — These two members are one piece of code written twice and then edited apart: 18 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 (18 corresponding lines) pkg/app/master/command/cliprompt.go:473— pkg/app/master/command/cliprompt.go:473-490 | pkg/app/master/command/cliprompt.go:492-509 — These two members are one piece of code written twice and then edited apart: 18 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 (18 corresponding lines) pkg/app/master/inspectors/container/container_inspector.go:1112— pkg/app/master/inspectors/container/container_inspector.go:1112-1130 | REDACTED:472-489 — These two members are one piece of code written twice and then edited apart: 18 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 (18 corresponding lines) pkg/app/master/command/clifvparser.go:206— pkg/app/master/command/clifvparser.go:206-223 | pkg/app/master/command/debug/cli.go:73-91 — These two members are one piece of code written twice and then edited apart: 18 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 (24 lines × 2) pkg/app/master/command/clifvparser.go:287— pkg/app/master/command/clifvparser.go:287-310 | pkg/app/master/command/clifvparser.go:320-343 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/app/master/command/clifvparser.go:287` 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 (24 lines × 2) pkg/app/master/command/containerize/cli.go:22— pkg/app/master/command/containerize/cli.go:22-45 | pkg/app/master/command/convert/cli.go:22-45 — `pkg/app/master/command/containerize/cli.go` and `pkg/app/master/command/convert/cli.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 58 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/app/master/command/containerize/cli.go:22` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (24 lines × 2) REDACTED:2139— REDACTED:2139-2162 | REDACTED:2178-2201 — 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:2139` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (24 lines × 2) pkg/pdiscover/pevents_linux.go:113— pkg/pdiscover/pevents_linux.go:113-136 | pkg/pdiscover/pevents_linux.go:144-167 — 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/pdiscover/pevents_linux.go:113` 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/app/master/command/debug/prompt.go:228— pkg/app/master/command/debug/prompt.go:228-244 | pkg/app/master/command/debug/prompt.go:256-272 — 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/app/master/command/debug/prompt.go:228` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) REDACTED:1209— REDACTED:1209-1225 | REDACTED:1318-1334 — 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:1209` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) pkg/launcher/launcher.go:22— pkg/launcher/launcher.go:22-38 | pkg/launcher/launcher.go:51-67 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/launcher/launcher.go:22` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 lines × 2) REDACTED:719— REDACTED:719-735 | REDACTED:774-790 — 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:719` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) pkg/app/master/command/debug/handle_kubernetes_runtime.go:234— pkg/app/master/command/debug/handle_kubernetes_runtime.go:234-249 | pkg/app/master/command/debug/handle_kubernetes_runtime.go:268-283 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/app/master/command/debug/handle_kubernetes_runtime.go:234` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) REDACTED:323— REDACTED:323-338 | REDACTED:2294-2309 — 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:323` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) REDACTED:1183— REDACTED:1183-1198 | REDACTED:1231-1246 — 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 (16 lines × 2) REDACTED:2294— REDACTED:2294-2309 | REDACTED:3417-3433 — 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:2294` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) pkg/app/master/command/profile/cli.go:25— pkg/app/master/command/profile/cli.go:25-30 | pkg/app/master/command/run/cli.go:85-90 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) pkg/app/master/command/install/cli.go:38— pkg/app/master/command/install/cli.go:38-43 | pkg/app/master/command/update/cli.go:24-29 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/app/master/command/install/cli.go:38` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) REDACTED:605— REDACTED:605-610 | REDACTED:624-629 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:605` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:612` calls `Chown`, `Warnf` and `REDACTED:630` 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.
Duplicated block (6 lines × 2) REDACTED:1992— REDACTED:1992-1997 | REDACTED:2044-2049 — 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:1992` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×3
Edited copy of a member (24 corresponding lines) pkg/app/master/command/install/cli.go:9— pkg/app/master/command/install/cli.go:9-51 | pkg/app/master/command/update/cli.go:12-35 — 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.
Edited copy of a member (24 corresponding lines) REDACTED:2815— REDACTED:2815-2838 | pkg/app/sensor/detector/filetype/filetype.go:32-59 — 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.
Edited copy of a member (24 corresponding lines) pkg/app/master/command/registry/handler_push.go:127— pkg/app/master/command/registry/handler_push.go:127-150 | pkg/app/master/command/registry/handler_push.go:157-181 — 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.
Duplicated block (19 lines × 2) pkg/app/master/command/profile/handler.go:195— pkg/app/master/command/profile/handler.go:195-213 | pkg/app/master/command/xray/handler.go:218-236 — 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 (19 lines × 2) REDACTED:1169— REDACTED:1169-1187 | REDACTED:1228-1246 — 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:1169` 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 (19 lines × 2) pkg/app/master/command/xray/handler.go:1126— pkg/app/master/command/xray/handler.go:1126-1144 | pkg/app/master/command/xray/handler.go:1189-1207 — 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/app/master/command/xray/handler.go:1126` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18 lines × 2) pkg/app/master/command/probe/handler.go:51— pkg/app/master/command/probe/handler.go:51-68 | pkg/app/master/command/version/handler.go:30-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/app/master/command/probe/handler.go:51` 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 (18 lines × 2) REDACTED:204— REDACTED:204-221 | pkg/app/master/inspectors/container/container_inspector.go:399-416 — 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 (18 lines × 2) REDACTED:1061— REDACTED:1061-1078 | REDACTED:1091-1108 — 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:1061` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (9 lines × 3) REDACTED:856— REDACTED:856-864 | REDACTED:3352-3360 | REDACTED:3524-3532 — 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 (9 lines × 3) REDACTED:867— REDACTED:867-875 | REDACTED:878-886 | REDACTED:891-899 — 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:867` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 3) REDACTED:1899— REDACTED:1899-1907 | REDACTED:1940-1948 | REDACTED:2040-2048 — 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:1899` 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.
HackComment REDACTED:1135— // hacky way to get the home directories for users... — 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.
HackComment cmd/slim/main.go:11— //hack to handle plugin invocations — 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.
TooManyFields: Inspector pkg/app/master/inspectors/container/container_inspector.go:81— TooManyFields — 70 stored fields beside 12 methods. The bar is 30 stored fields; this is 40 over it, 2.33× 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: StartMonitor pkg/ipc/command/command.go:42— TooManyFields — 42 stored fields beside 1 method. The bar is 30 stored fields; this is 12 over it, 1.40× 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.
ClassTooLong: Inspector pkg/app/master/inspectors/container/container_inspector.go:81— ClassTooLong — 719 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods, 13 blocks, lines 81-1425. The bar is 400 significant lines; this is 319 over it, 1.80× 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.
ClassTooLong: App pkg/monitor/ptrace/ptrace.go:124— ClassTooLong — 485 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods, 11 blocks, lines 124-987. The bar is 400 significant lines; this is 85 over it, 1.21× 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 (6 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (6 members, 50+ identical tokens) pkg/app/master/command/clifvparser.go:248— pkg/app/master/command/clifvparser.go:248-284 | pkg/app/master/command/clifvparser.go:476-531 | pkg/app/master/command/clifvparser.go:534-575 | pkg/app/master/command/clifvparser.go:767-803 | pkg/app/master/command/clifvparser.go:805-841 | pkg/app/master/command/clifvparser.go:851-885 — These 6 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 6 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 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) REDACTED:106— REDACTED:106-142 | REDACTED:144-209 | REDACTED:366-401 | REDACTED:876-913 | REDACTED:915-952 | REDACTED:977-1035 — These 6 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 6 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 6 times.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×2
Edited copy of a member (30 corresponding lines) pkg/pdiscover/pevents_linux.go:185— pkg/pdiscover/pevents_linux.go:185-227 | pkg/pdiscover/pevents_linux.go:229-258 — These two members are one piece of code written twice and then edited apart: 30 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 (30 corresponding lines) pkg/pdiscover/pevents_linux.go:112— pkg/pdiscover/pevents_linux.go:112-141 | pkg/pdiscover/pevents_linux.go:143-172 — These two members are one piece of code written twice and then edited apart: 30 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 (28 corresponding lines) · ×2
Edited copy of a member (28 corresponding lines) REDACTED:582— REDACTED:582-614 | pkg/app/master/inspectors/container/container_inspector.go:1132-1159 — These two members are one piece of code written twice and then edited apart: 28 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 (28 corresponding lines) pkg/launcher/launcher.go:21— pkg/launcher/launcher.go:21-48 | pkg/launcher/launcher.go:50-77 — These two members are one piece of code written twice and then edited apart: 28 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 (35 corresponding lines) · ×2
Edited copy of a member (35 corresponding lines) REDACTED:2135— REDACTED:2135-2172 | REDACTED:2174-2208 — These two members are one piece of code written twice and then edited apart: 35 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 (35 corresponding lines) REDACTED:673— REDACTED:673-707 | REDACTED:772-809 — These two members are one piece of code written twice and then edited apart: 35 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 (31 corresponding lines) · ×2
Edited copy of a member (31 corresponding lines) pkg/app/master/command/common.go:105— pkg/app/master/command/common.go:105-135 | pkg/app/master/inspectors/container/container_inspector.go:1433-1464 — These two members are one piece of code written twice and then edited apart: 31 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 (31 corresponding lines) pkg/docker/linter/check/id20004.go:33— pkg/docker/linter/check/id20004.go:33-63 | pkg/docker/linter/check/id20006.go:34-65 — These two members are one piece of code written twice and then edited apart: 31 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 (23 corresponding lines) · ×2
Edited copy of a member (23 corresponding lines) pkg/app/master/compose/execution.go:818— pkg/app/master/compose/execution.go:818-840 | pkg/app/master/compose/execution.go:842-868 — These two members are one piece of code written twice and then edited apart: 23 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 (23 corresponding lines) pkg/app/sensor/monitor/fanotify/monitor.go:89— pkg/app/sensor/monitor/fanotify/monitor.go:89-111 | pkg/app/sensor/monitor/ptrace/monitor.go:59-85 — These two members are one piece of code written twice and then edited apart: 23 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 (21 corresponding lines) · ×2
Edited copy of a member (21 corresponding lines) pkg/vulnerability/epss/api/api.go:177— pkg/vulnerability/epss/api/api.go:177-197 | pkg/vulnerability/epss/api/api.go:293-313 — 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.
Edited copy of a member (21 corresponding lines) pkg/app/master/command/install/handler.go:139— pkg/app/master/command/install/handler.go:139-159 | pkg/app/master/update/update.go:317-337 — 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 copy of a member (20 corresponding lines) · ×2
Edited copy of a member (20 corresponding lines) pkg/pdiscover/pevents.go:43— pkg/pdiscover/pevents.go:43-63 | pkg/pdiscover/pevents.go:66-85 — 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.
Edited copy of a member (20 corresponding lines) pkg/app/master/command/install/handler.go:116— pkg/app/master/command/install/handler.go:116-136 | pkg/app/master/update/update.go:296-315 — 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 copies of one member (3 members, 19+ corresponding lines) · ×2
Edited copies of one member (3 members, 19+ corresponding lines) pkg/vulnerability/epss/client/client.go:115— pkg/vulnerability/epss/client/client.go:115-138 | pkg/vulnerability/epss/client/client.go:161-179 | pkg/vulnerability/epss/client/client.go:200-218 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 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.
Edited copies of one member (3 members, 19+ corresponding lines) pkg/sysidentity/sysidentity.go:286— pkg/sysidentity/sysidentity.go:286-304 | pkg/sysidentity/sysidentity.go:485-503 | pkg/sysidentity/sysidentity.go:590-608 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 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 (14 corresponding lines) · ×2
Edited copy of a member (14 corresponding lines) pkg/vulnerability/epss/client/client.go:143— pkg/vulnerability/epss/client/client.go:143-156 | pkg/vulnerability/epss/client/client.go:183-196 — These two members are one piece of code written twice and then edited apart: 14 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 (14 corresponding lines) pkg/app/master/compose/execution.go:1588— pkg/app/master/compose/execution.go:1588-1601 | pkg/app/master/compose/execution.go:1738-1755 — These two members are one piece of code written twice and then edited apart: 14 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 (21 lines × 2) pkg/app/master/builder/image_builder.go:72— pkg/app/master/builder/image_builder.go:72-92 | pkg/app/master/builder/image_builder.go:155-175 — 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/app/master/builder/image_builder.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 (21 lines × 2) pkg/app/master/probe/http/swagger.go:40— pkg/app/master/probe/http/swagger.go:40-60 | pkg/app/master/probe/http/swagger.go:230-252 — 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/app/master/probe/http/swagger.go:40` 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 (19 lines × 4) pkg/app/master/command/registry/handler_copy.go:38— pkg/app/master/command/registry/handler_copy.go:38-56 | pkg/app/master/command/registry/handler_image_index.go:47-65 | pkg/app/master/command/registry/handler_pull.go:51-69 | pkg/app/master/command/registry/handler_push.go:41-59 — before extracting anything, compare `pkg/app/master/command/registry/handler_copy.go` and `pkg/app/master/command/registry/handler_image_index.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/app/master/command/registry/handler_copy.go:38` 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 (19 lines × 4) pkg/docker/linter/check/id20010.go:45— pkg/docker/linter/check/id20010.go:45-63 | pkg/docker/linter/check/id20011.go:45-63 | pkg/docker/linter/check/id20014.go:47-65 | pkg/docker/linter/check/id20015.go:56-74 — before extracting anything, compare `pkg/docker/linter/check/id20010.go` and `pkg/docker/linter/check/id20011.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/docker/linter/check/id20010.go:45` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 8) pkg/app/master/command/containerize/handler.go:40— pkg/app/master/command/containerize/handler.go:40-55 | pkg/app/master/command/convert/handler.go:40-55 | pkg/app/master/command/debug/handler.go:62-77 | pkg/app/master/command/edit/handler.go:40-55 | pkg/app/master/command/images/handler.go:45-60 | REDACTED:58-73 | pkg/app/master/command/run/handler.go:51-66 | pkg/app/master/command/server/handler.go:34-49 — `pkg/app/master/command/containerize/handler.go` and `pkg/app/master/command/convert/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 151 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/app/master/command/containerize/handler.go:40` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `pkg/app/master/command/run/handler.go:48` calls `Sprintf` and `pkg/app/master/command/images/handler.go:41` 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.
Duplicated block (16 lines × 8) pkg/app/master/command/containerize/handler.go:48— pkg/app/master/command/containerize/handler.go:48-63 | pkg/app/master/command/convert/handler.go:48-63 | pkg/app/master/command/edit/handler.go:48-63 | pkg/app/master/command/profile/handler.go:107-122 | pkg/app/master/command/registry/handler_copy.go:46-61 | pkg/app/master/command/registry/handler_pull.go:59-74 | pkg/app/master/command/run/handler.go:59-74 | pkg/app/master/command/server/handler.go:42-57 — `pkg/app/master/command/containerize/handler.go` and `pkg/app/master/command/convert/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 151 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/app/master/command/containerize/handler.go:48` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (16 lines × 4) pkg/app/master/command/containerize/handler.go:35— pkg/app/master/command/containerize/handler.go:35-50 | pkg/app/master/command/convert/handler.go:35-50 | pkg/app/master/command/edit/handler.go:35-50 | pkg/app/master/command/probe/handler.go:42-57 — `pkg/app/master/command/containerize/handler.go` and `pkg/app/master/command/convert/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 151 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/app/master/command/containerize/handler.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 (16 lines × 4) pkg/app/master/command/debug/handler.go:70— pkg/app/master/command/debug/handler.go:70-85 | pkg/app/master/command/images/handler.go:53-68 | pkg/app/master/command/registry/handler_image_index.go:55-70 | pkg/app/master/command/registry/handler_push.go:49-64 — `pkg/app/master/command/debug/handler.go` and `pkg/app/master/command/images/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 78 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/app/master/command/debug/handler.go:70` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 6) pkg/app/master/command/containerize/handler.go:53— pkg/app/master/command/containerize/handler.go:53-65 | pkg/app/master/command/convert/handler.go:53-65 | pkg/app/master/command/edit/handler.go:53-65 | pkg/app/master/command/probe/handler.go:60-72 | pkg/app/master/command/registry/handler_copy.go:51-63 | pkg/app/master/command/registry/handler_pull.go:64-76 — `pkg/app/master/command/containerize/handler.go` and `pkg/app/master/command/convert/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 151 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/app/master/command/containerize/handler.go:53` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 6) REDACTED:114— REDACTED:114-126 | REDACTED:153-165 | REDACTED:371-383 | REDACTED:877-889 | REDACTED:916-928 | REDACTED:978-990 — all 6 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:114` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:141` calls `ImageToIdentity`, `ListImages` and `REDACTED:112` 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.
Duplicated block (12 lines × 2) pkg/app/master/command/debug/prompt.go:82— pkg/app/master/command/debug/prompt.go:82-93 | pkg/app/master/command/debug/prompt.go:108-119 — 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/app/master/command/debug/prompt.go:82` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) pkg/app/master/inspectors/container/container_inspector.go:154— pkg/app/master/inspectors/container/container_inspector.go:154-165 | REDACTED:933-944 — 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 (10 lines × 4) pkg/app/master/command/containerize/cli.go:20— pkg/app/master/command/containerize/cli.go:20-29 | pkg/app/master/command/convert/cli.go:20-29 | pkg/app/master/command/edit/cli.go:20-29 | pkg/app/master/command/profile/cli.go:89-98 — `pkg/app/master/command/containerize/cli.go` and `pkg/app/master/command/convert/cli.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 58 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/app/master/command/containerize/cli.go:20` 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 × 4) pkg/app/master/command/xray/cli.go:431— pkg/app/master/command/xray/cli.go:431-440 | pkg/app/master/command/xray/cli.go:479-488 | pkg/app/master/command/xray/cli.go:524-533 | pkg/app/master/command/xray/cli.go:572-581 — 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/app/master/command/xray/cli.go:431` 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 × 3) pkg/app/master/command/xray/handler.go:1018— pkg/app/master/command/xray/handler.go:1018-1024 | pkg/app/master/command/xray/handler.go:1118-1124 | pkg/app/master/command/xray/handler.go:1181-1187 — 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/app/master/command/xray/handler.go:1018` 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 (7 lines × 3) REDACTED:555— REDACTED:555-561 | REDACTED:898-904 | REDACTED:1032-1039 — 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:555` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:552` calls `Stat` and `REDACTED:1028` 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.
Duplicated block (7 lines × 2) REDACTED:436— REDACTED:436-442 | REDACTED:444-450 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) REDACTED:1505— REDACTED:1505-1511 | REDACTED:1595-1601 — 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:1505` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) pkg/util/fsutil/sysstat_darwin.go:7— pkg/util/fsutil/sysstat_darwin.go:7-16 | pkg/util/fsutil/sysstat_linux.go:7-16 — 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.
Duplicated block (10 lines × 2) REDACTED:839— REDACTED:839-848 | pkg/app/sensor/inspector/sodeps/sodeps.go:206-215 — 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 `REDACTED:839` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:838` calls `Debugf` and `pkg/app/sensor/inspector/sodeps/sodeps.go:205` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
store.saveArtifacts (cyclomatic 191) REDACTED:1681— store.saveArtifacts has cyclomatic complexity 191 (threshold 15). Of this number, 164 points are the body's own statements and 27 belong to 3 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.
dockerimage.LoadPackage (cyclomatic 173) REDACTED:518— dockerimage.LoadPackage has cyclomatic complexity 173 (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.
build.OnCommand (cyclomatic 133) pkg/app/master/command/build/handler.go:64— build.OnCommand has cyclomatic complexity 133 (threshold 15). Of this number, 86 points are the body's own statements and 47 belong to 4 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.
xray.printImagePackage (cyclomatic 127) pkg/app/master/command/xray/handler.go:643— xray.printImagePackage has cyclomatic complexity 127 (threshold 15). Of this number, 124 points are the body's own statements and 3 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.
Inspector.RunContainer (cyclomatic 115) pkg/app/master/inspectors/container/container_inspector.go:315— Inspector.RunContainer has cyclomatic complexity 115 (threshold 15). Of this number, 99 points are the body's own statements and 16 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.
dockerimage.inspectFile (cyclomatic 101) REDACTED:1713— dockerimage.inspectFile has cyclomatic complexity 101 (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.
debug.HandleKubernetesRuntime (cyclomatic 70) pkg/app/master/command/debug/handle_kubernetes_runtime.go:30— debug.HandleKubernetesRuntime has cyclomatic complexity 70 (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.
parser.FromFile (cyclomatic 70) pkg/docker/dockerfile/parser/parser.go:24— parser.FromFile has cyclomatic complexity 70 (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.
xray.OnCommand (cyclomatic 69) pkg/app/master/command/xray/handler.go:94— xray.OnCommand has cyclomatic complexity 69 (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.
reverse.DockerfileFromHistoryStruct (cyclomatic 69) pkg/docker/dockerfile/reverse/reverse.go:218— reverse.DockerfileFromHistoryStruct has cyclomatic complexity 69 (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.
builder.NewImageBuilder (cyclomatic 62) pkg/app/master/builder/image_builder.go:139— builder.NewImageBuilder has cyclomatic complexity 62 (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.
CustomProbe.Start (cyclomatic 60) pkg/app/master/probe/http/custom_probe.go:263— CustomProbe.Start has cyclomatic complexity 60 (threshold 15). Most of this is not in the body itself: 2 of the 60 points are its own statements and the rest belongs to one function literal inside it that branches (line 271). 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.
dockerimage.layerFromStream (cyclomatic 49) REDACTED:1438— dockerimage.layerFromStream has cyclomatic complexity 49 (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.
PackageFiles.ListLayerFiles (cyclomatic 48) pkg/docker/dockerimage/packagefiles.go:209— PackageFiles.ListLayerFiles has cyclomatic complexity 48 (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.
store.saveCertsData (cyclomatic 44) REDACTED:1500— store.saveCertsData has cyclomatic complexity 44 (threshold 15). Of this number, 17 points are the body's own statements and 27 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
App.collect (cyclomatic 43) pkg/monitor/ptrace/ptrace.go:660— App.collect has cyclomatic complexity 43 (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.
Execution.Start (cyclomatic 42) REDACTED:158— Execution.Start has cyclomatic complexity 42 (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.
artifact.findSymlinks (cyclomatic 42) REDACTED:3313— artifact.findSymlinks has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 15 of the 42 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 3404, 3319). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
appbom.Get (cyclomatic 41) pkg/appbom/appbom.go:158— appbom.Get has cyclomatic complexity 41 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
dockerclient.New (cyclomatic 41) pkg/docker/dockerclient/client.go:134— dockerclient.New has cyclomatic complexity 41 (threshold 15). Of this number, 37 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.
Instance.call (cyclomatic 39) pkg/vulnerability/epss/api/api.go:380— Instance.call has cyclomatic complexity 39 (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.
reverse.deserialiseHealtheckInstruction (cyclomatic 38) pkg/docker/dockerfile/reverse/reverse.go:714— reverse.deserialiseHealtheckInstruction has cyclomatic complexity 38 (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.
PyPipInstallLatest.Run (cyclomatic 36) pkg/docker/linter/check/id20018.go:37— PyPipInstallLatest.Run has cyclomatic complexity 36 (threshold 15). Of this number, 33 points are the body's own statements and 3 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.
profile.OnCommand (cyclomatic 35) pkg/app/master/command/profile/handler.go:44— profile.OnCommand has cyclomatic complexity 35 (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.
store.saveSSHClient (cyclomatic 34) REDACTED:1163— store.saveSSHClient has cyclomatic complexity 34 (threshold 15). Of this number, 32 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
store.saveOSLibsNetwork (cyclomatic 34) REDACTED:1347— store.saveOSLibsNetwork 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.
Engine.Build (cyclomatic 34) pkg/imagebuilder/internalbuilder/engine.go:51— Engine.Build 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.
linter.Execute (cyclomatic 33) pkg/docker/linter/linter.go:91— linter.Execute has cyclomatic complexity 33 (threshold 15). Of this number, 32 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.
debug.HandleDockerRuntime (cyclomatic 32) REDACTED:22— debug.HandleDockerRuntime has cyclomatic complexity 32 (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.
InteractiveApp.complete (cyclomatic 31) pkg/app/master/command/cliprompt.go:113— InteractiveApp.complete has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
merge.OnCommand (cyclomatic 31) REDACTED:34— merge.OnCommand has cyclomatic complexity 31 (threshold 15). Of this number, 27 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.
compose.startContainer (cyclomatic 31) pkg/app/master/compose/execution.go:1246— compose.startContainer has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
fsutil.copyFileObjectHandler (cyclomatic 31) REDACTED:811— fsutil.copyFileObjectHandler has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to one function literal inside it that branches (line 819). 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.
sodeps.AllDependencies (cyclomatic 30) pkg/app/sensor/inspector/sodeps/sodeps.go:50— sodeps.AllDependencies has cyclomatic complexity 30 (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.
build.monitorContainer (cyclomatic 29) pkg/app/master/command/build/handler.go:1262— build.monitorContainer has cyclomatic complexity 29 (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.
registry.OnImageIndexCreateCommand (cyclomatic 28) pkg/app/master/command/registry/handler_image_index.go:30— registry.OnImageIndexCreateCommand 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.
ast.extractBuilderFlags (cyclomatic 28) pkg/docker/dockerfile/ast/split_command.go:31— ast.extractBuilderFlags 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.
fsutil.CopyRegularFile (cyclomatic 28) REDACTED:518— fsutil.CopyRegularFile 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.
build.UpdateBuildOptionsWithNewInstructions (cyclomatic 27) pkg/app/master/command/build/image.go:494— build.UpdateBuildOptionsWithNewInstructions 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.
build.buildOutputImage (cyclomatic 26) pkg/app/master/command/build/image.go:274— build.buildOutputImage 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.
monitor.processEvent (cyclomatic 26) pkg/app/sensor/monitor/fanotify/monitor.go:272— monitor.processEvent 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.
Execution.monitorContainerExitSync (cyclomatic 25) REDACTED:429— Execution.monitorContainerExitSync 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.
App.processFileActivity (cyclomatic 25) pkg/monitor/ptrace/ptrace.go:264— App.processFileActivity 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.
ast.parseWords (cyclomatic 24) pkg/docker/dockerfile/ast/line_parsers.go:82— ast.parseWords 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.
CustomProbe.crawl (cyclomatic 23) pkg/app/master/probe/http/crawler.go:22— CustomProbe.crawl has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 5 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 43). 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.
store.resolveLinks (cyclomatic 23) REDACTED:797— store.resolveLinks 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.
imagebuilder.SimpleBuildOptionsFromDockerfileData (cyclomatic 23) pkg/imagebuilder/imagebuilder.go:146— imagebuilder.SimpleBuildOptionsFromDockerfileData has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
debug.waitForContainer (cyclomatic 21) pkg/app/master/command/debug/handle_kubernetes_runtime.go:1004— debug.waitForContainer has cyclomatic complexity 21 (threshold 15). 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 1015). 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.
Inspector.setPorts (cyclomatic 21) pkg/app/master/inspectors/container/container_inspector.go:958— Inspector.setPorts 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.
store.prepareArtifacts (cyclomatic 21) REDACTED:696— store.prepareArtifacts 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.
build.UpdateBuildOptionsWithOverrides (cyclomatic 20) pkg/app/master/command/build/image.go:572— build.UpdateBuildOptionsWithOverrides has cyclomatic complexity 20 (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.
monitor.Start (cyclomatic 20) pkg/app/sensor/monitor/fanotify/monitor.go:113— monitor.Start has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 134). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
app.newCLI (cyclomatic 19) pkg/app/master/cli.go:73— app.newCLI has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 88, 163). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
command.ParseHTTPProbes (cyclomatic 19) pkg/app/master/command/clifvparser.go:579— command.ParseHTTPProbes 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.
command.ParseHTTPProbesFile (cyclomatic 19) pkg/app/master/command/clifvparser.go:650— command.ParseHTTPProbesFile 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.
CommandServer.OnConnection (cyclomatic 19) REDACTED:618— CommandServer.OnConnection has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 628). 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.
compose.NewConfigInfo (cyclomatic 18) pkg/app/master/compose/execution.go:183— compose.NewConfigInfo 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.
http.NewContainerProbe (cyclomatic 18) pkg/app/master/probe/http/custom_probe.go:81— http.NewContainerProbe 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.
dockerfile.GenerateFromInfo (cyclomatic 18) REDACTED:52— dockerfile.GenerateFromInfo 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.
dockerutil.PrepareContainerDataArchive (cyclomatic 18) REDACTED:798— dockerutil.PrepareContainerDataArchive 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.
fsutil.cloneDirPath (cyclomatic 18) REDACTED:431— fsutil.cloneDirPath 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.
fsutil.ArchiveDir (cyclomatic 18) REDACTED:1432— fsutil.ArchiveDir has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 1455). 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.
build.finishCommand (cyclomatic 17) pkg/app/master/command/build/handler.go:1498— build.finishCommand has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
command.UpdateGlobalFlagValues (cyclomatic 17) pkg/app/master/command/clifvgetter.go:322— command.UpdateGlobalFlagValues has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
xray.parseDetectUTF8 (cyclomatic 17) pkg/app/master/command/xray/cli.go:561— xray.parseDetectUTF8 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.
Execution.initServices (cyclomatic 17) pkg/app/master/compose/execution.go:438— Execution.initServices has cyclomatic complexity 17 (threshold 15). Of this number, 16 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.
store.detectAppStack (cyclomatic 17) REDACTED:2481— store.detectAppStack 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.
InvalidStageArgs.Run (cyclomatic 17) pkg/docker/linter/check/id20005.go:34— InvalidStageArgs.Run 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.
debug.completeTarget (cyclomatic 16) pkg/app/master/command/debug/prompt.go:140— debug.completeTarget 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.
debug.completeSession (cyclomatic 16) pkg/app/master/command/debug/prompt.go:197— debug.completeSession 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.
run.OnCommand (cyclomatic 16) pkg/app/master/command/run/handler.go:33— run.OnCommand has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 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.
container.BuildStartupCommand (cyclomatic 16) pkg/app/master/inspectors/container/container_startup.go:23— container.BuildStartupCommand 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.
FastCGITransport.buildEnv (cyclomatic 16) pkg/app/master/probe/http/internal/fastcgi.go:124— FastCGITransport.buildEnv has cyclomatic complexity 16 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
artifact.ngxEnsure (cyclomatic 16) REDACTED:3175— artifact.ngxEnsure 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.
internalbuilder.layerFromDir (cyclomatic 16) pkg/imagebuilder/internalbuilder/engine.go:267— internalbuilder.layerFromDir has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 281). 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.
fsutil.ReplaceFileData (cyclomatic 16) REDACTED:717— fsutil.ReplaceFileData 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.
Instance.GenericListCall (cyclomatic 16) pkg/vulnerability/epss/api/api.go:199— Instance.GenericListCall 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.
TodoComment repeated across 12 files REDACTED:67— The identical TodoComment appears in 12 files (17 occurrences) — almost certainly one boilerplate line from a single migration or decision, not 17 independent debts. Fix the systemic cause once rather than file-by-file. Text: "//TODO:". Source code is not a task system: track the cleanup where tasks live. (Every occurrence still counts toward the score and metrics.)
XxxComment pkg/docker/dockerfile/ast/line_parsers.go:285— // XXX to get around regexp.Split *always* providing an empty string at the — 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.
dockerimage.LoadPackage (cognitive 538) REDACTED:518— dockerimage.LoadPackage has cognitive complexity 538 (threshold 15). Drivers by points: if/else 136 (426 pts), loops 17 (61 pts), match/switch 7 (28 pts), boolean chains 23 (nesting depth added 355). 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.
store.saveArtifacts (cognitive 513) REDACTED:1681— store.saveArtifacts has cognitive complexity 513 (threshold 15). Drivers by points: if/else 166 (445 pts), loops 24 (40 pts), boolean chains 23, jumps 5 (nesting depth added 295). Of this number, 466 points are the body's own statements and 47 belong to 3 function literals inside it that branch. 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.
xray.printImagePackage (cognitive 400) pkg/app/master/command/xray/handler.go:643— xray.printImagePackage has cognitive complexity 400 (threshold 15). Drivers by points: if/else 83 (306 pts), loops 25 (70 pts), boolean chains 24 (nesting depth added 268). Of this number, 397 points are the body's own statements and 3 belong to one function literal inside it that branches. 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.
build.OnCommand (cognitive 395) pkg/app/master/command/build/handler.go:64— build.OnCommand has cognitive complexity 395 (threshold 15). Drivers by points: if/else 99 (272 pts), loops 30 (108 pts), boolean chains 12, match/switch 1 (3 pts) (nesting depth added 253). Of this number, 203 points are the body's own statements and 192 belong to 4 function literals inside it that branch. 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.
dockerimage.inspectFile (cognitive 320) REDACTED:1713— dockerimage.inspectFile has cognitive complexity 320 (threshold 15). Drivers by points: if/else 80 (297 pts), boolean chains 13, loops 5 (10 pts) (nesting depth added 222). 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.
parser.FromFile (cognitive 309) pkg/docker/dockerfile/parser/parser.go:24— parser.FromFile has cognitive complexity 309 (threshold 15). Drivers by points: if/else 64 (257 pts), loops 5 (24 pts), match/switch 3 (21 pts), boolean chains 7 (nesting depth added 230). 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.
reverse.DockerfileFromHistoryStruct (cognitive 224) pkg/docker/dockerfile/reverse/reverse.go:218— reverse.DockerfileFromHistoryStruct has cognitive complexity 224 (threshold 15). Drivers by points: if/else 64 (198 pts), loops 8 (17 pts), match/switch 2 (6 pts), boolean chains 3 (nesting depth added 147). 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.
CustomProbe.Start (cognitive 210) pkg/app/master/probe/http/custom_probe.go:263— CustomProbe.Start has cognitive complexity 210 (threshold 15). Drivers by points: if/else 51 (171 pts), loops 7 (18 pts), match/switch 4 (17 pts), boolean chains 4 (nesting depth added 144). Most of this is not in the body itself: 1 of the 210 points is its own statement and the rest belongs to one function literal inside it that branches (line 271). 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.
Inspector.RunContainer (cognitive 175) pkg/app/master/inspectors/container/container_inspector.go:315— Inspector.RunContainer has cognitive complexity 175 (threshold 15). Drivers by points: if/else 83 (143 pts), loops 10 (15 pts), boolean chains 14, match/switch 2 (3 pts) (nesting depth added 66). Of this number, 137 points are the body's own statements and 38 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.
xray.OnCommand (cognitive 131) pkg/app/master/command/xray/handler.go:94— xray.OnCommand has cognitive complexity 131 (threshold 15). Drivers by points: if/else 52 (95 pts), loops 14 (26 pts), boolean chains 7, match/switch 1 (3 pts) (nesting depth added 57). 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.
builder.NewImageBuilder (cognitive 129) pkg/app/master/builder/image_builder.go:139— builder.NewImageBuilder has cognitive complexity 129 (threshold 15). Drivers by points: if/else 32 (78 pts), loops 13 (38 pts), boolean chains 10, match/switch 1 (3 pts) (nesting depth added 73). 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.
debug.HandleKubernetesRuntime (cognitive 128) pkg/app/master/command/debug/handle_kubernetes_runtime.go:30— debug.HandleKubernetesRuntime has cognitive complexity 128 (threshold 15). Drivers by points: if/else 60 (105 pts), loops 10 (19 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 56). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
App.collect (cognitive 126) pkg/monitor/ptrace/ptrace.go:660— App.collect has cognitive complexity 126 (threshold 15). Drivers by points: if/else 39 (106 pts), match/switch 5 (17 pts), boolean chains 2, loops 1 (nesting depth added 79). 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.
dockerimage.layerFromStream (cognitive 123) REDACTED:1438— dockerimage.layerFromStream has cognitive complexity 123 (threshold 15). Drivers by points: if/else 46 (117 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 72). 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.
store.saveCertsData (cognitive 120) REDACTED:1500— store.saveCertsData has cognitive complexity 120 (threshold 15). Drivers by points: if/else 28 (93 pts), loops 8 (17 pts), match/switch 2 (6 pts), boolean chains 4 (nesting depth added 78). Of this number, 18 points are the body's own statements and 102 belong to 4 function literals inside it that branch. 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.
PackageFiles.ListLayerFiles (cognitive 116) pkg/docker/dockerimage/packagefiles.go:209— PackageFiles.ListLayerFiles has cognitive complexity 116 (threshold 15). Drivers by points: if/else 26 (85 pts), loops 8 (22 pts), boolean chains 7, match/switch 1 (2 pts) (nesting depth added 74). 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.
PyPipInstallLatest.Run (cognitive 96) pkg/docker/linter/check/id20018.go:37— PyPipInstallLatest.Run has cognitive complexity 96 (threshold 15). Drivers by points: if/else 15 (76 pts), boolean chains 10, loops 3 (10 pts) (nesting depth added 68). Of this number, 95 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
fsutil.copyFileObjectHandler (cognitive 87) REDACTED:811— fsutil.copyFileObjectHandler has cognitive complexity 87 (threshold 15). Drivers by points: if/else 30 (85 pts), loops 1, match/switch 1 (nesting depth added 55). None of this is in the body itself: all 87 points belong to one function literal inside it that branches (line 819). 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.
fsutil.CopyRegularFile (cognitive 84) REDACTED:518— fsutil.CopyRegularFile has cognitive complexity 84 (threshold 15). Drivers by points: if/else 33 (84 pts) (nesting depth added 51). 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.
Execution.monitorContainerExitSync (cognitive 83) REDACTED:429— Execution.monitorContainerExitSync has cognitive complexity 83 (threshold 15). Drivers by points: if/else 15 (75 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 61). 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.
store.saveSSHClient (cognitive 80) REDACTED:1163— store.saveSSHClient has cognitive complexity 80 (threshold 15). Drivers by points: if/else 24 (61 pts), loops 9 (18 pts), boolean chains 1 (nesting depth added 46). Of this number, 76 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Instance.call (cognitive 80) pkg/vulnerability/epss/api/api.go:380— Instance.call has cognitive complexity 80 (threshold 15). Drivers by points: if/else 35 (77 pts), boolean chains 3 (nesting depth added 42). 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.
debug.waitForContainer (cognitive 77) pkg/app/master/command/debug/handle_kubernetes_runtime.go:1004— debug.waitForContainer has cognitive complexity 77 (threshold 15). Drivers by points: if/else 14 (71 pts), match/switch 2 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 59). None of this is in the body itself: all 77 points belong to one function literal inside it that branches (line 1015). 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.
store.saveOSLibsNetwork (cognitive 75) REDACTED:1347— store.saveOSLibsNetwork has cognitive complexity 75 (threshold 15). Drivers by points: if/else 20 (56 pts), loops 7 (15 pts), boolean chains 4 (nesting depth added 44). 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.
linter.Execute (cognitive 75) pkg/docker/linter/linter.go:91— linter.Execute has cognitive complexity 75 (threshold 15). Drivers by points: if/else 26 (61 pts), loops 5 (9 pts), jumps 2, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 40). Of this number, 73 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
artifact.findSymlinks (cognitive 74) REDACTED:3313— artifact.findSymlinks has cognitive complexity 74 (threshold 15). Drivers by points: if/else 37 (64 pts), loops 6 (8 pts), boolean chains 2 (nesting depth added 29). Of this number, 30 points are the body's own statements and 44 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.
reverse.deserialiseHealtheckInstruction (cognitive 71) pkg/docker/dockerfile/reverse/reverse.go:714— reverse.deserialiseHealtheckInstruction has cognitive complexity 71 (threshold 15). Drivers by points: if/else 36 (65 pts), loops 2 (3 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 31). 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.
Execution.Start (cognitive 69) REDACTED:158— Execution.Start has cognitive complexity 69 (threshold 15). Drivers by points: if/else 36 (61 pts), boolean chains 5, loops 1 (3 pts) (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.
InteractiveApp.complete (cognitive 65) pkg/app/master/command/cliprompt.go:113— InteractiveApp.complete has cognitive complexity 65 (threshold 15). Drivers by points: if/else 34 (57 pts), boolean chains 4, loops 3 (4 pts) (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.
sodeps.AllDependencies (cognitive 62) pkg/app/sensor/inspector/sodeps/sodeps.go:50— sodeps.AllDependencies has cognitive complexity 62 (threshold 15). Drivers by points: if/else 24 (54 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 32). 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.
build.UpdateBuildOptionsWithNewInstructions (cognitive 61) pkg/app/master/command/build/image.go:494— build.UpdateBuildOptionsWithNewInstructions has cognitive complexity 61 (threshold 15). Drivers by points: if/else 14 (38 pts), loops 7 (18 pts), boolean chains 5 (nesting depth added 35). 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.
ast.extractBuilderFlags (cognitive 61) pkg/docker/dockerfile/ast/split_command.go:31— ast.extractBuilderFlags has cognitive complexity 61 (threshold 15). Drivers by points: if/else 18 (53 pts), boolean chains 7, loops 1 (nesting depth added 35). 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.
http.NewContainerProbe (cognitive 57) pkg/app/master/probe/http/custom_probe.go:81— http.NewContainerProbe has cognitive complexity 57 (threshold 15). Drivers by points: if/else 20 (49 pts), loops 4 (8 pts) (nesting depth added 33). 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.
App.processFileActivity (cognitive 57) pkg/monitor/ptrace/ptrace.go:264— App.processFileActivity has cognitive complexity 57 (threshold 15). Drivers by points: if/else 14 (40 pts), match/switch 2 (11 pts), boolean chains 6 (nesting depth added 35). 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.
Engine.Build (cognitive 56) pkg/imagebuilder/internalbuilder/engine.go:51— Engine.Build has cognitive complexity 56 (threshold 15). Drivers by points: if/else 27 (48 pts), loops 2 (4 pts), match/switch 2 (3 pts), boolean chains 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.
debug.HandleDockerRuntime (cognitive 54) REDACTED:22— debug.HandleDockerRuntime has cognitive complexity 54 (threshold 15). Drivers by points: if/else 23 (40 pts), loops 5 (10 pts), match/switch 1 (3 pts), boolean chains 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.
ast.parseWords (cognitive 53) pkg/docker/dockerfile/ast/line_parsers.go:82— ast.parseWords has cognitive complexity 53 (threshold 15). Drivers by points: if/else 16 (46 pts), boolean chains 6, loops 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
store.resolveLinks (cognitive 50) REDACTED:797— store.resolveLinks has cognitive complexity 50 (threshold 15). Drivers by points: if/else 19 (44 pts), loops 3 (4 pts), boolean chains 2 (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.
CommandServer.OnConnection (cognitive 50) REDACTED:618— CommandServer.OnConnection has cognitive complexity 50 (threshold 15). Drivers by points: if/else 17 (45 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 30). Most of this is not in the body itself: 1 of the 50 points is its own statement and the rest belongs to one function literal inside it that branches (line 628). 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.
merge.OnCommand (cognitive 48) REDACTED:34— merge.OnCommand has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (24 pts), loops 11 (21 pts), boolean chains 3 (nesting depth added 18). Of this number, 40 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.
compose.startContainer (cognitive 48) pkg/app/master/compose/execution.go:1246— compose.startContainer has cognitive complexity 48 (threshold 15). Drivers by points: if/else 19 (31 pts), loops 4 (8 pts), boolean chains 5, match/switch 1 (4 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.
build.monitorContainer (cognitive 47) pkg/app/master/command/build/handler.go:1262— build.monitorContainer has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (30 pts), loops 5 (14 pts), match/switch 1 (2 pts), boolean chains 1 (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.
Execution.initServices (cognitive 44) pkg/app/master/compose/execution.go:438— Execution.initServices has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (34 pts), loops 4 (10 pts) (nesting depth added 26). Of this number, 42 points are the body's own statements and 2 belong to one function literal inside it that branches. 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.
Inspector.setPorts (cognitive 44) pkg/app/master/inspectors/container/container_inspector.go:958— Inspector.setPorts has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (28 pts), loops 6 (15 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
store.prepareArtifacts (cognitive 44) REDACTED:696— store.prepareArtifacts has cognitive complexity 44 (threshold 15). Drivers by points: if/else 13 (31 pts), loops 4 (6 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 22). 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.
registry.OnImageIndexCreateCommand (cognitive 42) pkg/app/master/command/registry/handler_image_index.go:30— registry.OnImageIndexCreateCommand has cognitive complexity 42 (threshold 15). Drivers by points: if/else 26 (37 pts), boolean chains 4, loops 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.
artifact.ngxEnsure (cognitive 42) REDACTED:3175— artifact.ngxEnsure has cognitive complexity 42 (threshold 15). Drivers by points: if/else 21 (42 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dockerclient.New (cognitive 42) pkg/docker/dockerclient/client.go:134— dockerclient.New has cognitive complexity 42 (threshold 15). Drivers by points: if/else 19 (33 pts), boolean chains 8, match/switch 1 (nesting depth added 14). Of this number, 37 points are the body's own statements and 5 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.
BadContainerCommands.Run (cognitive 42) pkg/docker/linter/check/id20022.go:49— BadContainerCommands.Run has cognitive complexity 42 (threshold 15). Drivers by points: if/else 8 (33 pts), loops 3 (9 pts) (nesting depth added 31). 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.
build.UpdateBuildOptionsWithOverrides (cognitive 41) pkg/app/master/command/build/image.go:572— build.UpdateBuildOptionsWithOverrides has cognitive complexity 41 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 4 (14 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 28). 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.
command.ParseHTTPProbesFile (cognitive 41) pkg/app/master/command/clifvparser.go:650— command.ParseHTTPProbesFile has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (35 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 23). 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.
xray.parseDetectUTF8 (cognitive 41) pkg/app/master/command/xray/cli.go:561— xray.parseDetectUTF8 has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (39 pts), boolean chains 2 (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.
monitor.processEvent (cognitive 41) pkg/app/sensor/monitor/fanotify/monitor.go:272— monitor.processEvent has cognitive complexity 41 (threshold 15). Drivers by points: if/else 21 (35 pts), boolean chains 6 (nesting depth added 14). 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.
build.buildOutputImage (cognitive 40) pkg/app/master/command/build/image.go:274— build.buildOutputImage has cognitive complexity 40 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 5, match/switch 1 (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.
InvalidStageArgs.Run (cognitive 36) pkg/docker/linter/check/id20005.go:34— InvalidStageArgs.Run has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (29 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fsutil.cloneDirPath (cognitive 36) REDACTED:431— fsutil.cloneDirPath has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (34 pts), loops 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.
processor.PrepareEnv (cognitive 35) REDACTED:371— processor.PrepareEnv has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (30 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SeparateRemove.Run (cognitive 35) pkg/docker/linter/check/id20021.go:37— SeparateRemove.Run has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (31 pts), loops 2 (4 pts) (nesting depth added 25). 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.
lint.printLintResults (cognitive 34) pkg/app/master/command/lint/handler.go:152— lint.printLintResults has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 5 (16 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
profile.OnCommand (cognitive 34) pkg/app/master/command/profile/handler.go:44— profile.OnCommand has cognitive complexity 34 (threshold 15). Drivers by points: if/else 21 (27 pts), boolean chains 3, match/switch 2 (3 pts), loops 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
compose.NewConfigInfo (cognitive 33) pkg/app/master/compose/execution.go:183— compose.NewConfigInfo has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 3 (5 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.
artifact.rbEnsureGemFiles (cognitive 33) REDACTED:2955— artifact.rbEnsureGemFiles has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (27 pts), loops 2 (4 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.
store.prepareArtifact (cognitive 33) REDACTED:605— store.prepareArtifact has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (32 pts), match/switch 1 (nesting depth added 19). 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.
appbom.Get (cognitive 33) pkg/appbom/appbom.go:158— appbom.Get has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 4 (5 pts), match/switch 2 (5 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.
MalformedInstExecForm.Run (cognitive 33) pkg/docker/linter/check/id20013.go:36— MalformedInstExecForm.Run has cognitive complexity 33 (threshold 15). Drivers by points: if/else 4 (19 pts), loops 4 (13 pts), boolean chains 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.
debug.completeTarget (cognitive 32) pkg/app/master/command/debug/prompt.go:140— debug.completeTarget has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (8 pts), boolean chains 5 (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.
debug.completeSession (cognitive 32) pkg/app/master/command/debug/prompt.go:197— debug.completeSession has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (8 pts), boolean chains 5 (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.
Execution.PrepareService (cognitive 32) pkg/app/master/compose/execution.go:608— Execution.PrepareService has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (30 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
monitor.Start (cognitive 32) pkg/app/sensor/monitor/fanotify/monitor.go:113— monitor.Start has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 4 (9 pts), loops 3, jumps 2 (nesting depth added 13). Most of this is not in the body itself: 2 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 134). 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.
sodeps.resolveDepArtifacts (cognitive 30) pkg/app/sensor/inspector/sodeps/sodeps.go:192— sodeps.resolveDepArtifacts has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (29 pts), loops 1 (nesting depth added 19). 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.
pattern.compile (cognitive 30) pkg/docker/dockerignore/dockerignore.go:223— pattern.compile has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 1, loops 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.
RelativeWorkdir.Run (cognitive 30) pkg/docker/linter/check/id20015.go:36— RelativeWorkdir.Run has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (21 pts), loops 3 (9 pts) (nesting depth added 22). 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.
fsutil.CopySymlinkFile (cognitive 30) REDACTED:358— fsutil.CopySymlinkFile has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (30 pts) (nesting depth added 16). 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.
command.ParseHTTPProbes (cognitive 29) pkg/app/master/command/clifvparser.go:579— command.ParseHTTPProbes has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (20 pts), boolean chains 6, match/switch 1 (2 pts), loops 1 (nesting depth added 14). 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.
Inspector.ShutdownContainer (cognitive 28) pkg/app/master/inspectors/container/container_inspector.go:1162— Inspector.ShutdownContainer has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (28 pts) (nesting depth added 14). Of this number, 24 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Inspector.publishPorts (cognitive 28) REDACTED:394— Inspector.publishPorts has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 14). Of this number, 20 points are the body's own statements and 8 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.
fsutil.CopyDirOnly (cognitive 28) REDACTED:980— fsutil.CopyDirOnly has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (28 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.
CustomProbe.apiSpecEndpointCall (cognitive 27) pkg/app/master/probe/http/swagger.go:311— CustomProbe.apiSpecEndpointCall has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (26 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.
reverse.stripRunInstArgs (cognitive 27) pkg/docker/dockerfile/reverse/reverse.go:635— reverse.stripRunInstArgs has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (26 pts), boolean chains 1 (nesting depth added 15). 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.
EntrypointCmdShellForm.Run (cognitive 27) pkg/docker/linter/check/id20012.go:40— EntrypointCmdShellForm.Run has cognitive complexity 27 (threshold 15). Drivers by points: if/else 3 (14 pts), loops 4 (13 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
launcher.Start (cognitive 27) pkg/launcher/launcher.go:80— launcher.Start has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (27 pts) (nesting depth added 14). 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.
build.finishCommand (cognitive 26) pkg/app/master/command/build/handler.go:1498— build.finishCommand has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (21 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
container.BuildStartupCommand (cognitive 26) pkg/app/master/inspectors/container/container_startup.go:23— container.BuildStartupCommand has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
http.apiSpecPrefix (cognitive 26) pkg/app/master/probe/http/swagger.go:159— http.apiSpecPrefix has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 2 (4 pts), boolean chains 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.
artifact.homeDirs (cognitive 26) REDACTED:1114— artifact.homeDirs has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 3 (7 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.
ast.Parse (cognitive 26) pkg/docker/dockerfile/ast/parser.go:277— ast.Parse has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 2 (3 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.
dockerfile.GenerateFromInfo (cognitive 26) REDACTED:52— dockerfile.GenerateFromInfo has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 6 (12 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.
compose.MountsFromVolumeConfigs (cognitive 25) pkg/app/master/compose/execution.go:894— compose.MountsFromVolumeConfigs has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 2 (nesting depth added 13). 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.
build.inspectFatImage (cognitive 24) pkg/app/master/command/build/image.go:29— build.inspectFatImage has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 2 (5 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.
Inspector.setAvailablePorts (cognitive 24) pkg/app/master/inspectors/container/container_inspector.go:1053— Inspector.setAvailablePorts has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 9). Of this number, 22 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
store.enumerateArtifacts (cognitive 24) REDACTED:2671— store.enumerateArtifacts has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 2 (3 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.
fsutil.ArchiveDir (cognitive 24) REDACTED:1432— fsutil.ArchiveDir has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (23 pts), match/switch 1 (nesting depth added 9). Most of this is not in the body itself: 3 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 1455). 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.
Instance.GenericListCall (cognitive 24) pkg/vulnerability/epss/api/api.go:199— Instance.GenericListCall has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (21 pts), match/switch 1 (3 pts) (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.
Output.State (cognitive 23) pkg/app/execontext.go:261— Output.State has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 1 (3 pts), boolean chains 2, match/switch 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.
builder.NewBasicImageBuilder (cognitive 23) pkg/app/master/builder/image_builder.go:58— builder.NewBasicImageBuilder has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (5 pts), boolean chains 3 (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.
debug.listK8sDebugContainers (cognitive 23) pkg/app/master/command/debug/handle_kubernetes_runtime.go:796— debug.listK8sDebugContainers has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 2, 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.
CustomProbe.crawl (cognitive 23) pkg/app/master/probe/http/crawler.go:22— CustomProbe.crawl has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 8, match/switch 1 (nesting depth added 1). Most of this is not in the body itself: 5 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 43). 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.
dockerutil.PrepareContainerDataArchive (cognitive 23) REDACTED:798— dockerutil.PrepareContainerDataArchive has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 3, 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.
fsutil.ReplaceFileData (cognitive 23) REDACTED:717— fsutil.ReplaceFileData has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fsutil.ArchiveFiles (cognitive 23) REDACTED:1368— fsutil.ArchiveFiles has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 1, loops 1 (nesting depth added 11). Of this number, 21 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
debug.completePod (cognitive 22) pkg/app/master/command/debug/prompt.go:107— debug.completePod has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 4, loops 1 (4 pts) (nesting depth added 12). 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.
store.detectAppStack (cognitive 22) REDACTED:2481— store.detectAppStack has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
epss.NewResultWithHistory (cognitive 22) pkg/vulnerability/epss/data.go:218— epss.NewResultWithHistory has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 2 (3 pts) (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.
run.OnCommand (cognitive 21) pkg/app/master/command/run/handler.go:33— run.OnCommand has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 7). Of this number, 12 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dockerhost.GetIP (cognitive 21) pkg/app/master/docker/dockerhost/host.go:17— dockerhost.GetIP has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 1, match/switch 1 (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.
dockerutil.SaveImage (cognitive 21) REDACTED:266— dockerutil.SaveImage 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.
build.GetContainerBuildOptions (cognitive 20) pkg/app/master/command/build/flags.go:653— build.GetContainerBuildOptions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 2 (4 pts), loops 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.
xray.parseChangeDataMatchers (cognitive 20) pkg/app/master/command/xray/cli.go:423— xray.parseChangeDataMatchers has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (xray.parseChangePathMatchers, xray.parseChangeDataHashMatchers) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
xray.parseChangePathMatchers (cognitive 20) pkg/app/master/command/xray/cli.go:471— xray.parseChangePathMatchers has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (xray.parseChangeDataMatchers, xray.parseChangeDataHashMatchers) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
xray.parseChangeDataHashMatchers (cognitive 20) pkg/app/master/command/xray/cli.go:516— xray.parseChangeDataHashMatchers has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (xray.parseChangeDataMatchers, xray.parseChangePathMatchers) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
FastCGITransport.buildEnv (cognitive 20) pkg/app/master/probe/http/internal/fastcgi.go:124— FastCGITransport.buildEnv has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 4). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
NoWorkdirPath.Run (cognitive 20) pkg/docker/linter/check/id20014.go:36— NoWorkdirPath.Run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 3 (9 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
App.process (cognitive 20) pkg/monitor/ptrace/ptrace.go:384— App.process has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (10 pts), match/switch 2 (4 pts), jumps 3, loops 3 (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.
fsutil.PrepareImageStateDirs (cognitive 20) REDACTED:1190— fsutil.PrepareImageStateDirs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2, loops 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Inspector.sensorCommandStart (cognitive 19) REDACTED:556— Inspector.sensorCommandStart has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dockerignore.readPatterns (cognitive 19) pkg/docker/dockerignore/dockerignore.go:75— dockerignore.readPatterns has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dockerutil.CopyToVolume (cognitive 19) REDACTED:506— dockerutil.CopyToVolume has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 1 (nesting depth added 5). Of this number, 18 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.
dockerutil.CopyFromContainer (cognitive 19) REDACTED:719— dockerutil.CopyFromContainer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
publisher.process (cognitive 19) pkg/mondel/mondel.go:115— publisher.process has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2, match/switch 1 (2 pts) (nesting depth added 10). Of this number, 13 points are the body's own statements and 6 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.
app.newCLI (cognitive 18) pkg/app/master/cli.go:73— app.newCLI has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), match/switch 2 (4 pts) (nesting depth added 5). None of this is in the body itself: all 18 points belong to 2 function literals inside it that branch (lines 88, 163). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
command.ParsePathPerms (cognitive 18) pkg/app/master/command/clifvparser.go:357— command.ParsePathPerms has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3 (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.
internalbuilder.layerFromDir (cognitive 18) pkg/imagebuilder/internalbuilder/engine.go:267— internalbuilder.layerFromDir has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 2 (nesting depth added 2). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 281). 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.
Client.Read (cognitive 18) REDACTED:370— Client.Read has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, 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.
system.NewOSShells (cognitive 18) pkg/system/os_shells.go:228— system.NewOSShells has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 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.
fsutil.PreparePostUpdateStateDir (cognitive 18) REDACTED:1132— fsutil.PreparePostUpdateStateDir has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 1, loops 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.
build.SourceToOutputImageLabels (cognitive 17) pkg/app/master/command/build/image.go:660— build.SourceToOutputImageLabels has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (6 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.
debug.completeNamespace (cognitive 17) pkg/app/master/command/debug/prompt.go:81— debug.completeNamespace has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 1 (4 pts), boolean chains 3 (nesting depth added 9). 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.
xray.getDetectOpParam (cognitive 17) pkg/app/master/command/xray/cli.go:636— xray.getDetectOpParam has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebsocketClient.Connect (cognitive 17) pkg/app/master/probe/http/wsclient.go:62— WebsocketClient.Connect has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 2 (6 pts), loops 1 (nesting depth added 10). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 85). 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.
seccomp.GenProfile (cognitive 17) pkg/app/master/security/seccomp/seccomp.go:66— seccomp.GenProfile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2 (3 pts) (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.
channel.NewCommandClient (cognitive 17) REDACTED:460— channel.NewCommandClient has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 1 (2 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.
EventServer.Publish (cognitive 17) REDACTED:225— EventServer.Publish has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 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.
compose.buildImage (cognitive 16) pkg/app/master/compose/execution.go:1133— compose.buildImage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 3, boolean chains 2 (nesting depth added 3). 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.
pod.fatContainerCmd (cognitive 16) REDACTED:765— pod.fatContainerCmd has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sensor.EnsureLocalBinary (cognitive 16) pkg/app/master/inspectors/sensor/sensor.go:22— sensor.EnsureLocalBinary has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (16 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.
processor.GetCurrentPaths (cognitive 16) REDACTED:303— processor.GetCurrentPaths has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, loops 1 (nesting depth added 3). 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 310). 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.
dockerutil.ListImages (cognitive 16) REDACTED:144— dockerutil.ListImages has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Command.saveInfo (cognitive 16) REDACTED:521— Command.saveInfo has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×1
REDACTED
D4 · Code Duplication· Near-duplicate member family (5 members, 36 shared lines) · ×1
Near-duplicate member family (5 members, 36 shared lines) pkg/app/master/command/containerize/handler.go:25— pkg/app/master/command/containerize/handler.go:25-81 | pkg/app/master/command/convert/handler.go:25-81 | pkg/app/master/command/debug/handler.go:27-119 | pkg/app/master/command/edit/handler.go:25-81 | pkg/app/master/command/images/handler.go:30-110 — These 5 members are variants of one another: a block of 36 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 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 5 times.
D4 · Code Duplication· Near-duplicate member family (4 members, 29 shared lines) · ×1
Near-duplicate member family (4 members, 29 shared lines) pkg/app/master/command/containerize/handler.go:25— pkg/app/master/command/containerize/handler.go:25-81 | pkg/app/master/command/convert/handler.go:25-81 | pkg/app/master/command/edit/handler.go:25-81 | pkg/app/master/command/probe/handler.go:31-104 — These 4 members are variants of one another: a block of 29 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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· Members sharing a duplicated core (11 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (11 members, 50+ identical tokens) REDACTED:37— REDACTED:37-330 | pkg/app/master/command/probe/handler.go:31-104 | pkg/app/master/command/profile/handler.go:83-563 | pkg/app/master/command/registry/handler_copy.go:24-79 | pkg/app/master/command/registry/handler_image_index.go:33-224 | pkg/app/master/command/registry/handler_pull.go:32-124 | pkg/app/master/command/registry/handler_push.go:27-110 | pkg/app/master/command/registry/handler_server.go:30-152 | pkg/app/master/command/run/handler.go:36-203 | pkg/app/master/command/server/handler.go:24-75 | pkg/app/master/command/vulnerability/handler_tool_epss.go:32-154 — These 11 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 11 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 11 times.
D4 · Code Duplication· Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (7 members, 50+ identical tokens) REDACTED:211— REDACTED:211-264 | REDACTED:266-357 | REDACTED:419-464 | REDACTED:466-504 | REDACTED:511-625 | REDACTED:669-717 | REDACTED:719-796 — These 7 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 7 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 7 times.
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/app/master/command/debug/prompt.go:81— pkg/app/master/command/debug/prompt.go:81-105 | pkg/app/master/command/debug/prompt.go:107-138 | pkg/app/master/command/debug/prompt.go:140-195 | pkg/app/master/command/debug/prompt.go:197-276 — 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 (84 corresponding lines) · ×1
Edited copy of a member (84 corresponding lines) pkg/docker/dockerfile/ast/line_parsers.go:82— pkg/docker/dockerfile/ast/line_parsers.go:82-165 | pkg/docker/dockerfile/ast/split_command.go:31-120 — These two members are one piece of code written twice and then edited apart: 84 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 (42 corresponding lines) · ×1
Edited copy of a member (42 corresponding lines) pkg/app/master/command/debug/handle_kubernetes_runtime.go:753— pkg/app/master/command/debug/handle_kubernetes_runtime.go:753-794 | pkg/app/master/command/debug/handle_kubernetes_runtime.go:898-940 — These two members are one piece of code written twice and then edited apart: 42 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 (41 corresponding lines) · ×1
Edited copy of a member (41 corresponding lines) pkg/app/execontext.go:134— pkg/app/execontext.go:134-174 | pkg/app/execontext.go:332-373 — These two members are one piece of code written twice and then edited apart: 41 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, 44+ corresponding lines) · ×1
Edited copies of one member (3 members, 44+ corresponding lines) pkg/app/master/command/xray/cli.go:423— pkg/app/master/command/xray/cli.go:423-469 | pkg/app/master/command/xray/cli.go:471-514 | pkg/app/master/command/xray/cli.go:516-559 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 44 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 (32 corresponding lines) · ×1
Edited copy of a member (32 corresponding lines) pkg/app/master/command/clifvparser.go:286— pkg/app/master/command/clifvparser.go:286-317 | pkg/app/master/command/clifvparser.go:319-355 — These two members are one piece of code written twice and then edited apart: 32 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 (37 corresponding lines) · ×1
Edited copy of a member (37 corresponding lines) pkg/app/master/command/debug/prompt.go:11— pkg/app/master/command/debug/prompt.go:11-56 | pkg/app/master/command/lint/prompt.go:10-46 — These two members are one piece of code written twice and then edited apart: 37 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 (5 members, 34+ corresponding lines) · ×1
Edited copies of one member (5 members, 34+ corresponding lines) pkg/docker/linter/check/id20010.go:35— pkg/docker/linter/check/id20010.go:35-68 | pkg/docker/linter/check/id20011.go:35-68 | pkg/docker/linter/check/id20012.go:40-78 | pkg/docker/linter/check/id20013.go:36-79 | pkg/docker/linter/check/id20015.go:36-80 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 34 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 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 36+ corresponding lines) · ×1
Edited copies of one member (3 members, 36+ corresponding lines) pkg/app/master/command/containerize/cli.go:10— pkg/app/master/command/containerize/cli.go:10-45 | pkg/app/master/command/convert/cli.go:10-45 | pkg/app/master/command/edit/cli.go:10-45 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 36 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 (36 corresponding lines) · ×1
Edited copy of a member (36 corresponding lines) pkg/app/master/probe/http/swagger.go:25— pkg/app/master/probe/http/swagger.go:25-60 | pkg/app/master/probe/http/swagger.go:202-252 — 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 (38 corresponding lines) · ×1
Edited copy of a member (38 corresponding lines) REDACTED:505— REDACTED:505-542 | REDACTED:544-586 — 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 copies of one member (3 members, 27+ corresponding lines) · ×1
Edited copies of one member (3 members, 27+ corresponding lines) pkg/app/execontext.go:176— pkg/app/execontext.go:176-202 | pkg/app/execontext.go:204-231 | pkg/app/execontext.go:233-259 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 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 copies of one member (5 members, 26+ corresponding lines) · ×1
Edited copies of one member (5 members, 26+ corresponding lines) pkg/docker/linter/check/id20003.go:33— pkg/docker/linter/check/id20003.go:33-60 | pkg/docker/linter/check/id20007.go:33-60 | pkg/docker/linter/check/id20008.go:35-60 | pkg/docker/linter/check/id20009.go:33-58 | pkg/docker/linter/check/id20016.go:33-65 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 26 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 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 24+ corresponding lines) · ×1
Edited copies of one member (4 members, 24+ corresponding lines) pkg/app/master/command/appbom/cli.go:10— pkg/app/master/command/appbom/cli.go:10-33 | pkg/app/master/command/images/cli.go:11-37 | pkg/app/master/command/server/cli.go:10-33 | pkg/app/master/command/version/cli.go:10-35 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 24 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 (16 corresponding lines) · ×1
Edited copy of a member (16 corresponding lines) pkg/monitor/ptrace/ptrace.go:989— pkg/monitor/ptrace/ptrace.go:989-1006 | pkg/monitor/ptrace/ptrace.go:1008-1023 — 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 (13 corresponding lines) · ×1
Edited copy of a member (13 corresponding lines) pkg/app/master/command/install/prompt.go:9— pkg/app/master/command/install/prompt.go:9-21 | pkg/app/master/command/update/prompt.go:9-21 — 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 (12 corresponding lines) · ×1
Edited copy of a member (12 corresponding lines) pkg/app/master/inspectors/container/container_inspector.go:1398— pkg/app/master/inspectors/container/container_inspector.go:1398-1409 | REDACTED:691-702 — 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.
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/docker/linter/check/id10002.go:30— pkg/docker/linter/check/id10002.go:30-46 | pkg/docker/linter/check/id20001.go:30-42 | pkg/docker/linter/check/id20002.go:30-42 — 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.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×1
Edited copy of a member (8 corresponding lines) pkg/sysidentity/sysidentity.go:198— pkg/sysidentity/sysidentity.go:198-205 | pkg/util/jsonutil/jsonutil.go:16-25 — 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.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×1
Edited copy of a member (11 corresponding lines) pkg/app/sensor/controlled/controlled.go:42— pkg/app/sensor/controlled/controlled.go:42-52 | pkg/app/sensor/standalone/standalone.go:51-63 — 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.
Duplicated block (37 lines × 2) pkg/app/master/command/debug/handle_kubernetes_runtime.go:315— pkg/app/master/command/debug/handle_kubernetes_runtime.go:315-351 | pkg/app/master/command/debug/handle_kubernetes_runtime.go:553-589 — 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/app/master/command/debug/handle_kubernetes_runtime.go:315` 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 (33 lines × 2) REDACTED:57— REDACTED:57-89 | pkg/app/master/command/debug/handle_kubernetes_runtime.go:161-193 — 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 `REDACTED:57` 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 (29 lines × 2) pkg/app/master/compose/execution.go:37— pkg/app/master/compose/execution.go:37-65 | REDACTED:30-58 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (28 lines × 2) pkg/app/master/command/debug/handle_kubernetes_runtime.go:754— pkg/app/master/command/debug/handle_kubernetes_runtime.go:754-781 | pkg/app/master/command/debug/handle_kubernetes_runtime.go:899-926 — 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/app/master/command/debug/handle_kubernetes_runtime.go:754` 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 (27 lines × 2) pkg/docker/linter/check/id20012.go:52— pkg/docker/linter/check/id20012.go:52-78 | pkg/docker/linter/check/id20013.go:53-79 — before extracting anything, compare `pkg/docker/linter/check/id20012.go` and `pkg/docker/linter/check/id20013.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/docker/linter/check/id20012.go:52` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (25 lines × 2) pkg/monitor/ptrace/ptrace.go:294— pkg/monitor/ptrace/ptrace.go:294-318 | pkg/monitor/ptrace/ptrace.go:345-369 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/monitor/ptrace/ptrace.go:294` 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–25 lines × 2) pkg/vulnerability/epss/api/api.go:246— pkg/vulnerability/epss/api/api.go:246-268 | pkg/vulnerability/epss/api/api.go:329-353 — 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/vulnerability/epss/api/api.go:246` 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 (24 lines × 3) pkg/docker/linter/check/id20018.go:38— pkg/docker/linter/check/id20018.go:38-61 | pkg/docker/linter/check/id20021.go:38-61 | pkg/docker/linter/check/id20022.go:50-73 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/docker/linter/check/id20018.go:38` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21–22 lines × 6) pkg/app/master/command/clifvparser.go:251— pkg/app/master/command/clifvparser.go:251-272 | pkg/app/master/command/clifvparser.go:480-501 | pkg/app/master/command/clifvparser.go:538-559 | pkg/app/master/command/clifvparser.go:770-791 | pkg/app/master/command/clifvparser.go:808-829 | pkg/app/master/command/clifvparser.go:854-874 — all 6 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 (22 lines × 2) REDACTED:117— REDACTED:117-138 | REDACTED:158-179 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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–20 lines × 3) pkg/docker/linter/check/id20014.go:53— pkg/docker/linter/check/id20014.go:53-71 | pkg/docker/linter/check/id20015.go:62-80 | pkg/docker/linter/check/id20021.go:70-89 — before extracting anything, compare `pkg/docker/linter/check/id20014.go` and `pkg/docker/linter/check/id20015.go` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/docker/linter/check/id20014.go:53` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (44 lines × 3) pkg/app/master/command/containerize/handler.go:32— pkg/app/master/command/containerize/handler.go:32-75 | pkg/app/master/command/convert/handler.go:32-75 | pkg/app/master/command/edit/handler.go:32-75 — `pkg/app/master/command/containerize/handler.go` and `pkg/app/master/command/convert/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 151 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/app/master/command/containerize/handler.go:32` 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–19 lines × 3) pkg/docker/linter/check/id20010.go:51— pkg/docker/linter/check/id20010.go:51-68 | pkg/docker/linter/check/id20011.go:51-68 | pkg/docker/linter/check/id20017.go:60-78 — before extracting anything, compare `pkg/docker/linter/check/id20010.go` and `pkg/docker/linter/check/id20011.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/docker/linter/check/id20010.go:51` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (26 lines × 2) pkg/app/master/command/registry/handler_image_index.go:229— pkg/app/master/command/registry/handler_image_index.go:229-254 | pkg/app/master/command/registry/handler_pull.go:129-154 — before extracting anything, compare `pkg/app/master/command/registry/handler_image_index.go` and `pkg/app/master/command/registry/handler_pull.go` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (17 lines × 7) pkg/app/master/command/containerize/handler.go:42— pkg/app/master/command/containerize/handler.go:42-58 | pkg/app/master/command/convert/handler.go:42-58 | pkg/app/master/command/debug/handler.go:64-80 | pkg/app/master/command/edit/handler.go:42-58 | pkg/app/master/command/images/handler.go:47-63 | pkg/app/master/command/run/handler.go:53-69 | pkg/app/master/command/server/handler.go:36-52 — `pkg/app/master/command/containerize/handler.go` and `pkg/app/master/command/convert/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 151 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (16–17 lines × 6) pkg/docker/linter/check/id20010.go:50— pkg/docker/linter/check/id20010.go:50-65 | pkg/docker/linter/check/id20011.go:50-65 | pkg/docker/linter/check/id20014.go:52-67 | pkg/docker/linter/check/id20015.go:61-76 | pkg/docker/linter/check/id20017.go:59-75 | pkg/docker/linter/check/id20021.go:69-85 — before extracting anything, compare `pkg/docker/linter/check/id20010.go` and `pkg/docker/linter/check/id20011.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/docker/linter/check/id20010.go:50` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 3) pkg/app/master/command/appbom/cli.go:17— pkg/app/master/command/appbom/cli.go:17-33 | pkg/app/master/command/images/cli.go:21-37 | pkg/app/master/command/server/cli.go:17-33 — `pkg/app/master/command/appbom/cli.go` and `pkg/app/master/command/server/cli.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 2 separate duplicated blocks between them, totalling at least 32 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (16–17 lines × 2) pkg/app/master/compose/execution.go:1022— pkg/app/master/compose/execution.go:1022-1037 | pkg/app/master/compose/execution.go:1085-1101 — 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 (16 lines × 3) pkg/docker/linter/check/id20012.go:57— pkg/docker/linter/check/id20012.go:57-72 | pkg/docker/linter/check/id20013.go:58-73 | pkg/docker/linter/check/id20016.go:47-62 — before extracting anything, compare `pkg/docker/linter/check/id20012.go` and `pkg/docker/linter/check/id20013.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/docker/linter/check/id20012.go:57` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–16 lines × 2) pkg/app/execontext.go:151— pkg/app/execontext.go:151-165 | pkg/app/execontext.go:350-365 — 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/app/execontext.go:151` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `data` in one and `ref *Output) Info(infoType` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12–15 lines × 7) pkg/app/master/command/appbom/cli.go:14— pkg/app/master/command/appbom/cli.go:14-25 | pkg/app/master/command/containerize/cli.go:14-25 | pkg/app/master/command/convert/cli.go:14-25 | pkg/app/master/command/edit/cli.go:14-25 | pkg/app/master/command/images/cli.go:15-29 | pkg/app/master/command/server/cli.go:14-25 | pkg/app/master/command/version/cli.go:14-25 — `pkg/app/master/command/appbom/cli.go` and `pkg/app/master/command/server/cli.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 2 separate duplicated blocks between them, totalling at least 32 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/app/master/command/appbom/cli.go:14` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 6) pkg/app/master/command/containerize/handler.go:67— pkg/app/master/command/containerize/handler.go:67-81 | pkg/app/master/command/convert/handler.go:67-81 | pkg/app/master/command/debug/handler.go:105-119 | pkg/app/master/command/edit/handler.go:67-81 | pkg/app/master/command/images/handler.go:96-110 | pkg/app/master/command/lint/handler.go:105-119 — `pkg/app/master/command/containerize/handler.go` and `pkg/app/master/command/convert/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 151 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/app/master/command/containerize/handler.go:67` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 3) REDACTED:268— REDACTED:268-282 | REDACTED:421-435 | REDACTED:721-735 — 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:268` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 12) pkg/app/master/command/containerize/handler.go:47— pkg/app/master/command/containerize/handler.go:47-60 | pkg/app/master/command/convert/handler.go:47-60 | pkg/app/master/command/debug/handler.go:69-82 | pkg/app/master/command/edit/handler.go:47-60 | pkg/app/master/command/images/handler.go:52-65 | pkg/app/master/command/profile/handler.go:106-119 | pkg/app/master/command/registry/handler_copy.go:45-58 | pkg/app/master/command/registry/handler_image_index.go:54-67 | pkg/app/master/command/registry/handler_pull.go:58-71 | pkg/app/master/command/registry/handler_push.go:48-61 | pkg/app/master/command/run/handler.go:58-71 | pkg/app/master/command/server/handler.go:41-54 — `pkg/app/master/command/containerize/handler.go` and `pkg/app/master/command/convert/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 151 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/app/master/command/containerize/handler.go:47` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 10) REDACTED:316— REDACTED:316-329 | pkg/app/master/command/probe/handler.go:90-103 | pkg/app/master/command/registry/handler_copy.go:65-78 | pkg/app/master/command/registry/handler_image_index.go:210-223 | pkg/app/master/command/registry/handler_pull.go:110-123 | pkg/app/master/command/registry/handler_push.go:96-109 | pkg/app/master/command/registry/handler_server.go:93-106 | pkg/app/master/command/run/handler.go:189-202 | pkg/app/master/command/server/handler.go:61-74 | pkg/app/master/command/vulnerability/handler_tool_epss.go:140-153 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 10 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 10 times.
Duplicated block (14 lines × 3) pkg/vulnerability/epss/data.go:197— pkg/vulnerability/epss/data.go:197-210 | pkg/vulnerability/epss/data.go:242-255 | pkg/vulnerability/epss/data.go:264-277 — 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 (13–14 lines × 2) REDACTED:2693— REDACTED:2693-2705 | REDACTED:2719-2732 — 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:2693` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 5) REDACTED:271— REDACTED:271-283 | REDACTED:424-436 | REDACTED:512-524 | REDACTED:681-693 | REDACTED:724-736 — all 5 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:271` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 4) pkg/docker/linter/check/id20018.go:124— pkg/docker/linter/check/id20018.go:124-136 | pkg/docker/linter/check/id20019.go:51-63 | pkg/docker/linter/check/id20021.go:64-76 | pkg/docker/linter/check/id20022.go:79-91 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/docker/linter/check/id20018.go:124` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–13 lines × 2) pkg/app/sensor/controlled/controlled.go:210— pkg/app/sensor/controlled/controlled.go:210-218 | pkg/app/sensor/standalone/standalone.go:222-234 — `pkg/app/sensor/controlled/controlled.go` and `pkg/app/sensor/standalone/standalone.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 39 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/app/sensor/controlled/controlled.go:210` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 11) REDACTED:318— REDACTED:318-330 | pkg/app/master/command/probe/handler.go:92-104 | pkg/app/master/command/profile/handler.go:551-563 | pkg/app/master/command/registry/handler_copy.go:67-79 | pkg/app/master/command/registry/handler_image_index.go:212-224 | pkg/app/master/command/registry/handler_pull.go:112-124 | pkg/app/master/command/registry/handler_push.go:98-110 | pkg/app/master/command/registry/handler_server.go:95-106 | pkg/app/master/command/run/handler.go:191-203 | pkg/app/master/command/server/handler.go:63-75 | pkg/app/master/command/vulnerability/handler_tool_epss.go:142-154 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 11 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 11 times. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:318` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 7) REDACTED:213— REDACTED:213-225 | REDACTED:272-283 | REDACTED:425-436 | REDACTED:471-483 | REDACTED:513-524 | REDACTED:682-693 | REDACTED:725-736 — all 7 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:213` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 6) pkg/docker/linter/check/id20010.go:44— pkg/docker/linter/check/id20010.go:44-55 | pkg/docker/linter/check/id20011.go:44-55 | pkg/docker/linter/check/id20012.go:51-62 | pkg/docker/linter/check/id20013.go:52-63 | pkg/docker/linter/check/id20014.go:46-57 | pkg/docker/linter/check/id20015.go:55-66 — before extracting anything, compare `pkg/docker/linter/check/id20010.go` and `pkg/docker/linter/check/id20011.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/docker/linter/check/id20010.go:44` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–10 lines × 2) REDACTED:548— REDACTED:548-557 | REDACTED:892-900 — 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:548` 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–7 lines × 3) REDACTED:2242— REDACTED:2242-2248 | REDACTED:2370-2376 | REDACTED:2384-2389 — 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:2242` 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 (7 lines × 4) pkg/system/syscalls_armf32.go:383— pkg/system/syscalls_armf32.go:383-389 | pkg/system/syscalls_armf64.go:318-324 | pkg/system/syscalls_x86f32.go:472-478 | pkg/system/syscalls_x86f64.go:472-478 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
Duplicated block (26–27 lines × 2) REDACTED:825— REDACTED:825-851 | REDACTED:997-1022 — 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:825` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 4) pkg/docker/linter/check/id20005.go:48— pkg/docker/linter/check/id20005.go:48-62 | pkg/docker/linter/check/id20005.go:69-83 | pkg/docker/linter/check/id20005.go:89-103 | pkg/docker/linter/check/id20005.go:112-126 — 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/docker/linter/check/id20005.go:48` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) pkg/app/master/command/xray/cli.go:432— pkg/app/master/command/xray/cli.go:432-442 | pkg/app/master/command/xray/cli.go:480-490 | pkg/app/master/command/xray/cli.go:525-535 — 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/app/master/command/xray/cli.go:432` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 5) pkg/app/master/command/containerize/cli.go:28— pkg/app/master/command/containerize/cli.go:28-36 | pkg/app/master/command/convert/cli.go:28-36 | pkg/app/master/command/edit/cli.go:28-36 | pkg/app/master/command/profile/cli.go:97-105 | pkg/app/master/command/xray/cli.go:112-120 — `pkg/app/master/command/containerize/cli.go` and `pkg/app/master/command/convert/cli.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 58 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `pkg/app/master/command/xray/cli.go:109` calls `String` and `pkg/app/master/command/containerize/cli.go:25` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 3) REDACTED:1061— REDACTED:1061-1068 | REDACTED:1185-1192 | REDACTED:1233-1240 — 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:1061` 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 (5 lines × 2) REDACTED:2222— REDACTED:2222-2226 | REDACTED:2466-2470 — 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:2222` 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.
Orphaned file pkg/app/master/inspectors/container/container_inspector.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/app/master/command/xray/handler.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/monitor/ptrace/ptrace.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/app/master/command/cliflags.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file REDACTED:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/app/master/command/debug/handle_kubernetes_runtime.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file REDACTED:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file 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 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 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/app/master/probe/http/custom_probe.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/app/master/command/xray/cli.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/app/master/command/clifvparser.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/app/master/command/profile/handler.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file 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/app/master/command/cliprompt.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/sysidentity/sysidentity.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/vulnerability/epss/api/api.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/app/master/command/xray/flags.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/docker/dockerimage/metadata.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/app/master/command/clifvgetter.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file REDACTED:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/app/master/inspectors/image/image_inspector.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/docker/dockerfile/ast/parser.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/appbom/appbom.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 REDACTED:435— `devent == nil || devent.ID == "" || devent.Status == ""` appears character-identically in 2 files — REDACTED, pkg/app/master/inspectors/container/container_inspector.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/app/master/command/cliprompt.go:47— `gparams.InContainer && gparams.IsDSImage` appears character-identically in 16 files — pkg/app/master/command/cliprompt.go, pkg/app/master/command/containerize/handler.go, pkg/app/master/command/convert/handler.go, pkg/app/master/command/debug/handler.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/app/master/compose/execution.go:1006— `imageRef == "" || imageRef == "." || imageRef == ".."` appears character-identically in 2 files — pkg/app/master/compose/execution.go, REDACTED. 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:233— `len(commandParams.Cmd) == 0 && CgrSlimToolkitDebugImage == commandParams.DebugContainerImage` appears character-identically in 2 files — REDACTED, pkg/app/master/command/debug/handle_kubernetes_runtime.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:449— `ok && exitCodeStr != "" && exitCodeStr != "0"` appears character-identically in 2 files — REDACTED, pkg/app/master/inspectors/container/container_inspector.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/app/master/inspectors/container/container_inspector.go:876— `os.IsTimeout(err) || err == channel.ErrWaitTimeout` appears character-identically in 2 files — pkg/app/master/inspectors/container/container_inspector.go, REDACTED. 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/docker/dockerclient/client.go:224— `socketInfo == nil || socketInfo.Address == ""` appears character-identically in 2 files — pkg/docker/dockerclient/client.go, REDACTED. 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:211— `strings.HasPrefix(vol.Source, "./") || strings.HasPrefix(vol.Source, "../") || (vol.Source == "..") || (vol.Source == ".")` appears character-identically in 2 files — REDACTED, pkg/app/master/inspectors/container/container_inspector.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.
D34 · Knowledge Freshness· Most significant orphaned file · ×3
Most significant orphaned file REDACTED:1— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
Most significant orphaned file REDACTED:1— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
Most significant orphaned file pkg/app/master/compose/execution.go:1— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
No ADRs found cmd/slim-sensor/main.go:1— No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `cmd/slim-sensor/main.go` makes this repository a deployable product (line 1).
Scattered collaborators — 82 % of calls cross a namespace and only 58 % 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
Concentrated knowledge decay — 119 of 120 significant files have no living knowledge, while the repository is still being changed at a low rate (1 commit(s) in the last 90 days) — so this is one repo-wide knowledge-decay state, not 119 separate risks. Counted over 120 of the 283 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. The code moved on without the people who understood these files: document them or schedule a read-through before the next change lands in them.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
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/9 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/c-bata/go-prompt — `github.com/c-bata/go-prompt` is required at v0.2.3 in REDACTED, but v0.2.6 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/c-bata/go-prompt@v0.2.6 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/c4milo/unpackit — `github.com/c4milo/unpackit` is required at v0.0.0-20170704181138-4ed373e9ef1c in REDACTED, but v1.0.0 is the module's current release — so this build is missing every fix published since, including any security fix. This crosses a major version — v0 releases carry no compatibility promise, so read the changelog before taking it. Run `go get github.com/c4milo/unpackit@v1.0.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/cespare/xxhash/v2 — `github.com/cespare/xxhash/v2` is required at v2.2.0 in REDACTED, but v2.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/cespare/xxhash/v2@v2.3.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/distribution/distribution/v3 — `github.com/distribution/distribution/v3` is required at v3.0.0-20210316161203-a01c71e2477e in REDACTED, but v3.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/distribution/distribution/v3@v3.1.2 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/docker/docker — `github.com/docker/docker` is required at v25.0.6+incompatible in REDACTED, but v28.5.2+incompatible is the module's current release — so this build is missing every fix published since, including any security fix. This crosses a major version — v0 releases carry no compatibility promise, so read the changelog before taking it. Run `go get github.com/docker/docker@v28.5.2+incompatible && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/docker/go-connections — `github.com/docker/go-connections` is required at v0.4.0 in REDACTED, but v0.8.2 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/docker/go-connections@v0.8.2 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/docker/go-connections — `github.com/docker/go-connections` is required at v0.4.0 in REDACTED, but v0.8.2 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/docker/go-connections@v0.8.2 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/docker/go-units — `github.com/docker/go-units` is required at v0.4.0 in REDACTED, but v0.5.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/docker/go-units@v0.5.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/dustin/go-humanize — `github.com/dustin/go-humanize` is required at v1.0.0 in REDACTED, but v1.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/dustin/go-humanize@v1.1.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/fatih/color — `github.com/fatih/color` is required at v1.13.0 in REDACTED, but v1.19.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/fatih/color@v1.19.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/fsouza/go-dockerclient — `github.com/fsouza/go-dockerclient` is required at v1.10.0 in REDACTED, but v1.13.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/fsouza/go-dockerclient@v1.13.3 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/getkin/kin-openapi — `github.com/getkin/kin-openapi` is required at v0.131.0 in REDACTED, but v0.153.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/getkin/kin-openapi@v0.153.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/gocolly/colly/v2 — `github.com/gocolly/colly/v2` is required at v2.1.0 in REDACTED, but v2.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/gocolly/colly/v2@v2.3.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/google/go-cmp — `github.com/google/go-cmp` is required at v0.5.5 in REDACTED, but v0.7.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/google/go-cmp@v0.7.0 && 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.19.0 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/google/uuid — `github.com/google/uuid` is required at v1.3.0 in REDACTED, but v1.6.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/google/uuid@v1.6.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/gorilla/websocket — `github.com/gorilla/websocket` is required at v1.4.2 in REDACTED, but v1.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/gorilla/websocket@v1.5.3 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/imdario/mergo — `github.com/imdario/mergo` is required at v0.3.12 in REDACTED, but v1.0.2 is the module's current release — so this build is missing every fix published since, including any security fix. This crosses a major version — v0 releases carry no compatibility promise, so read the changelog before taking it. Run `go get github.com/imdario/mergo@v1.0.2 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/jedib0t/go-pretty/v6 — `github.com/jedib0t/go-pretty/v6` is required at v6.4.9 in REDACTED, but v6.9.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/jedib0t/go-pretty/v6@v6.9.1 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/mattn/go-shellwords — `github.com/mattn/go-shellwords` is required at v1.0.12 in REDACTED, but v1.0.16 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/mattn/go-shellwords@v1.0.16 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/mitchellh/mapstructure — `github.com/mitchellh/mapstructure` is required at v1.4.1 in REDACTED, but v1.5.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/mitchellh/mapstructure@v1.5.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/moby/term — `github.com/moby/term` is required at v0.5.0 in REDACTED, but v0.5.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/moby/term@v0.5.2 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/opencontainers/image-spec — `github.com/opencontainers/image-spec` is required at v1.1.0-rc5 in REDACTED, but v1.1.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/opencontainers/image-spec@v1.1.1 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/sirupsen/logrus — `github.com/sirupsen/logrus` is required at v1.9.3 in REDACTED, but v1.10.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/sirupsen/logrus@v1.10.2 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/sirupsen/logrus — `github.com/sirupsen/logrus` is required at v1.8.1 in REDACTED, but v1.10.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/sirupsen/logrus@v1.10.2 && go mod tidy` and commit the updated REDACTED and go.sum.
+ 12 more in this group — see findings.md.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
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.
provenance: not applicable — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1d4f8-fc74-7190-9237-a0dda49e49c3 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 20 · Warnings: 702 · Recommendations: 138 · Info: 37 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 13-11-2026 @ 12:54 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.