Public report of lacework/go-sdk, published 16 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.4). 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, 16 November 2026, 20:20 UTC · Survey ID cd_fbd30eeac7f64818a3ab3de413bec2bb
lacework/go-sdk
Measured 16 November 2026, 20:19 UTC, at code version 4982ec8
Knowledge freshness is not measured: Freshness signal contradicted by repo activity.
CAI scoreAt risk
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: 69,021 lines of product code in 2 projects, tests not counted · Estimated rebuild effort: about 1.0 person-years · Weakest lens: Production Readiness, 57.9
Findings by how serious they are
79 critical982 serious96 minor
15 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
16 November 2026, 20:19 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 ▸
56of 56 dimensions measured by tools.
1083of 1157 findings point to an exact file and line, so you can open each one in the code. The other 74 concern the repository as a whole, such as missing documentation.
56dimensions across 6 lenses, read from 69,021 lines of product code in 2 projects.
lacework/go-sdk is rated At risk because critical security findings are open, most of them in the build pipeline. It scores 61.0 out of 100, which the At risk rating leaves unchanged.
Production Readiness, at 57.9, is the weakest lens and counts most in the score. The best first step is pinning the dependencies to tagged releases, worth about 3.0 points. Protecting outgoing calls with timeouts would lift Production Readiness itself, worth about 2.8 points. Raising Production Readiness to 70 would lift the score to about 63.8.
Forty-one pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Fifteen secrets can leak from the build pipeline, and seven pipeline steps run downloads nobody checks. Pinning each tool to an exact version, limiting each secret to its own step and checking each download against a checksum would close these risks. Correcting the flagged pipeline settings would fix the five weaknesses in the build pipeline's configuration, and updating the vulnerable packages would deal with the four packages with a known security hole.
The product code is 69,021 lines, about €140,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.9 to 70, the lowest score rated Strong, the score would rise from 61.0 to about 63.8.
Code composition: what the lines of code are
Product code 54%Tests 46%
Rebuild cost: about €140,000 · Estimate
Cost to rebuild
€46,000 to €230,000, for 772 to 2,450 hours of work, about 1.0 person-years for 1 to 2 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.8 at a score of 61. 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: 69,021 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 3 Dependency pinned to a stale untagged commit finding(s) in Dependency Hygiene.
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Files that change often carry extra risk · Combined risk
2 files are changed often and are hard to read, which makes them the likeliest places for a mistake. They also have under half their code tested, or were written almost entirely by one person, so a mistake there is less likely to be caught, or only one person knows the code well enough to avoid it. A change to these files therefore carries more risk than the overall score suggests.
Based on: Churn × Complexity Hotspots (3 files) · Code Coverage (318 files under half tested) · Bus Factor (0 files written almost entirely by one person) · The files: aws.go and api.go
What to do: Add tests to these files and have a second person review every change to them, starting with aws.go and api.go.
Where the investment is most exposed · Value at risk
This code would cost about €140,000 to build again, about 1.0 person-years of work. Its weakest lens is Production Readiness, at 57.9 (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 3 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 3.0 points for low effort, because it clears the 3 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 6.2 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 5% to 10% on every change. The history of the code shows how much it changes: about 4,842 lines over the last 90 days, which is about 19,637 lines a year. At that pace, the extra work comes to an estimated 2.2 to 13.3 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
50 modules, with 25 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; 10 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.
github.com/lacework/go-sdk/v2/api uses github.com/lacework/go-sdk/v2/lwtime, so a change to github.com/lacework/go-sdk/v2/lwtime can break github.com/lacework/go-sdk/v2/api, while a change to github.com/lacework/go-sdk/v2/api can't break github.com/lacework/go-sdk/v2/lwtime.
Position
Below the diagonal: github.com/lacework/go-sdk/v2/api uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/lacework/go-sdk/v2/lwcloud/gcp/resources/instances uses a type in github.com/lacework/go-sdk/v2/lwcloud/gcp/resources/models.
github.com/lacework/go-sdk/v2/lwcloud/gcp/resources/instances uses github.com/lacework/go-sdk/v2/lwcloud/gcp/resources/models, so a change to github.com/lacework/go-sdk/v2/lwcloud/gcp/resources/models can break github.com/lacework/go-sdk/v2/lwcloud/gcp/resources/instances, while a change to github.com/lacework/go-sdk/v2/lwcloud/gcp/resources/instances can't break github.com/lacework/go-sdk/v2/lwcloud/gcp/resources/models.
Position
Below the diagonal: github.com/lacework/go-sdk/v2/lwcloud/gcp/resources/instances uses a module listed above it, which is the healthy direction.
github.com/lacework/go-sdk/v2/lwgenerate/aws uses github.com/lacework/go-sdk/v2/lwgenerate, so a change to github.com/lacework/go-sdk/v2/lwgenerate can break github.com/lacework/go-sdk/v2/lwgenerate/aws, while a change to github.com/lacework/go-sdk/v2/lwgenerate/aws can't break github.com/lacework/go-sdk/v2/lwgenerate.
Position
Below the diagonal: github.com/lacework/go-sdk/v2/lwgenerate/aws uses a module listed above it, which is the healthy direction.
github.com/lacework/go-sdk/v2/lwgenerate/aws_eks_audit uses github.com/lacework/go-sdk/v2/lwgenerate, so a change to github.com/lacework/go-sdk/v2/lwgenerate can break github.com/lacework/go-sdk/v2/lwgenerate/aws_eks_audit, while a change to github.com/lacework/go-sdk/v2/lwgenerate/aws_eks_audit can't break github.com/lacework/go-sdk/v2/lwgenerate.
Position
Below the diagonal: github.com/lacework/go-sdk/v2/lwgenerate/aws_eks_audit uses a module listed above it, which is the healthy direction.
github.com/lacework/go-sdk/v2/lwgenerate/azure uses github.com/lacework/go-sdk/v2/lwgenerate, so a change to github.com/lacework/go-sdk/v2/lwgenerate can break github.com/lacework/go-sdk/v2/lwgenerate/azure, while a change to github.com/lacework/go-sdk/v2/lwgenerate/azure can't break github.com/lacework/go-sdk/v2/lwgenerate.
Position
Below the diagonal: github.com/lacework/go-sdk/v2/lwgenerate/azure uses a module listed above it, which is the healthy direction.
github.com/lacework/go-sdk/v2/lwgenerate/gcp uses github.com/lacework/go-sdk/v2/lwgenerate, so a change to github.com/lacework/go-sdk/v2/lwgenerate can break github.com/lacework/go-sdk/v2/lwgenerate/gcp, while a change to github.com/lacework/go-sdk/v2/lwgenerate/gcp can't break github.com/lacework/go-sdk/v2/lwgenerate.
Position
Below the diagonal: github.com/lacework/go-sdk/v2/lwgenerate/gcp uses a module listed above it, which is the healthy direction.
github.com/lacework/go-sdk/v2/lwpreflight/aws uses github.com/lacework/go-sdk/v2/lwpreflight/verbosewriter, so a change to github.com/lacework/go-sdk/v2/lwpreflight/verbosewriter can break github.com/lacework/go-sdk/v2/lwpreflight/aws, while a change to github.com/lacework/go-sdk/v2/lwpreflight/aws can't break github.com/lacework/go-sdk/v2/lwpreflight/verbosewriter.
Position
Below the diagonal: github.com/lacework/go-sdk/v2/lwpreflight/aws uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/lacework/go-sdk/v2/lwpreflight/azure uses a type in github.com/lacework/go-sdk/v2/lwpreflight/verbosewriter.
github.com/lacework/go-sdk/v2/lwpreflight/azure uses github.com/lacework/go-sdk/v2/lwpreflight/verbosewriter, so a change to github.com/lacework/go-sdk/v2/lwpreflight/verbosewriter can break github.com/lacework/go-sdk/v2/lwpreflight/azure, while a change to github.com/lacework/go-sdk/v2/lwpreflight/azure can't break github.com/lacework/go-sdk/v2/lwpreflight/verbosewriter.
Position
Below the diagonal: github.com/lacework/go-sdk/v2/lwpreflight/azure uses a module listed above it, which is the healthy direction.
github.com/lacework/go-sdk/v2/lwpreflight/gcp uses github.com/lacework/go-sdk/v2/lwpreflight/verbosewriter, so a change to github.com/lacework/go-sdk/v2/lwpreflight/verbosewriter can break github.com/lacework/go-sdk/v2/lwpreflight/gcp, while a change to github.com/lacework/go-sdk/v2/lwpreflight/gcp can't break github.com/lacework/go-sdk/v2/lwpreflight/verbosewriter.
Position
Below the diagonal: github.com/lacework/go-sdk/v2/lwpreflight/gcp uses a module listed above it, which is the healthy direction.
github.com/lacework/go-sdk/v2/lwcomponent uses github.com/lacework/go-sdk/v2/api, so a change to github.com/lacework/go-sdk/v2/api can break github.com/lacework/go-sdk/v2/lwcomponent, while a change to github.com/lacework/go-sdk/v2/lwcomponent can't break github.com/lacework/go-sdk/v2/api.
Position
Below the diagonal: github.com/lacework/go-sdk/v2/lwcomponent uses a module listed above it, which is the healthy direction.
github.com/lacework/go-sdk/v2/cli/cmd uses github.com/lacework/go-sdk/v2/lwconfig, so a change to github.com/lacework/go-sdk/v2/lwconfig can break github.com/lacework/go-sdk/v2/cli/cmd, while a change to github.com/lacework/go-sdk/v2/cli/cmd can't break github.com/lacework/go-sdk/v2/lwconfig.
Position
Below the diagonal: github.com/lacework/go-sdk/v2/cli/cmd uses a module listed above it, which is the healthy direction.
github.com/lacework/go-sdk/v2/cli/cmd uses github.com/lacework/go-sdk/v2/lwgenerate/aws_controltower, so a change to github.com/lacework/go-sdk/v2/lwgenerate/aws_controltower can break github.com/lacework/go-sdk/v2/cli/cmd, while a change to github.com/lacework/go-sdk/v2/cli/cmd can't break github.com/lacework/go-sdk/v2/lwgenerate/aws_controltower.
Position
Below the diagonal: github.com/lacework/go-sdk/v2/cli/cmd uses a module listed above it, which is the healthy direction.
github.com/lacework/go-sdk/v2/cli/cmd uses github.com/lacework/go-sdk/v2/lwgenerate/oci, so a change to github.com/lacework/go-sdk/v2/lwgenerate/oci can break github.com/lacework/go-sdk/v2/cli/cmd, while a change to github.com/lacework/go-sdk/v2/cli/cmd can't break github.com/lacework/go-sdk/v2/lwgenerate/oci.
Position
Below the diagonal: github.com/lacework/go-sdk/v2/cli/cmd uses a module listed above it, which is the healthy direction.
github.com/lacework/go-sdk/v2/cli/cmd uses github.com/lacework/go-sdk/v2/lwpreflight/verbosewriter, so a change to github.com/lacework/go-sdk/v2/lwpreflight/verbosewriter can break github.com/lacework/go-sdk/v2/cli/cmd, while a change to github.com/lacework/go-sdk/v2/cli/cmd can't break github.com/lacework/go-sdk/v2/lwpreflight/verbosewriter.
Position
Below the diagonal: github.com/lacework/go-sdk/v2/cli/cmd uses a module listed above it, which is the healthy direction.
github.com/lacework/go-sdk/v2/cli/cmd uses github.com/lacework/go-sdk/v2/lwrunner, so a change to github.com/lacework/go-sdk/v2/lwrunner can break github.com/lacework/go-sdk/v2/cli/cmd, while a change to github.com/lacework/go-sdk/v2/cli/cmd can't break github.com/lacework/go-sdk/v2/lwrunner.
Position
Below the diagonal: github.com/lacework/go-sdk/v2/cli/cmd uses a module listed above it, which is the healthy direction.
github.com/lacework/go-sdk/v2/cli/cmd uses github.com/lacework/go-sdk/v2/lwupdater, so a change to github.com/lacework/go-sdk/v2/lwupdater can break github.com/lacework/go-sdk/v2/cli/cmd, while a change to github.com/lacework/go-sdk/v2/cli/cmd can't break github.com/lacework/go-sdk/v2/lwupdater.
Position
Below the diagonal: github.com/lacework/go-sdk/v2/cli/cmd uses a module listed above it, which is the healthy direction.
81 pairs of types, where a type in github.com/lacework/go-sdk/v2/cli/cmd uses a type in github.com/lacework/go-sdk/v2/api. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
github.com/lacework/go-sdk/v2/cli/cmd uses github.com/lacework/go-sdk/v2/api, so a change to github.com/lacework/go-sdk/v2/api can break github.com/lacework/go-sdk/v2/cli/cmd, while a change to github.com/lacework/go-sdk/v2/cli/cmd can't break github.com/lacework/go-sdk/v2/api.
Position
Below the diagonal: github.com/lacework/go-sdk/v2/cli/cmd uses a module listed above it, which is the healthy direction.
github.com/lacework/go-sdk/v2/cli/cmd uses github.com/lacework/go-sdk/v2/lwgenerate/aws, so a change to github.com/lacework/go-sdk/v2/lwgenerate/aws can break github.com/lacework/go-sdk/v2/cli/cmd, while a change to github.com/lacework/go-sdk/v2/cli/cmd can't break github.com/lacework/go-sdk/v2/lwgenerate/aws.
Position
Below the diagonal: github.com/lacework/go-sdk/v2/cli/cmd uses a module listed above it, which is the healthy direction.
github.com/lacework/go-sdk/v2/cli/cmd uses github.com/lacework/go-sdk/v2/lwgenerate/aws_eks_audit, so a change to github.com/lacework/go-sdk/v2/lwgenerate/aws_eks_audit can break github.com/lacework/go-sdk/v2/cli/cmd, while a change to github.com/lacework/go-sdk/v2/cli/cmd can't break github.com/lacework/go-sdk/v2/lwgenerate/aws_eks_audit.
Position
Below the diagonal: github.com/lacework/go-sdk/v2/cli/cmd uses a module listed above it, which is the healthy direction.
github.com/lacework/go-sdk/v2/cli/cmd uses github.com/lacework/go-sdk/v2/lwgenerate/azure, so a change to github.com/lacework/go-sdk/v2/lwgenerate/azure can break github.com/lacework/go-sdk/v2/cli/cmd, while a change to github.com/lacework/go-sdk/v2/cli/cmd can't break github.com/lacework/go-sdk/v2/lwgenerate/azure.
Position
Below the diagonal: github.com/lacework/go-sdk/v2/cli/cmd uses a module listed above it, which is the healthy direction.
github.com/lacework/go-sdk/v2/cli/cmd uses github.com/lacework/go-sdk/v2/lwgenerate/gcp, so a change to github.com/lacework/go-sdk/v2/lwgenerate/gcp can break github.com/lacework/go-sdk/v2/cli/cmd, while a change to github.com/lacework/go-sdk/v2/cli/cmd can't break github.com/lacework/go-sdk/v2/lwgenerate/gcp.
Position
Below the diagonal: github.com/lacework/go-sdk/v2/cli/cmd uses a module listed above it, which is the healthy direction.
github.com/lacework/go-sdk/v2/cli/cmd uses github.com/lacework/go-sdk/v2/lwpreflight/aws, so a change to github.com/lacework/go-sdk/v2/lwpreflight/aws can break github.com/lacework/go-sdk/v2/cli/cmd, while a change to github.com/lacework/go-sdk/v2/cli/cmd can't break github.com/lacework/go-sdk/v2/lwpreflight/aws.
Position
Below the diagonal: github.com/lacework/go-sdk/v2/cli/cmd uses a module listed above it, which is the healthy direction.
github.com/lacework/go-sdk/v2/cli/cmd uses github.com/lacework/go-sdk/v2/lwpreflight/azure, so a change to github.com/lacework/go-sdk/v2/lwpreflight/azure can break github.com/lacework/go-sdk/v2/cli/cmd, while a change to github.com/lacework/go-sdk/v2/cli/cmd can't break github.com/lacework/go-sdk/v2/lwpreflight/azure.
Position
Below the diagonal: github.com/lacework/go-sdk/v2/cli/cmd uses a module listed above it, which is the healthy direction.
github.com/lacework/go-sdk/v2/cli/cmd uses github.com/lacework/go-sdk/v2/lwpreflight/gcp, so a change to github.com/lacework/go-sdk/v2/lwpreflight/gcp can break github.com/lacework/go-sdk/v2/cli/cmd, while a change to github.com/lacework/go-sdk/v2/cli/cmd can't break github.com/lacework/go-sdk/v2/lwpreflight/gcp.
Position
Below the diagonal: github.com/lacework/go-sdk/v2/cli/cmd uses a module listed above it, which is the healthy direction.
github.com/lacework/go-sdk/v2/cli/cmd uses github.com/lacework/go-sdk/v2/lwcomponent, so a change to github.com/lacework/go-sdk/v2/lwcomponent can break github.com/lacework/go-sdk/v2/cli/cmd, while a change to github.com/lacework/go-sdk/v2/cli/cmd can't break github.com/lacework/go-sdk/v2/lwcomponent.
Position
Below the diagonal: github.com/lacework/go-sdk/v2/cli/cmd uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 64.8 · Adequate · gated by D4 ·
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
112
High / Critical
A03:2025 — Software Supply Chain Failures
26
High / Critical
A02:2025 — Security Misconfiguration
4
High / Critical
A07:2025 — Authentication Failures
2
High / Critical
Roadmap
Top priorities: Resolve the 350 Low coverage finding(s) in Code Coverage — start with policy.go (5), REDACTED (3), main.go (3); Resolve the 3 Dependency pinned to a stale untagged commit finding(s) in Dependency Hygiene; Give every `http.Client` an explicit `Timeout` (never call `http.Get`/`http.Post` or `http.DefaultClient`, which have none), or build each request with `http.NewRequestWithContext` under a `context.WithTimeout`; add retry with back-off (`hashicorp/go-retryablehttp`) and a breaker (`sony/gobreaker`) around dependencies that fail.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 3 Dependency pinned to a stale untagged commit finding(s) in Dependency Hygiene.
Give every `http.Client` an explicit `Timeout` (never call `http.Get`/`http.Post` or `http.DefaultClient`, which have none), or build each request with `http.NewRequestWithContext` under a `context.WithTimeout`; add retry with back-off (`hashicorp/go-retryablehttp`) and a breaker (`sony/gobreaker`) around dependencies that fail.
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.
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 — 79
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 — 982
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 — 96
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 15
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 56 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 1.0, 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 — 56 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, 1083 of 1157 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.
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 — 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. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
D21 Naming Consistency — 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. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
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.
D31 IaC & Container Security — 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. Integration/test_resources/clean.Dockerfile, integration/test_resources/vuln_scan/dirty.Dockerfile carries no `FROM` instruction, so it declares no build stage and every REDACTED rule this engine owns — the runtime-hardening, key-material, mutable-clone, no-op-shim, build-context, trust-anchor, install-guard, setuid and world-writable-path rules — is outside its own premise there and returned nothing. That silence is deliberate and correct: with no base image there is no image to reason about. It is reported here because it is NOT the same fact as a clean file, and coverage is stated as 34 of 36 Infrastructure-as-Code manifest(s) fully judged rather than as 100%. The vendor scanners (trivy, checkov) do read these files and their findings above stand; only this engine's own stage-keyed rules are absent. No owner action: a build file with no FROM is a legitimate include fragment.
D32 Data Compliance (PII/GDPR) — 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. `cli/cmd/preflight_aws.go`, `internal/array/unique.go` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
D34 Knowledge Freshness — 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. File-level freshness contradicts repo activity: 65 commits in the last 90 days, yet 213 of 242 significant files carry no living knowledge. Those two readings cannot both be true, so the per-file recency signal is treated as unreliable here and freshness is not scored for this run.
C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
C5 Data-Subject Rights — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Java was found, and this repository's Go, Python 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, Scala and Rust source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby, Scala or Rust was found, and this repository's Go, Python 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.
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's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
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, Kotlin and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala, Kotlin 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.
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, PHP and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala, PHP 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.
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.
X3 Exception handling — 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. 26 further occurrence(s) are not listed individually; the score already reflects all 66.
X5 Nullable reference types — 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 MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, Kotlin source, and Rust source only, and no C# was loaded, no TypeScript was found, and this repository's Python 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.
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.
D8 Code Coverage: Coverage is measured by building and running the test suite inside our isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
D11 Test Reliability: Flakiness is inferred from history/markers — we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
D22 Internal API Consistency: API consistency compares the call shapes of members that play the same role on the exposed C# surface: whether the API suits its callers is not measured, and surfaces in other languages are not measured.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and 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.
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.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
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.
43 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was cmd.promptAzureGenerate at 36. A further 1 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being cmd.promptCreateAlertChannel at 19 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: cli/cmd/alert_channel.go (cmd.promptCreateAlertChannel at 19). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 38 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 43 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with cmd.promptAzureGenerate (cyclomatic 36), GenerateAwsTfConfigurationArgs.Validate (cyclomatic 36), aws.createCloudtrail (cyclomatic 33). — 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 43 together lifts Cyclomatic Complexity from 7.1 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
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.
+ 105 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 4 bodies over 60 down to 60 or less in Cognitive Complexity — start with aws.createCloudtrail (cognitive 75), GenerateAwsTfConfigurationArgs.Validate (cognitive 75), gcp.createAuditLog (cognitive 72). — 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 4 together lifts Cognitive Complexity from 4.5 to about 5.0/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.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 9 FunctionTooLong finding(s) in God Classes — start with generate_aws.go, aws.go, agent_aws-install_ec2ssm.go. — One of this dimension's main actionable groups (9 warning-level).
Resolve the 9 FileTooLong finding(s) in God Classes — start with generate_aws.go, aws.go, REDACTED. — One of this dimension's main actionable groups (9 warning-level).
Resolve the 7 TooManyFields finding(s) in God Classes — start with aws.go, azure.go, gcp.go. — One of this dimension's main actionable groups (7 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D4 · Code Duplication3.5 / 10Weak✓ Tool-verified
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
157 duplicated block group(s) detected. 16.2 % of the production lines (11,200 of 69,021) are in a reported copy. A further 118 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.
+ 140 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 9 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with vulnerability_exceptions_container.go (2), REDACTED, report_definitions_create.go. — One of this dimension's main actionable groups (9 warning-level).
Resolve the 6 Edited copy of a member (19 corresponding lines) finding(s) in Code Duplication — start with logging.go, agent_install.go, cli_unix.go. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 6 Duplicated block (13 lines × 2) finding(s) in Code Duplication — start with REDACTED, integration_gar.go, aws.go. — One of this dimension's main actionable groups (6 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.
Resolve the 3 Low cohesion finding(s) in Cohesion (LCOM4) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D8 · Code Coverage4.2 / 10Weak✓ Tool-verified
What it measures: How much of the code is actually exercised by tests.
Method: Coverage from the analyzer's own run of the suite, computed per-file with structured exclusions for generated, trivial, and glue code. A coverage report found in the repository is never read. When the suite can't be built/run in-image, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.
Line coverage 9.3% — 350 file(s) below 50%. Measured from the Go suite (github.com/lacework/go-sdk/v2: `go test -coverprofile -coverpkg=./...`, the 3 run(s) test reliability made). Taken over 3 runs of the suite: a line counts as covered only when every run executed it.
Resolve the 350 Low coverage finding(s) in Code Coverage — start with policy.go (5), REDACTED (3), main.go (3). — One of this dimension's main actionable groups (350 warning-level).
Detailed fixes: d8_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests pass reliably, with no flakiness.
Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
58 outdated, 1 author-deprecated direct Go module(s), 4 pinning or checksum defect(s). 77 of 77 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/Netflix/go-expect · ×3
Deprecated module: github.com/golang/protobuf
No go.sum committed (REDACTED)
Outdated: aead.dev/minisign · ×58
What to do
Resolve the 3 Dependency pinned to a stale untagged commit finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 1 Deprecated module finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 No go.sum committed (REDACTED) finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 171 required Go module(s) use a banned license. Licences were read per module version from the licence files pkg.go.dev detects (via api.deps.dev), over every module this repository's REDACTED requires, direct and indirect, at the version the build uses. Go records no test-only scope at module level, so modules only this repository's own tests import are included. 1 of them carry no licence file that matches a known SPDX licence; that is missing data, not a violation, and none of them is charged.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 3 Hotspot finding(s) in Churn × Complexity Hotspots — start with aws.go, ctx_cfg.go, api.go. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.3 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
16 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is cli/cmd/generate_aws.go. Counted over 242 of the 398 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1 · ×2
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
35 deducted task-comment markers across 69021 LoC (0.0/KLoC) → score 9.9. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
TodoComment · ×35lwgenerate/constants.go:3
What to do
Resolve the 35 TodoComment finding(s) in Explicit Debt — start with vulnerability_test.go (3), http_test.go (3), main.go (3). — One of this dimension's main actionable groups (35 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. 154 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.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.
9 naming inconsistencies among 378 declarations measured against a convention their peers follow.
`agentAWSInstallCmd` spells `AWS` where 159 names in the project spell it `Aws`cli/cmd/agent.go:177
`agentGCPInstallCmd` spells `GCP` where 112 names in the project spell it `Gcp`cli/cmd/agent.go:183
`OptCloudtrailSQS` spells `SQS` where 24 names in the project spell it `Sqs`cli/cmd/generate_aws.go:88
`promptCloudtrailSQSQuestions` spells `SQS` where 24 names in the project spell it `Sqs`cli/cmd/generate_aws.go:1435
`createAwsGovCloudCTIntegration` spells `CT` where 14 names in the project spell it `Ct`cli/cmd/integration_aws_govcloud.go:81
+ 4 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 `agentAWSInstallCmd` spells `AWS` where 159 names in the project spell… finding(s) in Naming Consistency — start with agent.go. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `agentGCPInstallCmd` spells `GCP` where 112 names in the project spell… finding(s) in Naming Consistency — start with agent.go. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `OptCloudtrailSQS` spells `SQS` where 24 names in the project spell it… finding(s) in Naming Consistency — start with generate_aws.go. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D22 · Internal API Consistency10.0 / 10Exemplary○ Nothing flagged
What it measures: Whether the internal API surface is consistent and coherent.
Method: Call-shape rules (A1-A9) over the structured code model of the intentionally exposed C# surface: members of one type, overloads of one name and the same slot across sibling types are compared, and a member that makes a caller use a different convention for the same kind of operation is flagged. Deterministic, no model. Advisory.
1 of 2 build units (Go) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesionREDACTED:1
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
3 % of calls cross a namespace and 15 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.
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.
1 finding(s): 0 critical, 1 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 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 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).
112 finding(s): 0 critical, 73 high, 38 medium, 1 low. 40 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 6 file(s) — `cli/cmd/preflight_aws.go` (line 200), `REDACTED` (lines 19–21), `internal/array/unique.go` (line 23), `internal/databox/blob.go`, `internal/databox/static/vuln_assessment.html` (line 2019, line 2020, line 2021, …), … (+1 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 4 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
+ 19 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 13 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (4), REDACTED (3), REDACTED. — One of this dimension's main actionable groups (13 issue-level).
Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (4). — One of this dimension's main actionable groups (4 issue-level).
No action in Static Analysis (SAST) — all 40 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (40 issue-level, 0 of them charged here).
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 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).
Resolve the 2 High 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 1 High IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 2 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 Low IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 5 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 3 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 3 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.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives10.0 / 10Exemplary○ Nothing flagged
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
Do you agree with this assessment?
AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Do you agree with this assessment?
AC3 · Page structure4.3 / 10Weak✓ Tool-verified
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
A document must expose only one main landmark. Multiple visible <main> (or role="main") elements confuse the landmark map and the "skip to content" target. Keep one; remove or hide the rest. — internal/databox/static/vuln_assessment.html:2
Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. (×6) — internal/databox/static/vuln_assessment.html:1961, internal/databox/static/vuln_assessment.html:1970, internal/databox/static/vuln_assessment.html:1979, …
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
`.tooltip` moves (`animation: fadeIn .5s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — internal/databox/static/vuln_assessment.html:600
`.tooltip` moves (`animation: fadeIn .5s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — internal/databox/static/vuln_assessment.html:605
`.header-main>.header-main-icon` moves (`transition: left .45s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — internal/databox/static/vuln_assessment.html:808
`.fixedDataTable-button:before` moves (`transition: transform .25s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — internal/databox/static/vuln_assessment.html:1444
`.fixedDataTable-button:before` moves (`transition: transform .25s,-webkit-transform .25s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — internal/databox/static/vuln_assessment.html:1445
`:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — internal/databox/static/vuln_assessment.html:206
`.Select-control` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — internal/databox/static/vuln_assessment.html:1497
`.Select-input>input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — internal/databox/static/vuln_assessment.html:1530
`.ant-avatar` sets color: #fff on background-color: #ccc — 1.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — internal/databox/static/vuln_assessment.html:18
`.button-primary,.info` sets color: #fff on background-color: #2eb9f0 — 2.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — internal/databox/static/vuln_assessment.html:1580
`.info:hover,button.button-primary:hover` sets color: #fff on background-color: #54c5f2 — 2.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — internal/databox/static/vuln_assessment.html:1588
What to do
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.
Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.
`MetricEvent` is shared by every request (`AddFeatureField` is called per request from the gRPC service method `cliState.Honeyvent`, on the one `MetricEvent` value that handler's shared receiver holds) but writes its fields outside any lock (FeatureData; e.g. `FeatureData` in `AddFeatureField` at line 105). Unsynchronised concurrent writes are a data race in Go: an update is lost or a value tears, and a concurrent map write aborts the process. — api/metrics.go:71
What to do
Go: guard the state handlers share with a sync.Mutex held for the whole update (`mu.Lock(); defer mu.Unlock()`), make counters sync/atomic types (atomic.Int64) and caches a sync.Map, or keep per-request data in locals and the request context. `go test -race` over a handler test confirms the race and then its fix.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
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.
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.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
What to do
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
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.
`http.Get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — lwgenerate/azure/azure.go:154
`http.Client{` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — lwupdater/updater.go:138
What to do
Give every `http.Client` an explicit `Timeout` (never call `http.Get`/`http.Post` or `http.DefaultClient`, which have none), or build each request with `http.NewRequestWithContext` under a `context.WithTimeout`; add retry with back-off (`hashicorp/go-retryablehttp`) and a breaker (`sony/gobreaker`) around dependencies that fail.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. 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 0/6 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.
`getGitRelease` 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, …)`. — lwupdater/updater.go:129
`getCurrentPublicIP` calls `http.Get(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — lwgenerate/azure/azure.go:145
`inputQueryFromURL` calls `http.Get(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — cli/cmd/lql.go:275
`inputPolicyFromURL` calls `http.Get(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — cli/cmd/policy.go:309
`putFileToS3` 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, …)`. — api/component_data.go:166
`RequestEncoderDecoderWithToken` 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, …)`. — api/http.go:178
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?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen. Whether a `for … range` leaves the slice or map it is walking alone — Go raises nothing, but the walk and the collection part: a range evaluates its slice once, so an element appended in the body is never visited and a removal by reslicing (`s = append(s[:i], s[i+1:]...)`, `slices.Delete`) shifts the next element under the index, which is then skipped while the last is read twice; a reslice, a reassignment or a sort leaves every later `s[i]` naming another element; and a map's order is unspecified, so deleting another key (or clearing the map) changes from run to run which entries the loop still sees.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard6.9 / 10Adequate✓ Tool-verified
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.
`zoneStart` is the result of a search that answers -1 when nothing is found, and `zone[:zoneStart]` uses it as a bound with no test of `zoneStart` in between. When the search misses, the bound is -1 and the access panics with `slice bounds out of range`. Test `zoneStart < 0` (or use `strings.Cut`) before using it. — lwcloud/gcp/resources/instances/instances.go:100
What to do
Each finding names the index access that escapes the guard and the line of the correctly bracketed access beside it. Compare the two: they differ only in where one parenthesis sits. Move it so the emptiness test brackets every access to that symbol — and if the value provably cannot be empty at this point, delete the test rather than leave a condition that guards one access and not its neighbour.
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.
`ms, _ := strconv.Atoi(string(b))` writes the call's error to `_` and then uses `ms` as if the call succeeded. When `strconv.Atoi` fails, `ms` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `ms` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. — lwtime/epoch.go:13
`millis, _ := strconv.ParseInt(t, 10, 64)` writes the call's error to `_` and then uses `millis` as if the call succeeded. When `strconv.ParseInt` fails, `millis` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `millis` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. — lwtime/epochstring.go:15
`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. (×24) — lwtime/nattime.go:125, lwtime/reltime.go:168, lwgenerate/azure/azure.go:155, …
`res, _ := time.Parse(time.RFC1123Z, t)` writes the call's error to `_` and then uses `res` as if the call succeeded. When `time.Parse` fails, `res` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `res` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. — lwtime/rfc1123z.go:12
`matched, _ = regexp.MatchString(pattern, permission)` writes the call's error to `_` and then uses `matched` as if the call succeeded. When `regexp.MatchString` fails, `matched` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `matched` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. (×2) — lwpreflight/azure/permission.go:23, lwpreflight/aws/permission.go:27
`regex, _ := regexp.Compile(`^\d{12}$`)` writes the call's error to `_` and then uses `regex` as if the call succeeded. When `regexp.Compile` fails, `regex` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `regex` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. — lwgenerate/aws/aws.go:383
`if _, err = os.Stat(configPath); err == nil` reports `err` on the one path where it is nil, and the path where the call failed goes on without ever reading it: the comparison is inverted. The real failure is lost and a nil error (or a panic on `err.Error()`) is reported in its place. Test `err != nil` here. — lwconfig/config.go:158
`if err := hostInfo.Validate(); 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:188
`launchTime, _ := time.Parse(time.RFC3339, instance.GetCreationTimestamp())` writes the call's error to `_` and then uses `launchTime` as if the call succeeded. When `time.Parse` fails, `launchTime` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `launchTime` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. — lwcloud/gcp/resources/instances/instances.go:90
`if dataJSON, err := c.Cache.Read(key); err == nil` reports `err` on the one path where it is nil, and the path where the call failed goes on without ever reading it: the comparison is inverted. The real failure is lost and a nil error (or a panic on `err.Error()`) is reported in its place. Test `err != nil` here. — cli/cmd/cache.go:275
`if err := json.Unmarshal(dataJSON, &asset); err == nil` reports `err` on the one path where it is nil, and the path where the call failed goes on without ever reading it: the comparison is inverted. The real failure is lost and a nil error (or a panic on `err.Error()`) is reported in its place. Test `err != nil` here. — cli/cmd/cache.go:277
`if err := survey.AskOne(&survey.Confirm{Message: message, Default: false}, &proceed); 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. — cli/cmd/cloud_account_backup.go:329
`match, _ := regexp.MatchString(".lacework.net", cli.Account)` writes the call's error to `_` and then uses `match` as if the call succeeded. When `regexp.MatchString` fails, `match` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `match` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. — cli/cmd/configure.go:195
`locationDir, _ := determineOutputDirPath(dirname, "aws")` writes the call's error to `_` and then uses `locationDir` as if the call succeeded. When `determineOutputDirPath` fails, `locationDir` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `locationDir` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. — cli/cmd/generate_aws.go:269
`locationDir, _ := determineOutputDirPath(dirname, "azure")` writes the call's error to `_` and then uses `locationDir` as if the call succeeded. When `determineOutputDirPath` fails, `locationDir` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `locationDir` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. — cli/cmd/generate_azure.go:283
`matched, _ := regexp.MatchString(AzureSubscriptionIDRegex, str)` writes the call's error to `_` and then uses `matched` as if the call succeeded. When `regexp.MatchString` fails, `matched` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `matched` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. — cli/cmd/generate_azure.go:403
What to do
Discarded error (assigned to `_`, then its result used)
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.
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. 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 rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 13 of 55 WCAG 2.2 Level A/AA success criteria (24%; ≈26% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 42 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 3 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
P12 CI test-gate honesty — 1 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
X10 Duplicated predicate — 14 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 3 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 — 54 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
AX1 Captive dependencies — 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; this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
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) — 5 | COPY LICENSE / 6 | >>> ADD bin/lacework-cli-linux-amd64 /usr/local/bin/lacework 7 | ENTRYPOINT ["/usr/local/bin/lacework"] 8 | -------------------- ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 76bf0e8f-e91a-4fec-8792-a1beddd56e6a::n6irxlkxmro6vt5u3q14yidbl: "/bin/lacework-cli-linux-amd64": not found; likely cause (the repository): a file the REDACTED copies (`bin/lacework-cli-linux-amd64`) is not in the repository's build context (it may be produced by a build step outside the REDACTED, or excluded by .dockerignore); runtime evidence skipped The cause is in the repository, not in our sandbox: a file the REDACTED copies (`bin/lacework-cli-linux-amd64`) is not in the repository's build context (it may be produced by a build step outside the REDACTED, or excluded by .dockerignore). 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 — ~58509 lines of test source are present (.go) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .go, .py, 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
D32 Data Compliance (PII/GDPR) — 2 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D34 Knowledge Freshness — knowledge concentrated in recent work — freshness signal contradicted by repo activity
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
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
DM1 Domain Modelling — not scored — this repository shows none of the 2 signals this lens looks for
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage data present for 383 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
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 applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X12 Unreachable branch — X12 reached only 0% of this repository's production lines — go (69,017 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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 applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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
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 — the code was read and holds no site of this kind, so there is nothing for this check to judge
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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.
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X6 Hand-rolled structured-format parsing — 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 lwgenerate/constants.go:3— // TODO update — 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 lwgenerate/aws/aws.go:240— // TODO @ipcrm future: support split regions for resources (s3 one place, sns another, etc) — 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 lwgenerate/aws/aws.go:311— // TODO @ipcrm future: what about many individual ct/config integrations together? — 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 lwcomponent/catalog_test.go:571— // @jon-stewart: TODO GROW-2765
TodoComment REDACTED:116— // TODO @afiune maybe we should deploy a .specs file? — 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 lwcomponent/minisign.go:36— // TODO(pjm): Can we make the signature format be an argument? — 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 lwcomponent/status.go:76— // TODO: @jon-stewart: remove - is in wrong place — 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 lwcloud/gcp/resources/instances/instances.go:156— // TODO log error and continue — 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 integration/alert_list_test.go:95— // TODO: investigate and fix (the following command does not respect the speficied time frame for some reason) — 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 integration/cloud_account_test.go:84— // TODO @afiune lets try to create an environment where we can be 100% sure that — 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 integration/framework_test.go:207— // TODO @afiune add ext for windows 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 integration/vulnerability_test.go:53— // TODO: host can not be found — 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 integration/vulnerability_test.go:63— // TODO: host can not be found — 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 integration/vulnerability_test.go:73— // TODO: host can not be found — 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 cli/cmd/agent.go:127— // TODO hidden for now — 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:512— // TODO @afiune move this into its own go package (look at REDACTED) — 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 cli/cmd/configure.go:123— // TODO change this to be dynamic — 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 cli/cmd/generate_aws.go:478— // TODO Share the help with the interactive generation — 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 cli/cmd/generate_aws_eks_audit.go:341— // TODO Share the help with the interactive generation — 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 cli/cmd/generate_gcp.go:330— // TODO Share the help with the interactive generation — 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 cli/cmd/policy_library.go:269— // TODO: proper handling for $account based ids — 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 cli/cmd/root.go:383— // TODO @afiune figure out how to propagate this to main() — 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 cli/cmd/vuln_container_show_assessments.go:612— // Todo(v2): CVSSv3Score is missing from V2 — 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 cli/cmd/vuln_container_show_assessments.go:614— // Todo(v2): CVSSv2Score is missing from V2 — 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 cli/cmd/vuln_html.go:342— // Todo(v2): CVSSv3Score does not exist in v2 container response — 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) lwtime/nattime.go:125— `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) lwtime/reltime.go:168— `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) lwgenerate/azure/azure.go:155— `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) lwgenerate/azure/azure.go:162— `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:30— `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:461— `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:188— `if err := hostInfo.Validate(); 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:194— `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:98— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:626— `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) lwcloud/gcp/resources/instances/instances.go:155— `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) integration/context/ctx_cfg.go:92— `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) integration/context/ctx_cfg.go:120— `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) cli/cmd/alert.go:123— `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) cli/cmd/alert_rules.go:319— `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) cli/cmd/alert_rules.go:338— `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) cli/cmd/alert_rules.go:359— `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) cli/cmd/alert_rules.go:372— `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) cli/cmd/cloud_account_backup.go:269— `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) cli/cmd/cloud_account_backup.go:329— `if err := survey.AskOne(&survey.Confirm{Message: message, Default: false}, &proceed); 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) cli/cmd/compliance_aws.go:692— `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) cli/cmd/compliance_aws.go:696— `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) cli/cmd/compliance_azure.go:698— `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) cli/cmd/compliance_azure.go:703— `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) cli/cmd/compliance_gcp.go:724— `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.
+ 1 more in this group — see findings.md.
X3 · Exception handling· Discarded error (assigned to `_`, then its result used) · ×11
Discarded error (assigned to `_`, then its result used) lwtime/epoch.go:13— `ms, _ := strconv.Atoi(string(b))` writes the call's error to `_` and then uses `ms` as if the call succeeded. When `strconv.Atoi` fails, `ms` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `ms` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) lwtime/epochstring.go:15— `millis, _ := strconv.ParseInt(t, 10, 64)` writes the call's error to `_` and then uses `millis` as if the call succeeded. When `strconv.ParseInt` fails, `millis` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `millis` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) lwtime/rfc1123z.go:12— `res, _ := time.Parse(time.RFC1123Z, t)` writes the call's error to `_` and then uses `res` as if the call succeeded. When `time.Parse` fails, `res` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `res` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) lwpreflight/azure/permission.go:23— `matched, _ = regexp.MatchString(pattern, permission)` writes the call's error to `_` and then uses `matched` as if the call succeeded. When `regexp.MatchString` fails, `matched` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `matched` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) lwpreflight/aws/permission.go:27— `matched, _ = regexp.MatchString(pattern, permission)` writes the call's error to `_` and then uses `matched` as if the call succeeded. When `regexp.MatchString` fails, `matched` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `matched` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) lwgenerate/aws/aws.go:383— `regex, _ := regexp.Compile(`^\d{12}$`)` writes the call's error to `_` and then uses `regex` as if the call succeeded. When `regexp.Compile` fails, `regex` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `regex` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) lwcloud/gcp/resources/instances/instances.go:90— `launchTime, _ := time.Parse(time.RFC3339, instance.GetCreationTimestamp())` writes the call's error to `_` and then uses `launchTime` as if the call succeeded. When `time.Parse` fails, `launchTime` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `launchTime` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) cli/cmd/configure.go:195— `match, _ := regexp.MatchString(".lacework.net", cli.Account)` writes the call's error to `_` and then uses `match` as if the call succeeded. When `regexp.MatchString` fails, `match` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `match` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) cli/cmd/generate_aws.go:269— `locationDir, _ := determineOutputDirPath(dirname, "aws")` writes the call's error to `_` and then uses `locationDir` as if the call succeeded. When `determineOutputDirPath` fails, `locationDir` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `locationDir` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) cli/cmd/generate_azure.go:283— `locationDir, _ := determineOutputDirPath(dirname, "azure")` writes the call's error to `_` and then uses `locationDir` as if the call succeeded. When `determineOutputDirPath` fails, `locationDir` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `locationDir` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) cli/cmd/generate_azure.go:403— `matched, _ := regexp.MatchString(AzureSubscriptionIDRegex, str)` writes the call's error to `_` and then uses `matched` as if the call succeeded. When `regexp.MatchString` fails, `matched` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `matched` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
FunctionTooLong: cmd.initGenerateAwsTfCommandFlags cli/cmd/generate_aws.go:476— FunctionTooLong — initGenerateAwsTfCommandFlags runs 236 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 136 over it, 2.36× 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: aws.createAgentless lwgenerate/aws/aws.go:1371— FunctionTooLong — createAgentless runs 210 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 110 over it, 2.10× 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: cmd.installAWSSSM cli/cmd/agent_aws-install_ec2ssm.go:157— FunctionTooLong — installAWSSSM runs 178 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 78 over it, 1.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: cmd.initGenerateAzureTfCommandFlags cli/cmd/generate_azure.go:410— FunctionTooLong — initGenerateAzureTfCommandFlags runs 162 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 62 over it, 1.62× 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: cmd.initGenerateAwsEksAuditTfCommandFlags cli/cmd/generate_aws_eks_audit.go:339— FunctionTooLong — initGenerateAwsEksAuditTfCommandFlags runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35× 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: cmd.initGenerateGcpTfCommandFlags cli/cmd/generate_gcp.go:328— FunctionTooLong — initGenerateGcpTfCommandFlags 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.
FunctionTooLong: cmd.createAwsEcrIntegration cli/cmd/integration_ecr.go:31— FunctionTooLong — createAwsEcrIntegration 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.
FunctionTooLong: aws_eks_audit.createEksAudit lwgenerate/aws_eks_audit/aws_eks_audit.go:585— FunctionTooLong — createEksAudit runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: cmd.createGarIntegration cli/cmd/integration_gar.go:30— FunctionTooLong — createGarIntegration runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× 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.
FileTooLong: cmd/generate_aws.go cli/cmd/generate_aws.go— FileTooLong — 1129 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 629 over it, 2.26× 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: aws/aws.go lwgenerate/aws/aws.go— FileTooLong — 906 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 406 over it, 1.81× 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: cmd/component.go cli/cmd/component.go— FileTooLong — 803 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 303 over it, 1.61× 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: cmd/generate_azure.go cli/cmd/generate_azure.go— FileTooLong — 658 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 158 over it, 1.32× 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: cmd/generate_aws_eks_audit.go cli/cmd/generate_aws_eks_audit.go— FileTooLong — 639 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 139 over it, 1.28× 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: cmd/generate_gcp.go cli/cmd/generate_gcp.go— FileTooLong — 595 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 95 over it, 1.19× 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: azure/azure.go lwgenerate/azure/azure.go— FileTooLong — 568 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 68 over it, 1.14× 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: api/v2_vulnerabilities.go api/v2_vulnerabilities.go— FileTooLong — 519 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 19 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.
FileTooLong: cmd/vuln_container_show_assessments.go cli/cmd/vuln_container_show_assessments.go— FileTooLong — 506 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 6 over it, 1.01× 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) cli/cmd/component.go:811— cli/cmd/component.go:811-819 | cli/cmd/component.go:854-862 — 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) cli/cmd/report_definitions_create.go:320— cli/cmd/report_definitions_create.go:320-328 | cli/cmd/report_definitions_create.go:332-340 — 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 `cli/cmd/report_definitions_create.go:320` 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 × 2) api/vulnerability_exceptions_container.go:35— api/vulnerability_exceptions_container.go:35-43 | api/vulnerability_exceptions_host.go:35-43 — 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 `api/vulnerability_exceptions_container.go:35` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) api/vulnerability_exceptions_container.go:57— api/vulnerability_exceptions_container.go:57-65 | api/vulnerability_exceptions_host.go:55-63 — 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 `api/vulnerability_exceptions_container.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. 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) api/alert_rules.go:259— api/alert_rules.go:259-267 | api/report_rules.go:218-226 — 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 `api/alert_rules.go:259` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) cli/cmd/package_manifest.go:398— cli/cmd/package_manifest.go:398-406 | cli/cmd/package_manifest.go:420-428 — 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 `cli/cmd/package_manifest.go:398` 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 (9 lines × 2) REDACTED:249— REDACTED:249-257 | cli/cmd/container_registry.go:109-117 — 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:249` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) cli/cmd/component_dev.go:319— cli/cmd/component_dev.go:319-327 | cli/cmd/component_dev.go:421-429 — 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 `cli/cmd/component_dev.go:319` 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) cli/cmd/vulnerability_exception_container.go:114— cli/cmd/vulnerability_exception_container.go:114-122 | cli/cmd/vulnerability_exception_host.go:112-120 — before extracting anything, compare `cli/cmd/vulnerability_exception_container.go` and `cli/cmd/vulnerability_exception_host.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `cli/cmd/vulnerability_exception_container.go:114` 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.
TooManyFields: GenerateAwsTfConfigurationArgs lwgenerate/aws/aws.go:129— TooManyFields — 63 stored fields beside 3 methods. The bar is 30 stored fields; this is 33 over it, 2.10× 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: GenerateAzureTfConfigurationArgs lwgenerate/azure/azure.go:16— TooManyFields — 40 stored fields beside 2 methods. The bar is 30 stored fields; this is 10 over it, 1.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: GenerateGcpTfConfigurationArgs lwgenerate/gcp/gcp.go:49— TooManyFields — 39 stored fields beside 2 methods. The bar is 30 stored fields; this is 9 over it, 1.30× 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: GenerateAwsEksAuditTfConfigurationArgs lwgenerate/aws_eks_audit/aws_eks_audit.go:49— TooManyFields — 36 stored fields beside 2 methods. The bar is 30 stored fields; this is 6 over it, 1.20× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: V2Endpoints api/v2.go:31— TooManyFields — 36 stored fields. The bar is 30 stored fields; this is 6 over it, 1.20× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: ReportRuleNotificationTypes api/report_rules.go:253— TooManyFields — 33 stored fields beside 2 methods. The bar is 30 stored fields; this is 3 over it, 1.10× 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: VulnerabilityHostMachineTags api/v2_vulnerabilities.go:535— TooManyFields — 33 stored fields. The bar is 30 stored fields; this is 3 over it, 1.10× 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.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×6
Edited copy of a member (19 corresponding lines) api/logging.go:107— api/logging.go:107-125 | api/logging.go:133-151 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) cli/cmd/agent_install.go:143— cli/cmd/agent_install.go:143-161 | cli/cmd/agent_install.go:200-218 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) cli/cmd/cli_unix.go:32— cli/cmd/cli_unix.go:32-58 | cli/cmd/cli_windows.go:30-48 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) cli/cmd/report_distributions_create.go:402— cli/cmd/report_distributions_create.go:402-421 | cli/cmd/report_distributions_create.go:423-441 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) cli/cmd/suppressions.go:190— cli/cmd/suppressions.go:190-216 | cli/cmd/suppressions.go:219-237 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) cli/cmd/generate_aws.go:1244— cli/cmd/generate_aws.go:1244-1264 | cli/cmd/generate_aws_controltower.go:503-521 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (13 lines × 2) cli/cmd/component.go:591— cli/cmd/component.go:591-603 | cli/cmd/component.go:712-724 — 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 `cli/cmd/component.go:591` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) cli/cmd/integration_gar.go:154— cli/cmd/integration_gar.go:154-166 | cli/cmd/integration_ghcr.go:112-124 — before extracting anything, compare `cli/cmd/integration_gar.go` and `cli/cmd/integration_ghcr.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `cli/cmd/integration_gar.go:154` 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 (13 lines × 2) lwgenerate/aws/aws.go:860— lwgenerate/aws/aws.go:860-872 | lwgenerate/aws_controltower/aws_controltower.go:123-135 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) cli/cmd/generate.go:163— cli/cmd/generate.go:163-176 | cli/cmd/generate_execute.go:457-469 — 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 `cli/cmd/generate.go:163` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) cli/cmd/alert_show_details.go:50— cli/cmd/alert_show_details.go:50-62 | cli/cmd/alert_show_details.go:74-86 — 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 `cli/cmd/alert_show_details.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 (13 lines × 2) cli/cmd/vuln_container_show_assessments.go:95— cli/cmd/vuln_container_show_assessments.go:95-107 | cli/cmd/vuln_container_show_assessments.go:111-123 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cli/cmd/vuln_container_show_assessments.go:95` 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 (11 lines × 2) cli/cmd/generate_gke.go:214— cli/cmd/generate_gke.go:214-224 | cli/cmd/generate_oci.go:178-191 — 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 `cli/cmd/generate_gke.go:214` 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) cli/cmd/lql_show.go:34— cli/cmd/lql_show.go:34-44 | cli/cmd/policy.go:134-144 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `cli/cmd/policy.go:147` calls `MustCompile` and `cli/cmd/lql_show.go:47` 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 (11 lines × 2) cli/cmd/report_distributions_create.go:132— cli/cmd/report_distributions_create.go:132-142 | cli/cmd/report_distributions_update.go:138-148 — before extracting anything, compare `cli/cmd/report_distributions_create.go` and `cli/cmd/report_distributions_update.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 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 `cli/cmd/report_distributions_create.go:132` 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 (11 lines × 2) lwgenerate/aws/aws.go:1416— lwgenerate/aws/aws.go:1416-1426 | lwgenerate/aws/aws.go:1662-1672 — 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 `lwgenerate/aws/aws.go:1416` 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) lwgenerate/aws/aws.go:865— lwgenerate/aws/aws.go:865-875 | lwgenerate/oci/oci.go:91-102 — 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 `lwgenerate/aws/aws.go:865` 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) cli/cmd/vulnerability_exception_container.go:136— cli/cmd/vulnerability_exception_container.go:136-146 | cli/cmd/vulnerability_exception_host.go:134-144 — before extracting anything, compare `cli/cmd/vulnerability_exception_container.go` and `cli/cmd/vulnerability_exception_host.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `cli/cmd/vulnerability_exception_container.go:136` 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 (8 lines × 2) cli/cmd/compliance_azure.go:344— cli/cmd/compliance_azure.go:344-351 | cli/cmd/compliance_azure.go:396-403 — 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 (8 lines × 2) cli/cmd/compliance_gcp.go:351— cli/cmd/compliance_gcp.go:351-358 | cli/cmd/compliance_gcp.go:403-410 — 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 (8 lines × 2) api/v2_configs_azure.go:40— api/v2_configs_azure.go:40-47 | api/v2_configs_gcp.go:40-47 — 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 (8 lines × 2) REDACTED:84— REDACTED:84-91 | REDACTED:432-439 — 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 (8 lines × 2) REDACTED:260— REDACTED:260-267 | cli/cmd/container_registry.go:121-129 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) cli/cmd/component_dev.go:614— cli/cmd/component_dev.go:614-621 | cli/cmd/component_dev.go:636-643 — 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 `cli/cmd/component_dev.go:614` 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.
X2 · Cancellation propagation· Function without context.Context · ×6
Function without context.Context: getGitRelease lwupdater/updater.go:129— `getGitRelease` 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: getCurrentPublicIP lwgenerate/azure/azure.go:145— `getCurrentPublicIP` calls `http.Get(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: inputQueryFromURL cli/cmd/lql.go:275— `inputQueryFromURL` calls `http.Get(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: inputPolicyFromURL cli/cmd/policy.go:309— `inputPolicyFromURL` calls `http.Get(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: putFileToS3 api/component_data.go:166— `putFileToS3` 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: RequestEncoderDecoderWithToken api/http.go:178— `RequestEncoderDecoderWithToken` 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, …)`.
AC3 · Page structure· Heading level jumps from h1 to h4 · ×5
Heading level jumps from h1 to h4 internal/databox/static/vuln_assessment.html:1961— Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
Heading level jumps from h1 to h4 internal/databox/static/vuln_assessment.html:1970— Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
Heading level jumps from h1 to h4 internal/databox/static/vuln_assessment.html:1979— Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
Heading level jumps from h1 to h4 internal/databox/static/vuln_assessment.html:1986— Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
Heading level jumps from h1 to h4 internal/databox/static/vuln_assessment.html:2012— Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
AC6 · Visual & motion safety· Animation without a prefers-reduced-motion guard · ×5
Animation without a prefers-reduced-motion guard internal/databox/static/vuln_assessment.html:600— `.tooltip` moves (`animation: fadeIn .5s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard internal/databox/static/vuln_assessment.html:605— `.tooltip` moves (`animation: fadeIn .5s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard internal/databox/static/vuln_assessment.html:808— `.header-main>.header-main-icon` moves (`transition: left .45s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard internal/databox/static/vuln_assessment.html:1444— `.fixedDataTable-button:before` moves (`transition: transform .25s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard internal/databox/static/vuln_assessment.html:1445— `.fixedDataTable-button:before` moves (`transition: transform .25s,-webkit-transform .25s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×5
Edited copy of a member (25 corresponding lines) api/policy.go:95— api/policy.go:95-119 | api/policy.go:148-172 — These two members are one piece of code written twice and then edited apart: 25 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 (25 corresponding lines) cli/cmd/generate_aws_eks_audit.go:628— cli/cmd/generate_aws_eks_audit.go:628-676 | cli/cmd/generate_aws_eks_audit.go:694-718 — These two members are one piece of code written twice and then edited apart: 25 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 (25 corresponding lines) cli/cmd/lql_library.go:64— cli/cmd/lql_library.go:64-88 | cli/cmd/lql_list.go:64-88 — These two members are one piece of code written twice and then edited apart: 25 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 (25 corresponding lines) cli/cmd/policy_create.go:65— cli/cmd/policy_create.go:65-89 | cli/cmd/policy_update.go:97-124 — These two members are one piece of code written twice and then edited apart: 25 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 (25 corresponding lines) api/entities_containers.go:51— api/entities_containers.go:51-78 | api/entities_containers.go:84-108 — These two members are one piece of code written twice and then edited apart: 25 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) · ×5
Edited copy of a member (20 corresponding lines) cli/cmd/package_manifest.go:395— cli/cmd/package_manifest.go:395-415 | cli/cmd/package_manifest.go:417-436 — 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) cli/cmd/report_distributions_update.go:279— cli/cmd/report_distributions_update.go:279-298 | cli/cmd/report_distributions_update.go:300-319 — 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) cli/cmd/lql.go:203— cli/cmd/lql.go:203-222 | cli/cmd/policy.go:198-224 — 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) cli/cmd/component.go:550— cli/cmd/component.go:550-574 | REDACTED:750-769 — 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) api/agent_access_tokens.go:113— api/agent_access_tokens.go:113-133 | api/team_members.go:210-229 — 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.
Duplicated block (15 lines × 2) api/v2_recommendations_azure.go:64— api/v2_recommendations_azure.go:64-78 | api/v2_recommendations_gcp.go:64-78 — 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 `api/v2_recommendations_azure.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 (15 lines × 2) cli/cmd/component_dev.go:565— cli/cmd/component_dev.go:565-579 | cli/cmd/component_dev.go:616-630 — 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 `cli/cmd/component_dev.go:565` 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 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) cli/cmd/vuln_container_show_assessments.go:472— cli/cmd/vuln_container_show_assessments.go:472-486 | REDACTED:406-420 — 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 `cli/cmd/vuln_container_show_assessments.go:472` 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 × 2) cli/cmd/vuln_container_show_assessments.go:131— cli/cmd/vuln_container_show_assessments.go:131-145 | REDACTED:284-298 — 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 (15 lines × 2) lwgenerate/gcp/gcp.go:30— lwgenerate/gcp/gcp.go:30-47 | lwgenerate/gcp/service_account.go:25-39 — 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 (14 lines × 3) api/cloud_accounts_aws_ct_sqs.go:79— api/cloud_accounts_aws_ct_sqs.go:79-92 | api/cloud_accounts_aws_sidekick_org.go:93-106 | api/cloud_accounts_gcp_sidekick.go:102-115 — 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. 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 (14 lines × 3) cli/cmd/compliance_azure.go:313— cli/cmd/compliance_azure.go:313-326 | cli/cmd/compliance_azure.go:373-386 | cli/cmd/compliance_azure.go:425-438 — 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 `cli/cmd/compliance_azure.go:313` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 3) cli/cmd/compliance_gcp.go:320— cli/cmd/compliance_gcp.go:320-333 | cli/cmd/compliance_gcp.go:380-393 | cli/cmd/compliance_gcp.go:432-445 — 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 `cli/cmd/compliance_gcp.go:320` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 3) cli/cmd/integration_docker_hub.go:95— cli/cmd/integration_docker_hub.go:95-108 | cli/cmd/integration_gcr.go:121-134 | cli/cmd/integration_proxy_scanner.go:81-95 — before extracting anything, compare `cli/cmd/integration_docker_hub.go` and `cli/cmd/integration_gcr.go` as WHOLE FILES: this scan already matched 4 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 `cli/cmd/integration_docker_hub.go:95` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (14 lines × 3) cli/cmd/compliance_aws.go:130— cli/cmd/compliance_aws.go:130-143 | cli/cmd/compliance_azure.go:186-199 | cli/cmd/compliance_gcp.go:186-199 — before extracting anything, compare `cli/cmd/compliance_aws.go` and `cli/cmd/compliance_azure.go` as WHOLE FILES: this scan already matched 6 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. Read the line range as the matched WINDOW rather than a finished unit: at `cli/cmd/compliance_aws.go:130` 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) api/alert_channels_jira_cloud_server.go:97— api/alert_channels_jira_cloud_server.go:97-110 | api/alert_channels_service_now_rest.go:52-65 — 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. 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 (14 lines × 2) api/logging.go:112— api/logging.go:112-125 | api/logging.go:138-151 — 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 `api/logging.go:112` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) cli/cmd/compliance_azure.go:186— cli/cmd/compliance_azure.go:186-199 | cli/cmd/compliance_gcp.go:186-199 — before extracting anything, compare `cli/cmd/compliance_azure.go` and `cli/cmd/compliance_gcp.go` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 118 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 `cli/cmd/compliance_azure.go:186` 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) REDACTED:112— REDACTED:112-125 | REDACTED:690-703 — 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:112` 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) lwpreflight/azure/azure.go:127— lwpreflight/azure/azure.go:127-140 | lwpreflight/gcp/gcp.go:117-130 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 3) cli/cmd/compliance_aws.go:258— cli/cmd/compliance_aws.go:258-268 | cli/cmd/compliance_aws.go:315-325 | cli/cmd/compliance_aws.go:364-374 — 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 `cli/cmd/compliance_aws.go:258` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) cli/cmd/agent_aws-install_ec2ic.go:180— cli/cmd/agent_aws-install_ec2ic.go:180-190 | cli/cmd/agent_aws-install_ec2ssh.go:186-196 | cli/cmd/agent_gcp-install-osl.go:190-200 — before extracting anything, compare `cli/cmd/agent_aws-install_ec2ic.go` and `cli/cmd/agent_aws-install_ec2ssh.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 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 `cli/cmd/agent_aws-install_ec2ic.go:180` 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) cli/cmd/preflight_aws.go:118— cli/cmd/preflight_aws.go:118-128 | cli/cmd/preflight_azure.go:110-120 | cli/cmd/preflight_gcp.go:102-112 — 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. 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 × 3) cli/cmd/compliance_aws.go:750— cli/cmd/compliance_aws.go:750-760 | cli/cmd/compliance_azure.go:753-763 | cli/cmd/compliance_gcp.go:833-843 — before extracting anything, compare `cli/cmd/compliance_aws.go` and `cli/cmd/compliance_azure.go` as WHOLE FILES: this scan already matched 6 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. Read the line range as the matched WINDOW rather than a finished unit: at `cli/cmd/compliance_aws.go:750` 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 (11 lines × 3) cli/cmd/integration_docker_hub.go:118— cli/cmd/integration_docker_hub.go:118-128 | cli/cmd/integration_gcr.go:146-156 | cli/cmd/integration_proxy_scanner.go:100-110 — before extracting anything, compare `cli/cmd/integration_docker_hub.go` and `cli/cmd/integration_gcr.go` as WHOLE FILES: this scan already matched 4 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 `cli/cmd/integration_docker_hub.go:118` 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 (10 lines × 2) cli/cmd/alert_profiles.go:433— cli/cmd/alert_profiles.go:433-442 | cli/cmd/alert_profiles.go:449-458 — 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 `cli/cmd/alert_profiles.go:433` 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) cli/cmd/package_manifest.go:215— cli/cmd/package_manifest.go:215-224 | cli/cmd/package_manifest.go:233-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 `cli/cmd/package_manifest.go:215` 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 (10 lines × 2) api/alert_channels.go:57— api/alert_channels.go:57-66 | api/cloud_accounts.go:61-70 — 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) cli/cmd/lql.go:254— cli/cmd/lql.go:254-263 | cli/cmd/policy.go:287-297 — 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) cli/cmd/suppressions_aws.go:210— cli/cmd/suppressions_aws.go:210-220 | cli/cmd/suppressions_aws.go:237-246 — 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 `cli/cmd/suppressions_aws.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. 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 (21 corresponding lines) · ×4
Edited copy of a member (21 corresponding lines) cli/cmd/component_dev.go:559— cli/cmd/component_dev.go:559-579 | cli/cmd/component_dev.go:610-630 — 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) cli/cmd/compliance_azure.go:723— cli/cmd/compliance_azure.go:723-743 | cli/cmd/compliance_gcp.go:678-699 — 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) cli/cmd/package_manifest.go:334— cli/cmd/package_manifest.go:334-356 | cli/cmd/package_manifest.go:358-378 — 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) cli/cmd/report_distributions_create.go:174— cli/cmd/report_distributions_create.go:174-194 | cli/cmd/report_distributions_update.go:181-205 — 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 (18 corresponding lines) · ×4
Edited copy of a member (18 corresponding lines) lwgenerate/aws/aws.go:1036— lwgenerate/aws/aws.go:1036-1053 | lwgenerate/aws_controltower/aws_controltower.go:399-416 — 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) lwcomponent/host_info.go:84— lwcomponent/host_info.go:84-101 | lwcomponent/host_info.go:103-120 — 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) cli/cmd/generate.go:244— cli/cmd/generate.go:244-262 | cli/cmd/generate_gcp.go:904-921 — 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) lwgenerate/aws/aws.go:36— lwgenerate/aws/aws.go:36-53 | lwgenerate/aws_eks_audit/aws_eks_audit.go:22-39 — 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 (22 lines × 2) cli/cmd/alert_rules.go:204— cli/cmd/alert_rules.go:204-225 | cli/cmd/report_rules.go:242-263 — before extracting anything, compare `cli/cmd/alert_rules.go` and `cli/cmd/report_rules.go` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 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 `cli/cmd/alert_rules.go:204` 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 (22 lines × 2) cli/cmd/alert_rules.go:357— cli/cmd/alert_rules.go:357-378 | cli/cmd/report_rules.go:391-412 — before extracting anything, compare `cli/cmd/alert_rules.go` and `cli/cmd/report_rules.go` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 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 `cli/cmd/alert_rules.go:357` 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 (22 lines × 2) cli/cmd/lql.go:276— cli/cmd/lql.go:276-297 | cli/cmd/policy.go:310-331 — 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. 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `url string) (query` in one and `url string) (policy` 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 (22 lines × 2) REDACTED:13— REDACTED:13-34 | REDACTED:190-211 — 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. 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. Check import visibility before settling on that home: `REDACTED` sits under a restricted `internal` directory, which only code inside its own subtree is permitted to import from — so it is reachable from some of these sites and not from others, and being able to see the copies is not the same as being allowed to share them. The home has to be somewhere every one of these sites is permitted to import from; if there is no such place, that restriction may be exactly why the copies are separate.
Duplicated block (16 lines × 2) cli/cmd/generate_aws_controltower.go:167— cli/cmd/generate_aws_controltower.go:167-182 | cli/cmd/generate_aws_eks_audit.go:202-217 — 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. 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) api/alert_rules.go:135— api/alert_rules.go:135-150 | api/report_rules.go:108-123 — 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 (16 lines × 2) cli/cmd/agent_aws-install_ec2ic.go:123— cli/cmd/agent_aws-install_ec2ic.go:123-138 | cli/cmd/agent_aws-install_ec2ssh.go:136-151 — before extracting anything, compare `cli/cmd/agent_aws-install_ec2ic.go` and `cli/cmd/agent_aws-install_ec2ssh.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 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 `cli/cmd/agent_aws-install_ec2ic.go:123` 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) api/v2_recommendations_azure.go:46— api/v2_recommendations_azure.go:46-61 | api/v2_recommendations_gcp.go:46-61 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `api/v2_recommendations_azure.go:46` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) cli/cmd/component.go:491— cli/cmd/component.go:491-499 | cli/cmd/component.go:682-690 | cli/cmd/component.go:729-737 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `cli/cmd/component.go:502` calls `OutputHuman` and `cli/cmd/component.go:694` 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 × 3) cli/cmd/lql.go:265— cli/cmd/lql.go:265-273 | cli/cmd/policy.go:299-307 | cli/cmd/report_definitions_create.go:89-97 — 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.
Duplicated block (9 lines × 3) lwgenerate/aws_eks_audit/aws_eks_audit.go:575— lwgenerate/aws_eks_audit/aws_eks_audit.go:575-583 | lwgenerate/azure/azure.go:577-585 | lwgenerate/oci/oci.go:143-151 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (9 lines × 3) REDACTED:60— REDACTED:60-69 | REDACTED:61-70 | REDACTED:61-69 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 4 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.
Duplicated block (7 lines × 2) lwgenerate/hcl.go:363— lwgenerate/hcl.go:363-369 | lwgenerate/hcl.go:412-418 — 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 `lwgenerate/hcl.go:363` 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 × 2) cli/cmd/lql.go:239— cli/cmd/lql.go:239-245 | cli/cmd/policy.go:240-246 — 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. 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 (7 lines × 2) lwgenerate/aws/aws.go:121— lwgenerate/aws/aws.go:121-127 | lwgenerate/aws_controltower/aws_controltower.go:166-172 — 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 (7 lines × 2) api/alert_channels.go:219— api/alert_channels.go:219-225 | api/container_registries.go:261-267 — 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.
AC6 · Visual & motion safety· Focus outline removed in CSS without a · ×3
Focus outline removed in CSS without a :focus replacement internal/databox/static/vuln_assessment.html:206— `:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement internal/databox/static/vuln_assessment.html:1497— `.Select-control` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement internal/databox/static/vuln_assessment.html:1530— `.Select-input>input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
D12 · Dependency Hygiene· Dependency pinned to a stale untagged commit · ×3
Dependency pinned to a stale untagged commit: github.com/Netflix/go-expect — Direct dependency `github.com/Netflix/go-expect` is required at `v0.0.0-20200312175327-da48e75238e2` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2020-03-12, 6.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/Netflix/go-expect` and has not moved this requirement in 6.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/Netflix/go-expect` 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/hinshun/vt10x — Direct dependency `github.com/hinshun/vt10x` is required at `v0.0.0-20180809195222-d55458df857c` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2018-08-09, 8.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/hinshun/vt10x` and has not moved this requirement in 8.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/hinshun/vt10x` 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/hokaccha/go-prettyjson — Direct dependency `github.com/hokaccha/go-prettyjson` is required at `v0.0.0-20190818114111-108c894c2c0e` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2019-08-18, 7.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/hokaccha/go-prettyjson` and has not moved this requirement in 7.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/hokaccha/go-prettyjson` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
Hotspot: lwgenerate/aws/aws.go lwgenerate/aws/aws.go:347— lwgenerate/aws/aws.go changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in GenerateAwsTfConfigurationArgs.Validate at line 347. 4 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 17:22:03 +00:00' --until='2026-11-04 17:22:03 +00:00' --full-history --no-merges -- lwgenerate/aws/aws.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: integration/context/ctx_cfg.go integration/context/ctx_cfg.go:47— integration/context/ctx_cfg.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in main.integrationCtx at line 47. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 17:22:03 +00:00' --until='2026-11-04 17:22:03 +00:00' --full-history --no-merges -- integration/context/ctx_cfg.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: cli/cmd/api.go cli/cmd/api.go:97— cli/cmd/api.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in cmd.runApiCommand at line 97. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 17:22:03 +00:00' --until='2026-11-04 17:22:03 +00:00' --full-history --no-merges -- cli/cmd/api.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
TooManyMethods: cliState REDACTED:51— TooManyMethods — 69 methods, declared across 11 files: REDACTED (23), REDACTED (9), cmd/outputs.go (9), cmd/package_manifest.go (9), +7 more file(s). The bar is 30 methods; this is 39 over it, 2.30× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: CloudAccountsService api/cloud_accounts.go:32— TooManyMethods — 59 methods, declared across 22 files: api/cloud_accounts.go (9), api/cloud_accounts_fortidspm.go (5), api/cloud_accounts_aws_dspm.go (3), api/cloud_accounts_aws_sidekick.go (3), +18 more file(s). The bar is 30 methods; this is 29 over it, 1.97× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AlertChannelsService api/alert_channels.go:29— TooManyMethods — 40 methods, declared across 17 files: api/alert_channels.go (8), api/alert_channel_datadog.go (2), api/alert_channels_aws_cloudwatch.go (2), api/alert_channels_aws_s3.go (2), +13 more file(s). The bar is 30 methods; this is 10 over it, 1.33× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (5 members, 50+ identical tokens) cli/cmd/generate_aws.go:20— cli/cmd/generate_aws.go:20-451 | cli/cmd/generate_aws_controltower.go:18-282 | cli/cmd/generate_aws_eks_audit.go:18-322 | cli/cmd/generate_azure.go:19-371 | cli/cmd/generate_gcp.go:18-312 — These 5 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 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.
Members sharing a duplicated core (5 members, 50+ identical tokens) cli/cmd/vuln_container_show_assessments.go:546— cli/cmd/vuln_container_show_assessments.go:546-568 | cli/cmd/vuln_container_show_assessments.go:645-678 | cli/cmd/vuln_container_show_assessments.go:680-714 | REDACTED:430-480 | REDACTED:528-605 — These 5 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 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.
Members sharing a duplicated core (5 members, 50+ identical tokens) lwgenerate/aws/aws.go:852— lwgenerate/aws/aws.go:852-917 | lwgenerate/aws_eks_audit/aws_eks_audit.go:441-491 | lwgenerate/azure/azure.go:482-564 | lwgenerate/gcp/gcp.go:460-521 | lwgenerate/gcp/gke.go:41-91 — These 5 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 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· Edited copy of a member (34 corresponding lines) · ×3
Edited copy of a member (34 corresponding lines) cli/cmd/agent_aws-install_ec2ic.go:85— cli/cmd/agent_aws-install_ec2ic.go:85-118 | cli/cmd/agent_aws-install_ec2ssh.go:88-131 — These two members are one piece of code written twice and then edited apart: 34 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 (34 corresponding lines) cli/cmd/generate_execute.go:198— cli/cmd/generate_execute.go:198-231 | cli/cmd/policy_library.go:358-391 — These two members are one piece of code written twice and then edited apart: 34 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 (34 corresponding lines) cli/cmd/policy_disable.go:27— cli/cmd/policy_disable.go:27-60 | cli/cmd/policy_enable.go:27-64 — These two members are one piece of code written twice and then edited apart: 34 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 (33 corresponding lines) · ×3
Edited copy of a member (33 corresponding lines) REDACTED:93— REDACTED:93-125 | REDACTED:668-703 — These two members are one piece of code written twice and then edited apart: 33 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 (33 corresponding lines) lwgenerate/aws_controltower/aws_controltower.go:115— lwgenerate/aws_controltower/aws_controltower.go:115-153 | lwgenerate/oci/oci.go:83-115 — These two members are one piece of code written twice and then edited apart: 33 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 (33 corresponding lines) lwpreflight/aws/aws.go:13— lwpreflight/aws/aws.go:13-46 | lwpreflight/gcp/gcp.go:13-45 — These two members are one piece of code written twice and then edited apart: 33 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) · ×3
Edited copy of a member (28 corresponding lines) cli/cmd/lql.go:225— cli/cmd/lql.go:225-252 | cli/cmd/policy.go:227-260 — 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) cli/cmd/generate.go:156— cli/cmd/generate.go:156-184 | cli/cmd/generate_execute.go:450-477 — 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) cli/cmd/generate_aws.go:1266— cli/cmd/generate_aws.go:1266-1293 | cli/cmd/generate_aws_controltower.go:523-557 — 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 copies of one member (3 members, 19+ corresponding lines) · ×3
Edited copies of one member (3 members, 19+ corresponding lines) cli/cmd/compliance_aws.go:743— cli/cmd/compliance_aws.go:743-761 | cli/cmd/compliance_azure.go:745-764 | cli/cmd/compliance_gcp.go:825-844 — 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) cli/cmd/compliance.go:180— cli/cmd/compliance.go:180-199 | cli/cmd/vuln_host_scan_package_manifest.go:259-278 | cli/cmd/vuln_host_scan_package_manifest.go:309-327 — 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) lwpreflight/aws/policy.go:101— lwpreflight/aws/policy.go:101-119 | lwpreflight/aws/policy.go:146-164 | lwpreflight/aws/policy.go:217-235 — 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 (22 corresponding lines) · ×3
Edited copy of a member (22 corresponding lines) REDACTED:464— REDACTED:464-485 | REDACTED:487-508 — These two members are one piece of code written twice and then edited apart: 22 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 (22 corresponding lines) lwcomponent/dev_info.go:20— lwcomponent/dev_info.go:20-41 | lwcomponent/host_info.go:30-52 — These two members are one piece of code written twice and then edited apart: 22 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 (22 corresponding lines) cli/cmd/generate_execute.go:318— cli/cmd/generate_execute.go:318-344 | cli/cmd/policy_library.go:335-356 — These two members are one piece of code written twice and then edited apart: 22 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 (26 corresponding lines) · ×3
Edited copy of a member (26 corresponding lines) REDACTED:462— REDACTED:462-490 | REDACTED:493-518 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) cli/cmd/alert_rules.go:353— cli/cmd/alert_rules.go:353-378 | cli/cmd/report_rules.go:387-412 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) cli/cmd/report_distributions_create.go:290— cli/cmd/report_distributions_create.go:290-315 | cli/cmd/report_distributions_create.go:346-371 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×3
Edited copy of a member (13 corresponding lines) cli/cmd/policy_exceptions.go:141— cli/cmd/policy_exceptions.go:141-158 | cli/cmd/policy_exceptions.go:160-172 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) REDACTED:521— REDACTED:521-533 | REDACTED:536-552 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) api/lql.go:162— api/lql.go:162-174 | api/lql_delete.go:35-47 — 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 (16 corresponding lines) · ×3
Edited copy of a member (16 corresponding lines) api/team_members.go:141— api/team_members.go:141-156 | api/team_members.go:178-199 — 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.
Edited copy of a member (16 corresponding lines) cli/cmd/compliance_azure.go:621— cli/cmd/compliance_azure.go:621-636 | cli/cmd/compliance_gcp.go:634-649 — 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.
Edited copy of a member (16 corresponding lines) api/reports.go:109— api/reports.go:109-124 | api/v2_vulnerabilities.go:590-605 — 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 copies of one member (3 members, 10+ corresponding lines) · ×3
Edited copies of one member (3 members, 10+ corresponding lines) REDACTED:106— REDACTED:106-115 | REDACTED:102-116 | REDACTED:123-137 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 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, 10+ corresponding lines) cli/cmd/lql_library.go:53— cli/cmd/lql_library.go:53-62 | cli/cmd/lql_list.go:46-62 | cli/cmd/policy.go:655-666 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 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, 10+ corresponding lines) cli/cmd/alert_channel.go:147— cli/cmd/alert_channel.go:147-156 | cli/cmd/container_registry.go:146-155 | cli/cmd/lql_delete.go:45-57 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 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 (12 corresponding lines) · ×3
Edited copy of a member (12 corresponding lines) cli/cmd/cloud_account_cleanup.go:491— cli/cmd/cloud_account_cleanup.go:491-502 | cli/cmd/cloud_account_cleanup.go:505-516 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) api/data_export_rules.go:94— api/data_export_rules.go:94-105 | api/policy_exceptions.go:79-91 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) cli/cmd/policy.go:333— cli/cmd/policy.go:333-344 | cli/cmd/report_definitions_create.go:292-303 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (22–23 lines × 2) api/entities_images.go:47— api/entities_images.go:47-68 | api/entities_images.go:76-98 — 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 `api/entities_images.go:47` 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 (22–23 lines × 2) api/entities_machine_details.go:51— api/entities_machine_details.go:51-72 | api/entities_machine_details.go:80-102 — 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 `api/entities_machine_details.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 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–23 lines × 2) api/entities_machines.go:49— api/entities_machines.go:49-70 | api/entities_machines.go:78-100 — 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 `api/entities_machines.go:49` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17 lines × 2) cli/cmd/report_distributions_create.go:258— cli/cmd/report_distributions_create.go:258-274 | cli/cmd/report_distributions_update.go:324-340 — before extracting anything, compare `cli/cmd/report_distributions_create.go` and `cli/cmd/report_distributions_update.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 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 (17 lines × 2) cli/cmd/vulnerability_exception_container.go:70— cli/cmd/vulnerability_exception_container.go:70-86 | cli/cmd/vulnerability_exception_host.go:69-85 — before extracting anything, compare `cli/cmd/vulnerability_exception_container.go` and `cli/cmd/vulnerability_exception_host.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `cli/cmd/vulnerability_exception_container.go:70` 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 (17 lines × 2) cli/cmd/vulnerability_exception_container.go:88— cli/cmd/vulnerability_exception_container.go:88-104 | cli/cmd/vulnerability_exception_host.go:87-103 — before extracting anything, compare `cli/cmd/vulnerability_exception_container.go` and `cli/cmd/vulnerability_exception_host.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `cli/cmd/vulnerability_exception_container.go:88` 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 (13 lines × 3) cli/cmd/compliance_aws.go:181— cli/cmd/compliance_aws.go:181-193 | cli/cmd/compliance_azure.go:238-250 | cli/cmd/compliance_gcp.go:245-257 — before extracting anything, compare `cli/cmd/compliance_aws.go` and `cli/cmd/compliance_azure.go` as WHOLE FILES: this scan already matched 6 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. Read the line range as the matched WINDOW rather than a finished unit: at `cli/cmd/compliance_aws.go:181` 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 × 3) cli/cmd/integration_gcp.go:95— cli/cmd/integration_gcp.go:95-107 | cli/cmd/integration_gcp.go:184-196 | cli/cmd/integration_gcp_pub_sub_audit.go:109-121 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `cli/cmd/integration_gcp.go:95` 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 (13 lines × 3) cli/cmd/alert_channel.go:65— cli/cmd/alert_channel.go:65-77 | REDACTED:113-125 | cli/cmd/container_registry.go:63-75 — 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.
Duplicated block (12 lines × 3) REDACTED:340— REDACTED:340-352 | cli/cmd/policy.go:632-643 | cli/cmd/policy_library.go:120-131 — 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 `REDACTED:340` 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 × 3) lwgenerate/azure/azure.go:682— lwgenerate/azure/azure.go:682-693 | lwgenerate/azure/azure.go:743-754 | lwgenerate/azure/azure.go:1040-1051 — 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 `lwgenerate/azure/azure.go:682` 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 × 3) cli/cmd/generate_aws_controltower.go:464— cli/cmd/generate_aws_controltower.go:464-475 | cli/cmd/generate_aws_controltower.go:490-501 | cli/cmd/generate_aws_eks_audit.go:721-732 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `cli/cmd/generate_aws_eks_audit.go:721` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (12 lines × 2) cli/cmd/vuln_host_list_cves.go:310— cli/cmd/vuln_host_list_cves.go:310-321 | REDACTED:575-586 — 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 `cli/cmd/vuln_host_list_cves.go:310` 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:571` calls `aggregatePackagesWithHosts` and `cli/cmd/vuln_host_list_cves.go:308` 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) cli/cmd/generate_gke.go:170— cli/cmd/generate_gke.go:170-181 | cli/cmd/generate_oci.go:138-149 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) REDACTED:472— REDACTED:472-483 | REDACTED:495-506 — 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:472` 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:270— REDACTED:270-274 | REDACTED:513-517 — 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 (5 lines × 2) api/v2_recommendations.go:48— api/v2_recommendations.go:48-52 | api/v2_suppressions.go:49-53 — 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 `api/v2_suppressions.go:49` 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 (5 lines × 2) cli/cmd/alert_rules.go:180— cli/cmd/alert_rules.go:180-184 | cli/cmd/report_rules.go:194-198 — before extracting anything, compare `cli/cmd/alert_rules.go` and `cli/cmd/report_rules.go` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `cli/cmd/alert_rules.go:179` calls `Join` and `cli/cmd/report_rules.go:193` 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.
Duplicated block (8 lines × 3) REDACTED:154— REDACTED:154-161 | REDACTED:159-166 | REDACTED:180-187 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 4 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.
Duplicated block (8 lines × 3) REDACTED:51— REDACTED:51-58 | REDACTED:52-59 | REDACTED:52-59 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 4 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.
Duplicated block (8 lines × 3) cli/cmd/generate_aws_eks_audit.go:932— cli/cmd/generate_aws_eks_audit.go:932-940 | cli/cmd/generate_gcp.go:730-738 | cli/cmd/generate_gke.go:308-315 — 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.
Low cohesion: Catalog (LCOM4 5) REDACTED:55— Catalog's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: cliState (LCOM4 4) REDACTED:51— cliState's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: State (LCOM4 4) REDACTED:57— State's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
X3 · Exception handling· Lost error (reports an error that is nil on this path) · ×3
Lost error (reports an error that is nil on this path) lwconfig/config.go:158— `if _, err = os.Stat(configPath); err == nil` reports `err` on the one path where it is nil, and the path where the call failed goes on without ever reading it: the comparison is inverted. The real failure is lost and a nil error (or a panic on `err.Error()`) is reported in its place. Test `err != nil` here.
Lost error (reports an error that is nil on this path) cli/cmd/cache.go:275— `if dataJSON, err := c.Cache.Read(key); err == nil` reports `err` on the one path where it is nil, and the path where the call failed goes on without ever reading it: the comparison is inverted. The real failure is lost and a nil error (or a panic on `err.Error()`) is reported in its place. Test `err != nil` here.
Lost error (reports an error that is nil on this path) cli/cmd/cache.go:277— `if err := json.Unmarshal(dataJSON, &asset); err == nil` reports `err` on the one path where it is nil, and the path where the call failed goes on without ever reading it: the comparison is inverted. The real failure is lost and a nil error (or a panic on `err.Error()`) is reported in its place. Test `err != nil` here.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (4 members, 50+ identical tokens) cli/cmd/agent_aws-install_ec2ic.go:120— cli/cmd/agent_aws-install_ec2ic.go:120-205 | cli/cmd/agent_aws-install_ec2ssh.go:133-212 | cli/cmd/agent_aws-install_ec2ssm.go:157-405 | cli/cmd/agent_gcp-install-osl.go:130-215 — 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.
Members sharing a duplicated core (4 members, 50+ identical tokens) cli/cmd/integration_cisco_webex.go:27— cli/cmd/integration_cisco_webex.go:27-64 | cli/cmd/integration_slack_channel.go:27-64 | cli/cmd/integration_victorops.go:27-64 | cli/cmd/integration_webhook.go:27-64 — 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 (103 corresponding lines) · ×2
Edited copy of a member (103 corresponding lines) cli/cmd/component.go:407— cli/cmd/component.go:407-509 | cli/cmd/component.go:584-699 — These two members are one piece of code written twice and then edited apart: 103 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 (103 corresponding lines) cli/cmd/report_distributions_create.go:69— cli/cmd/report_distributions_create.go:69-172 | cli/cmd/report_distributions_update.go:75-177 — These two members are one piece of code written twice and then edited apart: 103 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 (32 corresponding lines) · ×2
Edited copy of a member (32 corresponding lines) cli/cmd/report_distributions_create.go:257— cli/cmd/report_distributions_create.go:257-288 | cli/cmd/report_distributions_update.go:323-360 — 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.
Edited copy of a member (32 corresponding lines) lwpreflight/aws/permission.go:8— lwpreflight/aws/permission.go:8-42 | lwpreflight/azure/permission.go:8-39 — 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 (29 corresponding lines) · ×2
Edited copy of a member (29 corresponding lines) lwcomponent/host_info.go:122— lwcomponent/host_info.go:122-152 | REDACTED:156-184 — These two members are one piece of code written twice and then edited apart: 29 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 (29 corresponding lines) cli/cmd/awsiam.go:205— cli/cmd/awsiam.go:205-247 | cli/cmd/awsiam.go:279-307 — These two members are one piece of code written twice and then edited apart: 29 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, 24+ corresponding lines) · ×2
Edited copies of one member (3 members, 24+ corresponding lines) lwpreflight/aws/policy.go:121— lwpreflight/aws/policy.go:121-144 | lwpreflight/aws/policy.go:166-189 | lwpreflight/aws/policy.go:237-262 — These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 24+ corresponding lines) api/v2_vulnerabilities.go:84— api/v2_vulnerabilities.go:84-107 | api/v2_vulnerabilities.go:426-449 | api/v2_vulnerability_observations.go:32-55 — These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×2
Edited copy of a member (24 corresponding lines) cli/cmd/report_distributions_create.go:232— cli/cmd/report_distributions_create.go:232-255 | cli/cmd/report_distributions_update.go:254-277 — 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) api/vulnerability_exceptions_container.go:67— api/vulnerability_exceptions_container.go:67-91 | api/vulnerability_exceptions_host.go:65-88 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×2
Edited copy of a member (9 corresponding lines) cli/cmd/generate_oci.go:262— cli/cmd/generate_oci.go:262-273 | cli/cmd/generate_gcp.go:656-664 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) api/alert_channels_email_user.go:115— api/alert_channels_email_user.go:115-123 | api/v2_vulnerabilities.go:510-518 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×2
Edited copy of a member (10 corresponding lines) cli/cmd/alert_show_events.go:7— cli/cmd/alert_show_events.go:7-16 | cli/cmd/alert_show_observationtimeline.go:7-16 — These two members are one piece of code written twice and then edited apart: 10 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 (10 corresponding lines) lwgenerate/aws/aws.go:483— lwgenerate/aws/aws.go:483-494 | lwgenerate/aws_controltower/aws_controltower.go:212-221 — These two members are one piece of code written twice and then edited apart: 10 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 (6 corresponding lines) · ×2
Edited copy of a member (6 corresponding lines) cli/cmd/generate_aws.go:469— cli/cmd/generate_aws.go:469-474 | cli/cmd/generate_aws_controltower.go:312-318 — These two members are one piece of code written twice and then edited apart: 6 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 (6 corresponding lines) cli/main.go:33— cli/main.go:33-38 | integration/test_resources/cdk/go-component/main.go:34-39 — These two members are one piece of code written twice and then edited apart: 6 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) cli/cmd/vuln_container_scan.go:276— cli/cmd/vuln_container_scan.go:276-299 | cli/cmd/vuln_container_show_assessments.go:194-217 — 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 `cli/cmd/vuln_container_scan.go:276` 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 (24 lines × 2) lwgenerate/azure/azure.go:680— lwgenerate/azure/azure.go:680-703 | lwgenerate/azure/azure.go:741-764 — 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 (20 lines × 2) cli/cmd/component_dev.go:112— cli/cmd/component_dev.go:112-131 | cli/cmd/component_dev.go:228-247 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (20 lines × 2) lwgenerate/gcp/gcp.go:720— lwgenerate/gcp/gcp.go:720-739 | lwgenerate/gcp/gcp.go:889-908 — 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 `lwgenerate/gcp/gcp.go:720` 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 × 2) cli/cmd/policy_create.go:66— cli/cmd/policy_create.go:66-84 | cli/cmd/policy_update.go:98-116 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19 lines × 2) lwgenerate/gcp/gcp.go:680— lwgenerate/gcp/gcp.go:680-698 | lwgenerate/gcp/gcp.go:818-836 — 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 `lwgenerate/gcp/gcp.go:680` 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 × 3) cli/cmd/integration_docker_hub.go:89— cli/cmd/integration_docker_hub.go:89-106 | cli/cmd/integration_ecr.go:95-112 | cli/cmd/integration_gcr.go:115-132 — before extracting anything, compare `cli/cmd/integration_docker_hub.go` and `cli/cmd/integration_gcr.go` as WHOLE FILES: this scan already matched 4 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 `cli/cmd/integration_docker_hub.go:89` 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 × 3) cli/cmd/suppressions_aws.go:286— cli/cmd/suppressions_aws.go:286-303 | cli/cmd/suppressions_azure.go:249-266 | cli/cmd/suppressions_gcp.go:217-234 — before extracting anything, compare `cli/cmd/suppressions_aws.go` and `cli/cmd/suppressions_azure.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 140 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 `cli/cmd/suppressions_aws.go:286` 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) cli/cmd/compliance_azure.go:242— cli/cmd/compliance_azure.go:242-259 | cli/cmd/compliance_gcp.go:249-266 — before extracting anything, compare `cli/cmd/compliance_azure.go` and `cli/cmd/compliance_gcp.go` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 118 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 `cli/cmd/compliance_azure.go:242` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) cli/cmd/report_distributions_create.go:238— cli/cmd/report_distributions_create.go:238-255 | cli/cmd/report_distributions_update.go:260-277 — before extracting anything, compare `cli/cmd/report_distributions_create.go` and `cli/cmd/report_distributions_update.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 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 `cli/cmd/report_distributions_create.go:238` 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 (16 lines × 3) lwpreflight/aws/policy.go:104— lwpreflight/aws/policy.go:104-119 | lwpreflight/aws/policy.go:149-164 | lwpreflight/aws/policy.go:220-235 — 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 `lwpreflight/aws/policy.go:104` 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 × 3) api/alert_rules.go:118— api/alert_rules.go:118-133 | api/report_rules.go:91-106 | api/vulnerability_exceptions.go:140-155 — 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.
Duplicated block (15 lines × 4) cli/cmd/agent_aws-install_ec2ic.go:148— cli/cmd/agent_aws-install_ec2ic.go:148-162 | cli/cmd/agent_aws-install_ec2ssh.go:154-168 | cli/cmd/agent_aws-install_ec2ssm.go:231-245 | cli/cmd/agent_gcp-install-osl.go:160-174 — before extracting anything, compare `cli/cmd/agent_aws-install_ec2ic.go` and `cli/cmd/agent_aws-install_ec2ssh.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 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 `cli/cmd/agent_aws-install_ec2ic.go:148` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 × 4) cli/cmd/generate_aws.go:243— cli/cmd/generate_aws.go:243-260 | cli/cmd/generate_aws_controltower.go:122-136 | cli/cmd/generate_aws_eks_audit.go:157-171 | cli/cmd/generate_gcp.go:185-199 — 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 `cli/cmd/generate_aws.go:243` 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–14 lines × 2) cli/cmd/alert_rules.go:319— cli/cmd/alert_rules.go:319-331 | cli/cmd/alert_rules.go:338-351 — 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 `cli/cmd/alert_rules.go:319` 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 (13–14 lines × 2) lwgenerate/aws/aws.go:1342— lwgenerate/aws/aws.go:1342-1355 | lwgenerate/azure/azure.go:1001-1013 — 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 `lwgenerate/aws/aws.go:1342` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 3) cli/cmd/compliance.go:355— cli/cmd/compliance.go:355-364 | cli/cmd/vuln_container_show_assessments.go:471-480 | REDACTED:405-414 — 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 `cli/cmd/compliance.go:355` 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 (10 lines × 3) cli/cmd/generate_aws_controltower.go:416— cli/cmd/generate_aws_controltower.go:416-426 | cli/cmd/generate_aws_eks_audit.go:827-837 | cli/cmd/generate_gke.go:496-505 — 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.
Duplicated block (5 lines × 3) cli/cmd/vuln_container_show_assessments.go:556— cli/cmd/vuln_container_show_assessments.go:556-561 | cli/cmd/vuln_container_show_assessments.go:667-671 | REDACTED:468-473 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `cli/cmd/vuln_container_show_assessments.go:556` 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 × 3) cli/cmd/generate_aws_controltower.go:642— cli/cmd/generate_aws_controltower.go:642-646 | cli/cmd/generate_azure.go:773-777 | cli/cmd/generate_oci.go:371-375 — 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.
Duplicated block (7 lines × 3) api/alert_channels.go:227— api/alert_channels.go:227-233 | api/cloud_accounts.go:295-301 | api/container_registries.go:269-275 — 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.
Duplicated block (7 lines × 3) lwgenerate/aws/aws.go:1437— lwgenerate/aws/aws.go:1437-1443 | lwgenerate/aws/aws.go:1463-1469 | lwgenerate/aws/aws.go:1682-1688 — 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 `lwgenerate/aws/aws.go:1437` 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.
Outbound HTTP without resilience lwgenerate/azure/azure.go:154— `http.Get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience lwupdater/updater.go:138— `http.Client{` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
AC3 · Page structure· More than one main landmark · ×1
More than one main landmark internal/databox/static/vuln_assessment.html:2— A document must expose only one main landmark. Multiple visible <main> (or role="main") elements confuse the landmark map and the "skip to content" target. Keep one; remove or hide the rest.
AC3 · Page structure· Heading level jumps from h1 to h5 · ×1
Heading level jumps from h1 to h5 internal/databox/static/vuln_assessment.html:1992— Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
Low contrast colour pair in CSS (1.6:1) internal/databox/static/vuln_assessment.html:18— `.ant-avatar` sets color: #fff on background-color: #ccc — 1.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.3:1) internal/databox/static/vuln_assessment.html:1580— `.button-primary,.info` sets color: #fff on background-color: #2eb9f0 — 2.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.0:1) internal/databox/static/vuln_assessment.html:1588— `.info:hover,button.button-primary:hover` sets color: #fff on background-color: #54c5f2 — 2.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Stateful handler dependency: MetricEvent api/metrics.go:71— `MetricEvent` is shared by every request (`AddFeatureField` is called per request from the gRPC service method `cliState.Honeyvent`, on the one `MetricEvent` value that handler's shared receiver holds) but writes its fields outside any lock (FeatureData; e.g. `FeatureData` in `AddFeatureField` at line 105). Unsynchronised concurrent writes are a data race in Go: an update is lost or a value tears, and a concurrent map write aborts the process.
cmd.promptAzureGenerate (cyclomatic 36) cli/cmd/generate_azure.go:780— cmd.promptAzureGenerate has cyclomatic complexity 36 (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.
GenerateAwsTfConfigurationArgs.Validate (cyclomatic 36) lwgenerate/aws/aws.go:347— GenerateAwsTfConfigurationArgs.Validate has cyclomatic complexity 36 (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.
aws.createCloudtrail (cyclomatic 33) lwgenerate/aws/aws.go:1138— aws.createCloudtrail has cyclomatic complexity 33 (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.
aws_eks_audit.createEksAudit (cyclomatic 33) lwgenerate/aws_eks_audit/aws_eks_audit.go:585— aws_eks_audit.createEksAudit has cyclomatic complexity 33 (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.
cmd.promptGcpGenerate (cyclomatic 32) cli/cmd/generate_gcp.go:741— cmd.promptGcpGenerate 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.
aws.createAgentless (cyclomatic 32) lwgenerate/aws/aws.go:1371— aws.createAgentless 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.
gcp.createAuditLog (cyclomatic 31) lwgenerate/gcp/gcp.go:757— gcp.createAuditLog 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.
cmd.repairAwsCfgOrg (cyclomatic 30) cli/cmd/cloud_account_repair_aws_cfg_org.go:71— cmd.repairAwsCfgOrg 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.
GenerateAzureTfConfigurationArgs.validate (cyclomatic 30) lwgenerate/azure/azure.go:178— GenerateAzureTfConfigurationArgs.validate has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
cmd.installAWSSSM (cyclomatic 26) cli/cmd/agent_aws-install_ec2ssm.go:157— cmd.installAWSSSM has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 11 of the 26 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 241, 201). 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.
cmd.promptCloudtrailQuestions (cyclomatic 26) cli/cmd/generate_aws.go:1006— cmd.promptCloudtrailQuestions 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.
cmd.cloudAccountCleanup (cyclomatic 25) cli/cmd/cloud_account_cleanup.go:108— cmd.cloudAccountCleanup 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.
cmd.repairAwsCfgOrgAll (cyclomatic 24) cli/cmd/cloud_account_repair_aws_cfg_org.go:418— cmd.repairAwsCfgOrgAll has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
cmd.listAgents (cyclomatic 21) cli/cmd/agent_list.go:77— cmd.listAgents 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.
cmd.cleanupIamRole (cyclomatic 21) cli/cmd/cloud_account_cleanup.go:416— cmd.cleanupIamRole 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.
cmd.hostVulnListCvesPackagesTable (cyclomatic 21) cli/cmd/vuln_host_list_cves.go:214— cmd.hostVulnListCvesPackagesTable 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.
State.Install (cyclomatic 21) REDACTED:227— State.Install has cyclomatic complexity 21 (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.
cmd.askAdvancedEksAuditOptions (cyclomatic 20) cli/cmd/generate_aws_eks_audit.go:839— cmd.askAdvancedEksAuditOptions 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.
cmd.buildDetailsTable (cyclomatic 19) REDACTED:270— cmd.buildDetailsTable 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.
cmd.devModeComponent (cyclomatic 19) cli/cmd/component_dev.go:90— cmd.devModeComponent 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.
cmd.cdkPythonScaffolding (cyclomatic 19) cli/cmd/component_dev.go:409— cmd.cdkPythonScaffolding 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.
cmd.preRunGenerateOci (cyclomatic 19) cli/cmd/generate_oci.go:135— cmd.preRunGenerateOci 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.
cmd.runQuery (cyclomatic 19) cli/cmd/lql.go:390— cmd.runQuery 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.
cmd.promptUpdateReportDefinitionSections (cyclomatic 19) cli/cmd/report_definitions_update.go:152— cmd.promptUpdateReportDefinitionSections 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.
cmd.installRemoteAgent (cyclomatic 18) cli/cmd/agent_install.go:40— cmd.installRemoteAgent 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.
cmd.runCloudAccountBackup (cyclomatic 18) cli/cmd/cloud_account_backup.go:89— cmd.runCloudAccountBackup 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.
cmd.prototypeRunComponentsDevMode (cyclomatic 18) cli/cmd/component_dev.go:206— cmd.prototypeRunComponentsDevMode 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.
cmd.askAdvancedControlTowerOptions (cyclomatic 18) cli/cmd/generate_aws_controltower.go:559— cmd.askAdvancedControlTowerOptions 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.
cmd.policySyncExecuteChanges (cyclomatic 18) cli/cmd/policy_library.go:393— cmd.policySyncExecuteChanges 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.
main.integrationCtx (cyclomatic 18) integration/context/ctx_cfg.go:47— main.integrationCtx 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.
aws.createAwsProvider (cyclomatic 18) lwgenerate/aws/aws.go:934— aws.createAwsProvider 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.
lwgenerate.convertTypeToCty (cyclomatic 18) lwgenerate/hcl.go:339— lwgenerate.convertTypeToCty has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
azure.FetchPolicies (cyclomatic 18) lwpreflight/azure/policy.go:12— azure.FetchPolicies 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.
cmd.promptAzureAgentlessQuestions (cyclomatic 17) cli/cmd/generate_azure.go:1042— cmd.promptAzureAgentlessQuestions 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.
cmd.convertSupCondition (cyclomatic 17) cli/cmd/suppressions.go:138— cmd.convertSupCondition has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
cmd.convertAzureSuppressions (cyclomatic 17) cli/cmd/suppressions_azure.go:274— cmd.convertAzureSuppressions 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.
cliState.GeneratePackageManifest (cyclomatic 17) cli/cmd/package_manifest.go:54— cliState.GeneratePackageManifest 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.
aws.New (cyclomatic 17) lwpreflight/aws/aws.go:48— aws.New 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.
cmd.listAlert (cyclomatic 16) cli/cmd/alert_list.go:180— cmd.listAlert 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.
cmd.runApiCommand (cyclomatic 16) cli/cmd/api.go:97— cmd.runApiCommand 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.
cmd.runConfigureSetup (cyclomatic 16) cli/cmd/configure.go:170— cmd.runConfigureSetup 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.
aws_controltower.createCloudTrailControlTower (cyclomatic 16) lwgenerate/aws_controltower/aws_controltower.go:316— aws_controltower.createCloudTrailControlTower has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
aws.CheckPermissionsViaSimulation (cyclomatic 16) lwpreflight/aws/permission_simulate.go:26— aws.CheckPermissionsViaSimulation 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.
Deprecated module: github.com/golang/protobuf — `github.com/golang/protobuf` is required at v1.5.4 in REDACTED, and its author has DEPRECATED the module: "Use the "google.golang.org/protobuf" module instead." A deprecation is declared by the author in the module's own REDACTED and applies to the whole module, not to one release, so moving to a newer version of it does not clear this. Follow the replacement the notice names.
D12 · Dependency Hygiene· No go.sum committed (REDACTED) · ×1
No go.sum committed (REDACTED) — REDACTED requires 19 module(s) but no `go.sum` is committed beside it, so nothing records the expected checksum of the code this module builds against — `go build` accepts whatever the module proxy serves, and two builds of this commit are not guaranteed to be the same build. Run `go mod tidy` and commit the resulting `go.sum`.
aws.createCloudtrail (cognitive 75) lwgenerate/aws/aws.go:1138— aws.createCloudtrail has cognitive complexity 75 (threshold 15). Drivers by points: if/else 35 (73 pts), boolean chains 2 (nesting depth added 38). 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.
GenerateAwsTfConfigurationArgs.Validate (cognitive 75) lwgenerate/aws/aws.go:347— GenerateAwsTfConfigurationArgs.Validate has cognitive complexity 75 (threshold 15). Drivers by points: if/else 25 (62 pts), loops 2 (7 pts), boolean chains 6 (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.
gcp.createAuditLog (cognitive 72) lwgenerate/gcp/gcp.go:757— gcp.createAuditLog has cognitive complexity 72 (threshold 15). Drivers by points: if/else 29 (67 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 40). 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.
aws.createAgentless (cognitive 71) lwgenerate/aws/aws.go:1371— aws.createAgentless has cognitive complexity 71 (threshold 15). Drivers by points: if/else 25 (59 pts), loops 5 (10 pts), boolean chains 2 (nesting depth added 39). 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.
cmd.policySyncExecuteChanges (cognitive 55) cli/cmd/policy_library.go:393— cmd.policySyncExecuteChanges has cognitive complexity 55 (threshold 15). Drivers by points: if/else 16 (54 pts), loops 1 (nesting depth added 38). 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.
cmd.convertAzureSuppressions (cognitive 53) cli/cmd/suppressions_azure.go:274— cmd.convertAzureSuppressions has cognitive complexity 53 (threshold 15). Drivers by points: if/else 14 (49 pts), loops 2 (4 pts) (nesting depth added 37). 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.
azure.FetchPolicies (cognitive 51) lwpreflight/azure/policy.go:12— azure.FetchPolicies has cognitive complexity 51 (threshold 15). Drivers by points: if/else 10 (34 pts), loops 4 (14 pts), boolean chains 3 (nesting depth added 34). 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.
cmd.installAWSSSM (cognitive 48) cli/cmd/agent_aws-install_ec2ssm.go:157— cmd.installAWSSSM has cognitive complexity 48 (threshold 15). Drivers by points: if/else 24 (42 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 20). Most of this is not in the body itself: 14 of the 48 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 241, 201). 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.
cmd.promptCloudtrailQuestions (cognitive 48) cli/cmd/generate_aws.go:1006— cmd.promptCloudtrailQuestions has cognitive complexity 48 (threshold 15). Drivers by points: if/else 18 (43 pts), match/switch 1 (3 pts), loops 1 (2 pts) (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.
cmd.promptGcpGenerate (cognitive 45) cli/cmd/generate_gcp.go:741— cmd.promptGcpGenerate has cognitive complexity 45 (threshold 15). Drivers by points: if/else 26 (41 pts), boolean chains 4 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cmd.convertAwsSuppressions (cognitive 45) cli/cmd/suppressions_aws.go:311— cmd.convertAwsSuppressions has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (41 pts), loops 2 (4 pts) (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.
cmd.convertGcpSuppressions (cognitive 45) cli/cmd/suppressions_gcp.go:242— cmd.convertGcpSuppressions has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (41 pts), loops 2 (4 pts) (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.
cmd.hostVulnListCvesPackagesTable (cognitive 45) cli/cmd/vuln_host_list_cves.go:214— cmd.hostVulnListCvesPackagesTable has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (37 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cmd.promptAzureGenerate (cognitive 43) cli/cmd/generate_azure.go:780— cmd.promptAzureGenerate has cognitive complexity 43 (threshold 15). Drivers by points: if/else 27 (40 pts), boolean chains 3 (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.
cmd.buildDetailsTable (cognitive 42) REDACTED:270— cmd.buildDetailsTable has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 4 (16 pts), match/switch 1 (3 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cmd.repairAwsCfgOrg (cognitive 39) cli/cmd/cloud_account_repair_aws_cfg_org.go:71— cmd.repairAwsCfgOrg has cognitive complexity 39 (threshold 15). Drivers by points: if/else 26 (36 pts), boolean chains 3 (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.
cmd.promptUpdateReportDefinitionSections (cognitive 39) cli/cmd/report_definitions_update.go:152— cmd.promptUpdateReportDefinitionSections has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (34 pts), loops 3 (5 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.
aws_eks_audit.createEksAudit (cognitive 38) lwgenerate/aws_eks_audit/aws_eks_audit.go:585— aws_eks_audit.createEksAudit has cognitive complexity 38 (threshold 15). Drivers by points: if/else 23 (25 pts), loops 3 (7 pts), boolean chains 6 (nesting depth added 6). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
cmd.cloudAccountCleanup (cognitive 36) cli/cmd/cloud_account_cleanup.go:108— cmd.cloudAccountCleanup has cognitive complexity 36 (threshold 15). Drivers by points: if/else 20 (31 pts), loops 3, match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cmd.cleanupIamRole (cognitive 36) cli/cmd/cloud_account_cleanup.go:416— cmd.cleanupIamRole has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (30 pts), boolean chains 3, loops 3 (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.
cmd.devModeComponent (cognitive 35) cli/cmd/component_dev.go:90— cmd.devModeComponent has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (32 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cmd.repairAwsCfgOrgAll (cognitive 33) cli/cmd/cloud_account_repair_aws_cfg_org.go:418— cmd.repairAwsCfgOrgAll has cognitive complexity 33 (threshold 15). Drivers by points: if/else 19 (26 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 10). 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, 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.
azure.createActivityLog (cognitive 33) lwgenerate/azure/azure.go:730— azure.createActivityLog has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (32 pts), boolean chains 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.
cmd.prototypeRunComponentsDevMode (cognitive 32) cli/cmd/component_dev.go:206— cmd.prototypeRunComponentsDevMode has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (29 pts), match/switch 1 (2 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.
cmd.askAdvancedEksAuditOptions (cognitive 32) cli/cmd/generate_aws_eks_audit.go:839— cmd.askAdvancedEksAuditOptions has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (29 pts), match/switch 1 (2 pts), loops 1 (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.
cmd.promptAzureAgentlessQuestions (cognitive 32) cli/cmd/generate_azure.go:1042— cmd.promptAzureAgentlessQuestions has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (22 pts), loops 3 (9 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.
cmd.cdkPythonScaffolding (cognitive 31) cli/cmd/component_dev.go:409— cmd.cdkPythonScaffolding has cognitive complexity 31 (threshold 15). Drivers by points: if/else 22 (30 pts), 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.
gcp.createConfiguration (cognitive 31) lwgenerate/gcp/gcp.go:668— gcp.createConfiguration has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 17). 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.
cmd.runQuery (cognitive 30) cli/cmd/lql.go:390— cmd.runQuery has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19 (29 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.
aws.FetchPolicies (cognitive 30) lwpreflight/aws/policy.go:27— aws.FetchPolicies has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 3 (6 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cmd.listAgents (cognitive 29) cli/cmd/agent_list.go:77— cmd.listAgents has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cmd.gcpDescribeInstancesInProject (cognitive 29) cli/cmd/gcp.go:36— cmd.gcpDescribeInstancesInProject has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cmd.askAdvancedControlTowerOptions (cognitive 29) cli/cmd/generate_aws_controltower.go:559— cmd.askAdvancedControlTowerOptions has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (26 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
azure.checkAdminRole (cognitive 29) lwpreflight/azure/caller.go:114— azure.checkAdminRole has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (23 pts), boolean chains 3, loops 2 (3 pts) (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.
cmd.preRunGenerateOci (cognitive 28) cli/cmd/generate_oci.go:135— cmd.preRunGenerateOci has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 3 (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.
cliState.PrototypeLoadComponents (cognitive 27) cli/cmd/component.go:263— cliState.PrototypeLoadComponents has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (23 pts), boolean chains 3, loops 1 (nesting depth added 15). Most of this is not in the body itself: 9 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 300). 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.
resources.getNetworkInfo (cognitive 27) lwcloud/gcp/resources/instances/instances.go:177— resources.getNetworkInfo has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 5, loops 2 (4 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.
GenerateAzureTfConfigurationArgs.validate (cognitive 27) lwgenerate/azure/azure.go:178— GenerateAzureTfConfigurationArgs.validate has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 10 (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.
aws.CheckPermissionsViaSimulation (cognitive 27) lwpreflight/aws/permission_simulate.go:26— aws.CheckPermissionsViaSimulation has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 6 (10 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cmd.cdkGolangScaffolding (cognitive 26) cli/cmd/component_dev.go:307— cmd.cdkGolangScaffolding has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (25 pts), 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.
cmd.runConfigureSetup (cognitive 26) cli/cmd/configure.go:170— cmd.runConfigureSetup has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
resources.EnumerateInstancesInProject (cognitive 26) lwcloud/gcp/resources/instances/instances.go:40— resources.EnumerateInstancesInProject has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 4 (10 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.
State.Install (cognitive 26) REDACTED:227— State.Install has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 1 (nesting depth added 5). 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.
aws.createAwsProvider (cognitive 26) lwgenerate/aws/aws.go:934— aws.createAwsProvider has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (20 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cmd.installRemoteAgent (cognitive 25) cli/cmd/agent_install.go:40— cmd.installRemoteAgent has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (25 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lwcomponent.status (cognitive 25) REDACTED:180— lwcomponent.status has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 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.
azure.FetchDetails (cognitive 25) lwpreflight/azure/detail.go:15— azure.FetchDetails has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (19 pts), boolean chains 3, 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.
lwgenerate.convertTypeToCty (cognitive 24) lwgenerate/hcl.go:339— lwgenerate.convertTypeToCty has cognitive complexity 24 (threshold 15). Drivers by points: loops 6 (13 pts), if/else 3 (10 pts), match/switch 1 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
cmd.installGCPOSL (cognitive 23) cli/cmd/agent_gcp-install-osl.go:130— cmd.installGCPOSL has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 1, loops 1 (nesting depth added 8). Of this number, 13 points are the body's own statements and 10 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.
cmd.runCloudAccountBackup (cognitive 23) cli/cmd/cloud_account_backup.go:89— cmd.runCloudAccountBackup has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (20 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.
cmd.accountsInOUs (cognitive 23) cli/cmd/cloud_account_repair_aws_cfg_org.go:585— cmd.accountsInOUs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 5 (11 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.
cmd.downloadProgress (cognitive 23) cli/cmd/component.go:1131— cmd.downloadProgress has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (20 pts), match/switch 1 (2 pts), 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.
cmd.promptGkeAdvancedOptions (cognitive 23) cli/cmd/generate_gke.go:375— cmd.promptGkeAdvancedOptions has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (20 pts), match/switch 1 (2 pts), 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.
azure.CheckVNetQuota (cognitive 23) lwpreflight/azure/constraint.go:12— azure.CheckVNetQuota has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (3 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.
cmd.listAlert (cognitive 22) cli/cmd/alert_list.go:180— cmd.listAlert has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (21 pts), 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.
cmd.promptAzureActivityLogQuestions (cognitive 22) cli/cmd/generate_azure.go:943— cmd.promptAzureActivityLogQuestions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 1 (3 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.
main.integrationCtx (cognitive 22) integration/context/ctx_cfg.go:47— main.integrationCtx has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
archive.UnTar (cognitive 22) REDACTED:11— archive.UnTar has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (19 pts), match/switch 1 (2 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.
Client.NewRequest (cognitive 21) api/http.go:33— Client.NewRequest has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 2, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VulnerabilitiesHostResponse.VulnerabilityCounts (cognitive 21) api/v2_vulnerabilities.go:656— VulnerabilitiesHostResponse.VulnerabilityCounts has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (17 pts), match/switch 1 (2 pts), boolean chains 1, 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.
cmd.awsRegionDescribeInstances (cognitive 21) cli/cmd/aws.go:90— cmd.awsRegionDescribeInstances has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 9). Of this number, 15 points are the body's own statements and 6 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.
cmd.severitySummary (cognitive 21) REDACTED:158— cmd.severitySummary has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3, match/switch 1 (2 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.
lwcomponent.LoadLocalComponents (cognitive 21) REDACTED:355— lwcomponent.LoadLocalComponents has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
azure.createAgentless (cognitive 21) lwgenerate/azure/azure.go:823— azure.createAgentless has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (4 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.
azure.createDspm (cognitive 21) lwgenerate/azure/azure.go:976— azure.createDspm has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lwgenerate.setBlockAttributeValue (cognitive 21) lwgenerate/hcl.go:402— lwgenerate.setBlockAttributeValue has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (7 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
aws.CheckPermissions (cognitive 21) lwpreflight/aws/permission.go:8— aws.CheckPermissions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (7 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cmd.installAWSEC2IC (cognitive 20) cli/cmd/agent_aws-install_ec2ic.go:120— cmd.installAWSEC2IC has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 1 (nesting depth added 8). Of this number, 10 points are the body's own statements and 10 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.
cmd.deleteCustomerManagedPolicy (cognitive 20) cli/cmd/cloud_account_cleanup.go:520— cmd.deleteCustomerManagedPolicy has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 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.
cmd.cliListGcpProjectsAndOrgs (cognitive 20) cli/cmd/compliance_gcp.go:771— cmd.cliListGcpProjectsAndOrgs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cmd.initConfig (cognitive 20) cli/cmd/root.go:301— cmd.initConfig has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17 (20 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
cmd.buildVulnHostsDetailsTable (cognitive 20) REDACTED:315— cmd.buildVulnHostsDetailsTable has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (19 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.
cmd.hostVulnPackagesTable (cognitive 20) REDACTED:528— cmd.hostVulnPackagesTable has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3, boolean chains 2 (nesting depth added 7). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
cliState.GeneratePackageManifest (cognitive 20) cli/cmd/package_manifest.go:54— cliState.GeneratePackageManifest has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 2 (3 pts), match/switch 1 (nesting depth added 7). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
componentArgParser.parseShortArg (cognitive 20) cli/cmd/component_args.go:118— componentArgParser.parseShortArg has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 2, 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.
resources.EnumerateFolders (cognitive 20) lwcloud/gcp/resources/folders/folders.go:40— resources.EnumerateFolders has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
aws.New (cognitive 20) lwpreflight/aws/aws.go:48— aws.New has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
cmd.installAWSSSH (cognitive 19) cli/cmd/agent_aws-install_ec2ssh.go:133— cmd.installAWSSSH has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 1 (nesting depth added 8). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 164). 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.
cmd.filterFixableAlerts (cognitive 19) cli/cmd/alert_list_fixable.go:70— cmd.filterFixableAlerts has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (5 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.
cmd.askAdvancedOciOptions (cognitive 19) cli/cmd/generate_oci.go:287— cmd.askAdvancedOciOptions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 1 (2 pts), 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.
cmd.buildListCVEReports (cognitive 19) cli/cmd/vuln_host_list_cves.go:108— cmd.buildListCVEReports has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (19 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.
azure.CheckPermissions (cognitive 19) lwpreflight/azure/permission.go:8— azure.CheckPermissions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (7 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VulnerabilitySoftwarePackagesResponse.VulnerabilityCounts (cognitive 18) api/v2_vulnerabilities_software_packages.go:60— VulnerabilitySoftwarePackagesResponse.VulnerabilityCounts has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (15 pts), match/switch 1 (2 pts), 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.
cmd.runApiCommand (cognitive 18) cli/cmd/api.go:97— cmd.runApiCommand has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cmd.complianceCSVReportRecommendationsTable (cognitive 18) cli/cmd/compliance.go:256— cmd.complianceCSVReportRecommendationsTable has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 2 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
cmd.updateComponent (cognitive 18) cli/cmd/component.go:584— cmd.updateComponent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16 (18 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
cmd.LoadCatalog (cognitive 18) cli/cmd/component.go:1190— cmd.LoadCatalog has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, 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.
cmd.LocateOrInstallTerraform (cognitive 18) cli/cmd/generate_execute.go:47— cmd.LocateOrInstallTerraform has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (17 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.
cmd.convertSupCondition (cognitive 18) cli/cmd/suppressions.go:138— cmd.convertSupCondition has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (7 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
gcp.rolesForCaller (cognitive 18) lwpreflight/gcp/policy.go:70— gcp.rolesForCaller has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (12 pts), loops 3 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cmd.cloudAccountRestore (cognitive 17) cli/cmd/cloud_account_restore.go:62— cmd.cloudAccountRestore has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 2, boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
cmd.promptAwsEksAuditAdditionalClusterRegionQuestions (cognitive 17) cli/cmd/generate_aws_eks_audit.go:734— cmd.promptAwsEksAuditAdditionalClusterRegionQuestions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cmd.promptCreatePolicyException (cognitive 17) cli/cmd/policy_exceptions.go:188— cmd.promptCreatePolicyException has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cmd.fetchReportDefinitionVersion (cognitive 17) cli/cmd/report_definitions.go:208— cmd.fetchReportDefinitionVersion 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.
cmd.promptCreateTeamMember (cognitive 17) cli/cmd/team_members.go:211— cmd.promptCreateTeamMember has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cliState.Migrations (cognitive 17) cli/cmd/migration.go:42— cliState.Migrations has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (17 pts) (nesting depth added 5). Of this number, 15 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.
resources.enumerateTopLevelProjects (cognitive 17) lwcloud/gcp/resources/projects/projects.go:41— resources.enumerateTopLevelProjects has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
gcp.createAgentless (cognitive 17) lwgenerate/gcp/gcp.go:608— gcp.createAgentless has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (16 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.
cmd.promptAgentlessQuestions (cognitive 16) cli/cmd/generate_aws.go:798— cmd.promptAgentlessQuestions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cmd.promptCustomizeGcpProjects (cognitive 16) cli/cmd/generate_gcp.go:666— cmd.promptCustomizeGcpProjects has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 5). Of this number, 8 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.
cmd.promptCreateReportDefinitionFromNew (cognitive 16) cli/cmd/report_definitions_create.go:113— cmd.promptCreateReportDefinitionFromNew has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cmd.pollScanStatus (cognitive 16) cli/cmd/vuln_container_scan.go:169— cmd.pollScanStatus has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 pts), 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.
cmd.buildVulnContainerAssessmentReports (cognitive 16) cli/cmd/vuln_container_show_assessments.go:275— cmd.buildVulnContainerAssessmentReports has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 1, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
cliState.removeInactivePackagesFromManifest (cognitive 16) cli/cmd/package_manifest.go:187— cliState.removeInactivePackagesFromManifest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 1 (2 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.
Catalog.Stage (cognitive 16) REDACTED:98— Catalog.Stage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (16 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
State.loadComponentsFromDisk (cognitive 16) REDACTED:95— State.loadComponentsFromDisk has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
aws.createDspm (cognitive 16) lwgenerate/aws/aws.go:1328— aws.createDspm has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (5 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.
aws_controltower.createCloudTrailControlTower (cognitive 16) lwgenerate/aws_controltower/aws_controltower.go:316— aws_controltower.createCloudTrailControlTower has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15 (16 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
azure.createConfig (cognitive 16) lwgenerate/azure/azure.go:669— azure.createConfig 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.
gcp.createGcpProvider (cognitive 16) lwgenerate/gcp/gcp.go:548— gcp.createGcpProvider has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Change coupling: api.go ↔ v2.go api/api.go:1— `api/api.go` and `api/v2.go` change together 79% of the time (30 of the 38 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 30 shared commits counted here, the most recent 3 are `f839aeb8` feat: create frameworks validation (#1816); `76f35894` feat(VULN-1588): Update CLI vuln container list-assessments and list-…; `7288cde9` refactor: dev honeycomb events to use lacework api (#1501) — run `git show` on any of them.
Near-duplicate member pair (43 shared lines) cli/cmd/vulnerability_exception_container.go:29— cli/cmd/vulnerability_exception_container.go:29-124 | cli/cmd/vulnerability_exception_host.go:29-122 — These two members are variants of one another: 43 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Members sharing a duplicated core (10 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (10 members, 50+ identical tokens) cli/cmd/alert_rules.go:168— cli/cmd/alert_rules.go:168-225 | REDACTED:270-352 | cli/cmd/compliance.go:502-562 | cli/cmd/policy.go:607-643 | cli/cmd/policy_library.go:107-131 | cli/cmd/report_definitions.go:185-206 | cli/cmd/report_definitions.go:312-375 | cli/cmd/report_rules.go:182-263 | cli/cmd/team_members.go:170-209 | cli/cmd/vulnerabilty_exceptions.go:169-191 — These 10 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 10 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 10 times.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (6 members, 50+ identical tokens) cli/cmd/integration_docker_hub.go:30— cli/cmd/integration_docker_hub.go:30-128 | cli/cmd/integration_ecr.go:31-212 | cli/cmd/integration_gar.go:30-166 | cli/cmd/integration_gcr.go:30-156 | cli/cmd/integration_ghcr.go:30-124 | cli/cmd/integration_proxy_scanner.go:30-110 — 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 copies of one member (3 members, 458+ corresponding lines) · ×1
Edited copies of one member (3 members, 458+ corresponding lines) cli/cmd/compliance_aws.go:38— cli/cmd/compliance_aws.go:38-543 | cli/cmd/compliance_azure.go:39-496 | cli/cmd/compliance_gcp.go:41-504 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 458 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 (4 members, 121+ corresponding lines) · ×1
Edited copies of one member (4 members, 121+ corresponding lines) cli/cmd/alert_profiles.go:35— cli/cmd/alert_profiles.go:35-173 | cli/cmd/alert_rules.go:35-155 | cli/cmd/report_rules.go:38-169 | cli/cmd/team_members.go:35-157 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 121 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 (100 corresponding lines) · ×1
Edited copy of a member (100 corresponding lines) cli/cmd/component_dev.go:90— cli/cmd/component_dev.go:90-204 | cli/cmd/component_dev.go:206-305 — These two members are one piece of code written twice and then edited apart: 100 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, 123+ corresponding lines) · ×1
Edited copies of one member (3 members, 123+ corresponding lines) cli/cmd/suppressions_aws.go:315— cli/cmd/suppressions_aws.go:315-437 | cli/cmd/suppressions_azure.go:278-414 | cli/cmd/suppressions_gcp.go:246-368 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 123 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 (3 members, 81+ corresponding lines) · ×1
Edited copies of one member (3 members, 81+ corresponding lines) cli/cmd/suppressions_aws.go:229— cli/cmd/suppressions_aws.go:229-309 | cli/cmd/suppressions_azure.go:192-272 | cli/cmd/suppressions_gcp.go:160-240 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 81 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 (42 corresponding lines) · ×1
Edited copy of a member (42 corresponding lines) lwgenerate/aws/aws.go:1328— lwgenerate/aws/aws.go:1328-1369 | lwgenerate/azure/azure.go:976-1025 — 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 copies of one member (3 members, 56+ corresponding lines) · ×1
Edited copies of one member (3 members, 56+ corresponding lines) cli/cmd/compliance_aws.go:545— cli/cmd/compliance_aws.go:545-600 | cli/cmd/compliance_azure.go:498-553 | cli/cmd/compliance_gcp.go:506-563 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 56 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 (51 corresponding lines) · ×1
Edited copy of a member (51 corresponding lines) lwgenerate/azure/azure.go:669— lwgenerate/azure/azure.go:669-728 | lwgenerate/azure/azure.go:1027-1077 — These two members are one piece of code written twice and then edited apart: 51 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 (75 corresponding lines) · ×1
Edited copy of a member (75 corresponding lines) cli/cmd/generate_aws_controltower.go:560— cli/cmd/generate_aws_controltower.go:560-634 | cli/cmd/generate_aws_eks_audit.go:840-923 — These two members are one piece of code written twice and then edited apart: 75 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, 47+ corresponding lines) · ×1
Edited copies of one member (3 members, 47+ corresponding lines) cli/cmd/preflight_aws.go:86— cli/cmd/preflight_aws.go:86-132 | cli/cmd/preflight_azure.go:77-124 | cli/cmd/preflight_gcp.go:69-116 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 47 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 (55 corresponding lines) · ×1
Edited copy of a member (55 corresponding lines) lwcloud/gcp/resources/folders/folders.go:42— lwcloud/gcp/resources/folders/folders.go:42-107 | lwcloud/gcp/resources/projects/projects.go:44-98 — These two members are one piece of code written twice and then edited apart: 55 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 (43 corresponding lines) · ×1
Edited copy of a member (43 corresponding lines) api/v2_recommendations_azure.go:45— api/v2_recommendations_azure.go:45-87 | api/v2_recommendations_gcp.go:45-87 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (36 corresponding lines) · ×1
Edited copy of a member (36 corresponding lines) cli/cmd/vuln_container_show_assessments.go:451— cli/cmd/vuln_container_show_assessments.go:451-486 | REDACTED:371-420 — 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 (35 corresponding lines) · ×1
Edited copy of a member (35 corresponding lines) cli/cmd/report_distributions_create.go:196— cli/cmd/report_distributions_create.go:196-230 | cli/cmd/report_distributions_update.go:209-250 — 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 (45 corresponding lines) · ×1
Edited copy of a member (45 corresponding lines) api/v2_vulnerabilities.go:656— api/v2_vulnerabilities.go:656-709 | api/v2_vulnerabilities_software_packages.go:60-104 — These two members are one piece of code written twice and then edited apart: 45 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 (58 corresponding lines) · ×1
Edited copy of a member (58 corresponding lines) cli/cmd/generate_gke.go:377— cli/cmd/generate_gke.go:377-436 | cli/cmd/generate_oci.go:287-344 — These two members are one piece of code written twice and then edited apart: 58 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, 43+ corresponding lines) · ×1
Edited copies of one member (3 members, 43+ corresponding lines) cli/cmd/alert_channel.go:12— cli/cmd/alert_channel.go:12-54 | REDACTED:19-87 | cli/cmd/container_registry.go:10-52 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 43 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 (3 members, 36+ corresponding lines) · ×1
Edited copies of one member (3 members, 36+ corresponding lines) REDACTED:117— REDACTED:117-152 | REDACTED:118-157 | REDACTED:139-178 — 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 copies of one member (3 members, 27+ corresponding lines) · ×1
Edited copies of one member (3 members, 27+ corresponding lines) cli/cmd/alert_channel.go:104— cli/cmd/alert_channel.go:104-131 | REDACTED:242-268 | cli/cmd/container_registry.go:102-130 — 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 copy of a member (53 corresponding lines) · ×1
Edited copy of a member (53 corresponding lines) cli/cmd/integration_aws_govcloud.go:27— cli/cmd/integration_aws_govcloud.go:27-79 | cli/cmd/integration_aws_govcloud.go:81-140 — These two members are one piece of code written twice and then edited apart: 53 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 61+ corresponding lines) · ×1
Edited copies of one member (6 members, 61+ corresponding lines) cli/cmd/integration_azure.go:82— cli/cmd/integration_azure.go:82-142 | cli/cmd/integration_azure.go:144-211 | cli/cmd/integration_gcp.go:27-107 | cli/cmd/integration_gcp.go:109-196 | cli/cmd/integration_gcp_pub_sub_audit.go:27-121 | cli/cmd/integration_gcp_pub_sub_channel.go:27-109 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 61 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (59 corresponding lines) · ×1
Edited copy of a member (59 corresponding lines) cli/cmd/integration_datadog.go:27— cli/cmd/integration_datadog.go:27-96 | cli/cmd/integration_qradar_channel.go:27-85 — These two members are one piece of code written twice and then edited apart: 59 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 (50 corresponding lines) · ×1
Edited copy of a member (50 corresponding lines) api/agent_info.go:51— api/agent_info.go:51-100 | api/entities_machine_details.go:120-171 — These two members are one piece of code written twice and then edited apart: 50 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 (46 corresponding lines) · ×1
Edited copy of a member (46 corresponding lines) cli/cmd/integration_aws.go:27— cli/cmd/integration_aws.go:27-72 | cli/cmd/integration_aws_s3_channel.go:27-80 — These two members are one piece of code written twice and then edited apart: 46 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, 38+ corresponding lines) · ×1
Edited copies of one member (3 members, 38+ corresponding lines) cli/cmd/integration_aws_cloudwatch.go:27— cli/cmd/integration_aws_cloudwatch.go:27-64 | cli/cmd/integration_email.go:29-68 | cli/cmd/integration_pagerduty.go:27-64 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 38 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 (3 members, 16+ corresponding lines) · ×1
Edited copies of one member (3 members, 16+ corresponding lines) cli/cmd/alert_rules.go:316— cli/cmd/alert_rules.go:316-331 | cli/cmd/alert_rules.go:333-351 | cli/cmd/report_rules.go:366-385 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 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 (3 members, 33+ corresponding lines) · ×1
Edited copies of one member (3 members, 33+ corresponding lines) cli/cmd/generate_aws_controltower.go:652— cli/cmd/generate_aws_controltower.go:652-684 | cli/cmd/generate_aws_eks_audit.go:947-983 | cli/cmd/generate_gke.go:321-373 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 33 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 (3 members, 23+ corresponding lines) · ×1
Edited copies of one member (3 members, 23+ corresponding lines) cli/cmd/integration_ctr_reg_limits.go:45— cli/cmd/integration_ctr_reg_limits.go:45-67 | cli/cmd/integration_ctr_reg_limits.go:69-91 | cli/cmd/integration_ctr_reg_limits.go:93-115 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 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 (3 members, 22+ corresponding lines) · ×1
Edited copies of one member (3 members, 22+ corresponding lines) cli/cmd/suppressions_aws.go:206— cli/cmd/suppressions_aws.go:206-227 | cli/cmd/suppressions_azure.go:169-190 | cli/cmd/suppressions_gcp.go:137-158 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 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) · ×1
Edited copy of a member (14 corresponding lines) cli/cmd/alert_profiles.go:429— cli/cmd/alert_profiles.go:429-442 | cli/cmd/alert_profiles.go:444-458 — 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.
D4 · Code Duplication· Edited copies of one member (5 members, 19+ corresponding lines) · ×1
Edited copies of one member (5 members, 19+ corresponding lines) cli/cmd/alert_show_details.go:89— cli/cmd/alert_show_details.go:89-107 | cli/cmd/alert_show_integrations.go:36-55 | cli/cmd/alert_show_investigation.go:33-52 | cli/cmd/alert_show_related.go:40-59 | cli/cmd/alert_show_timeline.go:38-57 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (44 corresponding lines) · ×1
Edited copy of a member (44 corresponding lines) cli/cmd/compliance_azure.go:556— cli/cmd/compliance_azure.go:556-599 | cli/cmd/compliance_gcp.go:566-610 — These two members are one piece of code written twice and then edited apart: 44 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 (15 corresponding lines) · ×1
Edited copy of a member (15 corresponding lines) api/container_registries.go:216— api/container_registries.go:216-231 | api/container_registries.go:233-247 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×1
Edited copies of one member (3 members, 13+ corresponding lines) cli/cmd/preflight_aws.go:180— cli/cmd/preflight_aws.go:180-195 | cli/cmd/preflight_azure.go:155-167 | cli/cmd/preflight_gcp.go:146-161 — 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) api/auth.go:73— api/auth.go:73-80 | api/auth.go:97-104 — 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) api/logging.go:34— api/logging.go:34-50 | api/logging.go:54-64 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 13+ corresponding lines) · ×1
Edited copies of one member (4 members, 13+ corresponding lines) cli/cmd/alert_show_integrations.go:22— cli/cmd/alert_show_integrations.go:22-34 | cli/cmd/alert_show_investigation.go:19-31 | cli/cmd/alert_show_related.go:26-38 | cli/cmd/alert_show_timeline.go:24-36 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 10+ corresponding lines) · ×1
Edited copies of one member (4 members, 10+ corresponding lines) api/container_registries_dockerhub.go:54— api/container_registries_dockerhub.go:54-63 | api/container_registries_gcp_gar.go:54-63 | api/container_registries_gcp_gcr.go:54-63 | api/container_registries_ghcr.go:54-64 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 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 (5 corresponding lines) · ×1
Edited copy of a member (5 corresponding lines) api/alerts.go:81— api/alerts.go:81-85 | api/alerts_details_related.go:43-48 — These two members are one piece of code written twice and then edited apart: 5 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, 6+ corresponding lines) · ×1
Edited copies of one member (3 members, 6+ corresponding lines) lwgenerate/aws_controltower/aws_controltower.go:392— lwgenerate/aws_controltower/aws_controltower.go:392-397 | lwgenerate/aws_eks_audit/aws_eks_audit.go:493-501 | lwgenerate/gcp/gcp.go:524-536 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (55 lines × 3) cli/cmd/suppressions_aws.go:383— cli/cmd/suppressions_aws.go:383-437 | cli/cmd/suppressions_azure.go:360-414 | cli/cmd/suppressions_gcp.go:314-368 — before extracting anything, compare `cli/cmd/suppressions_aws.go` and `cli/cmd/suppressions_azure.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 140 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 `cli/cmd/suppressions_aws.go:383` 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 (41 lines × 2) api/v2_vulnerabilities.go:669— api/v2_vulnerabilities.go:669-709 | api/v2_vulnerabilities_software_packages.go:64-104 — 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 `api/v2_vulnerabilities.go:669` 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 (40 lines × 2) api/agent_info.go:61— api/agent_info.go:61-100 | api/entities_machine_details.go:132-171 — 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 `api/agent_info.go:61` 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 (39 lines × 3) cli/cmd/suppressions_aws.go:327— cli/cmd/suppressions_aws.go:327-365 | cli/cmd/suppressions_azure.go:290-328 | cli/cmd/suppressions_gcp.go:258-296 — before extracting anything, compare `cli/cmd/suppressions_aws.go` and `cli/cmd/suppressions_azure.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 140 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 `cli/cmd/suppressions_aws.go:327` 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 (33–34 lines × 2) cli/cmd/component.go:442— cli/cmd/component.go:442-475 | cli/cmd/component.go:631-663 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (17–32 lines × 2) cli/cmd/component_dev.go:340— cli/cmd/component_dev.go:340-371 | cli/cmd/component_dev.go:434-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. Read the line range as the matched WINDOW rather than a finished unit: at `cli/cmd/component_dev.go:340` 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 (31 lines × 2) cli/cmd/agent_aws-install_ec2ic.go:175— cli/cmd/agent_aws-install_ec2ic.go:175-205 | cli/cmd/agent_gcp-install-osl.go:185-215 — before extracting anything, compare `cli/cmd/agent_aws-install_ec2ic.go` and `cli/cmd/agent_gcp-install-osl.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 73 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 `cli/cmd/agent_aws-install_ec2ic.go:175` 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 (30 lines × 2) cli/cmd/component_dev.go:170— cli/cmd/component_dev.go:170-199 | cli/cmd/component_dev.go:271-300 — 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 (29 lines × 3) REDACTED:124— REDACTED:124-152 | REDACTED:129-157 | REDACTED:150-178 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 4 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 `REDACTED:124` 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. 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 (29 lines × 2) cli/cmd/integration_gar.go:116— cli/cmd/integration_gar.go:116-144 | cli/cmd/integration_ghcr.go:76-104 — before extracting anything, compare `cli/cmd/integration_gar.go` and `cli/cmd/integration_ghcr.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `cli/cmd/integration_gar.go:116` 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 (28 lines × 3) cli/cmd/suppressions_aws.go:250— cli/cmd/suppressions_aws.go:250-277 | cli/cmd/suppressions_azure.go:213-240 | cli/cmd/suppressions_gcp.go:181-208 — before extracting anything, compare `cli/cmd/suppressions_aws.go` and `cli/cmd/suppressions_azure.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 140 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 `cli/cmd/suppressions_aws.go:250` 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 (26 lines × 4) cli/cmd/integration_cisco_webex.go:28— cli/cmd/integration_cisco_webex.go:28-53 | cli/cmd/integration_slack_channel.go:28-53 | cli/cmd/integration_victorops.go:28-53 | cli/cmd/integration_webhook.go:28-53 — 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 `cli/cmd/integration_cisco_webex.go:28` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (26 lines × 2) lwgenerate/aws/aws.go:74— lwgenerate/aws/aws.go:74-99 | lwgenerate/aws_controltower/aws_controltower.go:452-477 — 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. 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 (25 lines × 3) cli/cmd/compliance_aws.go:381— cli/cmd/compliance_aws.go:381-405 | cli/cmd/compliance_azure.go:445-469 | cli/cmd/compliance_gcp.go:452-476 — before extracting anything, compare `cli/cmd/compliance_aws.go` and `cli/cmd/compliance_azure.go` as WHOLE FILES: this scan already matched 6 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. Read the line range as the matched WINDOW rather than a finished unit: at `cli/cmd/compliance_aws.go:381` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (23–25 lines × 2) cli/cmd/integration_jira.go:141— cli/cmd/integration_jira.go:141-163 | cli/cmd/integration_service_now_channel.go:80-104 — 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 `cli/cmd/integration_service_now_channel.go:80` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (23 lines × 2) lwgenerate/aws/aws.go:1437— lwgenerate/aws/aws.go:1437-1459 | lwgenerate/aws/aws.go:1682-1704 — 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 `lwgenerate/aws/aws.go:1437` 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 (22 lines × 3) api/alerts.go:115— api/alerts.go:115-136 | api/alerts.go:160-181 | api/alerts_search.go:47-68 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `api/alerts.go:115` 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 (20–21 lines × 2) lwpreflight/aws/permission.go:23— lwpreflight/aws/permission.go:23-42 | lwpreflight/azure/permission.go:19-39 — `lwpreflight/aws/permission.go` and `lwpreflight/azure/permission.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 1 separate duplicated blocks between them, totalling at least 21 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 `lwpreflight/aws/permission.go:23` 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 (20 lines × 3) cli/cmd/vuln_container_list_assessments.go:64— cli/cmd/vuln_container_list_assessments.go:64-83 | cli/cmd/vuln_host_list_cves.go:66-85 | REDACTED:60-79 — 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.
Duplicated block (19 lines × 3) cli/cmd/integration_gar.go:119— cli/cmd/integration_gar.go:119-137 | cli/cmd/integration_ghcr.go:79-97 | cli/cmd/integration_proxy_scanner.go:74-92 — before extracting anything, compare `cli/cmd/integration_gar.go` and `cli/cmd/integration_ghcr.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `cli/cmd/integration_gar.go:119` 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 (18–19 lines × 2) lwgenerate/aws/aws.go:947— lwgenerate/aws/aws.go:947-965 | lwgenerate/aws_eks_audit/aws_eks_audit.go:537-554 — 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 (16–18 lines × 2) cli/cmd/component.go:553— cli/cmd/component.go:553-570 | REDACTED:752-767 — 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 (16–17 lines × 5) lwgenerate/aws/aws.go:893— lwgenerate/aws/aws.go:893-909 | lwgenerate/aws_eks_audit/aws_eks_audit.go:470-486 | lwgenerate/azure/azure.go:538-554 | lwgenerate/gcp/gcp.go:498-514 | lwgenerate/gcp/gke.go:72-87 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `lwgenerate/aws/aws.go:893` 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–17 lines × 3) cli/cmd/compliance_aws.go:66— cli/cmd/compliance_aws.go:66-81 | cli/cmd/compliance_azure.go:122-138 | cli/cmd/compliance_gcp.go:121-137 — before extracting anything, compare `cli/cmd/compliance_aws.go` and `cli/cmd/compliance_azure.go` as WHOLE FILES: this scan already matched 6 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. Read the line range as the matched WINDOW rather than a finished unit: at `cli/cmd/compliance_aws.go:66` 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 (15–16 lines × 3) cli/cmd/agent_aws-install_ec2ic.go:143— cli/cmd/agent_aws-install_ec2ic.go:143-158 | cli/cmd/agent_aws-install_ec2ssh.go:150-164 | cli/cmd/agent_gcp-install-osl.go:156-170 — before extracting anything, compare `cli/cmd/agent_aws-install_ec2ic.go` and `cli/cmd/agent_aws-install_ec2ssh.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 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 `cli/cmd/agent_aws-install_ec2ic.go:143` 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) cli/cmd/suppressions_azure.go:173— cli/cmd/suppressions_azure.go:173-188 | cli/cmd/suppressions_azure.go:200-214 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cli/cmd/suppressions_azure.go:173` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12–15 lines × 2) REDACTED:16— REDACTED:16-27 | REDACTED:218-232 — 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:16` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Check import visibility before settling on that home: `REDACTED` sits under a restricted `internal` directory, which only code inside its own subtree is permitted to import from — so it is reachable from some of these sites and not from others, and being able to see the copies is not the same as being allowed to share them. The home has to be somewhere every one of these sites is permitted to import from; if there is no such place, that restriction may be exactly why the copies are separate.
Duplicated block (14 lines × 5) cli/cmd/generate_aws.go:280— cli/cmd/generate_aws.go:280-293 | cli/cmd/generate_aws_controltower.go:160-173 | cli/cmd/generate_aws_eks_audit.go:195-208 | cli/cmd/generate_azure.go:294-307 | cli/cmd/generate_gcp.go:219-232 — 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 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `cli/cmd/generate_aws.go:280` 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 (14 lines × 4) cli/cmd/generate_aws_controltower.go:248— cli/cmd/generate_aws_controltower.go:248-261 | cli/cmd/generate_aws_eks_audit.go:261-274 | cli/cmd/generate_azure.go:333-346 | cli/cmd/generate_gcp.go:269-282 — 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 `cli/cmd/generate_aws_controltower.go:248` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–13 lines × 2) cli/cmd/lql_sources.go:159— cli/cmd/lql_sources.go:159-171 | cli/cmd/policy.go:553-563 — 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 `cli/cmd/lql_sources.go:159` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 5) cli/cmd/alert_rules.go:188— cli/cmd/alert_rules.go:188-199 | cli/cmd/report_definitions.go:192-203 | cli/cmd/report_definitions.go:335-346 | cli/cmd/report_rules.go:202-213 | cli/cmd/team_members.go:194-205 — before extracting anything, compare `cli/cmd/alert_rules.go` and `cli/cmd/report_rules.go` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 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 `cli/cmd/alert_rules.go:188` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 4) cli/cmd/integration_docker_hub.go:117— cli/cmd/integration_docker_hub.go:117-127 | cli/cmd/integration_ecr.go:151-161 | cli/cmd/integration_ecr.go:197-207 | cli/cmd/integration_gcr.go:145-155 — before extracting anything, compare `cli/cmd/integration_docker_hub.go` and `cli/cmd/integration_gcr.go` as WHOLE FILES: this scan already matched 4 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 `cli/cmd/integration_docker_hub.go:117` 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10–11 lines × 2) lwgenerate/aws/aws.go:1329— lwgenerate/aws/aws.go:1329-1338 | lwgenerate/azure/azure.go:977-987 — 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 `lwgenerate/aws/aws.go:1329` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 10) cli/cmd/alert_rules.go:187— cli/cmd/alert_rules.go:187-196 | REDACTED:339-348 | cli/cmd/compliance.go:528-537 | cli/cmd/policy.go:631-640 | cli/cmd/policy_library.go:119-128 | cli/cmd/report_definitions.go:191-200 | cli/cmd/report_definitions.go:334-343 | cli/cmd/report_rules.go:201-210 | cli/cmd/team_members.go:193-202 | cli/cmd/vulnerabilty_exceptions.go:175-184 — before extracting anything, compare `cli/cmd/alert_rules.go` and `cli/cmd/report_rules.go` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 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 `cli/cmd/alert_rules.go:187` 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 (9–10 lines × 2) cli/cmd/component.go:185— cli/cmd/component.go:185-193 | cli/cmd/component.go:291-300 — 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 `cli/cmd/component.go:185` 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–9 lines × 3) cli/cmd/agent_install.go:145— cli/cmd/agent_install.go:145-153 | cli/cmd/agent_install.go:176-183 | cli/cmd/agent_install.go:204-211 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7–8 lines × 3) cli/cmd/component.go:954— cli/cmd/component.go:954-960 | cli/cmd/component.go:1050-1057 | cli/cmd/component.go:1097-1103 — 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 `cli/cmd/component.go:1050` 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 (6–9 lines × 5) cli/cmd/vuln_container_show_assessments.go:560— cli/cmd/vuln_container_show_assessments.go:560-568 | cli/cmd/vuln_container_show_assessments.go:670-678 | cli/cmd/vuln_container_show_assessments.go:706-714 | REDACTED:472-480 | REDACTED:589-594 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `cli/cmd/vuln_container_show_assessments.go:560` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `cli/cmd/vuln_container_show_assessments.go:703` calls `Sprintf` and `cli/cmd/vuln_container_show_assessments.go:556` 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 (13 lines × 5) api/entities_containers.go:28— api/entities_containers.go:28-40 | api/entities_images.go:24-36 | api/entities_machine_details.go:26-38 | api/entities_machines.go:26-38 | api/entities_users.go:24-36 — 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 5 call sites, so a change lands once.
Duplicated block (12 lines × 8) api/alert_channels.go:154— api/alert_channels.go:154-165 | api/alert_profiles.go:92-103 | api/alert_rules.go:242-253 | api/cloud_accounts.go:171-182 | api/container_registries.go:163-174 | api/data_export_rules.go:108-119 | api/report_rules.go:201-212 | api/vulnerability_exceptions.go:301-312 — 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 8 call sites, so a change lands once.
Duplicated block (7 lines × 4) api/alert_profiles.go:121— api/alert_profiles.go:121-127 | api/alert_rules.go:270-276 | api/report_rules.go:229-235 | api/vulnerability_exceptions.go:331-337 — 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 (9 lines × 7) api/alerts_details.go:87— api/alerts_details.go:87-95 | api/alerts_details_events.go:36-44 | api/alerts_details_integrations.go:84-92 | api/alerts_details_investigation.go:37-45 | api/alerts_details_observationtimeline.go:34-42 | api/alerts_details_related.go:53-61 | api/alerts_details_timeline.go:67-75 — 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 7 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `api/alerts_details.go:87` 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 (5 lines × 7) cli/cmd/generate_aws.go:1592— cli/cmd/generate_aws.go:1592-1596 | cli/cmd/generate_aws_controltower.go:338-342 | cli/cmd/generate_aws_eks_audit.go:333-337 | cli/cmd/generate_azure.go:378-382 | cli/cmd/generate_gcp.go:322-326 | cli/cmd/generate_gke.go:31-35 | cli/cmd/generate_oci.go:357-361 — 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 7 call sites, so a change lands once.
Duplicated block (15 lines × 3) cli/cmd/generate_aws_controltower.go:119— cli/cmd/generate_aws_controltower.go:119-136 | cli/cmd/generate_aws_eks_audit.go:157-171 | cli/cmd/generate_gcp.go:182-199 — 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 `cli/cmd/generate_aws_controltower.go:119` 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 (11 lines × 5) cli/cmd/generate_aws.go:247— cli/cmd/generate_aws.go:247-260 | cli/cmd/generate_aws_controltower.go:123-137 | cli/cmd/generate_aws_eks_audit.go:158-172 | cli/cmd/generate_gcp.go:186-199 | cli/cmd/generate_gke.go:112-122 — 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 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `cli/cmd/generate_aws.go:247` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 3) cli/cmd/compliance_aws.go:519— cli/cmd/compliance_aws.go:519-524 | cli/cmd/compliance_azure.go:472-477 | cli/cmd/compliance_gcp.go:480-485 — before extracting anything, compare `cli/cmd/compliance_aws.go` and `cli/cmd/compliance_azure.go` as WHOLE FILES: this scan already matched 6 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. Read the line range as the matched WINDOW rather than a finished unit: at `cli/cmd/compliance_aws.go:519` 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.
P12 · CI test-gate honesty· Coverage collected but not gated · ×1
Coverage collected but not gated — CI collects a coverage report but no step enforces a minimum — coverage could halve and CI stays green. Add a step that fails the build when coverage drops below a floor (your coverage tool's minimum-threshold flag, or a coverage-gate action) so the number guards something. What was searched, so you can tell an absence from a miss: this repository's CI files AND its coverage configuration — the well-known coverage and test-runner config files, read at the repository root and inside workspace package directories two levels down, so a floor declared beside the tests rather than in the pipeline is credited — matched against the threshold settings this check knows by name. A floor set in your coverage service's web UI rather than in a committed file, or under a setting whose name is not one of those, is not seen here.
X28 · Index access outside its own emptiness guard· Index access outside its own emptiness guard · ×1
Index access outside its own emptiness guard lwcloud/gcp/resources/instances/instances.go:100— `zoneStart` is the result of a search that answers -1 when nothing is found, and `zone[:zoneStart]` uses it as a bound with no test of `zoneStart` in between. When the search misses, the bound is -1 and the access panics with `slice bounds out of range`. Test `zoneStart < 0` (or use `strings.Cut`) before using it.
Duplicated predicate cli/cmd/preflight_aws.go:112— `!cli.HumanOutput() || !cli.InteractiveMode()` appears character-identically in 3 files — cli/cmd/preflight_aws.go, cli/cmd/preflight_azure.go, cli/cmd/preflight_gcp.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 cli/cmd/generate_aws_controltower.go:249— `!iacParamsExpired || !extraStateParamsExpired` appears character-identically in 6 files — cli/cmd/generate_aws_controltower.go, cli/cmd/generate_aws_eks_audit.go, cli/cmd/generate_azure.go, cli/cmd/generate_gcp.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 cli/cmd/vuln_container_show_assessments.go:52— `!vulCmdState.Details && !vulCmdState.Packages` appears character-identically in 2 files — cli/cmd/vuln_container_show_assessments.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 lwgenerate/gcp/gcp.go:178— `args.ExistingServiceAccount.Name == "" || args.ExistingServiceAccount.PrivateKey == ""` appears character-identically in 2 files — lwgenerate/gcp/gcp.go, lwgenerate/gcp/gke.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 lwpreflight/azure/caller.go:131— `assignment.Properties != nil && assignment.Properties.RoleDefinitionID != nil` appears character-identically in 2 files — lwpreflight/azure/caller.go, lwpreflight/azure/policy.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 cli/cmd/compliance_aws.go:200— `cli.JSONOutput() && compCmdState.RecommendationID == ""` appears character-identically in 3 files — cli/cmd/compliance_aws.go, cli/cmd/compliance_azure.go, cli/cmd/compliance_gcp.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 cli/cmd/compliance_aws.go:76— `cmd.Flags().Changed("type") && cmd.Flags().Changed("report_name")` appears character-identically in 3 files — cli/cmd/compliance_aws.go, cli/cmd/compliance_azure.go, cli/cmd/compliance_gcp.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 cli/cmd/generate_gcp.go:753— `existingServiceAccount.Name != "" || existingServiceAccount.PrivateKey != ""` appears character-identically in 2 files — cli/cmd/generate_gcp.go, cli/cmd/generate_gke.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 cli/cmd/policy_disable.go:52— `len(args) > 0 && policyCmdState.Tag != ""` appears character-identically in 2 files — cli/cmd/policy_disable.go, cli/cmd/policy_enable.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 cli/cmd/agent_list.go:97— `len(kv) != 2 || kv[0] == "" || kv[1] == ""` appears character-identically in 2 files — cli/cmd/agent_list.go, cli/cmd/flags.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 lwgenerate/aws/aws.go:70— `len(orgMap.Mapping) == 0 && orgMap.DefaultLaceworkAccount == ""` appears character-identically in 2 files — lwgenerate/aws/aws.go, lwgenerate/aws_controltower/aws_controltower.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 cli/cmd/policy.go:109— `policyCmdState.Severity != "" && !lwseverity.IsValid(policyCmdState.Severity)` appears character-identically in 2 files — cli/cmd/policy.go, cli/cmd/policy_update.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 cli/cmd/generate_gcp.go:250— `projectId == "" && !cli.InteractiveMode()` appears character-identically in 2 files — cli/cmd/generate_gcp.go, cli/cmd/generate_gke.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 cli/cmd/vuln_container_show_assessments.go:291— `vulCmdState.Details || vulCmdState.Packages || vulFiltersEnabled()` appears character-identically in 2 files — cli/cmd/vuln_container_show_assessments.go, cli/cmd/vulnerability.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.
Silent fallback default on error api/http.go:285— `sniffBody` turns a non-nil `err` into `return nil, ""` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
Silent fallback default on error cli/cmd/alert.go:123— `alertLinkBuilderWithCLI` turns a non-nil `err` into `return ""` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
Silent fallback default on error cli/cmd/cache.go:199— `structToString` turns a non-nil `err` into `return []byte{}` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 10 significant file(s) lose their only recent owner: cli/cmd/generate_azure.go, cli/cmd/cloud_account_repair_aws_cfg_org.go, cli/cmd/preflight_aws.go, lwpreflight/azure/caller.go, cli/cmd/preflight_azure.go, cli/cmd/api.go, cli/cmd/cloud_account_repair.go, lwpreflight/azure/constants.go (+2 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 6 significant file(s) lose their only recent owner: cli/cmd/generate_aws.go, REDACTED, cli/cmd/root.go, cli/cmd/cache.go, integration/context/ctx_cfg.go, api/errors.go. Pair on, review, or document these before any departure.
No ADRs found internal/databox/static/scaffoldings/golang/main.go:18— 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 `internal/databox/static/scaffoldings/golang/main.go` makes this repository a deployable product (line 18).
D21 · Naming Consistency· `agentAWSInstallCmd` spells `AWS` where 159 names in the project spell it `Aws` · ×1
`agentAWSInstallCmd` spells `AWS` where 159 names in the project spell it `Aws` cli/cmd/agent.go:177— 159 of 162 names in project github.com/lacework/go-sdk/v2 spell the token `Aws` (159 of 162; unit: names in project github.com/lacework/go-sdk/v2 containing `Aws`). Peers: AlertChannelsService.GetAwsS3 (api/alert_channels_aws_s3.go:23); AlertChannelsService.UpdateAwsS3 (api/alert_channels_aws_s3.go:32); CloudAccountsService.GetAwsCfg (api/cloud_accounts_aws_cfg.go:23); CloudAccountsService.UpdateAwsCfg (api/cloud_accounts_aws_cfg.go:32); CloudAccountsService.GetAwsCtSqs (api/cloud_accounts_aws_ct_sqs.go:29). Rename to `agentAwsInstallCmd`. [rule N6]
D21 · Naming Consistency· `agentGCPInstallCmd` spells `GCP` where 112 names in the project spell it `Gcp` · ×1
`agentGCPInstallCmd` spells `GCP` where 112 names in the project spell it `Gcp` cli/cmd/agent.go:183— 112 of 114 names in project github.com/lacework/go-sdk/v2 spell the token `Gcp` (112 of 114; unit: names in project github.com/lacework/go-sdk/v2 containing `Gcp`). Peers: AlertChannelsService.GetGcpPubSub (api/alert_channels_gcp_pub_sub.go:22); AlertChannelsService.UpdateGcpPubSub (api/alert_channels_gcp_pub_sub.go:28); api.apiV2ConfigsGcp (api/api.go:78); api.apiV2ConfigsGcpProjects (api/api.go:79); api.apiV2MigrateGcpAtSes (api/api.go:142). Rename to `agentGcpInstallCmd`. [rule N6]
D21 · Naming Consistency· `OptCloudtrailSQS` spells `SQS` where 24 names in the project spell it `Sqs` · ×1
`OptCloudtrailSQS` spells `SQS` where 24 names in the project spell it `Sqs` cli/cmd/generate_aws.go:88— 24 of 26 names in project github.com/lacework/go-sdk/v2 spell the token `Sqs` (24 of 26; unit: names in project github.com/lacework/go-sdk/v2 containing `Sqs`). Peers: api.AwsCtSqsCloudAccount (api/cloud_accounts.go:88); api.AwsUsGovCtSqsCloudAccount (api/cloud_accounts.go:93); CloudAccountsService.GetAwsCtSqs (api/cloud_accounts_aws_ct_sqs.go:29); CloudAccountsService.UpdateAwsCtSqs (api/cloud_accounts_aws_ct_sqs.go:38); github.com/lacework/go-sdk/v2/api.AwsCtSqsIntegrationResponse (api/cloud_accounts_aws_ct_sqs.go:46). Rename to `OptCloudtrailSqs`. [rule N6]
D21 · Naming Consistency· `promptCloudtrailSQSQuestions` spells `SQS` where 24 names in the project spell it `Sqs` · ×1
`promptCloudtrailSQSQuestions` spells `SQS` where 24 names in the project spell it `Sqs` cli/cmd/generate_aws.go:1435— 24 of 26 names in project github.com/lacework/go-sdk/v2 spell the token `Sqs` (24 of 26; unit: names in project github.com/lacework/go-sdk/v2 containing `Sqs`). Peers: api.AwsCtSqsCloudAccount (api/cloud_accounts.go:88); api.AwsUsGovCtSqsCloudAccount (api/cloud_accounts.go:93); CloudAccountsService.GetAwsCtSqs (api/cloud_accounts_aws_ct_sqs.go:29); CloudAccountsService.UpdateAwsCtSqs (api/cloud_accounts_aws_ct_sqs.go:38); github.com/lacework/go-sdk/v2/api.AwsCtSqsIntegrationResponse (api/cloud_accounts_aws_ct_sqs.go:46). Rename to `promptCloudtrailSqsQuestions`. [rule N6]
D21 · Naming Consistency· `createAwsGovCloudCTIntegration` spells `CT` where 14 names in the project spell it `Ct` · ×1
`createAwsGovCloudCTIntegration` spells `CT` where 14 names in the project spell it `Ct` cli/cmd/integration_aws_govcloud.go:81— 14 of 15 names in project github.com/lacework/go-sdk/v2 spell the token `Ct` (14 of 15; unit: names in project github.com/lacework/go-sdk/v2 containing `Ct`). Peers: api.AwsCtSqsCloudAccount (api/cloud_accounts.go:88); api.AwsUsGovCtSqsCloudAccount (api/cloud_accounts.go:93); CloudAccountsService.GetAwsCtSqs (api/cloud_accounts_aws_ct_sqs.go:29); CloudAccountsService.UpdateAwsCtSqs (api/cloud_accounts_aws_ct_sqs.go:38); github.com/lacework/go-sdk/v2/api.AwsCtSqsIntegrationResponse (api/cloud_accounts_aws_ct_sqs.go:46). Rename to `createAwsGovCloudCtIntegration`. [rule N6]
D21 · Naming Consistency· `FetchEKSClusters` spells `EKS` where 60 names in the project spell it `Eks` · ×1
`FetchEKSClusters` spells `EKS` where 60 names in the project spell it `Eks` lwpreflight/aws/detail.go:287— 60 of 61 names in project github.com/lacework/go-sdk/v2 spell the token `Eks` (60 of 61; unit: names in project github.com/lacework/go-sdk/v2 containing `Eks`). Peers: api.AwsEksAuditCloudAccount (api/cloud_accounts.go:89); CloudAccountsService.GetAwsEksAudit (api/cloud_accounts_aws_eks_audit.go:22); CloudAccountsService.UpdateAwsEksAudit (api/cloud_accounts_aws_eks_audit.go:31); github.com/lacework/go-sdk/v2/api.AwsEksAuditIntegrationResponse (api/cloud_accounts_aws_eks_audit.go:39); github.com/lacework/go-sdk/v2/api.AwsEksAuditIntegration (api/cloud_accounts_aws_eks_audit.go:43). Rename to `FetchEksClusters`. [rule N6]
D21 · Naming Consistency· `isAWSAccessDenied` spells `AWS` where 159 names in the project spell it `Aws` · ×1
`isAWSAccessDenied` spells `AWS` where 159 names in the project spell it `Aws` lwpreflight/aws/permission_simulate.go:154— 159 of 162 names in project github.com/lacework/go-sdk/v2 spell the token `Aws` (159 of 162; unit: names in project github.com/lacework/go-sdk/v2 containing `Aws`). Peers: AlertChannelsService.GetAwsS3 (api/alert_channels_aws_s3.go:23); AlertChannelsService.UpdateAwsS3 (api/alert_channels_aws_s3.go:32); CloudAccountsService.GetAwsCfg (api/cloud_accounts_aws_cfg.go:23); CloudAccountsService.UpdateAwsCfg (api/cloud_accounts_aws_cfg.go:32); CloudAccountsService.GetAwsCtSqs (api/cloud_accounts_aws_ct_sqs.go:29). Rename to `isAwsAccessDenied`. [rule N6]
D21 · Naming Consistency· `NewAWSRunner` spells `AWS` where 159 names in the project spell it `Aws` · ×1
`NewAWSRunner` spells `AWS` where 159 names in the project spell it `Aws` lwrunner/awsrunner.go:47— 159 of 162 names in project github.com/lacework/go-sdk/v2 spell the token `Aws` (159 of 162; unit: names in project github.com/lacework/go-sdk/v2 containing `Aws`). Peers: AlertChannelsService.GetAwsS3 (api/alert_channels_aws_s3.go:23); AlertChannelsService.UpdateAwsS3 (api/alert_channels_aws_s3.go:32); CloudAccountsService.GetAwsCfg (api/cloud_accounts_aws_cfg.go:23); CloudAccountsService.UpdateAwsCfg (api/cloud_accounts_aws_cfg.go:32); CloudAccountsService.GetAwsCtSqs (api/cloud_accounts_aws_ct_sqs.go:29). Rename to `NewAwsRunner`. [rule N6]
D21 · Naming Consistency· `NewGCPRunner` spells `GCP` where 112 names in the project spell it `Gcp` · ×1
`NewGCPRunner` spells `GCP` where 112 names in the project spell it `Gcp` lwrunner/gcprunner.go:41— 112 of 114 names in project github.com/lacework/go-sdk/v2 spell the token `Gcp` (112 of 114; unit: names in project github.com/lacework/go-sdk/v2 containing `Gcp`). Peers: AlertChannelsService.GetGcpPubSub (api/alert_channels_gcp_pub_sub.go:22); AlertChannelsService.UpdateGcpPubSub (api/alert_channels_gcp_pub_sub.go:28); api.apiV2ConfigsGcp (api/api.go:78); api.apiV2ConfigsGcpProjects (api/api.go:79); api.apiV2MigrateGcpAtSes (api/api.go:142). Rename to `NewGcpRunner`. [rule N6]
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion REDACTED:1— `(repository root)` (68692 LoC, 665 module-visible types across 49 directories) overshoots its size bounds. 1 of 2 build unit(s) (Go) overshoot their size bounds, lowering Project Cohesion to 0.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
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.
Logging is not universal — Only 2/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`.
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 0/6 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: aead.dev/minisign — `aead.dev/minisign` is required at v0.2.0 in REDACTED, but v0.3.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get aead.dev/minisign@v0.3.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: cloud.google.com/go/compute — `cloud.google.com/go/compute` is required at v1.37.0 in REDACTED, but v1.75.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get cloud.google.com/go/compute@v1.75.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: cloud.google.com/go/compute/metadata — `cloud.google.com/go/compute/metadata` is required at v0.7.0 in REDACTED, but v0.10.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get cloud.google.com/go/compute/metadata@v0.10.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: cloud.google.com/go/oslogin — `cloud.google.com/go/oslogin` is required at v1.14.6 in REDACTED, but v1.20.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get cloud.google.com/go/oslogin@v1.20.1 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: cloud.google.com/go/resourcemanager — `cloud.google.com/go/resourcemanager` is required at v1.10.6 in REDACTED, but v1.18.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get cloud.google.com/go/resourcemanager@v1.18.1 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/AlecAivazis/survey/v2 — `github.com/AlecAivazis/survey/v2` is required at v2.3.2 in REDACTED, but v2.3.7 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/AlecAivazis/survey/v2@v2.3.7 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/Azure/azure-sdk-for-go/sdk/azcore — `github.com/Azure/azure-sdk-for-go/sdk/azcore` is required at v1.18.0 in REDACTED, but v1.24.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/Azure/azure-sdk-for-go/sdk/azcore@v1.24.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/Azure/azure-sdk-for-go/sdk/azidentity — `github.com/Azure/azure-sdk-for-go/sdk/azidentity` is required at v1.10.1 in REDACTED, but v1.15.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/Azure/azure-sdk-for-go/sdk/azidentity@v1.15.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/BurntSushi/toml — `github.com/BurntSushi/toml` is required at v1.3.2 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/BurntSushi/toml@v1.6.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/abiosoft/colima — `github.com/abiosoft/colima` is required at v0.5.4 in REDACTED, but v0.10.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/abiosoft/colima@v0.10.3 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2 — `github.com/aws/aws-sdk-go-v2` is required at v1.36.5 in REDACTED, but v1.48.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/aws/aws-sdk-go-v2@v1.48.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2/config — `github.com/aws/aws-sdk-go-v2/config` is required at v1.29.14 in REDACTED, but v1.33.19 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/aws/aws-sdk-go-v2/config@v1.33.19 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2/credentials — `github.com/aws/aws-sdk-go-v2/credentials` is required at v1.17.67 in REDACTED, but v1.21.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/aws/aws-sdk-go-v2/credentials@v1.21.1 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2/service/cloudformation — `github.com/aws/aws-sdk-go-v2/service/cloudformation` is required at v1.57.0 in REDACTED, but v1.84.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/aws/aws-sdk-go-v2/service/cloudformation@v1.84.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2/service/cloudtrail — `github.com/aws/aws-sdk-go-v2/service/cloudtrail` is required at v1.48.4 in REDACTED, but v1.65.12 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/aws/aws-sdk-go-v2/service/cloudtrail@v1.65.12 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2/service/ec2 — `github.com/aws/aws-sdk-go-v2/service/ec2` is required at v1.222.0 in REDACTED, but v1.348.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/aws/aws-sdk-go-v2/service/ec2@v1.348.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2/service/ec2instanceconnect — `github.com/aws/aws-sdk-go-v2/service/ec2instanceconnect` is required at v1.28.2 in REDACTED, but v1.44.7 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/aws/aws-sdk-go-v2/service/ec2instanceconnect@v1.44.7 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2/service/eks — `github.com/aws/aws-sdk-go-v2/service/eks` is required at v1.64.0 in REDACTED, but v1.105.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/aws/aws-sdk-go-v2/service/eks@v1.105.6 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2/service/iam — `github.com/aws/aws-sdk-go-v2/service/iam` is required at v1.42.0 in REDACTED, but v1.66.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/aws/aws-sdk-go-v2/service/iam@v1.66.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2/service/organizations — `github.com/aws/aws-sdk-go-v2/service/organizations` is required at v1.38.3 in REDACTED, but v1.63.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/aws/aws-sdk-go-v2/service/organizations@v1.63.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2/service/servicequotas — `github.com/aws/aws-sdk-go-v2/service/servicequotas` is required at v1.28.3 in REDACTED, but v1.43.12 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/aws/aws-sdk-go-v2/service/servicequotas@v1.43.12 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2/service/ssm — `github.com/aws/aws-sdk-go-v2/service/ssm` is required at v1.59.0 in REDACTED, but v1.83.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/aws/aws-sdk-go-v2/service/ssm@v1.83.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2/service/sts — `github.com/aws/aws-sdk-go-v2/service/sts` is required at v1.33.19 in REDACTED, but v1.52.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/aws/aws-sdk-go-v2/service/sts@v1.52.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/smithy-go — `github.com/aws/smithy-go` is required at v1.22.4 in REDACTED, but v1.28.9 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/aws/smithy-go@v1.28.9 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/briandowns/spinner — `github.com/briandowns/spinner` is required at v1.17.0 in REDACTED, but v1.23.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/briandowns/spinner@v1.23.2 && go mod tidy` and commit the updated REDACTED and go.sum.
+ 33 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. semgrep could not parse 2 file(s) — `cli/cmd/preflight_aws.go`, `internal/array/unique.go` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
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 01a1e603-ae7d-790c-8ca7-cb4b82836f7c · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 79 · Warnings: 982 · Recommendations: 38 · Info: 58 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 16-11-2026 @ 20:19 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.