Public report of aquasecurity/trivy, published 24 October 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.10.5). Watchdog 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, 24 October 2026, 02:28 UTC · Survey ID cd_0c5f0d107ca94eefa0b652e1d2cf64c3
aquasecurity/trivy
Measured 24 October 2026, 02:22 UTC, at code version 3a0164d
A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.
Code coverage is not measured: JavaScript/TypeScript suite (CouldNotMeasureNoCollector).
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
Up 1 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 108,361 lines of product code in 33 projects, tests not counted · Estimated rebuild effort: about 2.3 person-years · Weakest lens: Production Readiness, 49
Findings by how serious they are
17 critical655 serious138 minor
29 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks 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
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
24 October 2026, 02:22 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 Watchdog. It is open to any tool that
implements it, and today Watchdog is the only one that does.
The score is deterministic, which means the same code always gets the same score. Watchdog works 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 ▸
51of 54 dimensions measured by tools. The other 3 are advisory notes from an AI model, which explain the code but don't count towards the score.
794of 810 findings point to an exact file and line, so you can open each one in the code. The other 16 concern the repository as a whole, such as missing documentation.
54dimensions across 6 lenses, read from 108,361 lines of product code in 33 projects.
aquasecurity/trivy scores 63 out of 100 and is rated Adequate, while five of its six lenses score higher still: Architecture at 87 and Security and Compliance at 73, both rated Adequate, and Code Health at 76, Performance at 75 and Maturity at 73, all rated Strong. The project hasn't declared a stable release yet, so its lenses are rated against a lower bar than a released product's, while the score itself is worked out as for any repository.
The score is lower than those five because the weakest lens counts most, and here that is Production Readiness, which scores 49 and is rated Adequate. Its REDACTED Scanning dimension scores 0 out of 10, and until that reaches 4, Production Readiness can't be rated higher than Adequate. The first actions are to resolve the 5 Leaked secret finding(s) in REDACTED Scanning and to codify backups + geo-recovery in IaC and document RTO/RPO and the restore procedure — a persistence guard alone is not disaster recovery, and if Production Readiness rose to 70, the score would rise from 63 to about 72.
17 findings are critical: five in REDACTED Scanning, five in Secrets (history), three in Static Analysis (SAST), two in IaC & Container Security, one in Dependency Vulnerabilities and one in Knowledge Freshness.
Watchdog couldn't measure 29 dimensions in this code, among them Test Reliability, Internal API Consistency and Navigability, so they are left out of the score. The product code is 108,361 lines, which would take an estimated 2.3 person-years, around €340,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.
Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 58 findings
These 58 critical or serious findings were in the previous survey, on 10 October 2026, and are gone from this one.
Exception handling · Swallowed exception (caught, then discarded) pkg/sbom/sbom.go
Exception handling · Swallowed exception (caught, then discarded) pkg/sbom/sbom.go
Exception handling · Swallowed exception (caught, then discarded) pkg/sbom/sbom.go
Exception handling · Swallowed exception (caught, then discarded) pkg/sbom/cyclonedx/unmarshal.go
Rebuild cost: about €340,000 · Estimate
Cost to rebuild
€110,000 to €570,000, for 1,878 to 5,959 hours of work, about 2.3 person-years for 1 to 5 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.9 at a score of 63. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 108,361 lines of product code
How the estimate is made: Watchdog prices 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 5 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (4), REDACTED.
Raises the score by about 12 points · Low effort · REDACTED Scanning
2
Codify backups + geo-recovery in IaC and document RTO/RPO and the restore procedure — a persistence guard alone is not disaster recovery.
Raises the score by about 8 points · Medium effort · DR & Backup
3
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.
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €340,000 to build again, about 2.3 person-years of work. Its weakest lens is Production Readiness, at 49 (Weak). 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 5 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 12 points for low effort, because it clears the 5 REDACTED Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways — a layering smell or cycle. A clean layered graph has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
526 modules, with 1118 dependencies between them. 2 loops run through 10 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 486 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
com/aquasecurity/trivy/pkg/fanal/types uses com/aquasecurity/trivy/pkg/digest, so a change to com/aquasecurity/trivy/pkg/digest can break com/aquasecurity/trivy/pkg/fanal/types, while a change to com/aquasecurity/trivy/pkg/fanal/types can't break com/aquasecurity/trivy/pkg/digest.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/types uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/fanal/walker uses com/aquasecurity/trivy/pkg/x/io, so a change to com/aquasecurity/trivy/pkg/x/io can break com/aquasecurity/trivy/pkg/fanal/walker, while a change to com/aquasecurity/trivy/pkg/fanal/walker can't break com/aquasecurity/trivy/pkg/x/io.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/walker uses a module listed above it, which is the healthy direction.
9→13 com/aquasecurity/trivy/pkg/iac/types uses com/aquasecurity/trivy/pkg/iac/scanpart of a loop✕
Connections
8 pairs of types, where a type in com/aquasecurity/trivy/pkg/iac/types uses a type in com/aquasecurity/trivy/pkg/iac/scan.
com/aquasecurity/trivy/pkg/iac/types uses com/aquasecurity/trivy/pkg/iac/scan, so a change to com/aquasecurity/trivy/pkg/iac/scan can break com/aquasecurity/trivy/pkg/iac/types, while a change to com/aquasecurity/trivy/pkg/iac/types can't break com/aquasecurity/trivy/pkg/iac/scan.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
1 pair of types, where a type in com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/license uses a type in com/aquasecurity/trivy/pkg/fanal/types.
com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/license uses com/aquasecurity/trivy/pkg/fanal/types, so a change to com/aquasecurity/trivy/pkg/fanal/types can break com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/license, while a change to com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/license can't break com/aquasecurity/trivy/pkg/fanal/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/license uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/providers/aws/iam uses com/aquasecurity/trivy/pkg/iac/types, so a change to com/aquasecurity/trivy/pkg/iac/types can break com/aquasecurity/trivy/pkg/iac/providers/aws/iam, while a change to com/aquasecurity/trivy/pkg/iac/providers/aws/iam can't break com/aquasecurity/trivy/pkg/iac/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/providers/aws/iam uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/providers/azure/network uses com/aquasecurity/trivy/pkg/iac/types, so a change to com/aquasecurity/trivy/pkg/iac/types can break com/aquasecurity/trivy/pkg/iac/providers/azure/network, while a change to com/aquasecurity/trivy/pkg/iac/providers/azure/network can't break com/aquasecurity/trivy/pkg/iac/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/providers/azure/network uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/scan uses com/aquasecurity/trivy/pkg/iac/types, so a change to com/aquasecurity/trivy/pkg/iac/types can break com/aquasecurity/trivy/pkg/iac/scan, while a change to com/aquasecurity/trivy/pkg/iac/scan can't break com/aquasecurity/trivy/pkg/iac/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/scan uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/scanners/ansible/parser uses com/aquasecurity/trivy/pkg/set, so a change to com/aquasecurity/trivy/pkg/set can break com/aquasecurity/trivy/pkg/iac/scanners/ansible/parser, while a change to com/aquasecurity/trivy/pkg/iac/scanners/ansible/parser can't break com/aquasecurity/trivy/pkg/set.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/scanners/ansible/parser uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/scanners/ansible/parser uses com/aquasecurity/trivy/pkg/iac/types, so a change to com/aquasecurity/trivy/pkg/iac/types can break com/aquasecurity/trivy/pkg/iac/scanners/ansible/parser, while a change to com/aquasecurity/trivy/pkg/iac/scanners/ansible/parser can't break com/aquasecurity/trivy/pkg/iac/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/scanners/ansible/parser uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/scanners/azure uses com/aquasecurity/trivy/pkg/set, so a change to com/aquasecurity/trivy/pkg/set can break com/aquasecurity/trivy/pkg/iac/scanners/azure, while a change to com/aquasecurity/trivy/pkg/iac/scanners/azure can't break com/aquasecurity/trivy/pkg/set.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/scanners/azure uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/scanners/azure uses com/aquasecurity/trivy/pkg/iac/types, so a change to com/aquasecurity/trivy/pkg/iac/types can break com/aquasecurity/trivy/pkg/iac/scanners/azure, while a change to com/aquasecurity/trivy/pkg/iac/scanners/azure can't break com/aquasecurity/trivy/pkg/iac/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/scanners/azure uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/scanners/cloudformation/parser uses com/aquasecurity/trivy/pkg/set, so a change to com/aquasecurity/trivy/pkg/set can break com/aquasecurity/trivy/pkg/iac/scanners/cloudformation/parser, while a change to com/aquasecurity/trivy/pkg/iac/scanners/cloudformation/parser can't break com/aquasecurity/trivy/pkg/set.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/scanners/cloudformation/parser uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/scanners/cloudformation/parser uses com/aquasecurity/trivy/pkg/iac/types, so a change to com/aquasecurity/trivy/pkg/iac/types can break com/aquasecurity/trivy/pkg/iac/scanners/cloudformation/parser, while a change to com/aquasecurity/trivy/pkg/iac/scanners/cloudformation/parser can't break com/aquasecurity/trivy/pkg/iac/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/scanners/cloudformation/parser uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/sbom/core uses com/aquasecurity/trivy/pkg/digest, so a change to com/aquasecurity/trivy/pkg/digest can break com/aquasecurity/trivy/pkg/sbom/core, while a change to com/aquasecurity/trivy/pkg/sbom/core can't break com/aquasecurity/trivy/pkg/digest.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/sbom/core uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/sbom/core uses com/aquasecurity/trivy/pkg/fanal/types, so a change to com/aquasecurity/trivy/pkg/fanal/types can break com/aquasecurity/trivy/pkg/sbom/core, while a change to com/aquasecurity/trivy/pkg/sbom/core can't break com/aquasecurity/trivy/pkg/fanal/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/sbom/core uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/providers/aws uses com/aquasecurity/trivy/pkg/iac/types, so a change to com/aquasecurity/trivy/pkg/iac/types can break com/aquasecurity/trivy/pkg/iac/providers/aws, while a change to com/aquasecurity/trivy/pkg/iac/providers/aws can't break com/aquasecurity/trivy/pkg/iac/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/providers/aws uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/providers/aws uses com/aquasecurity/trivy/pkg/iac/providers/aws/iam, so a change to com/aquasecurity/trivy/pkg/iac/providers/aws/iam can break com/aquasecurity/trivy/pkg/iac/providers/aws, while a change to com/aquasecurity/trivy/pkg/iac/providers/aws can't break com/aquasecurity/trivy/pkg/iac/providers/aws/iam.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/providers/aws uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/providers/azure uses com/aquasecurity/trivy/pkg/iac/providers/azure/network, so a change to com/aquasecurity/trivy/pkg/iac/providers/azure/network can break com/aquasecurity/trivy/pkg/iac/providers/azure, while a change to com/aquasecurity/trivy/pkg/iac/providers/azure can't break com/aquasecurity/trivy/pkg/iac/providers/azure/network.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/providers/azure uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/rego uses com/aquasecurity/trivy/pkg/iac/scanners/options, so a change to com/aquasecurity/trivy/pkg/iac/scanners/options can break com/aquasecurity/trivy/pkg/iac/rego, while a change to com/aquasecurity/trivy/pkg/iac/rego can't break com/aquasecurity/trivy/pkg/iac/scanners/options.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/rego uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/rego uses com/aquasecurity/trivy/pkg/set, so a change to com/aquasecurity/trivy/pkg/set can break com/aquasecurity/trivy/pkg/iac/rego, while a change to com/aquasecurity/trivy/pkg/iac/rego can't break com/aquasecurity/trivy/pkg/set.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/rego uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/rego uses com/aquasecurity/trivy/pkg/iac/types, so a change to com/aquasecurity/trivy/pkg/iac/types can break com/aquasecurity/trivy/pkg/iac/rego, while a change to com/aquasecurity/trivy/pkg/iac/rego can't break com/aquasecurity/trivy/pkg/iac/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/rego uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/rego uses com/aquasecurity/trivy/pkg/iac/scan, so a change to com/aquasecurity/trivy/pkg/iac/scan can break com/aquasecurity/trivy/pkg/iac/rego, while a change to com/aquasecurity/trivy/pkg/iac/rego can't break com/aquasecurity/trivy/pkg/iac/scan.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/rego uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/scanners uses com/aquasecurity/trivy/pkg/iac/scan, so a change to com/aquasecurity/trivy/pkg/iac/scan can break com/aquasecurity/trivy/pkg/iac/scanners, while a change to com/aquasecurity/trivy/pkg/iac/scanners can't break com/aquasecurity/trivy/pkg/iac/scan.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/scanners uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/terraform uses com/aquasecurity/trivy/pkg/iac/types, so a change to com/aquasecurity/trivy/pkg/iac/types can break com/aquasecurity/trivy/pkg/iac/terraform, while a change to com/aquasecurity/trivy/pkg/iac/terraform can't break com/aquasecurity/trivy/pkg/iac/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/terraform uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/terraform uses com/aquasecurity/trivy/pkg/iac/scan, so a change to com/aquasecurity/trivy/pkg/iac/scan can break com/aquasecurity/trivy/pkg/iac/terraform, while a change to com/aquasecurity/trivy/pkg/iac/terraform can't break com/aquasecurity/trivy/pkg/iac/scan.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/terraform uses a module listed above it, which is the healthy direction.
28 pairs of types, where a type in com/aquasecurity/trivy/pkg/types uses a type in com/aquasecurity/trivy/pkg/fanal/types. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
com/aquasecurity/trivy/pkg/types uses com/aquasecurity/trivy/pkg/fanal/types, so a change to com/aquasecurity/trivy/pkg/fanal/types can break com/aquasecurity/trivy/pkg/types, while a change to com/aquasecurity/trivy/pkg/types can't break com/aquasecurity/trivy/pkg/fanal/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/types uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/types uses com/aquasecurity/trivy/pkg/sbom/core, so a change to com/aquasecurity/trivy/pkg/sbom/core can break com/aquasecurity/trivy/pkg/types, while a change to com/aquasecurity/trivy/pkg/types can't break com/aquasecurity/trivy/pkg/sbom/core.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/types uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/detector/ospkg/driver uses com/aquasecurity/trivy/pkg/fanal/types, so a change to com/aquasecurity/trivy/pkg/fanal/types can break com/aquasecurity/trivy/pkg/detector/ospkg/driver, while a change to com/aquasecurity/trivy/pkg/detector/ospkg/driver can't break com/aquasecurity/trivy/pkg/fanal/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/detector/ospkg/driver uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/detector/ospkg/driver uses com/aquasecurity/trivy/pkg/types, so a change to com/aquasecurity/trivy/pkg/types can break com/aquasecurity/trivy/pkg/detector/ospkg/driver, while a change to com/aquasecurity/trivy/pkg/detector/ospkg/driver can't break com/aquasecurity/trivy/pkg/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/detector/ospkg/driver uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/scanners/terraform uses com/aquasecurity/trivy/pkg/iac/scanners/options, so a change to com/aquasecurity/trivy/pkg/iac/scanners/options can break com/aquasecurity/trivy/pkg/iac/scanners/terraform, while a change to com/aquasecurity/trivy/pkg/iac/scanners/terraform can't break com/aquasecurity/trivy/pkg/iac/scanners/options.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/scanners/terraform uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/scanners/terraform uses com/aquasecurity/trivy/pkg/set, so a change to com/aquasecurity/trivy/pkg/set can break com/aquasecurity/trivy/pkg/iac/scanners/terraform, while a change to com/aquasecurity/trivy/pkg/iac/scanners/terraform can't break com/aquasecurity/trivy/pkg/set.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/scanners/terraform uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/scanners/terraform uses com/aquasecurity/trivy/pkg/iac/scan, so a change to com/aquasecurity/trivy/pkg/iac/scan can break com/aquasecurity/trivy/pkg/iac/scanners/terraform, while a change to com/aquasecurity/trivy/pkg/iac/scanners/terraform can't break com/aquasecurity/trivy/pkg/iac/scan.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/scanners/terraform uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/scanners/terraform uses com/aquasecurity/trivy/pkg/iac/scanners, so a change to com/aquasecurity/trivy/pkg/iac/scanners can break com/aquasecurity/trivy/pkg/iac/scanners/terraform, while a change to com/aquasecurity/trivy/pkg/iac/scanners/terraform can't break com/aquasecurity/trivy/pkg/iac/scanners.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/scanners/terraform uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/scanners/terraform uses com/aquasecurity/trivy/pkg/iac/terraform, so a change to com/aquasecurity/trivy/pkg/iac/terraform can break com/aquasecurity/trivy/pkg/iac/scanners/terraform, while a change to com/aquasecurity/trivy/pkg/iac/scanners/terraform can't break com/aquasecurity/trivy/pkg/iac/terraform.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/scanners/terraform uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/state uses com/aquasecurity/trivy/pkg/iac/providers/google, so a change to com/aquasecurity/trivy/pkg/iac/providers/google can break com/aquasecurity/trivy/pkg/iac/state, while a change to com/aquasecurity/trivy/pkg/iac/state can't break com/aquasecurity/trivy/pkg/iac/providers/google.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/state uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/state uses com/aquasecurity/trivy/pkg/iac/providers/nifcloud, so a change to com/aquasecurity/trivy/pkg/iac/providers/nifcloud can break com/aquasecurity/trivy/pkg/iac/state, while a change to com/aquasecurity/trivy/pkg/iac/state can't break com/aquasecurity/trivy/pkg/iac/providers/nifcloud.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/state uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/state uses com/aquasecurity/trivy/pkg/iac/providers/aws, so a change to com/aquasecurity/trivy/pkg/iac/providers/aws can break com/aquasecurity/trivy/pkg/iac/state, while a change to com/aquasecurity/trivy/pkg/iac/state can't break com/aquasecurity/trivy/pkg/iac/providers/aws.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/state uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/iac/state uses com/aquasecurity/trivy/pkg/iac/providers/azure, so a change to com/aquasecurity/trivy/pkg/iac/providers/azure can break com/aquasecurity/trivy/pkg/iac/state, while a change to com/aquasecurity/trivy/pkg/iac/state can't break com/aquasecurity/trivy/pkg/iac/providers/azure.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/iac/state uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/misconf uses com/aquasecurity/trivy/pkg/iac/scanners/options, so a change to com/aquasecurity/trivy/pkg/iac/scanners/options can break com/aquasecurity/trivy/pkg/misconf, while a change to com/aquasecurity/trivy/pkg/misconf can't break com/aquasecurity/trivy/pkg/iac/scanners/options.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/misconf uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/misconf uses com/aquasecurity/trivy/pkg/fanal/types, so a change to com/aquasecurity/trivy/pkg/fanal/types can break com/aquasecurity/trivy/pkg/misconf, while a change to com/aquasecurity/trivy/pkg/misconf can't break com/aquasecurity/trivy/pkg/fanal/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/misconf uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/misconf uses com/aquasecurity/trivy/pkg/iac/scan, so a change to com/aquasecurity/trivy/pkg/iac/scan can break com/aquasecurity/trivy/pkg/misconf, while a change to com/aquasecurity/trivy/pkg/misconf can't break com/aquasecurity/trivy/pkg/iac/scan.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/misconf uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/misconf uses com/aquasecurity/trivy/pkg/iac/rego, so a change to com/aquasecurity/trivy/pkg/iac/rego can break com/aquasecurity/trivy/pkg/misconf, while a change to com/aquasecurity/trivy/pkg/misconf can't break com/aquasecurity/trivy/pkg/iac/rego.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/misconf uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/misconf uses com/aquasecurity/trivy/pkg/iac/scanners, so a change to com/aquasecurity/trivy/pkg/iac/scanners can break com/aquasecurity/trivy/pkg/misconf, while a change to com/aquasecurity/trivy/pkg/misconf can't break com/aquasecurity/trivy/pkg/iac/scanners.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/misconf uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/sbom/cyclonedx uses com/aquasecurity/trivy/pkg/digest, so a change to com/aquasecurity/trivy/pkg/digest can break com/aquasecurity/trivy/pkg/sbom/cyclonedx, while a change to com/aquasecurity/trivy/pkg/sbom/cyclonedx can't break com/aquasecurity/trivy/pkg/digest.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/sbom/cyclonedx uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/sbom/cyclonedx uses com/aquasecurity/trivy/pkg/fanal/types, so a change to com/aquasecurity/trivy/pkg/fanal/types can break com/aquasecurity/trivy/pkg/sbom/cyclonedx, while a change to com/aquasecurity/trivy/pkg/sbom/cyclonedx can't break com/aquasecurity/trivy/pkg/fanal/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/sbom/cyclonedx uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/sbom/cyclonedx uses com/aquasecurity/trivy/pkg/sbom/core, so a change to com/aquasecurity/trivy/pkg/sbom/core can break com/aquasecurity/trivy/pkg/sbom/cyclonedx, while a change to com/aquasecurity/trivy/pkg/sbom/cyclonedx can't break com/aquasecurity/trivy/pkg/sbom/core.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/sbom/cyclonedx uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/sbom/cyclonedx uses com/aquasecurity/trivy/pkg/types, so a change to com/aquasecurity/trivy/pkg/types can break com/aquasecurity/trivy/pkg/sbom/cyclonedx, while a change to com/aquasecurity/trivy/pkg/sbom/cyclonedx can't break com/aquasecurity/trivy/pkg/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/sbom/cyclonedx uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/scan/local uses com/aquasecurity/trivy/pkg/fanal/types, so a change to com/aquasecurity/trivy/pkg/fanal/types can break com/aquasecurity/trivy/pkg/scan/local, while a change to com/aquasecurity/trivy/pkg/scan/local can't break com/aquasecurity/trivy/pkg/fanal/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/scan/local uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/scan/local uses com/aquasecurity/trivy/pkg/types, so a change to com/aquasecurity/trivy/pkg/types can break com/aquasecurity/trivy/pkg/scan/local, while a change to com/aquasecurity/trivy/pkg/scan/local can't break com/aquasecurity/trivy/pkg/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/scan/local uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/vex uses com/aquasecurity/trivy/pkg/sbom/core, so a change to com/aquasecurity/trivy/pkg/sbom/core can break com/aquasecurity/trivy/pkg/vex, while a change to com/aquasecurity/trivy/pkg/vex can't break com/aquasecurity/trivy/pkg/sbom/core.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/vex uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/vex uses com/aquasecurity/trivy/pkg/types, so a change to com/aquasecurity/trivy/pkg/types can break com/aquasecurity/trivy/pkg/vex, while a change to com/aquasecurity/trivy/pkg/vex can't break com/aquasecurity/trivy/pkg/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/vex uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/fanal/analyzer uses com/aquasecurity/trivy/pkg/x/io, so a change to com/aquasecurity/trivy/pkg/x/io can break com/aquasecurity/trivy/pkg/fanal/analyzer, while a change to com/aquasecurity/trivy/pkg/fanal/analyzer can't break com/aquasecurity/trivy/pkg/x/io.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/analyzer uses a module listed above it, which is the healthy direction.
27 pairs of types, where a type in com/aquasecurity/trivy/pkg/fanal/analyzer uses a type in com/aquasecurity/trivy/pkg/fanal/types. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
com/aquasecurity/trivy/pkg/fanal/analyzer uses com/aquasecurity/trivy/pkg/fanal/types, so a change to com/aquasecurity/trivy/pkg/fanal/types can break com/aquasecurity/trivy/pkg/fanal/analyzer, while a change to com/aquasecurity/trivy/pkg/fanal/analyzer can't break com/aquasecurity/trivy/pkg/fanal/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/analyzer uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/fanal/analyzer uses com/aquasecurity/trivy/pkg/misconf, so a change to com/aquasecurity/trivy/pkg/misconf can break com/aquasecurity/trivy/pkg/fanal/analyzer, while a change to com/aquasecurity/trivy/pkg/fanal/analyzer can't break com/aquasecurity/trivy/pkg/misconf.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/analyzer uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/fanal/analyzer/language uses com/aquasecurity/trivy/pkg/digest, so a change to com/aquasecurity/trivy/pkg/digest can break com/aquasecurity/trivy/pkg/fanal/analyzer/language, while a change to com/aquasecurity/trivy/pkg/fanal/analyzer/language can't break com/aquasecurity/trivy/pkg/digest.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/analyzer/language uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/fanal/analyzer/language uses com/aquasecurity/trivy/pkg/x/io, so a change to com/aquasecurity/trivy/pkg/x/io can break com/aquasecurity/trivy/pkg/fanal/analyzer/language, while a change to com/aquasecurity/trivy/pkg/fanal/analyzer/language can't break com/aquasecurity/trivy/pkg/x/io.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/analyzer/language uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/fanal/analyzer/language uses com/aquasecurity/trivy/pkg/fanal/types, so a change to com/aquasecurity/trivy/pkg/fanal/types can break com/aquasecurity/trivy/pkg/fanal/analyzer/language, while a change to com/aquasecurity/trivy/pkg/fanal/analyzer/language can't break com/aquasecurity/trivy/pkg/fanal/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/analyzer/language uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/fanal/analyzer/language uses com/aquasecurity/trivy/pkg/fanal/analyzer, so a change to com/aquasecurity/trivy/pkg/fanal/analyzer can break com/aquasecurity/trivy/pkg/fanal/analyzer/language, while a change to com/aquasecurity/trivy/pkg/fanal/analyzer/language can't break com/aquasecurity/trivy/pkg/fanal/analyzer.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/analyzer/language uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/yarn uses com/aquasecurity/trivy/pkg/set, so a change to com/aquasecurity/trivy/pkg/set can break com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/yarn, while a change to com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/yarn can't break com/aquasecurity/trivy/pkg/set.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/yarn uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/yarn uses com/aquasecurity/trivy/pkg/x/io, so a change to com/aquasecurity/trivy/pkg/x/io can break com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/yarn, while a change to com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/yarn can't break com/aquasecurity/trivy/pkg/x/io.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/yarn uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/yarn uses a type in com/aquasecurity/trivy/pkg/fanal/types.
com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/yarn uses com/aquasecurity/trivy/pkg/fanal/types, so a change to com/aquasecurity/trivy/pkg/fanal/types can break com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/yarn, while a change to com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/yarn can't break com/aquasecurity/trivy/pkg/fanal/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/yarn uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/yarn uses a type in com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/license.
com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/yarn uses com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/license, so a change to com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/license can break com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/yarn, while a change to com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/yarn can't break com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/license.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/yarn uses a module listed above it, which is the healthy direction.
5 pairs of types, where a type in com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/yarn uses a type in com/aquasecurity/trivy/pkg/fanal/analyzer.
com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/yarn uses com/aquasecurity/trivy/pkg/fanal/analyzer, so a change to com/aquasecurity/trivy/pkg/fanal/analyzer can break com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/yarn, while a change to com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/yarn can't break com/aquasecurity/trivy/pkg/fanal/analyzer.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/analyzer/language/nodejs/yarn uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/fanal/artifact uses com/aquasecurity/trivy/pkg/fanal/types, so a change to com/aquasecurity/trivy/pkg/fanal/types can break com/aquasecurity/trivy/pkg/fanal/artifact, while a change to com/aquasecurity/trivy/pkg/fanal/artifact can't break com/aquasecurity/trivy/pkg/fanal/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/artifact uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/fanal/artifact uses com/aquasecurity/trivy/pkg/fanal/walker, so a change to com/aquasecurity/trivy/pkg/fanal/walker can break com/aquasecurity/trivy/pkg/fanal/artifact, while a change to com/aquasecurity/trivy/pkg/fanal/artifact can't break com/aquasecurity/trivy/pkg/fanal/walker.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/artifact uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/fanal/artifact uses com/aquasecurity/trivy/pkg/sbom/core, so a change to com/aquasecurity/trivy/pkg/sbom/core can break com/aquasecurity/trivy/pkg/fanal/artifact, while a change to com/aquasecurity/trivy/pkg/fanal/artifact can't break com/aquasecurity/trivy/pkg/sbom/core.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/artifact uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/fanal/artifact uses com/aquasecurity/trivy/pkg/misconf, so a change to com/aquasecurity/trivy/pkg/misconf can break com/aquasecurity/trivy/pkg/fanal/artifact, while a change to com/aquasecurity/trivy/pkg/fanal/artifact can't break com/aquasecurity/trivy/pkg/misconf.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/artifact uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/fanal/artifact uses com/aquasecurity/trivy/pkg/fanal/analyzer, so a change to com/aquasecurity/trivy/pkg/fanal/analyzer can break com/aquasecurity/trivy/pkg/fanal/artifact, while a change to com/aquasecurity/trivy/pkg/fanal/artifact can't break com/aquasecurity/trivy/pkg/fanal/analyzer.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/artifact uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/module uses com/aquasecurity/trivy/pkg/x/io, so a change to com/aquasecurity/trivy/pkg/x/io can break com/aquasecurity/trivy/pkg/module, while a change to com/aquasecurity/trivy/pkg/module can't break com/aquasecurity/trivy/pkg/x/io.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/module uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/module uses com/aquasecurity/trivy/pkg/fanal/types, so a change to com/aquasecurity/trivy/pkg/fanal/types can break com/aquasecurity/trivy/pkg/module, while a change to com/aquasecurity/trivy/pkg/module can't break com/aquasecurity/trivy/pkg/fanal/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/module uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/module uses com/aquasecurity/trivy/pkg/types, so a change to com/aquasecurity/trivy/pkg/types can break com/aquasecurity/trivy/pkg/module, while a change to com/aquasecurity/trivy/pkg/module can't break com/aquasecurity/trivy/pkg/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/module uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/module uses com/aquasecurity/trivy/pkg/fanal/analyzer, so a change to com/aquasecurity/trivy/pkg/fanal/analyzer can break com/aquasecurity/trivy/pkg/module, while a change to com/aquasecurity/trivy/pkg/module can't break com/aquasecurity/trivy/pkg/fanal/analyzer.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/module uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/cache uses com/aquasecurity/trivy/pkg/fanal/types, so a change to com/aquasecurity/trivy/pkg/fanal/types can break com/aquasecurity/trivy/pkg/cache, while a change to com/aquasecurity/trivy/pkg/cache can't break com/aquasecurity/trivy/pkg/fanal/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/cache uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/cache uses com/aquasecurity/trivy/pkg/fanal/analyzer, so a change to com/aquasecurity/trivy/pkg/fanal/analyzer can break com/aquasecurity/trivy/pkg/cache, while a change to com/aquasecurity/trivy/pkg/cache can't break com/aquasecurity/trivy/pkg/fanal/analyzer.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/cache uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/cache uses com/aquasecurity/trivy/pkg/fanal/artifact, so a change to com/aquasecurity/trivy/pkg/fanal/artifact can break com/aquasecurity/trivy/pkg/cache, while a change to com/aquasecurity/trivy/pkg/cache can't break com/aquasecurity/trivy/pkg/fanal/artifact.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/cache uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/fanal/handler uses com/aquasecurity/trivy/pkg/fanal/types, so a change to com/aquasecurity/trivy/pkg/fanal/types can break com/aquasecurity/trivy/pkg/fanal/handler, while a change to com/aquasecurity/trivy/pkg/fanal/handler can't break com/aquasecurity/trivy/pkg/fanal/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/handler uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/fanal/handler uses com/aquasecurity/trivy/pkg/fanal/analyzer, so a change to com/aquasecurity/trivy/pkg/fanal/analyzer can break com/aquasecurity/trivy/pkg/fanal/handler, while a change to com/aquasecurity/trivy/pkg/fanal/handler can't break com/aquasecurity/trivy/pkg/fanal/analyzer.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/handler uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/fanal/handler uses com/aquasecurity/trivy/pkg/fanal/artifact, so a change to com/aquasecurity/trivy/pkg/fanal/artifact can break com/aquasecurity/trivy/pkg/fanal/handler, while a change to com/aquasecurity/trivy/pkg/fanal/handler can't break com/aquasecurity/trivy/pkg/fanal/artifact.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/handler uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/commands/artifact uses com/aquasecurity/trivy/pkg/fanal/types, so a change to com/aquasecurity/trivy/pkg/fanal/types can break com/aquasecurity/trivy/pkg/commands/artifact, while a change to com/aquasecurity/trivy/pkg/commands/artifact can't break com/aquasecurity/trivy/pkg/fanal/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/commands/artifact uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/commands/artifact uses com/aquasecurity/trivy/pkg/types, so a change to com/aquasecurity/trivy/pkg/types can break com/aquasecurity/trivy/pkg/commands/artifact, while a change to com/aquasecurity/trivy/pkg/commands/artifact can't break com/aquasecurity/trivy/pkg/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/commands/artifact uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/commands/artifact uses com/aquasecurity/trivy/pkg/misconf, so a change to com/aquasecurity/trivy/pkg/misconf can break com/aquasecurity/trivy/pkg/commands/artifact, while a change to com/aquasecurity/trivy/pkg/commands/artifact can't break com/aquasecurity/trivy/pkg/misconf.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/commands/artifact uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/commands/artifact uses com/aquasecurity/trivy/pkg/fanal/artifact, so a change to com/aquasecurity/trivy/pkg/fanal/artifact can break com/aquasecurity/trivy/pkg/commands/artifact, while a change to com/aquasecurity/trivy/pkg/commands/artifact can't break com/aquasecurity/trivy/pkg/fanal/artifact.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/commands/artifact uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/commands/artifact uses com/aquasecurity/trivy/pkg/module, so a change to com/aquasecurity/trivy/pkg/module can break com/aquasecurity/trivy/pkg/commands/artifact, while a change to com/aquasecurity/trivy/pkg/commands/artifact can't break com/aquasecurity/trivy/pkg/module.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/commands/artifact uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/commands/artifact uses com/aquasecurity/trivy/pkg/cache, so a change to com/aquasecurity/trivy/pkg/cache can break com/aquasecurity/trivy/pkg/commands/artifact, while a change to com/aquasecurity/trivy/pkg/commands/artifact can't break com/aquasecurity/trivy/pkg/cache.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/commands/artifact uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/fanal/artifact/image uses com/aquasecurity/trivy/pkg/fanal/types, so a change to com/aquasecurity/trivy/pkg/fanal/types can break com/aquasecurity/trivy/pkg/fanal/artifact/image, while a change to com/aquasecurity/trivy/pkg/fanal/artifact/image can't break com/aquasecurity/trivy/pkg/fanal/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/artifact/image uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/fanal/artifact/image uses com/aquasecurity/trivy/pkg/fanal/walker, so a change to com/aquasecurity/trivy/pkg/fanal/walker can break com/aquasecurity/trivy/pkg/fanal/artifact/image, while a change to com/aquasecurity/trivy/pkg/fanal/artifact/image can't break com/aquasecurity/trivy/pkg/fanal/walker.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/artifact/image uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/fanal/artifact/image uses com/aquasecurity/trivy/pkg/fanal/analyzer, so a change to com/aquasecurity/trivy/pkg/fanal/analyzer can break com/aquasecurity/trivy/pkg/fanal/artifact/image, while a change to com/aquasecurity/trivy/pkg/fanal/artifact/image can't break com/aquasecurity/trivy/pkg/fanal/analyzer.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/artifact/image uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/fanal/artifact/image uses com/aquasecurity/trivy/pkg/fanal/artifact, so a change to com/aquasecurity/trivy/pkg/fanal/artifact can break com/aquasecurity/trivy/pkg/fanal/artifact/image, while a change to com/aquasecurity/trivy/pkg/fanal/artifact/image can't break com/aquasecurity/trivy/pkg/fanal/artifact.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/artifact/image uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/fanal/artifact/image uses com/aquasecurity/trivy/pkg/cache, so a change to com/aquasecurity/trivy/pkg/cache can break com/aquasecurity/trivy/pkg/fanal/artifact/image, while a change to com/aquasecurity/trivy/pkg/fanal/artifact/image can't break com/aquasecurity/trivy/pkg/cache.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/artifact/image uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/fanal/artifact/image uses com/aquasecurity/trivy/pkg/fanal/handler, so a change to com/aquasecurity/trivy/pkg/fanal/handler can break com/aquasecurity/trivy/pkg/fanal/artifact/image, while a change to com/aquasecurity/trivy/pkg/fanal/artifact/image can't break com/aquasecurity/trivy/pkg/fanal/handler.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/fanal/artifact/image uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/flag uses com/aquasecurity/trivy/pkg/fanal/types, so a change to com/aquasecurity/trivy/pkg/fanal/types can break com/aquasecurity/trivy/pkg/flag, while a change to com/aquasecurity/trivy/pkg/flag can't break com/aquasecurity/trivy/pkg/fanal/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/flag uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/flag uses com/aquasecurity/trivy/pkg/types, so a change to com/aquasecurity/trivy/pkg/types can break com/aquasecurity/trivy/pkg/flag, while a change to com/aquasecurity/trivy/pkg/flag can't break com/aquasecurity/trivy/pkg/types.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/flag uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/flag uses com/aquasecurity/trivy/pkg/vex, so a change to com/aquasecurity/trivy/pkg/vex can break com/aquasecurity/trivy/pkg/flag, while a change to com/aquasecurity/trivy/pkg/flag can't break com/aquasecurity/trivy/pkg/vex.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/flag uses a module listed above it, which is the healthy direction.
com/aquasecurity/trivy/pkg/flag uses com/aquasecurity/trivy/pkg/cache, so a change to com/aquasecurity/trivy/pkg/cache can break com/aquasecurity/trivy/pkg/flag, while a change to com/aquasecurity/trivy/pkg/flag can't break com/aquasecurity/trivy/pkg/cache.
Position
Below the diagonal: com/aquasecurity/trivy/pkg/flag uses a module listed above it, which is the healthy direction.
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
41
High / Critical
A03:2025 — Software Supply Chain Failures
25
High / Critical
A02:2025 — Security Misconfiguration
17
High / Critical
A07:2025 — Authentication Failures
11
High / Critical
Roadmap
Immediately resolve the five leaked secrets in configuration files and establish a formal disaster recovery plan by codifying backups and documenting recovery objectives in infrastructure as code. Strengthen system resilience by enforcing explicit timeouts, retries, and circuit breakers on all outbound HTTP calls, and create an Architecture Decision Record to document key technical choices. Finally, implement an approval gate to require reviewer sign-off before any changes are promoted to production.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 5 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (4), REDACTED.
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.
Per-file score 0–10 — a quality signature. Of 317 files carrying findings, judged against the Preview bar: 0% slop · 15% mixed · 85% near-clean.
File
Score
Band
Worst signal
REDACTED
0.6
Slop
REDACTED Scanning: Leaked secret: REDACTED
REDACTED
3.0
Mixed
REDACTED Scanning: Leaked secret: REDACTED
REDACTED
3.5
Mixed
Dependency Vulnerabilities: High CVE: REDACTED
REDACTED
4.0
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
4.0
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
4.4
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
4.6
Mixed
IaC & Container Security: Medium IaC: REDACTED
REDACTED
4.6
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
5.1
Mixed
Static Analysis (SAST): High: REDACTED
REDACTED
5.1
Mixed
Static Analysis (SAST): High: REDACTED
REDACTED
5.1
Mixed
Static Analysis (SAST): High: REDACTED
REDACTED
5.1
Mixed
IaC & Container Security: High IaC: REDACTED
REDACTED
5.1
Mixed
IaC & Container Security: High IaC: REDACTED
REDACTED
5.1
Mixed
IaC & Container Security: Medium IaC: REDACTED
REDACTED
5.7
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
5.7
Mixed
Static Analysis (SAST): Medium: REDACTED
pkg/fanal/applier/docker.go
6.0
Mixed
Explicit Debt: TodoComment
pkg/dependency/parser/java/pom/parse.go
6.0
Mixed
Explicit Debt: TodoComment
pkg/flag/options.go
6.0
Mixed
Explicit Debt: TodoComment
pkg/dependency/parser/java/jar/parse.go
6.0
Mixed
Explicit Debt: TodoComment
How the grades work
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 17
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 — 655
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 — 138
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 29
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 51 of 54 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 3 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 54 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, 794 of 810 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D11 Test Reliability — not measured this run — Watchdog 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. Test reliability NOT MEASURED: the JavaScript/TypeScript suite could not be re-run in the analyzer sandbox — the mocha run in pkg/fanal/analyzer/language/nodejs/pkg/testdata/ produced no per-test report (> lodash@5.0.0 test). This is OUR limitation, not a defect in the repo — it is excluded from the score.
D11 Test Reliability — not measured this run — Watchdog 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. Test reliability for the mocha suite in pkg/fanal/analyzer/language/nodejs/pkg/testdata/ was NOT MEASURED: the mocha run in pkg/fanal/analyzer/language/nodejs/pkg/testdata/ produced no per-test report (> lodash@5.0.0 test). This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. This repository declares a Go module (REDACTED/go.sum), but the licence verdict published here was taken over its NuGet package dependencies. Nothing was read about its Go dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (REDACTED), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
D27 Navigability — not measured this run — Watchdog 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. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
D30 Dependency Vulnerabilities — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. The scanner produced no output at all, so no dependency was actually scanned. 1 of 2 declared ecosystem(s) (osv) WERE scanned and every vulnerability they reported is included in this result; npm was not, so this dimension's score covers less than the dependency surface this repository declares, and nothing here is evidence that npm is free of known-vulnerable dependencies.
D31 IaC & Container Security — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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/testdata/dockerfile-custom-policies.json.golden, integration/testdata/dockerfile.json.golden, integration/testdata/dockerfile_file_pattern.json.golden, pkg/fanal/analyzer/config/testdata/src/REDACTED, pkg/fanal/artifact/local/testdata/misconfig/dockerfile/passed/src/REDACTED (and 1 more) 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 104 of 110 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 — Watchdog 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. `contrib/junit.tpl`, `pkg/dependency/parser/python/pyproject/pyproject.go`, `pkg/flag/kubernetes_flags.go`, `pkg/flag/options.go`, `REDACTED`, … (+2 more) 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.
D41 Kernel & Syscall Confinement — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. Helm/trivy/templates/statefulset.yaml:2 did not read as a pod spec (a templated manifest such as Helm's that is not YAML until rendered, or a workload whose pod spec this check does not locate), so the seccomp/AppArmor profile in force there was not judged and no row about them can appear on this card.
D43 Malicious Dependencies — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. The scanner produced no output at all, so no dependency was actually scanned. 1 of 2 declared ecosystem(s) (osv) WERE scanned and every vulnerability they reported is included in this result; npm was not, so this dimension's score covers less than the dependency surface this repository declares, and nothing here is evidence that npm is free of known-vulnerable dependencies.
AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). docker build failed (exit 1) — DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
https://docs.docker.com/go/bui…; runtime evidence skipped.
C1 Data Protection — not measured this run — Watchdog 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 — Watchdog 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 — Watchdog 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 — Watchdog 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
ED5 Idempotency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check decides whether a handler's mutation is safe to re-run by recognising its persistence writes (a database save, a repository write, an event publish) and its guards. Those markers are .NET member names, so in this repository's language a write such as `repository.save(order)` is not recognised and a same-named call on an unrelated library type could be. The handlers were found; their idempotency was neither confirmed nor ruled out.
GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's Go is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala was found, and this repository's Go is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
P8 Schema migrations — not measured this run — Watchdog 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. The schema may be created by a runner, a deploy script or a config file outside what this check reads, so an absence here is our blind spot rather than a missing migration strategy. The card abstains instead of scoring. You can widen what we reach: if the schema is created and evolved by a tool this check does not name, naming it lets us teach the detector to read it.
S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X1 Async correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X12 Unreachable branch — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X13 Undrained process stream — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X19 Unrestored process-global state — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X22 Contradicted release guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, TypeScript/JavaScript, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded, and this repository's Go is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X23 Unguarded diagnostic materialisation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X25 Inert configuration knob — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart and Ruby source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart or Ruby was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded, no Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala or Kotlin was found, and this repository's Go is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X29 Per-element action decided by a fixed element — not measured this run — Watchdog 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, 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 — Watchdog measured this, but not all of it. What it 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. 52 further occurrence(s) are not listed individually; the score already reflects all 92.
X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala or Rust was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — 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.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
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 is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
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.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D40 Network Egress Confinement: Egress confinement is read from committed Kubernetes manifests — a policy applied out-of-band (cluster-default deny, a service mesh, or a cloud firewall/security group off-repo) is invisible, and a present NetworkPolicy is declared config, not proof the cluster admission-controller actually enforces it at runtime.
D41 Kernel & Syscall Confinement: Syscall/MAC confinement is read from committed manifests — a profile applied by a cluster-wide PodSecurity default or a mutating webhook off-repo isn't seen, and a declared seccomp/AppArmor profile is config presence, not proof the node's kernel actually loaded and enforced it.
D42 Runtime Threat Enforcement: Runtime enforcement is read from committed policy files — a Tetragon/Falco/Kyverno stack installed cluster-wide (Helm release, platform add-on) with no in-repo trace can't be credited, and a committed policy is declared intent, not proof the engine is running and blocking in the live cluster.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (REDACTED, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
The LLM boundary
LLM-set scores this run (3): D19, D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
46 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was applier.ApplyLayers at 37. A further 9 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 PackageURL.LangType at 23 — they are counted neither in the figure above nor in this dimension's score. 6 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: pkg/purl/purl.go (PackageURL.LangType at 23), pkg/fanal/analyzer/os/release/release.go (release.idToOSFamily at 22), pkg/detector/library/driver.go (library.NewDriver at 18), pkg/fanal/image/daemon/image.go (daemon.emptyLayer at 17), pkg/iac/scanners/ansible/vars/vars.go (VarPriority.Source at 17), and 1 more not listed here. 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.
+ 41 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 30 down to 30 or less in Cyclomatic Complexity — start with applier.ApplyLayers (cyclomatic 37). — Refactoring it lifts Cyclomatic Complexity from 7.1 to about 7.3/10.
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 161 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 20 bodies over 30 down to 30 or less in Cognitive Complexity — start with storage.adaptAccounts (cognitive 54), applier.ApplyLayers (cognitive 52), Parser.parseRoot (cognitive 45). — 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 20 together lifts Cognitive Complexity from 6.1 to about 7.0/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes9.1 / 10Stronggated by 23 serious findings✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 11 FileTooLong finding(s) in God Classes — start with parse_testcase.go (3), REDACTED (2), app.go. — One of this dimension's main actionable groups (11 warning-level).
Resolve the 4 TooManyMethods finding(s) in God Classes — start with property.go, block.go, attribute.go. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 3 FunctionTooLong finding(s) in God Classes — start with docker.go, functions.go, app.go. — One of this dimension's main actionable groups (3 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
154 duplicated block group(s) detected. A further 5 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 23 of the 159 are in trees this repository does not ship — vendored, example/demo, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 48 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 19 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with scanner.go (4), adapt.go (3), bun.go (2). — One of this dimension's main actionable groups (19 warning-level).
Resolve the 18 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with conanfile.py (3), REDACTED (2), bucket.go (2). — One of this dimension's main actionable groups (18 warning-level).
Resolve the 14 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with REDACTED (2), adapt.go (2), json.go. — One of this dimension's main actionable groups (14 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
33 production modules (Gradle+Maven+Go), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 0 module(s) off the main sequence, with abstractness counted on 1 of the 33 (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 run.go, node.go, file_context.go. — One of this dimension's main actionable groups (3 warning-level).
Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
1294 test methods: 1262 unit, 31 integration, 0 BDD, 1 e2e. The Go suite contributes 1294 test case(s) across 576 `_test.go` file(s) declaring at least one — every `func Test…(t *testing.T)` that `go test` would collect, plus the suite methods a testify-style runner reaches; a table-driven case list counts once, so this is a floor. Its tier split is INFERRED from file names, paths and build constraints, not declared: 191 of those file(s) use Go's external test package (`package x_test`), which is a visibility boundary rather than a pyramid tier and was not read as one.
What it measures: Whether dependencies are current, secure, and not bloated.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.
0 outdated direct SwiftPM dependencies, 0 pinning defect(s). SwiftPM has no package registry: a dependency is a repository URL and its releases are that repository's semver tags, so currency is answered by listing tags rather than by querying an index. Only a newer tag on the SAME MAJOR is reported — a `from:` requirement admits everything below the next major and nothing above it, so a major crossing needs a Package.swift edit rather than an update, and naming the update as its remedy would be wrong. Whether any dependency is DEPRECATED or ABANDONED is not graded and cannot be: a repository publishes no such marker, and there is no registry that could carry one. Known CVEs in this dependency graph are D30's question. 1 third-party CocoaPods resolved by a committed Podfile.lock were graded against the CocoaPods trunk (cdn.cocoapods.org): a pod is behind only when the trunk lists a newer release on the same major, which `pod update` reaches under a `~>` requirement. A pod sourced from a path, git URL or local podspec has no trunk release to compare and is not asked about. Carthage dependencies are not graded.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
Resolve the 5 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (4), REDACTED. — One of this dimension's main actionable groups (5 issue-level).
Enforce REDACTED Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: 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 87 packages use a banned license. The depth of this set was not established for this repository: the graded packages are what this pass resolved, and no lockfile was read, so it is not certified to be the full transitive closure. ★ COVERAGE OF THIS VERDICT: it grades this repository's NuGet package dependencies and nothing else. The repository also declares a Go module (REDACTED/go.sum), and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
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 7 Hotspot finding(s) in Churn × Complexity Hotspots — start with REDACTED (2), REDACTED, options.go. — One of this dimension's main actionable groups (7 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.0 / 10Strong✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
44 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is pkg/iac/terraform/attribute.go. Counted over 439 of the 1014 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 · ×3
Further sole-owners (lower concentration)
What to do
Resolve the 3 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (3 recommendation-level).
Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
128 deducted task-comment markers across 108361 LoC (0.1/KLoC) → score 9.8. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 126 TodoComment finding(s) in Explicit Debt — start with REDACTED (14), adapt.go (5), load.go (5). — One of this dimension's main actionable groups (126 warning-level).
Resolve the 1 XxxComment finding(s) in Explicit Debt — start with remote_flags.go. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 FixmeComment finding(s) in Explicit Debt — start with vals.go. — One of this dimension's main actionable groups (1 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
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: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.
The repository's root README gives a strong overview of Trivy as a comprehensive security scanner covering scanners, targets, and the Trivy homepage; it also documents Quick Start with installation examples, canary builds, and links to the Ecosystem page. The brand/README, e2e/README, helm/trivy/README, and docs/commercial/contact.md all document their own directories (media, integration tests, Helm chart, commercial comparison) rather than the repository as a whole, showing strong directory-level documentation. The root README is the only one lacking an overview/installation/contribution section; it is otherwise clear and complete. The documentation is comprehensive for a security tool: the READMEs cover installation, usage, and ecosystem integrations; architecture/design docs are extensive; and there is an overview plus detailed guides on first steps, container image installation, signature verification, and scanning. The ecosystem section lists both official and community integrations with clear guidance (add missing integration), while the FAQ covers pronunciation, paid versions, multi-report generation, air-gapped use, and why fs/repo scanners do not scan JAR files for vulnerabilities.
✓ 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: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
1 of 1 build units (Go) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — 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: 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.
5 finding(s): 0 critical, 5 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
REDACTED
What to do
Resolve the 4 REDACTED finding(s) in Secrets (history) — start with REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (4 issue-level).
Resolve the 1 High secret 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).
42 finding(s): 0 critical, 3 high, 32 medium, 7 low. semgrep hit a parse error in 36 file(s) — `contrib/junit.tpl` (line 1), `docs/overrides/main.html`, `helm/trivy/templates/configmap.yaml`, `helm/trivy/templates/ingress.yaml`, `helm/trivy/templates/podsecuritypolicy.yaml`, … (+31 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 3 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
+ 7 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 issue-level).
Resolve the 7 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED, REDACTED. — One of this dimension's main actionable groups (7 warning-level).
Resolve the 7 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED, REDACTED. — One of this dimension's main actionable groups (7 warning-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.
4 finding(s): 0 critical, 1 high, 3 medium, 0 low. Partial dependency scan: 1 of 2 declared ecosystem(s) were scanned (osv), and the findings above are real and complete for them. npm was not scanned (npm: the scanner produced no output at all, so no dependency was actually scanned), so this is not the whole dependency surface and the result is reported at reduced confidence.
REDACTED
REDACTED
REDACTED
What to do
Resolve the 1 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 2 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 2 High IaC finding(s) in IaC & Container Security — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 12 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (5), REDACTED (3), REDACTED (2). — One of this dimension's main actionable groups (12 warning-level).
Resolve the 3 Low IaC finding(s) in IaC & Container Security — start with REDACTED (3). — One of this dimension's main actionable groups (3 recommendation-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
93 of 439 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is pkg/iac/scanners/terraform/parser/funcs/collection.go. Counted over 439 of the 1014 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with collection.go. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 92 Orphaned file finding(s) in Knowledge Freshness — start with adapt.go (35), REDACTED (2), mssql.go (2). — One of this dimension's main actionable groups (92 recommendation-level).
Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 2 Change coupling finding(s) in Change Coupling — start with detect.go, const.go. — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with import.go. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Build pipeline generates provenance, signs artifacts and produces an SBOM.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
What to do
Resolve the 7 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (7 warning-level).
Resolve the 6 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (6 warning-level).
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).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether Kubernetes workloads restrict network EGRESS with a NetworkPolicy (or Cilium policy), limiting where a compromised pod can send data or reach a command-and-control server. Presence of committed egress-restricting policy, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn — language-agnostic): Kubernetes workloads gate applicability; credits a NetworkPolicy / Cilium policy that restricts egress (policyTypes: [Egress] / egress rules). Reward-leaning (neutral floor climbing to 10, never a deduction — baseline misconfigs stay with D31). Deterministic.
What it measures: Whether Kubernetes workloads confine the kernel boundary — a seccomp profile (RuntimeDefault/Localhost) plus an AppArmor/SELinux mandatory-access-control layer — shrinking the syscall attack surface a container escape would use. Presence of committed confinement config, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn): on Kubernetes workloads, credits a seccomp profile (RuntimeDefault/Localhost) and an AppArmor/SELinux MAC layer. Reward-leaning (neutral floor climbing to 10); NotApplicable without workloads. Deterministic.
What it measures: Whether the Kubernetes deployment wires runtime threat enforcement — a detection engine (Tetragon/Falco) and/or an admission-control policy gate (Kyverno / OPA Gatekeeper / PodSecurity). Presence of committed policy, not a runtime guarantee.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn): on Kubernetes workloads, credits a runtime threat-detection engine (Tetragon TracingPolicy / Falco) and an admission-control policy (Kyverno / OPA Gatekeeper / PodSecurity). Reward-leaning; NotApplicable without workloads. Deterministic.
Resolve the 1 No runtime threat detection finding(s) in Runtime Threat Enforcement. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d42_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. Scored 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. SCORED, not informational.
No known-vulnerable dependencies in the 1 ecosystem(s) that were scanned (osv). Partial dependency scan: 1 of 2 declared ecosystem(s) were scanned (osv), and the findings above are real and complete for them. npm was not scanned (npm: the scanner produced no output at all, so no dependency was actually scanned), so this is not the whole dependency surface and the result is reported at reduced confidence.
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 16 platform declaration(s) and 100 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.
Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Add a README to the 133 of 133 project(s) that lack one — worth up to 2 pts.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record 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 README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
docs/guide/configuration/cache.md links to `Downloaded`, but `docs/guide/configuration/Downloaded` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/guide/configuration/cache.md:105
docs/guide/configuration/filtering.md links to `license`, but `docs/guide/configuration/license` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/guide/configuration/filtering.md:537
docs/guide/configuration/reporting.md links to `To`, but `docs/guide/configuration/To` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/guide/configuration/reporting.md:672
docs/guide/configuration/skipping.md links to `Only`, but `docs/guide/configuration/Only` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/guide/configuration/skipping.md:108
docs/guide/scanner/vulnerability.md links to `Intentional`, but `docs/guide/scanner/Intentional` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/guide/scanner/vulnerability.md:160
docs/guide/scanner/vulnerability.md links to `Some`, but `docs/guide/scanner/Some` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/guide/scanner/vulnerability.md:363
docs/guide/target/container_image.md documents the environment variable `PODMAN_SYSTEM_SERVICE_PID`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/guide/target/container_image.md:318
docs/tutorials/misconfiguration/terraform.md changes into `bad_iac/terraform`, but no such folder exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/tutorials/misconfiguration/terraform.md:32
docs/guide/advanced/private-registries/acr.md documents the environment variable `SP_DATA`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/guide/advanced/private-registries/acr.md:9
docs/guide/references/modes/client-server.md links to `The`, but `docs/guide/references/modes/The` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/guide/references/modes/client-server.md:352
docs/guide/supply-chain/attestation/rekor.md documents the environment variable `COSIGN_EXPERIMENTAL`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/guide/supply-chain/attestation/rekor.md:23
What to do
Reconcile the README with reality: docs/guide/configuration/cache.md links to `Downloaded`, but `docs/guide/configuration/Downloaded` does not exist; docs/guide/configuration/filtering.md links to `license`, but `docs/guide/configuration/license` does not exist; docs/guide/configuration/reporting.md links to `To`, but `docs/guide/configuration/To` does not exist; docs/guide/configuration/skipping.md links to `Only`, but `docs/guide/configuration/Only` does not exist; docs/guide/scanner/vulnerability.md links to `Intentional`, but `docs/guide/scanner/Intentional` does not exist.
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
Dependabot is configured but does not watch `nuget`, `npm`, `cargo`, `pip`, `maven`, `gradle`, `composer` — add those `package-ecosystem` entries to .github/dependabot.yml so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it.
What to do
Add an approval/environment gate (required reviewers / protection rules) before production promotion.
Do you agree with this assessment?
P5 · DR & Backup0.0 / 10Critical✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
A persistence guard (data volume / purge-protection) was found, but no backup, geo-recovery or RTO/RPO controls were evidenced — a volume that survives a container recreate is not a tested restore from catastrophic loss.
What to do
Codify backups + geo-recovery in IaC and document RTO/RPO and the restore procedure — a persistence guard alone is not disaster recovery.
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`http.Get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×2) — pkg/fanal/analyzer/imgconf/apk/apk.go:111, pkg/vex/sbomref.go:80
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.
Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.
Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.
What to do
Raise allocation-aware density on the hot paths — currently 72 use(s) across 123,613 production line(s) (~0.6/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.
Go: on hot paths, reuse buffers and objects through sync.Pool, preallocate slices and maps with make([]T, 0, n) / make(map[K]V, n), size builders with Grow, append with strconv.Append*, and reslice with buf[:0] instead of allocating anew.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. 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 5/10 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.
`Exists` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — pkg/dependency/parser/java/jar/sonatype/sonatype.go:85
`SearchBySHA1` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — pkg/dependency/parser/java/jar/sonatype/sonatype.go:109
`SearchByArtifactID` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — pkg/dependency/parser/java/jar/sonatype/sonatype.go:156
`fetchApkIndexArchive` calls `http.Get(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — pkg/fanal/analyzer/imgconf/apk/apk.go:93
`newPodmanClient` calls `net.Dial(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — pkg/fanal/image/daemon/podman.go:29
What to do
Thread a context.Context through functions that make requests, so the work stops when its caller gives up.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×33) — magefiles/vex.go:179, pkg/dependency/parser/golang/mod/parse.go:207, pkg/dependency/parser/golang/mod/parse.go:211, …
`if _, err := c.GetArtifact(ctx, artifactID); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — pkg/cache/memory.go:74
`if _, err := c.GetBlob(ctx, blobID); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — pkg/cache/memory.go:79
`if _, err := version.Parse(parts[1]); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — pkg/dependency/parser/conda/environment/parse.go:111
`if _, err := sec.ReadAt(buf, int64(offset)); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — pkg/dependency/parser/golang/binary/elf.go:77
`if lib.Version, err = getVersion(line); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — pkg/dependency/parser/nodejs/yarn/parse.go:204
`if _, err := exec.LookPath(name); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — pkg/fanal/utils/utils.go:34
`if fr, err = gzip.NewReader(file); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — pkg/iac/detection/peek.go:21
What to do
Swallowed exception (caught, then discarded)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 9 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
Not included — 61 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — Not applicable: Go's wire constructs every dependency once for the life of the application, so there is no shorter lifetime to capture.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No Go request handler (a net/http, Gin, Echo, Fiber or fasthttp handler, or a gRPC service method) is declared as a method or function, and no handler function literal writes a value captured from outside it, so no state is shared between request goroutines. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads.
AX4 Dependency direction — not applicable to a CQRS architecture (the inward-dependency rule is for layered/clean styles)
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
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) — DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
https://docs.docker.com/go/bui…; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D10 Test Quality — ~143148 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.
D11 Test Reliability — Test reliability not measured — JavaScript/TypeScript suite did not run
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.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. 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 — No inline comments to assess — comment value is not applicable here.
D25 ADR Conformance — no ADRs to check
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.go), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D32 Data Compliance (PII/GDPR) — 7 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — pkg/fanal/analyzer/language/nodejs/pkg/testdata/ runs mocha but declares no coverage provider, so the suite can run and still produce no lcov — add `c8` (or `nyc`) as a devDependency so the suite can be wrapped for coverage. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
DM1 Domain Modelling — applicable but not scored (1 of 2 signals for this style — below the bar we score at): 5 value object(s)
ED1 Event-Driven — not scored — this repository shows only 1 of the 3 signals this lens looks for (1 CQRS handler(s))
ED5 Idempotency — Not assessed, and this one is on us: 1 command handler(s) or message consumer(s) were found here, but this check does not yet recognise persistence writes in this repository's language. Idempotency was neither confirmed nor ruled out — this is a limit of the analyzer, not a finding about your code.
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P8 Schema migrations — Django is declared, but the schema-migration mechanism could not be identified. Our limit, not a verdict on this repository.
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (`go test -coverprofile=coverage.out ./...`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
PF3 Async & latency hygiene — Not applicable: Go has no async/await function colour, so there is no asynchronous code for a blocking call to stall.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X12 Unreachable branch — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X13 Undrained process stream — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X16 Unfloored truncation loop — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X17 Uncapped recursion over a caller-supplied document — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X18 Disposal-pattern correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X19 Unrestored process-global state — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X21 Side-effecting pattern guard — Not applicable: this check looks for a pattern guard or `case` label that increments, decrements or assigns while the switch is deciding whether it matches, and in this repository's languages none can. Go's `++`, `--` and assignments are STATEMENTS, not expressions, so none of them can appear in a `case` expression or anywhere else in a condition, and a type switch's cases are types. Not a gap in the analyzer and not a finding about your code.
X22 Contradicted release guard — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X23 Unguarded diagnostic materialisation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X24 Document value interpolated into markup unescaped — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X25 Inert configuration knob — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X27 Collection changed while being enumerated — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X29 Per-element action decided by a fixed element — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X5 Nullable reference types — Not applicable: this check asks whether the null-typed discipline a language offers is switched on, and how much of that the assertion operator takes back, and in this repository's languages there is no such switch and no such operator. Go's type system has no nullable and non-nullable types — every pointer, map, slice and interface is nil-able at every position, there is no switch that turns null checking on, and the compiler produces no nullability warning for an operator to silence. Not a gap in the analyzer and not a finding about your code.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
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.
Orphaned knowledge pkg/iac/scanners/terraform/parser/funcs/collection.go:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
TodoComment examples/module/spring4shell/spring4shell.go:266— // TODO: version comparison — 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/vm_test.go:16— // TODO: Golden files cannot be updated with the -update flag currently because — 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 magefiles/magefile.go:83— // TODO: use `go install tool` — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment pkg/attestation/sbom/rekor.go:64— // TODO: Trivy SBOM should take precedence — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment pkg/attestation/sbom/rekor.go:89— // TODO: add support for SPDX — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment pkg/commands/app.go:414— // TODO: support --report summary — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment pkg/commands/app.go:481— // TODO: support --report summary — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment pkg/commands/app.go:1183— // TODO: support --report summary — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment pkg/commands/artifact/run.go:283— // TODO: Does VM scan disable lock 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 pkg/commands/artifact/run.go:535— // TODO disable all languages that don't contain license information for this case — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment pkg/commands/artifact/run.go:552— // TODO: add '--enable-analyzers' and delete this environment variable — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment pkg/crypto/parser/x509/parser.go:305— // TODO: describe this key as well. It holds a PKCS#1 public key, which
TodoComment pkg/crypto/parser/x509/parser.go:313— // TODO: describe this certificate as well. It holds an X.509 certificate followed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment pkg/dependency/parser/java/jar/parse.go:304— // TODO process inner deps — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment pkg/dependency/parser/java/pom/pom.go:254— // TODO: need to check the behavior — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment pkg/dependency/parser/java/pom/parse.go:499— // TODO handle repos from parents — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment pkg/dependency/parser/java/pom/artifact.go:118— // TODO: Other requirements are not supported — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment pkg/dependency/parser/python/poetry/parse.go:60— // TODO upgrade logic for working with groups — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment pkg/dependency/parser/rust/binary/parse.go:59— // TODO: Determine the direct dependencies by checking the dependencies of the root crate — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment pkg/detector/ospkg/alpine/alpine.go:82— // TODO: we should detect the current edge version. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment pkg/fanal/analyzer/imgconf/apk/apk_test.go:1460— // TODO: support $runDeps — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment pkg/fanal/analyzer/language/java/jar/jar.go:48— // TODO: think about the sonatype API and "--offline" — 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:190— // TODO use `*.list` files instead of `*.md5sums` files when Trivy will support links. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment pkg/fanal/analyzer/pkg/rpm/archive.go:85— // TODO: add the const to go-rpmutils — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment pkg/fanal/analyzer/pkg/rpm/archive.go:127— // TODO: Handle more vendors — 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) magefiles/vex.go:179— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/cache/memory.go:74— `if _, err := c.GetArtifact(ctx, artifactID); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/cache/memory.go:79— `if _, err := c.GetBlob(ctx, blobID); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/dependency/parser/conda/environment/parse.go:111— `if _, err := version.Parse(parts[1]); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/dependency/parser/golang/binary/elf.go:77— `if _, err := sec.ReadAt(buf, int64(offset)); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/dependency/parser/golang/mod/parse.go:207— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/dependency/parser/golang/mod/parse.go:211— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/dependency/parser/java/pom/parse.go:629— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/dependency/parser/java/pom/mirror.go:78— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/dependency/parser/java/pom/mirror.go:85— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/dependency/parser/nodejs/yarn/parse.go:204— `if lib.Version, err = getVersion(line); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/fanal/analyzer/language/golang/mod/mod.go:225— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/fanal/analyzer/language/golang/mod/mod.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) pkg/fanal/analyzer/language/python/pip/pip.go:177— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/fanal/analyzer/pkg/dpkg/copyright.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) pkg/fanal/analyzer/repo/apk/apk.go:60— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/fanal/analyzer/repo/apk/apk.go:64— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/fanal/artifact/image/remote_sbom.go:180— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/fanal/image/registry/token.go:34— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/fanal/utils/utils.go:34— `if _, err := exec.LookPath(name); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/fanal/utils/utils.go:42— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/fanal/walker/tar.go:108— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/flag/scan_flags.go:328— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/iac/adapters/cloudformation/aws/iam/policy.go:25— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/iac/adapters/cloudformation/aws/iam/policy.go:111— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Duplicated block (8 lines × 2) pkg/commands/artifact/scanner.go:77— pkg/commands/artifact/scanner.go:77-84 | pkg/commands/artifact/scanner.go:173-180 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/commands/artifact/scanner.go:77` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) pkg/commands/artifact/scanner.go:91— pkg/commands/artifact/scanner.go:91-98 | pkg/commands/artifact/scanner.go:187-194 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/commands/artifact/scanner.go:91` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) pkg/commands/artifact/scanner.go:118— pkg/commands/artifact/scanner.go:118-125 | pkg/commands/artifact/scanner.go:214-221 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/commands/artifact/scanner.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.
Duplicated block (8 lines × 2) pkg/fanal/analyzer/language/nodejs/bun/bun.go:111— pkg/fanal/analyzer/language/nodejs/bun/bun.go:111-118 | pkg/fanal/analyzer/language/nodejs/npm/npm.go:113-120 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/fanal/analyzer/language/nodejs/bun/bun.go:111` 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 (8 lines × 2) pkg/fanal/analyzer/language/python/poetry/poetry.go:162— pkg/fanal/analyzer/language/python/poetry/poetry.go:162-169 | pkg/fanal/analyzer/language/python/pylock/pylock.go:150-157 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/fanal/analyzer/language/python/poetry/poetry.go:162` 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 (8 lines × 2) REDACTED:55— REDACTED:55-63 | pkg/fanal/artifact/vm/vm.go:40-47 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) pkg/iac/adapters/terraform/aws/sqs/adapt.go:35— pkg/iac/adapters/terraform/aws/sqs/adapt.go:35-42 | pkg/iac/adapters/terraform/aws/sqs/adapt.go:108-115 — 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) pkg/iac/scanners/terraform/parser/funcs/encoding.go:76— pkg/iac/scanners/terraform/parser/funcs/encoding.go:76-83 | pkg/iac/scanners/terraform/parser/funcs/encoding.go:120-127 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) pkg/k8s/scanner/scanner.go:265— pkg/k8s/scanner/scanner.go:265-272 | pkg/k8s/scanner/scanner.go:346-353 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/k8s/scanner/scanner.go:265` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) REDACTED:46— REDACTED:46-53 | REDACTED:62-69 — 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) pkg/iac/adapters/arm/database/adapt.go:8— pkg/iac/adapters/arm/database/adapt.go:8-15 | pkg/iac/adapters/terraform/azure/database/adapt.go:8-15 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) pkg/iac/adapters/cloudformation/aws/redshift/redshift.go:9— pkg/iac/adapters/cloudformation/aws/redshift/redshift.go:9-16 | pkg/iac/adapters/terraform/aws/redshift/adapt.go:9-16 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) REDACTED:627— REDACTED:627-634 | REDACTED:698-708 — 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) pkg/iac/adapters/terraform/azure/storage/adapt.go:49— pkg/iac/adapters/terraform/azure/storage/adapt.go:49-56 | pkg/iac/adapters/terraform/azure/storage/adapt.go:66-74 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/adapters/terraform/azure/storage/adapt.go:49` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) pkg/detector/ospkg/minimos/minimos.go:44— pkg/detector/ospkg/minimos/minimos.go:44-51 | pkg/detector/ospkg/wolfi/wolfi.go:44-51 — `pkg/detector/ospkg/minimos/minimos.go` and `pkg/detector/ospkg/wolfi/wolfi.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 63 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/detector/ospkg/minimos/minimos.go:44` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) pkg/fanal/artifact/vm/ebs.go:68— pkg/fanal/artifact/vm/ebs.go:68-75 | pkg/fanal/artifact/vm/file.go:89-96 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/fanal/artifact/vm/ebs.go:68` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) pkg/fanal/analyzer/language/nodejs/bun/bun.go:53— pkg/fanal/analyzer/language/nodejs/bun/bun.go:53-60 | pkg/fanal/analyzer/language/nodejs/npm/npm.go:52-59 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/fanal/analyzer/language/nodejs/bun/bun.go:53` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:482— pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:482-489 | pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py:482-489 — before extracting anything, compare `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py` and `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:667— pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:667-674 | pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py:667-674 — before extracting anything, compare `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py` and `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) pkg/detector/ospkg/alma/alma.go:20— pkg/detector/ospkg/alma/alma.go:20-25 | pkg/detector/ospkg/rocky/rocky.go:19-24 — `pkg/detector/ospkg/alma/alma.go` and `pkg/detector/ospkg/rocky/rocky.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 40 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/detector/ospkg/alma/alma.go:20` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `pkg/detector/ospkg/alma/alma.go:26` calls `Date` and `pkg/detector/ospkg/rocky/rocky.go:25` 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 (6 lines × 2) pkg/fanal/analyzer/language/python/poetry/poetry.go:57— pkg/fanal/analyzer/language/python/poetry/poetry.go:57-62 | pkg/fanal/analyzer/language/python/pylock/pylock.go:56-62 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/fanal/analyzer/language/python/poetry/poetry.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `pkg/fanal/analyzer/language/python/pylock/pylock.go:66` calls `Sort` and `pkg/fanal/analyzer/language/python/poetry/poetry.go:65` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) pkg/fanal/artifact/sbom/sbom.go:111— pkg/fanal/artifact/sbom/sbom.go:111-116 | pkg/fanal/artifact/vm/file.go:106-111 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) pkg/fanal/secret/scanner.go:699— pkg/fanal/secret/scanner.go:699-704 | pkg/fanal/secret/scanner.go:787-792 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) pkg/iac/adapters/cloudformation/aws/sam/function.go:31— pkg/iac/adapters/cloudformation/aws/sam/function.go:31-36 | pkg/iac/adapters/cloudformation/aws/sam/state_machines.go:58-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 `pkg/iac/adapters/cloudformation/aws/sam/function.go:31` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `pkg/iac/adapters/cloudformation/aws/sam/function.go:37` calls `IsMap` and `pkg/iac/adapters/cloudformation/aws/sam/state_machines.go:64` 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 (6 lines × 2) pkg/iac/adapters/terraform/aws/ec2/vpc.go:191— pkg/iac/adapters/terraform/aws/ec2/vpc.go:191-196 | pkg/iac/adapters/terraform/aws/ec2/vpc.go:212-217 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/adapters/terraform/aws/ec2/vpc.go:191` 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 (6 lines × 2) pkg/iac/adapters/terraform/kubernetes/adapt.go:51— pkg/iac/adapters/terraform/kubernetes/adapt.go:51-56 | pkg/iac/adapters/terraform/kubernetes/adapt.go:75-80 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/adapters/terraform/kubernetes/adapt.go:51` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) pkg/module/module.go:199— pkg/module/module.go:199-206 | pkg/module/module.go:248-253 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) pkg/cache/fs.go:96— pkg/cache/fs.go:96-101 | pkg/cache/fs.go:153-159 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/cache/fs.go:96` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) pkg/iac/adapters/terraform/aws/s3/bucket.go:89— pkg/iac/adapters/terraform/aws/s3/bucket.go:89-94 | pkg/iac/adapters/terraform/aws/s3/bucket.go:134-139 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/adapters/terraform/aws/s3/bucket.go:89` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) pkg/iac/adapters/terraform/google/compute/networks.go:147— pkg/iac/adapters/terraform/google/compute/networks.go:147-152 | pkg/iac/adapters/terraform/google/compute/networks.go:160-165 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) pkg/fanal/artifact/local/fs.go:264— pkg/fanal/artifact/local/fs.go:264-269 | pkg/fanal/artifact/sbom/sbom.go:71-76 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/fanal/artifact/local/fs.go:264` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) pkg/detector/ospkg/suse/suse.go:39— pkg/detector/ospkg/suse/suse.go:39-44 | pkg/detector/ospkg/suse/suse.go:69-74 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/detector/ospkg/suse/suse.go:39` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) pkg/iac/adapters/cloudformation/aws/iam/iam.go:13— pkg/iac/adapters/cloudformation/aws/iam/iam.go:13-18 | pkg/iac/adapters/terraform/aws/iam/passwords.go:14-19 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) pkg/iac/adapters/terraform/aws/s3/bucket.go:152— pkg/iac/adapters/terraform/aws/s3/bucket.go:152-157 | pkg/iac/adapters/terraform/aws/s3/bucket.go:164-169 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/adapters/terraform/aws/s3/bucket.go:152` 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 (6 lines × 2) pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:406— pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:406-411 | pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py:406-411 — before extracting anything, compare `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py` and `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:623— pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:623-628 | pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py:623-628 — before extracting anything, compare `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py` and `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:130— pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:130-135 | pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py:130-135 — before extracting anything, compare `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py` and `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) pkg/compliance/report/json.go:32— pkg/compliance/report/json.go:32-41 | pkg/report/json.go:41-49 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/compliance/report/json.go:32` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) pkg/dependency/parser/julia/manifest/naive_pkg_parser.go:30— pkg/dependency/parser/julia/manifest/naive_pkg_parser.go:30-38 | pkg/dependency/parser/rust/cargo/naive_pkg_parser.go:31-39 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/dependency/parser/julia/manifest/naive_pkg_parser.go:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) pkg/detector/ospkg/azure/azure.go:44— pkg/detector/ospkg/azure/azure.go:44-53 | pkg/detector/ospkg/photon/photon.go:46-54 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/detector/ospkg/azure/azure.go:44` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `pkg/detector/ospkg/azure/azure.go:41` calls `Minor` and `pkg/detector/ospkg/photon/photon.go:44` 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 (9 lines × 2) pkg/iac/adapters/terraform/google/compute/instances.go:67— pkg/iac/adapters/terraform/google/compute/instances.go:67-75 | pkg/iac/adapters/terraform/google/compute/instances.go:79-87 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) pkg/iac/scanners/terraform/parser/funcs/collection.go:67— pkg/iac/scanners/terraform/parser/funcs/collection.go:67-75 | pkg/iac/scanners/terraform/parser/funcs/collection.go:97-105 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/scanners/terraform/parser/funcs/collection.go:67` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) pkg/x/json/jsonc.go:183— pkg/x/json/jsonc.go:183-191 | pkg/x/json/jsonc.go:195-203 — 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 `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) pkg/dependency/parser/java/jar/parse.go:576— pkg/dependency/parser/java/jar/parse.go:576-584 | pkg/dependency/parser/java/pom/pom.go:140-148 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) pkg/fanal/analyzer/os/amazonlinux/amazonlinux.go:31— pkg/fanal/analyzer/os/amazonlinux/amazonlinux.go:31-39 | pkg/fanal/analyzer/os/redhatbase/redhatbase.go:29-38 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) pkg/iac/adapters/terraform/aws/elasticache/adapt.go:77— pkg/iac/adapters/terraform/aws/elasticache/adapt.go:77-85 | pkg/iac/adapters/terraform/aws/redshift/adapt.go:100-108 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) pkg/k8s/k8s.go:34— pkg/k8s/k8s.go:34-42 | pkg/rpc/server/server.go:41-49 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) pkg/dependency/parser/julia/manifest/parse.go:62— pkg/dependency/parser/julia/manifest/parse.go:62-70 | pkg/dependency/parser/rust/cargo/parse.go:43-51 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/dependency/parser/julia/manifest/parse.go:62` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) pkg/iac/adapters/terraform/kubernetes/adapt.go:59— pkg/iac/adapters/terraform/kubernetes/adapt.go:59-67 | pkg/iac/adapters/terraform/kubernetes/adapt.go:83-91 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/adapters/terraform/kubernetes/adapt.go:59` 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) pkg/fanal/image/daemon/containerd.go:132— pkg/fanal/image/daemon/containerd.go:132-140 | pkg/fanal/image/daemon/docker.go:61-69 — 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 (9 lines × 2) pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:119— pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:119-127 | pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py:119-127 — before extracting anything, compare `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py` and `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
FileTooLong: npm/parse_testcase.go pkg/dependency/parser/nodejs/npm/parse_testcase.go— FileTooLong — 1043 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 543 over it, 2.09× 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: commands/app.go pkg/commands/app.go— FileTooLong — 1013 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 513 over it, 2.03× 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: rpc/convert.go pkg/rpc/convert.go— FileTooLong — 988 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 488 over it, 1.98× 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: pnpm/parse_testcase.go pkg/dependency/parser/nodejs/pnpm/parse_testcase.go— FileTooLong — 669 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 169 over it, 1.34× 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: terraform/attribute.go pkg/iac/terraform/attribute.go— FileTooLong — 636 significant lines (blank, comment-only and punctuation-only lines excluded), about 76% of them inside a single declaration: Attribute (49 blocks, 23-874). The bar is 500 significant lines; this is 136 over it, 1.27× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: pom/parse.go pkg/dependency/parser/java/pom/parse.go— FileTooLong — 630 significant lines (blank, comment-only and punctuation-only lines excluded), about 70% of them inside a single declaration: Parser (25 blocks, 94-1003). The bar is 500 significant lines; this is 130 over it, 1.26× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: licensing/normalize.go pkg/licensing/normalize.go— FileTooLong — 606 significant lines (blank, comment-only and punctuation-only lines excluded), about 69% of them inside a single declaration: mapping (17-453). The bar is 500 significant lines; this is 106 over it, 1.21× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: lock/parse_testcase.go pkg/dependency/parser/nuget/lock/parse_testcase.go— FileTooLong — 594 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 94 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: jar/parse.go pkg/dependency/parser/java/jar/parse.go— FileTooLong — 540 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 40 over it, 1.08× 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: secret/scanner.go pkg/fanal/secret/scanner.go— FileTooLong — 505 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 5 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.
FileTooLong: flag/options.go pkg/flag/options.go— FileTooLong — 505 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 5 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 (12 lines × 2) pkg/commands/artifact/scanner.go:59— pkg/commands/artifact/scanner.go:59-70 | pkg/commands/artifact/scanner.go:155-166 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/commands/artifact/scanner.go:59` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) pkg/detector/ospkg/alpine/alpine.go:103— pkg/detector/ospkg/alpine/alpine.go:103-114 | pkg/detector/ospkg/chainguard/chainguard.go:49-60 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/detector/ospkg/alpine/alpine.go:103` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) pkg/fanal/analyzer/licensing/license.go:127— pkg/fanal/analyzer/licensing/license.go:127-138 | pkg/fanal/utils/utils.go:67-78 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/fanal/analyzer/licensing/license.go:127` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) pkg/fanal/analyzer/pkg/apk/apk.go:177— pkg/fanal/analyzer/pkg/apk/apk.go:177-188 | pkg/fanal/analyzer/pkg/rpm/rpm.go:298-309 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/fanal/analyzer/pkg/apk/apk.go:177` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) pkg/flag/options.go:291— pkg/flag/options.go:291-302 | pkg/flag/options.go:310-321 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/flag/options.go:291` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) pkg/iac/adapters/terraform/aws/dynamodb/adapt.go:39— pkg/iac/adapters/terraform/aws/dynamodb/adapt.go:39-50 | pkg/iac/adapters/terraform/aws/dynamodb/adapt.go:65-76 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/adapters/terraform/aws/dynamodb/adapt.go:39` 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 (12 lines × 2) pkg/iac/scanners/cloudformation/scanner.go:78— pkg/iac/scanners/cloudformation/scanner.go:78-89 | pkg/iac/scanners/helm/scanner.go:99-110 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) pkg/iac/adapters/cloudformation/aws/apigateway/apigateway.go:11— pkg/iac/adapters/cloudformation/aws/apigateway/apigateway.go:11-22 | pkg/iac/adapters/terraform/aws/apigateway/adapt.go:10-21 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (12 lines × 2) pkg/iac/adapters/cloudformation/aws/documentdb/cluster.go:46— pkg/iac/adapters/cloudformation/aws/documentdb/cluster.go:46-58 | pkg/iac/adapters/cloudformation/aws/rds/instance.go:94-105 — 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 (12 lines × 2) pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:559— pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:559-570 | pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py:559-570 — before extracting anything, compare `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py` and `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/zlib/1.2.13/_/_/export/conanfile.py:99— pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/zlib/1.2.13/_/_/export/conanfile.py:99-110 | pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/zlib41bd3946e7341/e/conanfile.py:99-110 — before extracting anything, compare `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/zlib/1.2.13/_/_/export/conanfile.py` and `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/zlib41bd3946e7341/e/conanfile.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) REDACTED:21— REDACTED:21-30 | REDACTED:38-47 — 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 (10 lines × 2) pkg/fanal/analyzer/language/analyze.go:25— pkg/fanal/analyzer/language/analyze.go:25-34 | pkg/fanal/analyzer/language/analyze.go:39-48 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/fanal/analyzer/language/analyze.go:25` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) pkg/iac/adapters/cloudformation/aws/ecr/repository.go:70— pkg/iac/adapters/cloudformation/aws/ecr/repository.go:70-79 | pkg/iac/adapters/cloudformation/aws/sqs/queue.go:49-58 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/adapters/cloudformation/aws/ecr/repository.go:70` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) pkg/iac/scan/result.go:187— pkg/iac/scan/result.go:187-196 | pkg/iac/scan/result.go:203-212 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/scan/result.go:187` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) pkg/iac/adapters/ansible/aws/s3/adapt.go:8— pkg/iac/adapters/ansible/aws/s3/adapt.go:8-17 | pkg/iac/adapters/terraform/aws/s3/adapt.go:8-18 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) pkg/detector/ospkg/alpine/alpine.go:97— pkg/detector/ospkg/alpine/alpine.go:97-106 | pkg/detector/ospkg/ubuntu/ubuntu.go:115-124 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/detector/ospkg/alpine/alpine.go:97` 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) pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:97— pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:97-106 | pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py:97-106 — before extracting anything, compare `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py` and `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/zlib/1.2.13/_/_/export/conanfile.py:55— pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/zlib/1.2.13/_/_/export/conanfile.py:55-64 | pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/zlib41bd3946e7341/e/conanfile.py:55-64 — before extracting anything, compare `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/zlib/1.2.13/_/_/export/conanfile.py` and `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/zlib41bd3946e7341/e/conanfile.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Hotspot: pkg/crypto/parser/x509/parser.go pkg/crypto/parser/x509/parser.go:379— pkg/crypto/parser/x509/parser.go changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in x509.parseDERObject at line 379. 1 of those changes was a fix/bug commit, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 10:26:17 +00:00' --until='2026-10-23 10:26:17 +00:00' --full-history --no-merges -- pkg/crypto/parser/x509/parser.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: pkg/flag/options.go pkg/flag/options.go:453— pkg/flag/options.go changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in Options.Align at line 453. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 10:26:17 +00:00' --until='2026-10-23 10:26:17 +00:00' --full-history --no-merges -- pkg/flag/options.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: pkg/fanal/applier/docker.go pkg/fanal/applier/docker.go:113— pkg/fanal/applier/docker.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in applier.ApplyLayers at line 113. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 10:26:17 +00:00' --until='2026-10-23 10:26:17 +00:00' --full-history --no-merges -- pkg/fanal/applier/docker.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: pkg/dependency/parser/java/jar/parse.go pkg/dependency/parser/java/jar/parse.go:714— pkg/dependency/parser/java/jar/parse.go changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in manifest.addAttribute at line 714. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 10:26:17 +00:00' --until='2026-10-23 10:26:17 +00:00' --full-history --no-merges -- pkg/dependency/parser/java/jar/parse.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: pkg/fanal/types/crypto_descriptor.go pkg/fanal/types/crypto_descriptor.go:255— pkg/fanal/types/crypto_descriptor.go changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in CryptoIdentity.AlgorithmParameters at line 255. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 10:26:17 +00:00' --until='2026-10-23 10:26:17 +00:00' --full-history --no-merges -- pkg/fanal/types/crypto_descriptor.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: pkg/dependency/parser/java/pom/parse.go pkg/dependency/parser/java/pom/parse.go:840— pkg/dependency/parser/java/pom/parse.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in Parser.fetchPOMFromRemoteRepositories at line 840. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 10:26:17 +00:00' --until='2026-10-23 10:26:17 +00:00' --full-history --no-merges -- pkg/dependency/parser/java/pom/parse.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: pkg/flag/report_flags.go pkg/flag/report_flags.go:213— pkg/flag/report_flags.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in ReportFlagGroup.ToOptions at line 213. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 10:26:17 +00:00' --until='2026-10-23 10:26:17 +00:00' --full-history --no-merges -- pkg/flag/report_flags.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.
Duplicated block (7 lines × 2) pkg/commands/artifact/scanner.go:105— pkg/commands/artifact/scanner.go:105-111 | pkg/commands/artifact/scanner.go:201-207 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/commands/artifact/scanner.go:105` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) pkg/iac/scanners/terraform/parser/funcs/crypto.go:229— pkg/iac/scanners/terraform/parser/funcs/crypto.go:229-235 | pkg/iac/scanners/terraform/parser/funcs/crypto.go:249-255 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/scanners/terraform/parser/funcs/crypto.go:229` 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 (7 lines × 2) pkg/dependency/parser/julia/manifest/naive_pkg_parser.go:63— pkg/dependency/parser/julia/manifest/naive_pkg_parser.go:63-69 | pkg/dependency/parser/rust/cargo/naive_pkg_parser.go:66-72 — 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) pkg/iac/scanners/terraform/parser/resolvers/registry.go:86— pkg/iac/scanners/terraform/parser/resolvers/registry.go:86-93 | pkg/iac/scanners/terraform/parser/resolvers/registry.go:124-130 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/scanners/terraform/parser/resolvers/registry.go:86` 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 after the matched lines, `pkg/iac/scanners/terraform/parser/resolvers/registry.go:132` calls `Set` and `pkg/iac/scanners/terraform/parser/resolvers/registry.go:94` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) pkg/iac/adapters/arm/network/adapt.go:50— pkg/iac/adapters/arm/network/adapt.go:50-56 | pkg/iac/adapters/arm/network/adapt.go:66-72 — 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 (7 lines × 2) pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:328— pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:328-334 | pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py:328-334 — before extracting anything, compare `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py` and `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (7 lines × 2) pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:657— pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:657-663 | pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py:657-663 — before extracting anything, compare `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py` and `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:657` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) pkg/commands/artifact/scanner.go:40— pkg/commands/artifact/scanner.go:40-52 | pkg/commands/artifact/scanner.go:136-148 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/commands/artifact/scanner.go:40` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) pkg/dependency/parser/java/pom/pom.go:329— pkg/dependency/parser/java/pom/pom.go:329-341 | pkg/fanal/analyzer/language/java/gradle/pom.go:54-66 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/dependency/parser/java/pom/pom.go:329` 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 lines × 2) pkg/detector/ospkg/debian/debian.go:111— pkg/detector/ospkg/debian/debian.go:111-123 | pkg/detector/ospkg/ubuntu/ubuntu.go:145-157 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/detector/ospkg/debian/debian.go:111` 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 lines × 2) pkg/iac/adapters/terraform/azure/keyvault/adapt.go:39— pkg/iac/adapters/terraform/azure/keyvault/adapt.go:39-51 | pkg/iac/adapters/terraform/azure/keyvault/adapt.go:59-71 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/adapters/terraform/azure/keyvault/adapt.go:39` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) pkg/iac/scanners/cloudformation/parser/fn_and.go:15— pkg/iac/scanners/cloudformation/parser/fn_and.go:15-27 | pkg/iac/scanners/cloudformation/parser/fn_or.go:15-27 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/scanners/cloudformation/parser/fn_and.go:15` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) pkg/rekortest/server.go:53— pkg/rekortest/server.go:53-65 | pkg/rekortest/server.go:177-189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/rekortest/server.go:53` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) pkg/iac/scanners/cloudformation/parser/property.go:151— pkg/iac/scanners/cloudformation/parser/property.go:151-164 | pkg/iac/scanners/kubernetes/parser/manifest_node.go:217-230 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/scanners/cloudformation/parser/property.go:151` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) pkg/iac/scanners/terraform/parser/funcs/encoding.go:62— pkg/iac/scanners/terraform/parser/funcs/encoding.go:62-75 | pkg/iac/scanners/terraform/parser/funcs/encoding.go:106-119 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/scanners/terraform/parser/funcs/encoding.go:62` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) pkg/iac/scanners/terraform/parser/funcs/number.go:15— pkg/iac/scanners/terraform/parser/funcs/number.go:15-28 | pkg/iac/scanners/terraform/parser/funcs/number.go:44-57 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/scanners/terraform/parser/funcs/number.go:15` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) pkg/fanal/analyzer/language/nodejs/npm/npm.go:89— pkg/fanal/analyzer/language/nodejs/npm/npm.go:89-102 | pkg/fanal/analyzer/language/nodejs/pnpm/pnpm.go:90-104 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (14 lines × 2) pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/zlib/1.2.13/_/_/export/conanfile.py:67— pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/zlib/1.2.13/_/_/export/conanfile.py:67-80 | pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/zlib41bd3946e7341/e/conanfile.py:67-80 — before extracting anything, compare `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/zlib/1.2.13/_/_/export/conanfile.py` and `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/zlib41bd3946e7341/e/conanfile.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/zlib/1.2.13/_/_/export/conanfile.py:67` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) pkg/commands/app.go:1278— pkg/commands/app.go:1278-1288 | pkg/commands/app.go:1326-1336 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/commands/app.go:1278` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `pkg/commands/app.go:1325` calls `ExactArgs` and `pkg/commands/app.go:1277` 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) pkg/iac/adapters/terraform/azure/database/mysql.go:31— pkg/iac/adapters/terraform/azure/database/mysql.go:31-41 | pkg/iac/adapters/terraform/azure/database/postgresql.go:35-45 — 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 before the matched lines, `pkg/iac/adapters/terraform/azure/database/postgresql.go:32` calls `GetReferencingResources`, `adaptPostgreSQLConfig` and `pkg/iac/adapters/terraform/azure/database/mysql.go:28` 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) pkg/iac/adapters/terraform/google/iam/convert.go:12— pkg/iac/adapters/terraform/google/iam/convert.go:12-22 | pkg/iac/adapters/terraform/google/iam/project_iam.go:101-111 — 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 (11 lines × 2) pkg/dependency/parser/java/pom/mirror.go:55— pkg/dependency/parser/java/pom/mirror.go:55-65 | pkg/dependency/parser/java/pom/repository.go:58-68 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/dependency/parser/java/pom/mirror.go:55` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) pkg/cache/fs.go:102— pkg/cache/fs.go:102-112 | pkg/cache/fs.go:160-170 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/cache/fs.go:102` 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 (5 lines × 2) pkg/iac/adapters/arm/database/mssql.go:34— pkg/iac/adapters/arm/database/mssql.go:34-39 | pkg/iac/adapters/arm/database/postgresql.go:28-32 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/adapters/arm/database/mssql.go:34` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) pkg/iac/adapters/terraform/aws/ecr/adapt.go:105— pkg/iac/adapters/terraform/aws/ecr/adapt.go:105-109 | pkg/iac/adapters/terraform/aws/redshift/adapt.go:88-92 — 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) pkg/iac/adapters/terraform/aws/s3/policies.go:29— pkg/iac/adapters/terraform/aws/s3/policies.go:29-34 | pkg/iac/adapters/terraform/aws/s3/public_access_block.go:19-23 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/adapters/terraform/aws/s3/policies.go:29` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) pkg/iac/adapters/terraform/azure/network/common.go:50— pkg/iac/adapters/terraform/azure/network/common.go:50-54 | pkg/iac/adapters/terraform/azure/network/common.go:80-84 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/adapters/terraform/azure/network/common.go:50` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:159— pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:159-163 | pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py:159-163 — before extracting anything, compare `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py` and `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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.
X2 · Cancellation propagation· Function without context.Context · ×5
Function without context.Context: Exists pkg/dependency/parser/java/jar/sonatype/sonatype.go:85— `Exists` 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: SearchBySHA1 pkg/dependency/parser/java/jar/sonatype/sonatype.go:109— `SearchBySHA1` 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: SearchByArtifactID pkg/dependency/parser/java/jar/sonatype/sonatype.go:156— `SearchByArtifactID` 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: fetchApkIndexArchive pkg/fanal/analyzer/imgconf/apk/apk.go:93— `fetchApkIndexArchive` 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: newPodmanClient pkg/fanal/image/daemon/podman.go:29— `newPodmanClient` calls `net.Dial(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
TooManyMethods: Property pkg/iac/scanners/cloudformation/parser/property.go:25— TooManyMethods — 63 methods, declared across 3 files: parser/property.go (28), parser/property_helpers.go (27), parser/property_conversion.go (8). The bar is 30 methods; this is 33 over it, 2.10× 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: Block pkg/iac/terraform/block.go:22— TooManyMethods — 50 methods, declared across 2 files: terraform/block.go (49), terraform/export.go (1). The bar is 30 methods; this is 20 over it, 1.67× 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: Attribute pkg/iac/terraform/attribute.go:23— TooManyMethods — 49 methods, declared across 2 files: terraform/attribute.go (48), terraform/export.go (1). The bar is 30 methods; this is 19 over it, 1.63× 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: Marshaler pkg/sbom/cyclonedx/marshal.go:42— TooManyMethods — 35 methods, declared across 2 files: cyclonedx/marshal.go (27), cyclonedx/crypto.go (8). The bar is 30 methods; this is 5 over it, 1.17× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×4
Members sharing a duplicated core (4 members, 50+ identical tokens) pkg/detector/ospkg/azure/azure.go:39— pkg/detector/ospkg/azure/azure.go:39-86 | pkg/detector/ospkg/oracle/oracle.go:47-90 | pkg/detector/ospkg/photon/photon.go:44-79 | pkg/detector/ospkg/suse/suse.go:121-156 — 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) pkg/fanal/analyzer/os/redhatbase/alma.go:25— pkg/fanal/analyzer/os/redhatbase/alma.go:25-46 | pkg/fanal/analyzer/os/redhatbase/centos.go:25-46 | pkg/fanal/analyzer/os/redhatbase/fedora.go:25-45 | pkg/fanal/analyzer/os/redhatbase/rocky.go:25-46 — 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) pkg/iac/adapters/cloudformation/aws/ecr/repository.go:59— pkg/iac/adapters/cloudformation/aws/ecr/repository.go:59-79 | pkg/iac/adapters/cloudformation/aws/sam/function.go:30-58 | pkg/iac/adapters/cloudformation/aws/sam/state_machines.go:57-81 | pkg/iac/adapters/cloudformation/aws/sqs/queue.go:32-62 — 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) pkg/iac/scanners/terraform/parser/funcs/cidr.go:16— pkg/iac/scanners/terraform/parser/funcs/cidr.go:16-195 | pkg/iac/scanners/terraform/parser/funcs/crypto.go:29-78 | pkg/iac/scanners/terraform/parser/funcs/crypto.go:145-196 | pkg/iac/scanners/terraform/parser/funcs/string.go:14-152 — 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.
Duplicated block (15 lines × 2) pkg/commands/app.go:957— pkg/commands/app.go:957-971 | pkg/commands/app.go:981-995 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/commands/app.go:957` 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 (15 lines × 2) pkg/iac/scan/code.go:306— pkg/iac/scan/code.go:306-320 | pkg/iac/scanners/terraform/parser/parser.go:240-254 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/scan/code.go:306` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) pkg/report/table/licensing.go:41— pkg/report/table/licensing.go:41-55 | pkg/report/table/licensing.go:123-137 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (15 lines × 2) pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:498— pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:498-512 | pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py:498-512 — before extracting anything, compare `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py` and `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
FunctionTooLong: applier.ApplyLayers pkg/fanal/applier/docker.go:113— FunctionTooLong — ApplyLayers runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: parser.Functions pkg/iac/scanners/terraform/parser/functions.go:18— FunctionTooLong — Functions runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× 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: commands.NewPluginCommand pkg/commands/app.go:772— FunctionTooLong — NewPluginCommand runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Duplicated block (13 lines × 3) pkg/iac/scanners/terraform/parser/funcs/collection.go:176— pkg/iac/scanners/terraform/parser/funcs/collection.go:176-188 | pkg/iac/scanners/terraform/parser/funcs/number.go:15-27 | pkg/iac/scanners/terraform/parser/funcs/number.go:44-56 — 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 `pkg/iac/scanners/terraform/parser/funcs/collection.go:176` 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 × 3) pkg/detector/ospkg/alma/alma.go:97— pkg/detector/ospkg/alma/alma.go:97-109 | pkg/detector/ospkg/redhat/redhat.go:175-187 | pkg/detector/ospkg/rocky/rocky.go:88-100 — `pkg/detector/ospkg/alma/alma.go` and `pkg/detector/ospkg/rocky/rocky.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 40 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `osVer` in one and `s *Scanner) detect(osVer` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (13 lines × 3) pkg/iac/adapters/terraform/google/iam/folder_iam.go:48— pkg/iac/adapters/terraform/google/iam/folder_iam.go:48-60 | pkg/iac/adapters/terraform/google/iam/org_iam.go:47-59 | pkg/iac/adapters/terraform/google/iam/project_iam.go:136-148 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/adapters/terraform/google/iam/folder_iam.go:48` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) pkg/detector/ospkg/chainguard/chainguard.go:34— pkg/detector/ospkg/chainguard/chainguard.go:34-43 | pkg/detector/ospkg/minimos/minimos.go:34-43 | pkg/detector/ospkg/wolfi/wolfi.go:34-43 — `pkg/detector/ospkg/chainguard/chainguard.go` and `pkg/detector/ospkg/minimos/minimos.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 55 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/detector/ospkg/chainguard/chainguard.go:34` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) pkg/detector/ospkg/rapidfort/rapidfort.go:284— pkg/detector/ospkg/rapidfort/rapidfort.go:284-294 | pkg/detector/ospkg/rootio/rootio.go:86-95 | pkg/detector/ospkg/seal/seal.go:111-120 — `pkg/detector/ospkg/rootio/rootio.go` and `pkg/detector/ospkg/seal/seal.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 52 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/detector/ospkg/rapidfort/rapidfort.go:284` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) pkg/iac/adapters/terraform/google/storage/iam.go:30— pkg/iac/adapters/terraform/google/storage/iam.go:30-39 | pkg/iac/adapters/terraform/google/storage/iam.go:61-70 | pkg/iac/adapters/terraform/google/storage/iam.go:84-93 — 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 before the matched lines, `pkg/iac/adapters/terraform/google/storage/iam.go:59` calls `AdaptBinding` and `pkg/iac/adapters/terraform/google/storage/iam.go:28` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 4) pkg/iac/scanners/terraform/parser/funcs/filesystem.go:300— pkg/iac/scanners/terraform/parser/funcs/filesystem.go:300-307 | pkg/iac/scanners/terraform/parser/funcs/filesystem.go:315-322 | pkg/iac/scanners/terraform/parser/funcs/filesystem.go:329-336 | pkg/iac/scanners/terraform/parser/funcs/filesystem.go:344-351 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/scanners/terraform/parser/funcs/filesystem.go:300` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 4) pkg/iac/scanners/terraform/parser/funcs/cidr.go:51— pkg/iac/scanners/terraform/parser/funcs/cidr.go:51-58 | pkg/iac/scanners/terraform/parser/funcs/encoding.go:47-54 | pkg/iac/scanners/terraform/parser/funcs/encoding.go:154-161 | pkg/iac/scanners/terraform/parser/funcs/encoding.go:182-189 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (8 lines × 4) pkg/fanal/analyzer/os/redhatbase/alma.go:27— pkg/fanal/analyzer/os/redhatbase/alma.go:27-34 | pkg/fanal/analyzer/os/redhatbase/centos.go:27-34 | pkg/fanal/analyzer/os/redhatbase/fedora.go:27-34 | pkg/fanal/analyzer/os/redhatbase/rocky.go:27-34 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/fanal/analyzer/os/redhatbase/alma.go:27` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Low cohesion: runner (LCOM4 4) pkg/commands/artifact/run.go:100— runner'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: Node (LCOM4 4) pkg/iac/scanners/ansible/parser/node.go:94— Node'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: FileContext (LCOM4 4) pkg/iac/scanners/cloudformation/parser/file_context.go:27— FileContext'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.
Parser.Parse (cognitive 17) pkg/dependency/parser/julia/manifest/parse.go:35— Parser.Parse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 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.
Parser.Parse (cognitive 17) pkg/dependency/parser/nuget/lock/parse.go:36— Parser.Parse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (7 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.
Parser.parseV1 (cognitive 16) pkg/dependency/parser/c/conan/parse.go:55— Parser.parseV1 has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.parseV1 (cognitive 16) pkg/dependency/parser/nodejs/npm/parse.go:312— Parser.parseV1 has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (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.
Scanner.Detect (cognitive 16) pkg/detector/ospkg/alpine/alpine.go:71— Scanner.Detect has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Scanner.Detect (cognitive 16) pkg/detector/ospkg/ubuntu/ubuntu.go:104— Scanner.Detect has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 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.
ClassTooLong: Attribute pkg/iac/terraform/attribute.go:23— ClassTooLong — 483 significant lines (blank, comment-only and punctuation-only lines excluded), 49 methods, 49 blocks, lines 23-874. The bar is 400 significant lines; this is 83 over it, 1.21× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Parser pkg/dependency/parser/java/pom/parse.go:94— ClassTooLong — 444 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods, 25 blocks, lines 94-1003. The bar is 400 significant lines; this is 44 over it, 1.11× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyFields: AWS pkg/iac/providers/aws/aws.go:40— TooManyFields — 35 stored fields. The bar is 30 stored fields; this is 5 over it, 1.17× 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: TerraformProvider pkg/iac/providers/aws/provider.go:5— 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.
Change coupling: detect.go ↔ release.go pkg/detector/ospkg/detect.go:1— `pkg/detector/ospkg/detect.go` and `pkg/fanal/analyzer/os/release/release.go` change together 73% of the time (8 of the 11 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) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `6d562a3b` feat(sbom): added support for CoreOS (#9448); `c2dde33c` feat(minimos): Add support for MinimOS (#8792); `c7b8cc39` feat(echo): Add Echo Support (#8833) — run `git show` on any of them.
Change coupling: const.go ↔ const.go pkg/fanal/analyzer/const.go:1— `pkg/fanal/analyzer/const.go` and `pkg/fanal/types/const.go` change together 67% of the time (22 of the 33 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) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 22 shared commits counted here, the most recent 3 are `2c3b86c9` feat: add RapidFort curated image scanner (#10452); `d0a3f63b` feat(python): add pylock.toml support (#10137); `6d562a3b` feat(sbom): added support for CoreOS (#9448) — run `git show` on any of them.
Duplicated block (16 lines × 2) pkg/iac/scanners/terraform/parser/funcs/sensitive.go:12— pkg/iac/scanners/terraform/parser/funcs/sensitive.go:12-27 | pkg/iac/scanners/terraform/parser/funcs/sensitive.go:36-51 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/scanners/terraform/parser/funcs/sensitive.go:12` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) pkg/fanal/analyzer/language/nodejs/pnpm/pnpm.go:73— pkg/fanal/analyzer/language/nodejs/pnpm/pnpm.go:73-88 | REDACTED:103-118 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/fanal/analyzer/language/nodejs/pnpm/pnpm.go:73` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 3) pkg/iac/scanners/terraform/parser/funcs/collection.go:134— pkg/iac/scanners/terraform/parser/funcs/collection.go:134-142 | pkg/iac/scanners/terraform/parser/funcs/collection.go:617-625 | pkg/iac/scanners/terraform/parser/funcs/collection.go:638-646 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/scanners/terraform/parser/funcs/collection.go:134` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) pkg/iac/scanners/terraform/parser/funcs/encoding.go:47— pkg/iac/scanners/terraform/parser/funcs/encoding.go:47-55 | pkg/iac/scanners/terraform/parser/funcs/encoding.go:154-162 | pkg/iac/scanners/terraform/parser/funcs/encoding.go:182-190 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/scanners/terraform/parser/funcs/encoding.go:47` 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 × 2) pkg/fanal/analyzer/language/python/poetry/poetry.go:97— pkg/fanal/analyzer/language/python/poetry/poetry.go:97-105 | pkg/fanal/analyzer/language/python/pylock/pylock.go:114-121 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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–9 lines × 2) pkg/iac/adapters/terraform/google/gke/adapt.go:84— pkg/iac/adapters/terraform/google/gke/adapt.go:84-91 | pkg/iac/adapters/terraform/google/gke/adapt.go:191-199 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7–8 lines × 4) pkg/detector/ospkg/azure/azure.go:43— pkg/detector/ospkg/azure/azure.go:43-50 | pkg/detector/ospkg/oracle/oracle.go:49-55 | pkg/detector/ospkg/photon/photon.go:45-51 | pkg/detector/ospkg/suse/suse.go:122-128 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/detector/ospkg/azure/azure.go:43` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `pkg/detector/ospkg/azure/azure.go:41` calls `Minor` and `pkg/detector/ospkg/photon/photon.go:44` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7–8 lines × 4) pkg/iac/adapters/cloudformation/aws/ecr/repository.go:71— pkg/iac/adapters/cloudformation/aws/ecr/repository.go:71-77 | pkg/iac/adapters/cloudformation/aws/sam/function.go:43-50 | pkg/iac/adapters/cloudformation/aws/sam/state_machines.go:69-76 | pkg/iac/adapters/cloudformation/aws/sqs/queue.go:50-56 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. 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 after the matched lines, `pkg/iac/adapters/cloudformation/aws/sam/function.go:52` calls `IsString`, `AsStringValue` and `pkg/iac/adapters/cloudformation/aws/sam/state_machines.go:78` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 3) pkg/report/table/licensing.go:89— pkg/report/table/licensing.go:89-95 | pkg/report/table/licensing.go:186-192 | pkg/report/table/vulnerability.go:188-194 — 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.
Duplicated block (7 lines × 3) pkg/fanal/artifact/sbom/sbom.go:70— pkg/fanal/artifact/sbom/sbom.go:70-76 | pkg/fanal/artifact/vm/ebs.go:67-73 | pkg/fanal/artifact/vm/file.go:88-94 — 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. 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 (26 lines × 2) pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:533— pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:533-558 | pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py:533-558 — before extracting anything, compare `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py` and `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (26 lines × 2) pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:190— pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:190-215 | pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py:190-215 — before extracting anything, compare `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py` and `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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.
Outbound HTTP without resilience pkg/fanal/analyzer/imgconf/apk/apk.go:111— `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 pkg/vex/sbomref.go:80— `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.
applier.ApplyLayers (cyclomatic 37) pkg/fanal/applier/docker.go:113— applier.ApplyLayers has cyclomatic complexity 37 (threshold 15). Of this number, 27 points are the body's own statements and 10 belong to 3 function literals inside it that branch. 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.
funcs.parseIPv6 (cyclomatic 26) pkg/iac/scanners/terraform/parser/funcs/ip.go:106— funcs.parseIPv6 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.
registryResolver.Resolve (cyclomatic 24) pkg/iac/scanners/terraform/parser/resolvers/registry.go:46— registryResolver.Resolve has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Parser.parseRoot (cyclomatic 23) pkg/dependency/parser/java/pom/parse.go:242— Parser.parseRoot has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
terraform.RewriteExpr (cyclomatic 23) pkg/iac/terraform/attribute.go:879— terraform.RewriteExpr has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function taking that case's concrete type, so the dispatch reads one line per case. These arms are selected by TYPE rather than by value, so there is no key a lookup table could be built on; where you own the matched types, giving them one shared interface method and calling that is the form a table would have taken, and where you do not, keep the cases — they stay explicit and reviewable.
alpinePkgAnalyzer.parseApkInfo (cyclomatic 20) pkg/fanal/analyzer/pkg/apk/apk.go:54— alpinePkgAnalyzer.parseApkInfo 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.
ReportFlagGroup.ToOptions (cyclomatic 20) pkg/flag/report_flags.go:213— ReportFlagGroup.ToOptions 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.
iam.parseStatement (cyclomatic 20) pkg/iac/adapters/terraform/aws/iam/convert.go:126— iam.parseStatement 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.
Flag.Add (cyclomatic 19) pkg/flag/options.go:276— Flag.Add 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.
Options.Align (cyclomatic 19) pkg/flag/options.go:453— Options.Align 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.
secretRenderer.renderCode (cyclomatic 19) pkg/report/table/secret.go:111— secretRenderer.renderCode 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.
clean.Run (cyclomatic 18) pkg/commands/clean/run.go:17— clean.Run 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.
Parser.traverseZip (cyclomatic 18) pkg/dependency/parser/java/jar/parse.go:249— Parser.traverseZip 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.
Parser.parseV2 (cyclomatic 18) pkg/dependency/parser/nodejs/npm/parse.go:110— Parser.parseV2 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.
sealSecurity.Match (cyclomatic 18) pkg/detector/library/seal/seal.go:74— sealSecurity.Match 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.
StaticMetadata.populate (cyclomatic 18) pkg/iac/rego/metadata.go:65— StaticMetadata.populate has cyclomatic complexity 18 (threshold 15). Of this number, 17 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.
Value.UnmarshalJSONFrom (cyclomatic 18) pkg/iac/scanners/azure/value.go:115— Value.UnmarshalJSONFrom 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.
expression.NewLexer (cyclomatic 18) pkg/licensing/expression/lexer.go:20— expression.NewLexer has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 22). 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.
module.newWASMPlugin (cyclomatic 18) pkg/module/module.go:283— module.newWASMPlugin has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Parser.Parse (cyclomatic 17) pkg/dependency/parser/golang/mod/parse.go:77— Parser.Parse 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.
Parser.fetchPOMFromRemoteRepositories (cyclomatic 17) pkg/dependency/parser/java/pom/parse.go:840— Parser.fetchPOMFromRemoteRepositories 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.
Artifact.Inspect (cyclomatic 17) pkg/fanal/artifact/local/fs.go:169— Artifact.Inspect 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.
adapter.adaptQueues (cyclomatic 17) pkg/iac/adapters/terraform/aws/sqs/adapt.go:28— adapter.adaptQueues 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.
storage.adaptAccounts (cyclomatic 17) pkg/iac/adapters/terraform/azure/storage/adapt.go:83— storage.adaptAccounts 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.
Node.subtree (cyclomatic 17) pkg/iac/scanners/ansible/parser/node.go:491— Node.subtree 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.
Property.EqualTo (cyclomatic 17) pkg/iac/scanners/cloudformation/parser/property_helpers.go:172— Property.EqualTo 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.
funcs.parseTimestamp (cyclomatic 17) pkg/iac/scanners/terraform/parser/funcs/datetime.go:100— funcs.parseTimestamp 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.
Scanner.Scan (cyclomatic 17) pkg/k8s/scanner/scanner.go:55— Scanner.Scan has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, 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.
Scanner.scanK8sVulns (cyclomatic 17) pkg/k8s/scanner/scanner.go:241— Scanner.scanK8sVulns 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.
misconfigRenderer.renderCode (cyclomatic 17) pkg/report/table/misconfig.go:159— misconfigRenderer.renderCode 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.
SPDX.parsePackage (cyclomatic 17) pkg/sbom/spdx/unmarshal.go:174— SPDX.parsePackage 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.
runner.initScannerConfig (cyclomatic 16) pkg/commands/artifact/run.go:573— runner.initScannerConfig 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.
x509.parseDERObject (cyclomatic 16) pkg/crypto/parser/x509/parser.go:379— x509.parseDERObject 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.
pom.resolveMirrors (cyclomatic 16) pkg/dependency/parser/java/pom/mirror.go:33— pom.resolveMirrors 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.
Parser.Parse (cyclomatic 16) pkg/dependency/parser/nodejs/bun/parse.go:81— Parser.Parse has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
dockerfileAnalyzer.Analyze (cyclomatic 16) REDACTED:28— dockerfileAnalyzer.Analyze 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.
mod.findLicense (cyclomatic 16) pkg/fanal/analyzer/language/golang/mod/mod.go:351— mod.findLicense has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to one function literal inside it that branches. 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.
sql.adaptFlags (cyclomatic 16) pkg/iac/adapters/terraform/google/sql/adapt.go:84— sql.adaptFlags has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
detection.detectKubernetes (cyclomatic 16) pkg/iac/detection/detect.go:218— detection.detectKubernetes 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.
inventory.ParseINI (cyclomatic 16) pkg/iac/scanners/ansible/inventory/ini.go:20— inventory.ParseINI 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.
Parser.ParseFile (cyclomatic 16) pkg/iac/scanners/cloudformation/parser/parser.go:86— Parser.ParseFile has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
evaluator.expandBlockForEaches (cyclomatic 16) pkg/iac/scanners/terraform/parser/evaluator.go:308— evaluator.expandBlockForEaches has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
funcs.MakeTemplateFileFunc (cyclomatic 16) pkg/iac/scanners/terraform/parser/funcs/filesystem.go:69— funcs.MakeTemplateFileFunc has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 98, 157, 82, …). 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.
Attribute.getStringValues (cyclomatic 16) pkg/iac/terraform/attribute.go:343— Attribute.getStringValues has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
module.deleteResults (cyclomatic 16) pkg/module/module.go:610— module.deleteResults has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 615, 624). 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.
Marshaler.Marshal (cyclomatic 16) pkg/sbom/spdx/marshal.go:128— Marshaler.Marshal 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.
XxxComment pkg/flag/remote_flags.go:162— // e.g. x-api-token:XXX — 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.
FixmeComment pkg/iac/scanners/helm/parser/vals.go:99— // FIXME: maybe someone handle other protocols like ftp. — 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.
storage.adaptAccounts (cognitive 54) pkg/iac/adapters/terraform/azure/storage/adapt.go:83— storage.adaptAccounts has cognitive complexity 54 (threshold 15). Drivers by points: if/else 9 (36 pts), loops 6 (16 pts), boolean chains 2 (nesting depth added 37). 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.
applier.ApplyLayers (cognitive 52) pkg/fanal/applier/docker.go:113— applier.ApplyLayers has cognitive complexity 52 (threshold 15). Drivers by points: loops 16 (28 pts), if/else 10 (21 pts), match/switch 2, boolean chains 1 (nesting depth added 23). Of this number, 49 points are the body's own statements and 3 belong to 3 function literals inside it that branch. 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.
Parser.parseRoot (cognitive 45) pkg/dependency/parser/java/pom/parse.go:242— Parser.parseRoot has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (39 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
funcs.parseIPv6 (cognitive 43) pkg/iac/scanners/terraform/parser/funcs/ip.go:106— funcs.parseIPv6 has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (33 pts), boolean chains 5, 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.
Scanner.scanK8sVulns (cognitive 42) pkg/k8s/scanner/scanner.go:241— Scanner.scanK8sVulns has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (39 pts), match/switch 1 (2 pts), loops 1 (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.
Parser.fetchPOMFromRemoteRepositories (cognitive 38) pkg/dependency/parser/java/pom/parse.go:840— Parser.fetchPOMFromRemoteRepositories has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (32 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
adapter.adaptQueues (cognitive 36) pkg/iac/adapters/terraform/aws/sqs/adapt.go:28— adapter.adaptQueues has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (31 pts), loops 3, boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.Parse (cognitive 35) pkg/dependency/parser/swift/cocoapods/parse.go:33— Parser.Parse has cognitive complexity 35 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 5 (11 pts), match/switch 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ec2.getRules (cognitive 35) pkg/iac/adapters/cloudformation/aws/ec2/nacl.go:24— ec2.getRules has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (33 pts), boolean chains 1, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
spaces.adaptBuckets (cognitive 35) pkg/iac/adapters/terraform/digitalocean/spaces/adapt.go:17— spaces.adaptBuckets has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (25 pts), loops 5 (10 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rego.BuildSchemaSetFromPolicies (cognitive 35) pkg/iac/rego/build.go:16— rego.BuildSchemaSetFromPolicies has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (28 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Scanner.Detect (cognitive 34) pkg/detector/ospkg/rapidfort/rapidfort.go:228— Scanner.Detect has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 4 (11 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Flag.Add (cognitive 34) pkg/flag/options.go:276— Flag.Add has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 2 (8 pts), boolean chains 1, match/switch 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
http.colorizeHTTPDump (cognitive 34) REDACTED:422— http.colorizeHTTPDump has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (31 pts), boolean chains 2, loops 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.
Parser.parseV2 (cognitive 32) pkg/dependency/parser/nodejs/npm/parse.go:110— Parser.parseV2 has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 4, loops 3 (4 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.
dockerfileAnalyzer.Analyze (cognitive 32) REDACTED:28— dockerfileAnalyzer.Analyze has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 5 (10 pts), match/switch 2 (8 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.
Node.subtree (cognitive 32) pkg/iac/scanners/ansible/parser/node.go:491— Node.subtree has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 2 (4 pts), boolean chains 1, match/switch 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.
registryResolver.Resolve (cognitive 32) pkg/iac/scanners/terraform/parser/resolvers/registry.go:46— registryResolver.Resolve has cognitive complexity 32 (threshold 15). Drivers by points: if/else 22 (30 pts), boolean chains 1, match/switch 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.
Parser.traverseZip (cognitive 31) pkg/dependency/parser/java/jar/parse.go:249— Parser.traverseZip has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (27 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
secretRenderer.renderCode (cognitive 31) pkg/report/table/secret.go:111— secretRenderer.renderCode has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 2 (7 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
compute.adaptInstances (cognitive 30) pkg/iac/adapters/terraform/google/compute/instances.go:9— compute.adaptInstances has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 4 (7 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.
Marshaler.Marshal (cognitive 30) pkg/sbom/spdx/marshal.go:128— Marshaler.Marshal has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 5 (9 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
inventory.ParseINI (cognitive 29) pkg/iac/scanners/ansible/inventory/ini.go:20— inventory.ParseINI has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (18 pts), match/switch 2 (6 pts), loops 2 (4 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.
Parser.resolvePlaybook (cognitive 29) REDACTED:260— Parser.resolvePlaybook has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 3 (5 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.
pom.resolveMirrors (cognitive 28) pkg/dependency/parser/java/pom/mirror.go:33— pom.resolveMirrors has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 5 (8 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
apigateway.adaptAPIsV1 (cognitive 28) pkg/iac/adapters/cloudformation/aws/apigateway/apiv1.go:8— apigateway.adaptAPIsV1 has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 5 (10 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
compute.adaptNetworks (cognitive 28) pkg/iac/adapters/terraform/google/compute/networks.go:14— compute.adaptNetworks has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 6 (8 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.
Attribute.mapContains (cognitive 28) pkg/iac/terraform/attribute.go:498— Attribute.mapContains has cognitive complexity 28 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 5 (12 pts), boolean chains 3, match/switch 1 (nesting depth added 15). None of this is in the body itself: all 28 points belong to one function literal inside it that branches (line 499). 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.
misconfigRenderer.renderCode (cognitive 28) pkg/report/table/misconfig.go:159— misconfigRenderer.renderCode has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 2 (7 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.Parse (cognitive 27) pkg/dependency/parser/ruby/bundler/parse.go:23— Parser.Parse has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 4 (5 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.
module.updateResults (cognitive 27) pkg/module/module.go:572— module.updateResults has cognitive complexity 27 (threshold 15). Drivers by points: if/else 3 (13 pts), loops 4 (11 pts), boolean chains 3 (nesting depth added 17). Most of this is not in the body itself: 7 of the 27 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 576, 590). 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.
module.deleteResults (cognitive 27) pkg/module/module.go:610— module.deleteResults has cognitive complexity 27 (threshold 15). Drivers by points: if/else 3 (13 pts), loops 4 (11 pts), boolean chains 3 (nesting depth added 17). Most of this is not in the body itself: 7 of the 27 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 615, 624). 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.
cargoAnalyzer.parseRootCargoTOML (cognitive 26) pkg/fanal/analyzer/language/rust/cargo/cargo.go:217— cargoAnalyzer.parseRootCargoTOML has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 4 (7 pts), match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rego.isPolicyApplicable (cognitive 26) pkg/iac/rego/scanner.go:307— rego.isPolicyApplicable has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4 (9 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Scanner.Scan (cognitive 26) pkg/k8s/scanner/scanner.go:55— Scanner.Scan has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 10). Of this number, 19 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.Parse (cognitive 25) pkg/dependency/parser/golang/mod/parse.go:77— Parser.Parse has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 3, loops 2 (3 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.
Parser.parseBlock (cognitive 25) pkg/dependency/parser/nodejs/yarn/parse.go:175— Parser.parseBlock has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 2, 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.
ecr.adaptRepository (cognitive 25) pkg/iac/adapters/terraform/aws/ecr/adapt.go:28— ecr.adaptRepository has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (23 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.
detection.detectKubernetes (cognitive 25) pkg/iac/detection/detect.go:218— detection.detectKubernetes has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 3 (5 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.
Parser.Parse (cognitive 24) pkg/dependency/parser/python/packaging/parse.go:34— Parser.Parse has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rpmPkgAnalyzer.listPkgs (cognitive 24) pkg/fanal/analyzer/pkg/rpm/rpm.go:113— rpmPkgAnalyzer.listPkgs has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 3 (6 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.
ReportFlagGroup.ToOptions (cognitive 24) pkg/flag/report_flags.go:213— ReportFlagGroup.ToOptions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 3, match/switch 1 (2 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.
StaticMetadata.populate (cognitive 24) pkg/iac/rego/metadata.go:65— StaticMetadata.populate has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (19 pts), loops 1 (3 pts), match/switch 1 (2 pts) (nesting depth added 8). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Scanner.clusterInfoToReportResources (cognitive 24) pkg/k8s/scanner/scanner.go:388— Scanner.clusterInfoToReportResources has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 3 (5 pts), match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.parseV9 (cognitive 23) pkg/dependency/parser/nodejs/pnpm/parse.go:127— Parser.parseV9 has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 6 (9 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.
adapter.adaptBucketPolicies (cognitive 23) pkg/iac/adapters/terraform/aws/s3/policies.go:9— adapter.adaptBucketPolicies has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
convert.StructToRego (cognitive 23) pkg/iac/rego/convert/struct.go:16— convert.StructToRego has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3, 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.
Scanner.ScanInput (cognitive 23) pkg/iac/rego/scanner.go:181— Scanner.ScanInput has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 12). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
scan.shiftANSIOverLineEndings (cognitive 23) pkg/iac/scan/highlighting.go:83— scan.shiftANSIOverLineEndings has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 3, match/switch 1 (3 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.
Node.render (cognitive 23) pkg/iac/scanners/ansible/parser/node.go:233— Node.render has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (4 pts), match/switch 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.
Property.EqualTo (cognitive 23) pkg/iac/scanners/cloudformation/parser/property_helpers.go:172— Property.EqualTo has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 4, loops 1, match/switch 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.
Parser.Parse (cognitive 23) pkg/iac/scanners/dockerfile/parser/parser.go:39— Parser.Parse has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Attribute.getStringValues (cognitive 23) pkg/iac/terraform/attribute.go:343— Attribute.getStringValues has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 12). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
expression.NewLexer (cognitive 23) pkg/licensing/expression/lexer.go:20— expression.NewLexer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, loops 2, match/switch 1 (2 pts) (nesting depth added 9). None of this is in the body itself: all 23 points belong to one function literal inside it that branches (line 22). 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.
Writer.Write (cognitive 23) pkg/report/github/github.go:75— Writer.Write has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 2 (3 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.
artifact.resolveAnsibleExtraVars (cognitive 22) pkg/commands/artifact/run.go:791— artifact.resolveAnsibleExtraVars has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (18 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sealSecurity.Match (cognitive 22) pkg/detector/library/seal/seal.go:74— sealSecurity.Match has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 1, match/switch 1 (nesting depth added 10). 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.
Artifact.Inspect (cognitive 22) pkg/fanal/artifact/local/fs.go:169— Artifact.Inspect has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16 (20 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, 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.
msk.getClusters (cognitive 22) pkg/iac/adapters/cloudformation/aws/msk/cluster.go:9— msk.getClusters has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
iam.parseStatement (cognitive 22) pkg/iac/adapters/terraform/aws/iam/convert.go:126— iam.parseStatement has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (17 pts), loops 2, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
inventory.LoadSourceVars (cognitive 22) pkg/iac/scanners/ansible/inventory/inventory_vars.go:156— inventory.LoadSourceVars has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 12). Of this number, 18 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
inventory.LoadFromSources (cognitive 22) pkg/iac/scanners/ansible/inventory/load.go:236— inventory.LoadFromSources has cognitive complexity 22 (threshold 15). Drivers by points: if/else 3 (12 pts), loops 3 (8 pts), match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Scanner.ScanFS (cognitive 22) pkg/iac/scanners/terraform/scanner.go:80— Scanner.ScanFS has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 3 (4 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.
walker.walk (cognitive 21) pkg/crypto/parser/pkcs12/parser.go:153— walker.walk has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (18 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.
Parser.Parse (cognitive 21) pkg/dependency/parser/nodejs/bun/parse.go:81— Parser.Parse has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 4, boolean chains 2 (nesting depth added 6). Of this number, 20 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.
Scanner.Detect (cognitive 21) pkg/detector/ospkg/echo/echo.go:29— Scanner.Detect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
builder.readStruct (cognitive 21) pkg/iac/rego/schemas/builder.go:169— builder.readStruct has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 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.
evaluator.expandBlockForEaches (cognitive 21) pkg/iac/scanners/terraform/parser/evaluator.go:308— evaluator.expandBlockForEaches has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 4, loops 1 (nesting depth added 8). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 332). 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.
evaluator.getValuesByBlockType (cognitive 21) pkg/iac/scanners/terraform/parser/evaluator.go:532— evaluator.getValuesByBlockType has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (18 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.
evaluator.localHasDynamicValues (cognitive 21) pkg/iac/scanners/terraform/parser/evaluator.go:671— evaluator.localHasDynamicValues has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (5 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.
snapshot.parseSnapshot (cognitive 21) pkg/iac/scanners/terraformplan/snapshot/snapshot.go:63— snapshot.parseSnapshot has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2, 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.
Attribute.GetRawValue (cognitive 21) pkg/iac/terraform/attribute.go:74— Attribute.GetRawValue has cognitive complexity 21 (threshold 15). Drivers by points: loops 3 (12 pts), match/switch 3 (6 pts), if/else 1 (3 pts) (nesting depth added 14). None of this is in the body itself: all 21 points belong to one function literal inside it that branches (line 75). 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.
Encoder.component (cognitive 21) pkg/sbom/io/encode.go:414— Encoder.component has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
testutil.purgeMetadata (cognitive 20) internal/testutil/util.go:98— testutil.purgeMetadata has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (6 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.
main.writeFlags (cognitive 20) REDACTED:100— main.writeFlags has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (3 pts), boolean chains 2 (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.
Scanner.detect (cognitive 20) pkg/detector/ospkg/redhat/redhat.go:93— Scanner.detect has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
gomodAnalyzer.fillAdditionalData (cognitive 20) pkg/fanal/analyzer/language/golang/mod/mod.go:162— gomodAnalyzer.fillAdditionalData has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (3 pts) (nesting depth added 9). Of this number, 17 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
apkRepoAnalyzer.Analyze (cognitive 20) pkg/fanal/analyzer/repo/apk/apk.go:31— apkRepoAnalyzer.Analyze has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Scanner.scanChunk (cognitive 20) pkg/fanal/secret/scanner.go:709— Scanner.scanChunk has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 8). 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.
CryptoIdentity.AlgorithmParameters (cognitive 20) pkg/fanal/types/crypto_descriptor.go:255— CryptoIdentity.AlgorithmParameters has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, match/switch 1 (2 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.
CryptoAssetInfo.Validate (cognitive 20) pkg/fanal/types/crypto.go:100— CryptoAssetInfo.Validate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 1, match/switch 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.
LayerTar.Walk (cognitive 20) pkg/fanal/walker/tar.go:35— LayerTar.Walk has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (17 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.
msk.adaptCluster (cognitive 20) pkg/iac/adapters/terraform/aws/msk/adapt.go:25— msk.adaptCluster has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (20 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.
adapter.adaptPublicAccessBlocks (cognitive 20) pkg/iac/adapters/terraform/aws/s3/public_access_block.go:7— adapter.adaptPublicAccessBlocks has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (4 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.
adapter.adaptBindings (cognitive 20) pkg/iac/adapters/terraform/google/storage/iam.go:24— adapter.adaptBindings has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Value.UnmarshalJSONFrom (cognitive 20) pkg/iac/scanners/azure/value.go:115— Value.UnmarshalJSONFrom has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 1, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
parser.expandProperties (cognitive 20) pkg/iac/scanners/cloudformation/parser/file_context.go:221— parser.expandProperties has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (4 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.
Marshaler.ratings (cognitive 20) pkg/sbom/cyclonedx/marshal.go:494— Marshaler.ratings has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4, loops 1 (nesting depth added 7). Of this number, 16 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
testutil.DecompressSparseGzip (cognitive 19) REDACTED:37— testutil.DecompressSparseGzip has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (17 pts), boolean chains 1, 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.
runner.initScannerConfig (cognitive 19) pkg/commands/artifact/run.go:573— runner.initScannerConfig has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 3 (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.
Scanner.Detect (cognitive 19) pkg/detector/ospkg/debian/debian.go:58— Scanner.Detect has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
analyzer.NewAnalyzerGroup (cognitive 19) pkg/fanal/analyzer/analyzer.go:396— analyzer.NewAnalyzerGroup has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
types.parseDescriptor (cognitive 19) pkg/fanal/types/crypto_descriptor.go:155— types.parseDescriptor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
funcs.parseTimestamp (cognitive 19) pkg/iac/scanners/terraform/parser/funcs/datetime.go:100— funcs.parseTimestamp has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 2 (5 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.
module.newWASMPlugin (cognitive 19) pkg/module/module.go:283— module.newWASMPlugin has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16 (18 pts), loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
Service.Scan (cognitive 19) pkg/scan/local/service.go:59— Service.Scan has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (2 pts), boolean chains 1, match/switch 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.
version.NewVersionInfo (cognitive 19) REDACTED:31— version.NewVersionInfo has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 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.
vex.New (cognitive 19) pkg/vex/vex.go:93— vex.New has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clean.Run (cognitive 18) pkg/commands/clean/run.go:17— clean.Run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 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.
AnalyzerGroup.PostAnalyze (cognitive 18) pkg/fanal/analyzer/analyzer.go:561— AnalyzerGroup.PostAnalyze has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
alpinePkgAnalyzer.parseApkInfo (cognitive 18) pkg/fanal/analyzer/pkg/apk/apk.go:54— alpinePkgAnalyzer.parseApkInfo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 1 (2 pts), boolean chains 1, 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.
image.getOCIImage (cognitive 18) pkg/fanal/image/oci.go:52— image.getOCIImage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (16 pts), boolean chains 1, 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.
CryptoDescriptor.validateKindKeyTypeMethod (cognitive 18) pkg/fanal/types/crypto_descriptor.go:90— CryptoDescriptor.validateKindKeyTypeMethod has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Options.Align (cognitive 18) pkg/flag/options.go:453— Options.Align has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ec2.getInstances (cognitive 18) pkg/iac/adapters/terraform/aws/ec2/adapt.go:27— ec2.getInstances has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (9 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.
iam.ConvertTerraformDocument (cognitive 18) pkg/iac/adapters/terraform/aws/iam/convert.go:75— iam.ConvertTerraformDocument has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 6 (7 pts) (nesting depth added 7). 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.
s3.applyForBucketRelatedResource (cognitive 18) pkg/iac/adapters/terraform/aws/s3/bucket.go:320— s3.applyForBucketRelatedResource has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (16 pts), boolean chains 1, 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.
adapter.adaptQueue (cognitive 18) pkg/iac/adapters/terraform/aws/sqs/adapt.go:97— adapter.adaptQueue has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
container.adaptCluster (cognitive 18) pkg/iac/adapters/terraform/azure/container/adapt.go:26— container.adaptCluster has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (18 pts) (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.
compute.adaptFirewallRule (cognitive 18) pkg/iac/adapters/terraform/google/compute/networks.go:107— compute.adaptFirewallRule has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Scanner.convertResults (cognitive 18) pkg/iac/rego/result.go:124— Scanner.convertResults has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 3 (6 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.
Parameters.UnmarshalJSONFrom (cognitive 18) pkg/iac/scanners/cloudformation/parser/parameter.go:99— Parameters.UnmarshalJSONFrom has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (5 pts), match/switch 1 (nesting depth added 10). 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.
Property.inferBool (cognitive 18) pkg/iac/scanners/cloudformation/parser/property.go:344— Property.inferBool has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (18 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.
Resource.inferBool (cognitive 18) pkg/iac/scanners/cloudformation/parser/resource.go:239— Resource.inferBool has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (18 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.
executor.ignoreByParams (cognitive 18) pkg/iac/scanners/terraform/executor/executor.go:202— executor.ignoreByParams has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, match/switch 1 (2 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.
funcs.MakeTemplateFileFunc (cognitive 18) pkg/iac/scanners/terraform/parser/funcs/filesystem.go:69— funcs.MakeTemplateFileFunc has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 3, boolean chains 2 (nesting depth added 3). None of this is in the body itself: all 18 points belong to 4 function literals inside it that branch (lines 98, 157, 82, …). 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.
Parser.ParseFS (cognitive 18) pkg/iac/scanners/terraform/parser/parser.go:159— Parser.ParseFS has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
terraform.NewBlock (cognitive 18) pkg/iac/terraform/block.go:38— terraform.NewBlock has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (9 pts), loops 3 (6 pts), match/switch 2, boolean chains 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Module.GetReferencedBlock (cognitive 18) pkg/iac/terraform/module.go:109— Module.GetReferencedBlock has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Module.GetReferencingBlocks (cognitive 18) pkg/iac/terraform/module.go:144— Module.GetReferencingBlocks has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (4 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.
Pipeline.Do (cognitive 18) pkg/parallel/pipeline.go:48— Pipeline.Do has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4 (5 pts), match/switch 2 (5 pts) (nesting depth added 8). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 60, 80). 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.
SarifWriter.Write (cognitive 18) pkg/report/sarif.go:128— SarifWriter.Write has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 5 (9 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.
SPDX.parsePackage (cognitive 18) pkg/sbom/spdx/unmarshal.go:174— SPDX.parsePackage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (12 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 3). 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.
pom.resolvePomRepos (cognitive 17) pkg/dependency/parser/java/pom/repository.go:35— pom.resolvePomRepos has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 4, 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.
pom.listProperties (cognitive 17) pkg/dependency/parser/java/pom/pom.go:83— pom.listProperties has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (7 pts), if/else 2 (6 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnalyzerGroup.AnalyzeFile (cognitive 17) pkg/fanal/analyzer/analyzer.go:474— AnalyzerGroup.AnalyzeFile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 7). Of this number, 12 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnalysisResult.Merge (cognitive 17) pkg/fanal/analyzer/analyzer.go:279— AnalysisResult.Merge has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 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.
alpineCmdAnalyzer.parseCommand (cognitive 17) pkg/fanal/analyzer/imgconf/apk/apk.go:147— alpineCmdAnalyzer.parseCommand has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 4 (6 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cargoAnalyzer.removeDevDependencies (cognitive 17) pkg/fanal/analyzer/language/rust/cargo/cargo.go:111— cargoAnalyzer.removeDevDependencies has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4 (5 pts), match/switch 1 (2 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.
sam.setFunctionPolicies (cognitive 17) pkg/iac/adapters/cloudformation/aws/sam/function.go:30— sam.setFunctionPolicies has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (3 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ec2.adaptVPC (cognitive 17) pkg/iac/adapters/terraform/aws/ec2/vpc.go:32— ec2.adaptVPC has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (16 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.
adapter.adaptBuckets (cognitive 17) pkg/iac/adapters/terraform/google/storage/adapt.go:23— adapter.adaptBuckets has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (9 pts), if/else 3 (7 pts), boolean chains 1 (nesting depth added 7). 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.
kubernetes.adaptNetworkPolicy (cognitive 17) pkg/iac/adapters/terraform/kubernetes/adapt.go:29— kubernetes.adaptNetworkPolicy has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (12 pts), if/else 3 (5 pts) (nesting depth added 10). 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.
parser.ResolveFindInMap (cognitive 17) REDACTED:9— parser.ResolveFindInMap has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, loops 1 (2 pts), match/switch 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.
Property.Contains (cognitive 17) pkg/iac/scanners/cloudformation/parser/property_helpers.go:238— Property.Contains has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), boolean chains 1, match/switch 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.
funcs.MakeToFunc (cognitive 17) pkg/iac/scanners/terraform/parser/funcs/conversion.go:20— funcs.MakeToFunc has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, match/switch 2 (4 pts) (nesting depth added 6). None of this is in the body itself: all 17 points belong to 2 function literals inside it that branch (lines 59, 38). 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.
counter.countBlockRecursion (cognitive 17) pkg/iac/scanners/terraform/parser/sort.go:32— counter.countBlockRecursion has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (4 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.
State.Merge (cognitive 17) pkg/iac/state/merge.go:9— State.Merge has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 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.
misconf.CreatePolicyFS (cognitive 17) pkg/misconf/scanner.go:436— misconf.CreatePolicyFS has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 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.
Decoder.decodeComponents (cognitive 17) pkg/sbom/io/decode.go:118— Decoder.decodeComponents has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 2, match/switch 1 (2 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.
jsoncParser.processNormalToken (cognitive 17) pkg/x/json/jsonc.go:166— jsoncParser.processNormalToken has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 2 (3 pts) (nesting depth added 10). 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.
main.fixtureTerraformPlanSnapshots (cognitive 16) magefiles/terraformplan.go:28— main.fixtureTerraformPlanSnapshots has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 5). Of this number, 11 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.resolveLinks (cognitive 16) pkg/dependency/parser/nodejs/npm/parse.go:225— Parser.resolveLinks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 pts) (nesting depth added 7). Of this number, 14 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.
alpineCmdAnalyzer.guessVersion (cognitive 16) pkg/fanal/analyzer/imgconf/apk/apk.go:235— alpineCmdAnalyzer.guessVersion has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mod.findLicense (cognitive 16) pkg/fanal/analyzer/language/golang/mod/mod.go:351— mod.findLicense has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 2 (4 pts), boolean chains 3, loops 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.
eks.adaptCluster (cognitive 16) pkg/iac/adapters/terraform/aws/eks/adapt.go:25— eks.adaptCluster has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (4 pts), match/switch 1 (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.
adapter.adaptBucketResource (cognitive 16) pkg/iac/adapters/terraform/google/storage/adapt.go:82— adapter.adaptBucketResource has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rego.LoadPoliciesFromDirs (cognitive 16) pkg/iac/rego/embed.go:79— rego.LoadPoliciesFromDirs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, loops 1 (nesting depth added 7). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 82). 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.
rego.parseCause (cognitive 16) pkg/iac/rego/result.go:75— rego.parseCause 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.
inventory.splitFields (cognitive 16) pkg/iac/scanners/ansible/inventory/ini.go:123— inventory.splitFields has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 8). Of this number, 15 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.
Parser.ParseFile (cognitive 16) pkg/iac/scanners/cloudformation/parser/parser.go:86— Parser.ParseFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 2, match/switch 2 (nesting depth added 2). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
ValueOptions.MergeValues (cognitive 16) pkg/iac/scanners/helm/parser/vals.go:25— ValueOptions.MergeValues has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (nesting depth added 6). Of this number, 14 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.
Scanner.scanChart (cognitive 16) pkg/iac/scanners/helm/scanner.go:181— Scanner.scanChart has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 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.
Scanner.findModules (cognitive 16) pkg/iac/scanners/terraform/scanner.go:190— Scanner.findModules has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (3 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.
commands.clusterRun (cognitive 16) pkg/k8s/commands/cluster.go:20— commands.clusterRun has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
licensing.SplitLicenses (cognitive 16) pkg/licensing/normalize.go:712— licensing.SplitLicenses has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 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.
parallel.WalkDir (cognitive 16) pkg/parallel/walk.go:19— parallel.WalkDir has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 3 (4 pts), match/switch 1 (nesting depth added 4). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 28, 62). 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.
remote.tryGet (cognitive 16) pkg/remote/remote.go:36— remote.tryGet has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vulnerabilityRenderer.setVulnerabilityRows (cognitive 16) pkg/report/table/vulnerability.go:132— vulnerabilityRenderer.setVulnerabilityRows has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Marshaler.marshalVulnerabilities (cognitive 16) pkg/sbom/cyclonedx/marshal.go:208— Marshaler.marshalVulnerabilities has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (13 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.
BOM.parseBOM (cognitive 16) pkg/sbom/cyclonedx/unmarshal.go:65— BOM.parseBOM has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Encoder.encodePackages (cognitive 16) pkg/sbom/io/encode.go:222— Encoder.encodePackages has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (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.
traceTransport.redactBody (cognitive 16) REDACTED:283— traceTransport.redactBody has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 6). Of this number, 14 points are the body's own statements and 2 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.
MethodTooLong: SarifWriter.Write pkg/report/sarif.go:128— MethodTooLong — Write runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18× 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.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×1
Change-coupling hub: import.go → driver.go, const.go, const.go, purl.go pkg/fanal/analyzer/all/import.go— `pkg/fanal/analyzer/all/import.go` changes together with 4 other files — `pkg/detector/library/driver.go`, `pkg/fanal/analyzer/const.go`, `pkg/fanal/types/const.go`, `pkg/purl/purl.go` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
Duplicated block (32 lines × 2) pkg/iac/scanners/cloudformation/parser/property.go:345— pkg/iac/scanners/cloudformation/parser/property.go:345-376 | pkg/iac/scanners/cloudformation/parser/resource.go:240-271 — 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 (30 lines × 2) pkg/report/table/misconfig.go:186— pkg/report/table/misconfig.go:186-215 | pkg/report/table/secret.go:140-169 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/report/table/misconfig.go:186` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (24–25 lines × 2) REDACTED:474— REDACTED:474-497 | pkg/fanal/artifact/vm/vm.go:112-136 — 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:474` 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 (23 lines × 2) pkg/detector/ospkg/rootio/rootio.go:127— pkg/detector/ospkg/rootio/rootio.go:127-149 | pkg/detector/ospkg/seal/seal.go:158-180 — `pkg/detector/ospkg/rootio/rootio.go` and `pkg/detector/ospkg/seal/seal.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 52 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (22 lines × 3) pkg/detector/ospkg/chainguard/chainguard.go:51— pkg/detector/ospkg/chainguard/chainguard.go:51-72 | pkg/detector/ospkg/minimos/minimos.go:52-73 | pkg/detector/ospkg/wolfi/wolfi.go:52-73 — `pkg/detector/ospkg/chainguard/chainguard.go` and `pkg/detector/ospkg/minimos/minimos.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 55 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/detector/ospkg/chainguard/chainguard.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 (20–21 lines × 2) pkg/detector/ospkg/alma/alma.go:64— pkg/detector/ospkg/alma/alma.go:64-83 | pkg/detector/ospkg/rocky/rocky.go:58-78 — `pkg/detector/ospkg/alma/alma.go` and `pkg/detector/ospkg/rocky/rocky.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 40 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/detector/ospkg/alma/alma.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 (21 lines × 2) pkg/iac/adapters/terraform/azure/appservice/adapt.go:45— pkg/iac/adapters/terraform/azure/appservice/adapt.go:45-65 | pkg/iac/adapters/terraform/azure/appservice/adapt.go:93-113 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/adapters/terraform/azure/appservice/adapt.go:45` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `pkg/iac/adapters/terraform/azure/appservice/adapt.go:92` calls `StringDefault`, `GetMetadata` and `pkg/iac/adapters/terraform/azure/appservice/adapt.go:44` 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 (18–20 lines × 2) pkg/iac/adapters/terraform/azure/compute/adapt.go:74— pkg/iac/adapters/terraform/azure/compute/adapt.go:74-91 | pkg/iac/adapters/terraform/azure/compute/adapt.go:114-133 — 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 (19 lines × 3) pkg/detector/ospkg/oracle/oracle.go:72— pkg/detector/ospkg/oracle/oracle.go:72-90 | pkg/detector/ospkg/photon/photon.go:61-79 | pkg/detector/ospkg/suse/suse.go:138-156 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/detector/ospkg/oracle/oracle.go:72` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `pkg/detector/ospkg/oracle/oracle.go:68` calls `PackageFlavor` and `pkg/detector/ospkg/photon/photon.go:60` 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 (17–18 lines × 2) pkg/detector/ospkg/rootio/rootio.go:84— pkg/detector/ospkg/rootio/rootio.go:84-101 | pkg/detector/ospkg/seal/seal.go:109-125 — `pkg/detector/ospkg/rootio/rootio.go` and `pkg/detector/ospkg/seal/seal.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 52 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/detector/ospkg/rootio/rootio.go:84` 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 lines × 3) pkg/k8s/scanner/scanner.go:277— pkg/k8s/scanner/scanner.go:277-291 | pkg/k8s/scanner/scanner.go:323-337 | pkg/k8s/scanner/scanner.go:358-372 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/k8s/scanner/scanner.go:277` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–15 lines × 2) pkg/iac/adapters/cloudformation/aws/sam/function.go:38— pkg/iac/adapters/cloudformation/aws/sam/function.go:38-51 | pkg/iac/adapters/cloudformation/aws/sam/state_machines.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 `pkg/iac/adapters/cloudformation/aws/sam/state_machines.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11–14 lines × 2) pkg/iac/scanners/helm/parser/parser.go:85— pkg/iac/scanners/helm/parser/parser.go:85-95 | pkg/iac/scanners/helm/scanner.go:67-80 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/scanners/helm/scanner.go:67` 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 (4–13 lines × 6) pkg/iac/scanners/terraform/parser/funcs/cidr.go:17— pkg/iac/scanners/terraform/parser/funcs/cidr.go:17-29 | pkg/iac/scanners/terraform/parser/funcs/cidr.go:76-92 | pkg/iac/scanners/terraform/parser/funcs/crypto.go:30-33 | pkg/iac/scanners/terraform/parser/funcs/crypto.go:43-55 | pkg/iac/scanners/terraform/parser/funcs/crypto.go:146-158 | pkg/iac/scanners/terraform/parser/funcs/string.go:92-108 — there are 6 copies across 3 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 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/scanners/terraform/parser/funcs/cidr.go:17` 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–12 lines × 2) pkg/commands/app.go:399— pkg/commands/app.go:399-410 | pkg/commands/app.go:760-770 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/commands/app.go:399` 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 (11 lines × 8) pkg/commands/app.go:386— pkg/commands/app.go:386-396 | pkg/commands/app.go:454-464 | pkg/commands/app.go:516-526 | pkg/commands/app.go:567-577 | pkg/commands/app.go:740-750 | pkg/commands/app.go:1081-1091 | pkg/commands/app.go:1151-1161 | pkg/commands/app.go:1234-1244 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/commands/app.go:386` 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 × 4) pkg/detector/ospkg/alpine/alpine.go:105— pkg/detector/ospkg/alpine/alpine.go:105-115 | pkg/detector/ospkg/chainguard/chainguard.go:51-61 | pkg/detector/ospkg/minimos/minimos.go:52-62 | pkg/detector/ospkg/wolfi/wolfi.go:52-62 — `pkg/detector/ospkg/chainguard/chainguard.go` and `pkg/detector/ospkg/minimos/minimos.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 55 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/detector/ospkg/alpine/alpine.go:105` 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–10 lines × 10) pkg/commands/app.go:323— pkg/commands/app.go:323-332 | pkg/commands/app.go:385-391 | pkg/commands/app.go:453-459 | pkg/commands/app.go:515-521 | pkg/commands/app.go:566-572 | pkg/commands/app.go:622-628 | pkg/commands/app.go:739-745 | pkg/commands/app.go:1080-1086 | pkg/commands/app.go:1150-1156 | pkg/commands/app.go:1233-1239 — all 10 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/commands/app.go:323` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `pkg/commands/app.go:392` calls `Bind`, `Errorf` and `pkg/commands/app.go:333` 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 (9–10 lines × 2) pkg/iac/adapters/terraform/aws/apigateway/apiv1.go:106— pkg/iac/adapters/terraform/aws/apigateway/apiv1.go:106-115 | pkg/iac/adapters/terraform/aws/apigateway/apiv2.go:61-69 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/iac/adapters/terraform/aws/apigateway/apiv1.go:106` 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 (8 lines × 9) pkg/commands/app.go:391— pkg/commands/app.go:391-398 | pkg/commands/app.go:459-466 | pkg/commands/app.go:521-528 | pkg/commands/app.go:572-579 | pkg/commands/app.go:678-685 | pkg/commands/app.go:745-752 | pkg/commands/app.go:1086-1093 | pkg/commands/app.go:1156-1163 | pkg/commands/app.go:1239-1246 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/commands/app.go:391` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 5) pkg/commands/app.go:392— pkg/commands/app.go:392-398 | pkg/commands/app.go:460-466 | pkg/commands/app.go:522-528 | pkg/commands/app.go:631-637 | pkg/commands/app.go:1240-1246 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `pkg/commands/app.go:629` calls `Warn` and `pkg/commands/app.go:391` 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 (6 lines × 4) pkg/commands/app.go:957— pkg/commands/app.go:957-962 | pkg/commands/app.go:981-986 | pkg/commands/app.go:1279-1284 | pkg/commands/app.go:1327-1332 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/commands/app.go:957` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `pkg/commands/app.go:1325` calls `ExactArgs` and `pkg/commands/app.go:1277` 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 × 3) pkg/detector/ospkg/chainguard/chainguard.go:74— pkg/detector/ospkg/chainguard/chainguard.go:74-85 | pkg/detector/ospkg/minimos/minimos.go:75-86 | pkg/detector/ospkg/wolfi/wolfi.go:75-86 — `pkg/detector/ospkg/chainguard/chainguard.go` and `pkg/detector/ospkg/minimos/minimos.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 55 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (7 lines × 11) pkg/fanal/analyzer/config/ansible/ansible.go:26— pkg/fanal/analyzer/config/ansible/ansible.go:26-32 | pkg/fanal/analyzer/config/azurearm/azurearm.go:28-34 | pkg/fanal/analyzer/config/cloudformation/cloudformation.go:24-30 | pkg/fanal/analyzer/config/dockerfile/docker.go:30-36 | pkg/fanal/analyzer/config/helm/helm.go:31-37 | pkg/fanal/analyzer/config/json/json.go:26-32 | pkg/fanal/analyzer/config/k8s/k8s.go:24-30 | pkg/fanal/analyzer/config/terraform/terraform.go:26-32 | pkg/fanal/analyzer/config/terraformplan/json/json.go:33-39 | pkg/fanal/analyzer/config/terraformplan/snapshot/snapshot.go:27-33 | pkg/fanal/analyzer/config/yaml/yaml.go:26-32 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 11 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 11 times.
Duplicated block (12 lines × 4) pkg/fanal/analyzer/language/julia/pkg/pkg.go:75— pkg/fanal/analyzer/language/julia/pkg/pkg.go:75-86 | pkg/fanal/analyzer/language/php/composer/composer.go:67-79 | pkg/fanal/analyzer/language/python/pylock/pylock.go:66-77 | pkg/fanal/analyzer/language/rust/cargo/cargo.go:80-92 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/fanal/analyzer/language/julia/pkg/pkg.go:75` 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 (8 lines × 3) REDACTED:55— REDACTED:55-63 | pkg/fanal/artifact/local/fs.go:57-65 | pkg/fanal/artifact/vm/vm.go:40-47 — 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. 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.
Near-duplicate member pair (41 shared lines) pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:623— pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:623-674 | pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py:623-674 — These two members are variants of one another: 41 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.
Duplicated block (62 lines × 2) pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:418— pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:418-479 | pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py:418-479 — before extracting anything, compare `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py` and `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:418` 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 (59 lines × 2) pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:343— pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:343-401 | pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py:343-401 — before extracting anything, compare `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py` and `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (20 lines × 2) pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:632— pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:632-651 | pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py:632-651 — before extracting anything, compare `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py` and `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (19 lines × 2) pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:168— pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:168-186 | pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py:168-186 — before extracting anything, compare `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py` and `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (39 lines × 2) pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:573— pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:573-611 | pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py:573-611 — before extracting anything, compare `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py` and `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir_v2/p/opens464b5c427ce9d/e/conanfile.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/fanal/analyzer/language/c/conan/testdata/cacheDir/.conan/data/openssl/3.0.5/_/_/export/conanfile.py:573` 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.
Coverage not measured — JavaScript/TypeScript suite — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — pkg/fanal/analyzer/language/nodejs/pkg/testdata/ runs mocha but declares no coverage provider, so the suite can run and still produce no lcov — add `c8` (or `nyc`) as a devDependency so the suite can be wrapped for coverage. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
No DR/backup evidence — A persistence guard (data volume / purge-protection) was found, but no backup, geo-recovery or RTO/RPO controls were evidenced — a volume that survives a container recreate is not a tested restore from catastrophic loss.
Orphaned file pkg/iac/adapters/terraform/google/gke/adapt.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/iac/adapters/terraform/aws/rds/adapt.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/iac/adapters/terraform/aws/ec2/vpc.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/iac/scanners/terraform/parser/funcs/crypto.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/k8s/report/report.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/iac/adapters/terraform/aws/provider/adapt.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/report/table/misconfig.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/iac/adapters/terraform/azure/network/adapt.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/iac/adapters/arm/network/adapt.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/iac/scanners/terraform/parser/funcs/encoding.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/iac/adapters/terraform/azure/compute/adapt.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/iac/adapters/terraform/google/sql/adapt.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/iac/scanners/terraform/parser/funcs/cidr.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/iac/adapters/terraform/google/storage/adapt.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/iac/adapters/terraform/google/compute/networks.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/dependency/parser/nodejs/bun/parse.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/iac/adapters/terraform/aws/sqs/adapt.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/report/github/github.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/fanal/walker/vm.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/fanal/analyzer/language/julia/pkg/pkg.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/iac/adapters/terraform/google/compute/instances.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/iac/adapters/terraform/azure/database/mssql.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/iac/adapters/terraform/azure/keyvault/adapt.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/iac/scanners/cloudformation/parser/property_helpers.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/iac/adapters/cloudformation/aws/rds/instance.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
README/code drift docs/guide/configuration/cache.md:105— docs/guide/configuration/cache.md links to `Downloaded`, but `docs/guide/configuration/Downloaded` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs/guide/configuration/filtering.md:537— docs/guide/configuration/filtering.md links to `license`, but `docs/guide/configuration/license` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs/guide/configuration/reporting.md:672— docs/guide/configuration/reporting.md links to `To`, but `docs/guide/configuration/To` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs/guide/configuration/skipping.md:108— docs/guide/configuration/skipping.md links to `Only`, but `docs/guide/configuration/Only` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs/guide/scanner/vulnerability.md:160— docs/guide/scanner/vulnerability.md links to `Intentional`, but `docs/guide/scanner/Intentional` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs/guide/scanner/vulnerability.md:363— docs/guide/scanner/vulnerability.md links to `Some`, but `docs/guide/scanner/Some` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs/guide/target/container_image.md:318— docs/guide/target/container_image.md documents the environment variable `PODMAN_SYSTEM_SERVICE_PID`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs/tutorials/misconfiguration/terraform.md:32— docs/tutorials/misconfiguration/terraform.md changes into `bad_iac/terraform`, but no such folder exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs/guide/advanced/private-registries/acr.md:9— docs/guide/advanced/private-registries/acr.md documents the environment variable `SP_DATA`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs/guide/references/modes/client-server.md:352— docs/guide/references/modes/client-server.md links to `The`, but `docs/guide/references/modes/The` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs/guide/supply-chain/attestation/rekor.md:23— docs/guide/supply-chain/attestation/rekor.md documents the environment variable `COSIGN_EXPERIMENTAL`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
Duplicated predicate pkg/iac/scanners/terraform/parser/load_module.go:67— `!sourceVal.IsKnown() || sourceVal.Type() != cty.String` appears character-identically in 2 files — pkg/iac/scanners/terraform/parser/load_module.go, pkg/iac/scanners/terraform/parser/modules.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate pkg/report/table/misconfig.go:194— `(line.FirstCause && line.LastCause) || len(lines) == 1` appears character-identically in 2 files — pkg/report/table/misconfig.go, pkg/report/table/secret.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate pkg/fanal/analyzer/licensing/license.go:138— `b < 7 || b == 11 || (13 < b && b < 27) || (27 < b && b < 0x20) || b == 0x7f` appears character-identically in 2 files — pkg/fanal/analyzer/licensing/license.go, pkg/fanal/utils/utils.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate pkg/iac/adapters/terraform/aws/ecr/adapt.go:80— `dataBlock.Type() == "data" && dataBlock.TypeLabel() == "aws_iam_policy_document"` appears character-identically in 3 files — pkg/iac/adapters/terraform/aws/ecr/adapt.go, pkg/iac/adapters/terraform/aws/iam/convert.go, pkg/iac/adapters/terraform/aws/sqs/adapt.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate pkg/fanal/analyzer/language/dotnet/nuget/nuget.go:90— `err != nil && !errors.Is(err, fs.ErrNotExist)` appears character-identically in 4 files — pkg/fanal/analyzer/language/dotnet/nuget/nuget.go, pkg/fanal/analyzer/language/golang/mod/mod.go, REDACTED, pkg/iac/scanners/ansible/parser/role.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate pkg/fanal/analyzer/language/nodejs/bun/bun.go:96— `fileName == types.NpmPkg && xpath.Contains(filePath, "node_modules")` appears character-identically in 3 files — pkg/fanal/analyzer/language/nodejs/bun/bun.go, pkg/fanal/analyzer/language/nodejs/npm/npm.go, pkg/fanal/analyzer/language/nodejs/pnpm/pnpm.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate pkg/purl/purl.go:219— `p.Type == packageurl.TypeMaven || p.Type == packageurl.TypeGradle` appears character-identically in 3 files — pkg/purl/purl.go, pkg/sbom/io/decode.go, pkg/sbom/spdx/marshal.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate pkg/vex/openvex.go:78— `product == nil || product.PkgIdentifier.PURL == nil` appears character-identically in 2 files — pkg/vex/openvex.go, pkg/vex/repo.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate pkg/report/table/summary.go:57— `result.Class == types.ClassOSPkg || result.Class == types.ClassLangPkg` appears character-identically in 2 files — pkg/report/table/summary.go, pkg/sbom/io/encode.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 pkg/dependency/parser/golang/binary/elf.go:77— `readELFSymbolString` 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 pkg/dependency/parser/java/jar/parse.go:843— `properties` turns a non-nil `err` into `return Properties{}` — 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 pkg/iac/adapters/terraform/google/iam/project_iam.go:197— `resolveProjectBlockID` 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 pkg/notification/identifier.go:42— `uniqueIdentifier` 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.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 30 significant file(s) lose their only recent owner: pkg/iac/terraform/attribute.go, pkg/crypto/parser/x509/parser.go, pkg/iac/adapters/terraform/aws/s3/bucket.go, pkg/fanal/secret/keyword.go, pkg/iac/scanners/ansible/parser/node.go, pkg/iac/scan/result.go, REDACTED, pkg/mapfs/file.go (+22 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: pkg/vex/oci/oci.go, pkg/detector/ospkg/seal/seal.go, pkg/dependency/parser/java/pom/mirror.go, pkg/fanal/analyzer/language/analyze.go, pkg/fanal/analyzer/secret/secret.go, pkg/fanal/handler/sysfile/filter.go. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 3 significant file(s) lose their only recent owner: pkg/plugin/manager.go, pkg/scan/service.go, pkg/vex/repo.go. Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 5 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (44 single-owned of 439 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 439 of the 1014 production source files in this repository met that bar). They are anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)), anonymized user #7 (1 file(s)), anonymized user #8 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: pkg/dependency/parser/conda/environment/parse.go, pkg/x/os/os.go, pkg/iac/adapters/arm/container/adapt.go, pkg/iac/adapters/cloudformation/aws/ec2/instance.go, pkg/iac/adapters/cloudformation/aws/cloudfront/distribution.go.
No ADRs found — 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/`.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 1 of 1 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (108276 LoC, 1700 module-visible types across 521 directories). 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
REDACTED
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 92 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: pkg/iac/scanners/terraform/parser/funcs/crypto.go, pkg/iac/adapters/terraform/google/gke/adapt.go, pkg/k8s/report/report.go, pkg/report/table/misconfig.go, pkg/iac/scanners/terraform/parser/funcs/encoding.go, pkg/iac/adapters/terraform/aws/rds/adapt.go, pkg/iac/scanners/terraform/parser/funcs/cidr.go, pkg/dependency/parser/nodejs/bun/parse.go (and 84 more) (93 orphaned of 439 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 439 of the 1014 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D40 · Network Egress Confinement· No network policy · ×1
No network policy — No Kubernetes NetworkPolicy (or Cilium policy) found. Without one, every pod can talk to every other pod and reach out to the internet by default. Add a default-deny policy and open only the flows you need.
No runtime threat detection — No runtime threat-detection engine (Tetragon TracingPolicy / Falco) is committed. These observe process, file and network activity in-kernel and can alert or kill on malicious behaviour a static scan cannot catch.
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.
No release approval gate — Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it.
X2 · Cancellation propagation· Not all functions that make a request accept a context.Context · ×1
Not all functions that make a request accept a context.Context — Only 5/10 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.
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 7 file(s) — `contrib/junit.tpl`, `pkg/dependency/parser/python/pyproject/pyproject.go`, `pkg/flag/kubernetes_flags.go`, `pkg/flag/options.go`, `REDACTED`, … (+2 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
Run 01a16bb7-cbce-7a2d-b48d-5437cb0778b7 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 17 · Warnings: 655 · Recommendations: 138 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 24-10-2026 @ 02:22 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.