{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D16","name":"Bus Factor","shortDescription":{"text":"Bus Factor"},"helpUri":"https://codehealth.canine.dev/dimensions/D16"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D21","name":"Naming Consistency","shortDescription":{"text":"Naming Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D21"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"]}},{"id":"D31","name":"IaC \u0026 Container Security","shortDescription":{"text":"IaC \u0026 Container Security"},"helpUri":"https://codehealth.canine.dev/dimensions/D31","relationships":[{"target":{"id":"CWE-1032","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-732","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-16","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1032","CWE-732","CWE-16"]}},{"id":"D33","name":"JS/npm Dependency Vulnerabilities","shortDescription":{"text":"JS/npm Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D33","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"]}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"]}},{"id":"D37","name":"Vulnerability-disclosure Policy","shortDescription":{"text":"Vulnerability-disclosure Policy"},"helpUri":"https://codehealth.canine.dev/dimensions/D37","relationships":[{"target":{"id":"CWE-1059","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1059"]}},{"id":"D38","name":"OSV Dependency Vulnerabilities","shortDescription":{"text":"OSV Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D38","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"]}},{"id":"D40","name":"Network Egress Confinement","shortDescription":{"text":"Network Egress Confinement"},"helpUri":"https://codehealth.canine.dev/dimensions/D40"},{"id":"D41","name":"Kernel \u0026 Syscall Confinement","shortDescription":{"text":"Kernel \u0026 Syscall Confinement"},"helpUri":"https://codehealth.canine.dev/dimensions/D41"},{"id":"D42","name":"Runtime Threat Enforcement","shortDescription":{"text":"Runtime Threat Enforcement"},"helpUri":"https://codehealth.canine.dev/dimensions/D42"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"applier.ApplyLayers (cyclomatic 34): applier.ApplyLayers has cyclomatic complexity 34 (threshold 15). Of this number, 25 points are the body\u0027s own statements and 9 belong to 3 function literals inside it that branch. 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/applier/docker.go"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"345976b709e037fe17a1f001f5333019f68c1e96f097c1db9024764df9a0896a"}},{"ruleId":"D1","level":"warning","message":{"text":"funcs.parseIPv6 (cyclomatic 26): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/terraform/parser/funcs/ip.go"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc0d9d862857cd4827454744cd5ee4cc245f3d5c2ba3ef79a4eac33509e7f8d7"}},{"ruleId":"D1","level":"warning","message":{"text":"registryResolver.Resolve (cyclomatic 24): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/terraform/parser/resolvers/registry.go"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0cd1dcf725def91d3a6f566c2291c363f9e7184259fcf2271a517db81889bfe"}},{"ruleId":"D1","level":"warning","message":{"text":"Parser.parseRoot (cyclomatic 23): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/java/pom/parse.go"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"04c2f9c96387dabf015b7a5c7ad21d5cf61307429304bb9a0b38a91466311afb"}},{"ruleId":"D1","level":"warning","message":{"text":"terraform.RewriteExpr (cyclomatic 23): 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\u0027s 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 \u2014 they stay explicit and reviewable."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/terraform/attribute.go"},"region":{"startLine":853}}}],"partialFingerprints":{"codehealthFindingId/v1":"a567c5f9e37d0bbeab1cb9d94281f578e5ead6fb634b0a594d16972863f83a1d"}},{"ruleId":"D1","level":"warning","message":{"text":"alpinePkgAnalyzer.parseApkInfo (cyclomatic 20): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/pkg/apk/apk.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"851d602e49cb707ebde35257f4b32ff17ed7bc56b93d42be04bbbad7e1ed1de0"}},{"ruleId":"D1","level":"warning","message":{"text":"iam.parseStatement (cyclomatic 20): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/aws/iam/convert.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf85e3bf374470317b376730817d13f34ee1c378c9f513a09c5fd06dc74cb542"}},{"ruleId":"D1","level":"warning","message":{"text":"report.Write (cyclomatic 20): report.Write has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/report/writer.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"2058887022819db1d1f480d3f89557648d78c2b6d0d3eda8188af5389f1d2b66"}},{"ruleId":"D1","level":"warning","message":{"text":"Flag.Add (cyclomatic 19): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/flag/options.go"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"f74b8a836d36fe9df38af3e9bd875a665b2bfc09553ff78fd2f42f6bcecb9dd1"}},{"ruleId":"D1","level":"warning","message":{"text":"ReportFlagGroup.ToOptions (cyclomatic 19): ReportFlagGroup.ToOptions 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/flag/report_flags.go"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e13f581b960bc8675f716ff5a708143306277217e38dfb87c6ee65f85171305"}},{"ruleId":"D1","level":"warning","message":{"text":"secretRenderer.renderCode (cyclomatic 19): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/report/table/secret.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"002ec0156923b51576d7ccba123010f453696a16514864954b7cc27e62513512"}},{"ruleId":"D1","level":"warning","message":{"text":"clean.Run (cyclomatic 18): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/commands/clean/run.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd12c64e6daeccb4e1523f2df440a161808d229caf8fe656a00c0d4d8a8b3025"}},{"ruleId":"D1","level":"warning","message":{"text":"jar.parseManifest (cyclomatic 18): jar.parseManifest has cyclomatic complexity 18 (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 \u2014 the same kind of value, with no behaviour of its own \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/java/jar/parse.go"},"region":{"startLine":614}}}],"partialFingerprints":{"codehealthFindingId/v1":"91435d47780873c34db94a2da60ded84208ed562c74ab532cdc30bc4d2d2847c"}},{"ruleId":"D1","level":"warning","message":{"text":"Parser.traverseZip (cyclomatic 18): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/java/jar/parse.go"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9c60b5e7441f099a3e957c2d387f7946a3761d3443a976e6abb6c0327153002"}},{"ruleId":"D1","level":"warning","message":{"text":"Parser.parseV2 (cyclomatic 18): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/nodejs/npm/parse.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"31ca370e21d5cec60fc4543139d12f98162a07f6e2ecc3af7ea9c021a4a877c8"}},{"ruleId":"D1","level":"warning","message":{"text":"sealSecurity.Match (cyclomatic 18): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/detector/library/seal/seal.go"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4c2ef7d078a37b22e5ebb59e20728b341ed03a69bd106ebbcb42313b61afdd8"}},{"ruleId":"D1","level":"warning","message":{"text":"StaticMetadata.populate (cyclomatic 18): StaticMetadata.populate has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/rego/metadata.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f6930b419ae92b372cd90ce61e158c1ad26a9ed4328123a2af6b6ab7d9cdf1d"}},{"ruleId":"D1","level":"warning","message":{"text":"Value.UnmarshalJSONFrom (cyclomatic 18): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/azure/value.go"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f2d47e15688cb26d657bf1119dfc4caf329a9b4cd7eda380e50598a75579f03"}},{"ruleId":"D1","level":"warning","message":{"text":"expression.NewLexer (cyclomatic 18): 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\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/licensing/expression/lexer.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"d68bad4f0c677007be1fce97dbe72f35daca6a4d06dcb8ebb4b147cad3a60092"}},{"ruleId":"D1","level":"warning","message":{"text":"module.newWASMPlugin (cyclomatic 18): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/module/module.go"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5a6a6e3a51f54b9764919df540f1c675e9f15fe49fda8bd116d5307136d385f"}},{"ruleId":"D1","level":"warning","message":{"text":"Parser.fetchPOMFromRemoteRepositories (cyclomatic 17): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/java/pom/parse.go"},"region":{"startLine":840}}}],"partialFingerprints":{"codehealthFindingId/v1":"941938e5cca4825eb59d7ce3361dbf3ddb253c3f1847dc5a2f08f66d6eaad8f0"}},{"ruleId":"D1","level":"warning","message":{"text":"Artifact.Inspect (cyclomatic 17): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/artifact/local/fs.go"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"308e84e329fcfe7e2a843de814165f87fab002ac2a6fbfc16d42f54d51fd738a"}},{"ruleId":"D1","level":"warning","message":{"text":"adapter.adaptQueues (cyclomatic 17): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/aws/sqs/adapt.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"586078c664b3f4c3f2894eed42a1b65eb72bb5b05e81554654b3a7e9c16dda4f"}},{"ruleId":"D1","level":"warning","message":{"text":"storage.adaptAccounts (cyclomatic 17): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/azure/storage/adapt.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"c70817fac03ffbdd02e5c770d5821802f91c5ed5febdf06c3594920590299ff2"}},{"ruleId":"D1","level":"warning","message":{"text":"Node.subtree (cyclomatic 17): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/ansible/parser/node.go"},"region":{"startLine":491}}}],"partialFingerprints":{"codehealthFindingId/v1":"33dcab61c62f610c443707268646e39b4029d8cda93b80136e5bd36663834803"}},{"ruleId":"D1","level":"warning","message":{"text":"Property.EqualTo (cyclomatic 17): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/cloudformation/parser/property_helpers.go"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"214d22adbf5830d2def1ae71616cee9a7356c17f280af6fd60e5b6bb5ad7c7dd"}},{"ruleId":"D1","level":"warning","message":{"text":"funcs.parseTimestamp (cyclomatic 17): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/terraform/parser/funcs/datetime.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"c66b4167ddb346711816dfb457d9a104468ef45b4b44ad164d5813756889fec3"}},{"ruleId":"D1","level":"warning","message":{"text":"Scanner.Scan (cyclomatic 17): Scanner.Scan has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/k8s/scanner/scanner.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"38cc89d7199aa4ac6c4058d48755f61aeec833886618f24d5a4d9e128ee86495"}},{"ruleId":"D1","level":"warning","message":{"text":"Scanner.scanK8sVulns (cyclomatic 17): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/k8s/scanner/scanner.go"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"b103bb5907499a4b6474f1bc0a4435df3fd9389373235f1b6f5b70e4b4fa124a"}},{"ruleId":"D1","level":"warning","message":{"text":"misconfigRenderer.renderCode (cyclomatic 17): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/report/table/misconfig.go"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d97abad0ec4ed131b120e13eb4036a1774ad65b08d3fe670faac9495ef9fb6f"}},{"ruleId":"D1","level":"warning","message":{"text":"SPDX.parsePackage (cyclomatic 17): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/sbom/spdx/unmarshal.go"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba7855ba52a7ba3bbcb97bc8c8a0a5c4d6f4d45f6a582b5549a025f27aea500d"}},{"ruleId":"D1","level":"warning","message":{"text":"runner.initScannerConfig (cyclomatic 16): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/commands/artifact/run.go"},"region":{"startLine":568}}}],"partialFingerprints":{"codehealthFindingId/v1":"c962943ebbd3a6634758387fe594f8d48817f25e54656a08461eec7bcdb22e42"}},{"ruleId":"D1","level":"warning","message":{"text":"Parser.Parse (cyclomatic 16): Parser.Parse 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/golang/mod/parse.go"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2ddba43e9f9ed2c2b466f9d19fd0b5ae2c957e492c86f67e1bc0b2a6e7677c8"}},{"ruleId":"D1","level":"warning","message":{"text":"pom.resolveMirrors (cyclomatic 16): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/java/pom/mirror.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"b02792a7e8ca5fc117cdcdc8d78ef1b024128a8e3ff00f455dc7f5befde3fe3d"}},{"ruleId":"D1","level":"warning","message":{"text":"Parser.Parse (cyclomatic 16): Parser.Parse has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/nodejs/bun/parse.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef109edfe54257725a81fe3b837bc79d4c2920f4fea068881b504c24a638ba73"}},{"ruleId":"D1","level":"warning","message":{"text":"dockerfileAnalyzer.Analyze (cyclomatic 16): dockerfileAnalyzer.Analyze has cyclomatic complexity 16 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/buildinfo/dockerfile.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"e14b40e6036dd21a8ea443dde0913c9612c9f1d13c42d3f03bd91d432526e3ee"}},{"ruleId":"D1","level":"warning","message":{"text":"mod.findLicense (cyclomatic 16): mod.findLicense has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/language/golang/mod/mod.go"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bd7c69657b8621292c09e831772b208ab71d4920b030009f41812cc5762b416"}},{"ruleId":"D1","level":"warning","message":{"text":"sql.adaptFlags (cyclomatic 16): 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 \u2014 the same kind of value, with no behaviour of its own \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/google/sql/adapt.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"c320796901ccc97040a905c55c47f2b3dff7df799ff82c8252b6fc764c7e6a20"}},{"ruleId":"D1","level":"warning","message":{"text":"detection.detectKubernetes (cyclomatic 16): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/detection/detect.go"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"d689664533189850b53d0bd85c66cd9411dbc15348d35ce3f987dd7aaf55e49a"}},{"ruleId":"D1","level":"warning","message":{"text":"inventory.ParseINI (cyclomatic 16): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/ansible/inventory/ini.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a7d0797b0443003fd92ba11a825a909db1ff54b78da07f21e3035cc7a4c888b"}},{"ruleId":"D1","level":"warning","message":{"text":"functions.Take (cyclomatic 16): functions.Take 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/azure/functions/take.go"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3732ba618dffb7bff1fc4c06de80c7bf69ccd84ff275b7959b60858a283ec6b"}},{"ruleId":"D1","level":"warning","message":{"text":"Parser.ParseFile (cyclomatic 16): Parser.ParseFile has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/cloudformation/parser/parser.go"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"45d758e97eb9e252576760c341c4cc1d5ef44da9bb8b74f3ba61d8db75b93dad"}},{"ruleId":"D1","level":"warning","message":{"text":"evaluator.expandBlockForEaches (cyclomatic 16): evaluator.expandBlockForEaches has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/terraform/parser/evaluator.go"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ce96efbc015d941bacec3e9c33dfea2b84dd001415b5b5a0b77e812c1b551f3"}},{"ruleId":"D1","level":"warning","message":{"text":"funcs.MakeTemplateFileFunc (cyclomatic 16): 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, \u2026). 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\u0027 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/terraform/parser/funcs/filesystem.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ea94339b75e1a8c3bc1c4111565eb7686a0092156cce352f4f191ea76ff33ee"}},{"ruleId":"D1","level":"warning","message":{"text":"Attribute.getStringValues (cyclomatic 16): Attribute.getStringValues has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/terraform/attribute.go"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"764dcf28be49e676f6e0eae002f661c5e4732b0fc9f04df108dbfe31791de4ec"}},{"ruleId":"D1","level":"warning","message":{"text":"module.deleteResults (cyclomatic 16): 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\u0027 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/module/module.go"},"region":{"startLine":610}}}],"partialFingerprints":{"codehealthFindingId/v1":"057e438b365c29e59891124d7bb9a8e486ca4fcbbf9ec01168b5dbfd131a3e15"}},{"ruleId":"D1","level":"warning","message":{"text":"Marshaler.Marshal (cyclomatic 16): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/sbom/spdx/marshal.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a4c5ec2122dd730d98c4d1d32414ddeecec0a8517783f82f5575d35ea9c31c4"}},{"ruleId":"D2","level":"warning","message":{"text":"storage.adaptAccounts (cognitive 54): storage.adaptAccounts has cognitive complexity 54 (threshold 15). Drivers by points: if/else 36, loops 16, boolean chains 2 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/azure/storage/adapt.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"18a7af72a021a6c87211bee2ed807fc6feec36cd42ed7c359258e9b4b1e5d5ba"}},{"ruleId":"D2","level":"warning","message":{"text":"applier.ApplyLayers (cognitive 47): applier.ApplyLayers has cognitive complexity 47 (threshold 15). Drivers by points: loops 23, if/else 21, match/switch 2, boolean chains 1 (nesting depth added 20). Of this number, 44 points are the body\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/applier/docker.go"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a1f2b9ab3035a83bb48ac5d3a8c8e23ea1e2e01bdcf2a8c83450b18626fa41f"}},{"ruleId":"D2","level":"warning","message":{"text":"Parser.parseRoot (cognitive 45): Parser.parseRoot has cognitive complexity 45 (threshold 15). Drivers by points: if/else 39, loops 4, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/java/pom/parse.go"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"779054fe80a1d38469bcf3c6f5c909fd1f94ee8c52403e2b3f1e5746fd049318"}},{"ruleId":"D2","level":"warning","message":{"text":"funcs.parseIPv6 (cognitive 43): funcs.parseIPv6 has cognitive complexity 43 (threshold 15). Drivers by points: if/else 33, boolean chains 5, loops 5 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/terraform/parser/funcs/ip.go"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"85c8a3e268e89f626f2ae082e2344e69ccd63da610269ab6c1bfecf23d63e83a"}},{"ruleId":"D2","level":"warning","message":{"text":"Scanner.scanK8sVulns (cognitive 42): Scanner.scanK8sVulns has cognitive complexity 42 (threshold 15). Drivers by points: if/else 39, match/switch 2, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/k8s/scanner/scanner.go"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6f46c11f83a3799bdbe8ea4b50c4a218d99051f633ee89d7dbf2b161a1d536f"}},{"ruleId":"D2","level":"warning","message":{"text":"Parser.fetchPOMFromRemoteRepositories (cognitive 38): Parser.fetchPOMFromRemoteRepositories has cognitive complexity 38 (threshold 15). Drivers by points: if/else 32, boolean chains 3, loops 3 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/java/pom/parse.go"},"region":{"startLine":840}}}],"partialFingerprints":{"codehealthFindingId/v1":"69e17a88a0fb14ba54be8be807ec641719604eb556d404ef5687e2154b5220ca"}},{"ruleId":"D2","level":"warning","message":{"text":"adapter.adaptQueues (cognitive 36): adapter.adaptQueues has cognitive complexity 36 (threshold 15). Drivers by points: if/else 31, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/aws/sqs/adapt.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a1f7bf566235ec08da2ed51e648707e0668c67852a95f3ff1a3a441df44bb1d"}},{"ruleId":"D2","level":"warning","message":{"text":"ec2.getRules (cognitive 35): ec2.getRules has cognitive complexity 35 (threshold 15). Drivers by points: if/else 33, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/cloudformation/aws/ec2/nacl.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"629af4c1355ba142eb86743134aa15dad2eb58d157a1453c17d337ae2b536d24"}},{"ruleId":"D2","level":"warning","message":{"text":"spaces.adaptBuckets (cognitive 35): spaces.adaptBuckets has cognitive complexity 35 (threshold 15). Drivers by points: if/else 25, loops 10 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/digitalocean/spaces/adapt.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"603eca4c468bb983eb2749d52eb0e0090e15fa0afb8f56fcb2cb7933c0c88721"}},{"ruleId":"D2","level":"warning","message":{"text":"rego.BuildSchemaSetFromPolicies (cognitive 35): rego.BuildSchemaSetFromPolicies has cognitive complexity 35 (threshold 15). Drivers by points: if/else 28, loops 6, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/rego/build.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f3c4d06d56b164d0cef8409eb3be006d3771be20353a2d6073f9fb76cbf4fb3"}},{"ruleId":"D2","level":"warning","message":{"text":"Flag.Add (cognitive 34): Flag.Add has cognitive complexity 34 (threshold 15). Drivers by points: if/else 24, loops 8, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/flag/options.go"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"e03a31cd18c1c2bcf11662df7b0278190d13e56407790f8f07f27997d3e37b47"}},{"ruleId":"D2","level":"warning","message":{"text":"http.colorizeHTTPDump (cognitive 34): http.colorizeHTTPDump has cognitive complexity 34 (threshold 15). Drivers by points: if/else 31, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/x/http/trace.go"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"983eae1f629dbce967d1979bea70b856be50604aec158d4de80e184716db4139"}},{"ruleId":"D2","level":"warning","message":{"text":"Scanner.convertResults (cognitive 33): Scanner.convertResults has cognitive complexity 33 (threshold 15). Drivers by points: if/else 26, loops 6, boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/rego/result.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"34e75be773731b1e74fb93fc52901337cd1dd2c64040655339724be1f00e7d12"}},{"ruleId":"D2","level":"warning","message":{"text":"Parser.parseV2 (cognitive 32): Parser.parseV2 has cognitive complexity 32 (threshold 15). Drivers by points: if/else 24, boolean chains 4, loops 4 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/nodejs/npm/parse.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"710d6947fd513e58b0e990f79c9211337b4e019fb0f3e25bc8eb728ecccb847a"}},{"ruleId":"D2","level":"warning","message":{"text":"dockerfileAnalyzer.Analyze (cognitive 32): dockerfileAnalyzer.Analyze has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14, loops 10, match/switch 8 (nesting depth added 19). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/buildinfo/dockerfile.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"efe23719bbe53031b7d837cb339fa17ca8da12bd0a9fd5f81b80de2f646933ef"}},{"ruleId":"D2","level":"warning","message":{"text":"Node.subtree (cognitive 32): Node.subtree has cognitive complexity 32 (threshold 15). Drivers by points: if/else 26, loops 4, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/ansible/parser/node.go"},"region":{"startLine":491}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c3970ccdce81f2715e0c191ee726d539302e3c2c2d88fb4b2680045a8de241a"}},{"ruleId":"D2","level":"warning","message":{"text":"registryResolver.Resolve (cognitive 32): registryResolver.Resolve has cognitive complexity 32 (threshold 15). Drivers by points: if/else 30, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/terraform/parser/resolvers/registry.go"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"97be4a55e8a8d51e39d77233d51d9f5ec119b50448b3ac02d3ab27fe87d87b2f"}},{"ruleId":"D2","level":"warning","message":{"text":"Parser.traverseZip (cognitive 31): Parser.traverseZip has cognitive complexity 31 (threshold 15). Drivers by points: if/else 27, match/switch 2, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/java/jar/parse.go"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"8175d9e318da414112be8166774857421d2557a8fd620252e417e385b7b8b8dd"}},{"ruleId":"D2","level":"warning","message":{"text":"secretRenderer.renderCode (cognitive 31): secretRenderer.renderCode has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18, match/switch 7, boolean chains 4, loops 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/report/table/secret.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"71e7c49134fc22188c88a3e7b2099cb1b0cbd769dee080e8a96f0be4d45d6a41"}},{"ruleId":"D2","level":"warning","message":{"text":"Parser.Parse (cognitive 30): Parser.Parse has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17, loops 11, match/switch 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/swift/cocoapods/parse.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"1332e3813a76a2ea30850cea5360885e0de5783ca1ce8d0cd5f3fccf3ceecdae"}},{"ruleId":"D2","level":"warning","message":{"text":"compute.adaptInstances (cognitive 30): compute.adaptInstances has cognitive complexity 30 (threshold 15). Drivers by points: if/else 22, loops 7, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/google/compute/instances.go"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"441334b2fc3dbcd322bda4b43cb60792952f69890559bd9b70ab331a3eb32d8f"}},{"ruleId":"D2","level":"warning","message":{"text":"Marshaler.Marshal (cognitive 30): Marshaler.Marshal has cognitive complexity 30 (threshold 15). Drivers by points: if/else 21, loops 9 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/sbom/spdx/marshal.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e0c34c620cba1deda29ef1da3ee613cb46da41c9968368e4740ce36c3e60766"}},{"ruleId":"D2","level":"warning","message":{"text":"inventory.ParseINI (cognitive 29): inventory.ParseINI has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18, match/switch 6, loops 4, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/ansible/inventory/ini.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"6696fcce4dcd471a349fb2a6b56fd48baadfd3ec74196a6e39823edf37e5268a"}},{"ruleId":"D2","level":"warning","message":{"text":"Parser.resolvePlaybook (cognitive 29): Parser.resolvePlaybook has cognitive complexity 29 (threshold 15). Drivers by points: if/else 23, loops 5, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/ansible/parser/parser.go"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"fed2890699c7dcb441a7848aae40ce825bbf7062fa8102af66686c2c13ed4b83"}},{"ruleId":"D2","level":"warning","message":{"text":"pom.resolveMirrors (cognitive 28): pom.resolveMirrors has cognitive complexity 28 (threshold 15). Drivers by points: if/else 19, loops 8, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/java/pom/mirror.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"605bb647b9eb1bf0f958db61477320706c79c0f20d791b7a463a2bafeadb224c"}},{"ruleId":"D2","level":"warning","message":{"text":"apigateway.adaptAPIsV1 (cognitive 28): apigateway.adaptAPIsV1 has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18, loops 10 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/cloudformation/aws/apigateway/apiv1.go"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"8eaa93ab7cc3b2fe7f9de18b2ce4ed2080f5d11fd698b2d67ffb3a279bff9930"}},{"ruleId":"D2","level":"warning","message":{"text":"compute.adaptNetworks (cognitive 28): compute.adaptNetworks has cognitive complexity 28 (threshold 15). Drivers by points: if/else 20, loops 8 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/google/compute/networks.go"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e1097a627863b0dcde26bfc09c04d0a40cf827ee44f62a2837122f436a2074c"}},{"ruleId":"D2","level":"warning","message":{"text":"Attribute.mapContains (cognitive 28): Attribute.mapContains has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12, loops 12, boolean chains 3, match/switch 1 (nesting depth added 15). Most of this is not in the body itself: 0 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 471). 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\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/terraform/attribute.go"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"26632a90b43f096e1eb5aadb23f3ea139f7776ddce171d79e1aa5c1fb9e598ac"}},{"ruleId":"D2","level":"warning","message":{"text":"misconfigRenderer.renderCode (cognitive 28): misconfigRenderer.renderCode has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13, match/switch 7, boolean chains 4, loops 4 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/report/table/misconfig.go"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4bad9ee4ee1c5ba96ffea7aaf50ee82d5459dc32a0ac9be7caa8a58ed4c87fb"}},{"ruleId":"D2","level":"warning","message":{"text":"module.updateResults (cognitive 27): module.updateResults has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13, loops 11, 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\u0027 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/module/module.go"},"region":{"startLine":572}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d9bd63c6dccccfa0a80f3f30b8b20ba2c0e3987e7c87f0baec2d826d612f0d0"}},{"ruleId":"D2","level":"warning","message":{"text":"module.deleteResults (cognitive 27): module.deleteResults has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13, loops 11, 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\u0027 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/module/module.go"},"region":{"startLine":610}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a1c8100e15bcf9b648444265b42b1ba711d1133e71f8649e910f1032943c5c1"}},{"ruleId":"D2","level":"warning","message":{"text":"cargoAnalyzer.parseRootCargoTOML (cognitive 26): cargoAnalyzer.parseRootCargoTOML has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17, loops 7, match/switch 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/language/rust/cargo/cargo.go"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"097cc2fc44905b727f783292ce333e994845873b524d93222082f42858a74499"}},{"ruleId":"D2","level":"warning","message":{"text":"rego.isPolicyApplicable (cognitive 26): rego.isPolicyApplicable has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16, loops 9, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/rego/scanner.go"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"140b0a38063a4b9c8e201f1aa0df71175d0d2f151584a9f8b995eca455aa0b22"}},{"ruleId":"D2","level":"warning","message":{"text":"Scanner.Scan (cognitive 26): Scanner.Scan has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20, loops 4, boolean chains 2 (nesting depth added 10). Of this number, 19 points are the body\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/k8s/scanner/scanner.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"1050e79e578f93d17b0a01eeaf7c32c1fdc4ce9c0076e1f50395f0a8ee1c4ee3"}},{"ruleId":"D2","level":"warning","message":{"text":"Parser.parseBlock (cognitive 25): Parser.parseBlock has cognitive complexity 25 (threshold 15). Drivers by points: if/else 20, boolean chains 2, match/switch 2, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/nodejs/yarn/parse.go"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"486aea5fce490b991efff50d4cb51b4662daaf308418399a0fff0a11193d5171"}},{"ruleId":"D2","level":"warning","message":{"text":"ecr.adaptRepository (cognitive 25): ecr.adaptRepository has cognitive complexity 25 (threshold 15). Drivers by points: if/else 23, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/aws/ecr/adapt.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0d227d53459693335ee879232eec38f0ac2ddb042fd6bcaf0d05d6b7ae158b5"}},{"ruleId":"D2","level":"warning","message":{"text":"detection.detectKubernetes (cognitive 25): detection.detectKubernetes has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19, loops 5, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/detection/detect.go"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d445a5ffbd058a5e63ddac61f74d57a13b96124bc7df0b5a11ecc3d51f9ebb5"}},{"ruleId":"D2","level":"warning","message":{"text":"Parser.Parse (cognitive 24): Parser.Parse has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, loops 3, boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/golang/mod/parse.go"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2e755c3ce2a9af8bb65d76e048f472081b021f3c1186330e92e308174f44ade"}},{"ruleId":"D2","level":"warning","message":{"text":"Parser.Parse (cognitive 24): Parser.Parse has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, boolean chains 3, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/python/packaging/parse.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"a51ab789d2a89c2c9cf255bf0f09e7bcd71981290531a4f85f13f04f4518a999"}},{"ruleId":"D2","level":"warning","message":{"text":"Parser.Parse (cognitive 24): Parser.Parse has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, loops 5 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/ruby/bundler/parse.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc68d2f73f25184d0f5ec645bc9a19ec08d6f822536874850bace2801f21782c"}},{"ruleId":"D2","level":"warning","message":{"text":"rpmPkgAnalyzer.listPkgs (cognitive 24): rpmPkgAnalyzer.listPkgs has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17, loops 6, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/pkg/rpm/rpm.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"23d6d951fd02094171a0fb1437d4da8a80a7008a41c2c804207695a6cfa43c1b"}},{"ruleId":"D2","level":"warning","message":{"text":"ReportFlagGroup.ToOptions (cognitive 24): ReportFlagGroup.ToOptions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, boolean chains 3, match/switch 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/flag/report_flags.go"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"978b266ece5fa74afb3311eaa899ca4d026a2133d2d01653c74bcbd575a818e4"}},{"ruleId":"D2","level":"warning","message":{"text":"StaticMetadata.populate (cognitive 24): StaticMetadata.populate has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, loops 3, match/switch 2 (nesting depth added 8). Of this number, 23 points are the body\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/rego/metadata.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"b28aa482e74dc8539754d30a1316ee45f7740c2ec740f0b57049012a922b9aa7"}},{"ruleId":"D2","level":"warning","message":{"text":"Scanner.clusterInfoToReportResources (cognitive 24): Scanner.clusterInfoToReportResources has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17, loops 5, match/switch 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/k8s/scanner/scanner.go"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"d904fd7b5de67fc74f68aeb41d5d0ff22322181c781f3c466e8e1262c1bcae82"}},{"ruleId":"D2","level":"warning","message":{"text":"Parser.parseV9 (cognitive 23): Parser.parseV9 has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13, loops 9, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/nodejs/pnpm/parse.go"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ea48ea7e7ca029b47a2ff35918e89a2ebb954a4f7b47187c3c11d6f645d21b8"}},{"ruleId":"D2","level":"warning","message":{"text":"adapter.adaptBucketPolicies (cognitive 23): adapter.adaptBucketPolicies has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, loops 4 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/aws/s3/policies.go"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"fca6c223ac2f6d2ca78ea940ef5c3e31de2535bf6291ce7dafd94de66d1fdcf8"}},{"ruleId":"D2","level":"warning","message":{"text":"convert.StructToRego (cognitive 23): convert.StructToRego has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/rego/convert/struct.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"9716d188168c311fa0678ef1acdb986537e94a9741a2f3935cc123f38244dc9a"}},{"ruleId":"D2","level":"warning","message":{"text":"Scanner.ScanInput (cognitive 23): Scanner.ScanInput has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18, loops 3, match/switch 2 (nesting depth added 12). Of this number, 22 points are the body\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/rego/scanner.go"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"92bc66e05d1b98f3c374a025850897d1cc8de1bb977697a6f606191243cd9d74"}},{"ruleId":"D2","level":"warning","message":{"text":"scan.shiftANSIOverLineEndings (cognitive 23): scan.shiftANSIOverLineEndings has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16, boolean chains 3, match/switch 3, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scan/highlighting.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd2ba3bbdb57059942aaee74802b204dbf090836b8012a37629b68961e0fd0d7"}},{"ruleId":"D2","level":"warning","message":{"text":"Node.render (cognitive 23): Node.render has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18, loops 4, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/ansible/parser/node.go"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"eea871f5472f4bd6c68fcf19ccbaab0e57755bdc372dc8012886df45b0b8945f"}},{"ruleId":"D2","level":"warning","message":{"text":"Property.EqualTo (cognitive 23): Property.EqualTo has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/cloudformation/parser/property_helpers.go"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9a1b285138439a4068726b341730a3f31a3f2bd3c77260ba327d1bc10b51e71"}},{"ruleId":"D2","level":"warning","message":{"text":"Parser.Parse (cognitive 23): Parser.Parse has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, loops 4, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/dockerfile/parser/parser.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d84a5f443cb9dda875e97c99df77b2e2b02210f720ae62791da90521703f524"}},{"ruleId":"D2","level":"warning","message":{"text":"Attribute.getStringValues (cognitive 23): Attribute.getStringValues has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18, loops 4, match/switch 1 (nesting depth added 12). Of this number, 22 points are the body\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/terraform/attribute.go"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"de8ff8b5e56989857bbfb3236c5921d32a31a1a55506610d80e49806a6b6f5a5"}},{"ruleId":"D2","level":"warning","message":{"text":"expression.NewLexer (cognitive 23): expression.NewLexer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15, boolean chains 4, loops 2, match/switch 2 (nesting depth added 9). Most of this is not in the body itself: 0 of the 23 points are its own statements 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\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/licensing/expression/lexer.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec58709d58053bb991183e2ff235d7245bbb672b70b1c3bcfe8b2f3b588381ed"}},{"ruleId":"D2","level":"warning","message":{"text":"Writer.Write (cognitive 23): Writer.Write has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20, loops 3 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/report/github/github.go"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"7daf1cf7d558f86143e22d4c56b3a81d8d43ae33d93975d364a16af8d905ab65"}},{"ruleId":"D2","level":"warning","message":{"text":"artifact.resolveAnsibleExtraVars (cognitive 22): artifact.resolveAnsibleExtraVars has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, match/switch 2, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/commands/artifact/run.go"},"region":{"startLine":786}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe0ac92244838c6a458739bc75efd16673a3c97d7d407917a4a530c15199438b"}},{"ruleId":"D2","level":"warning","message":{"text":"sealSecurity.Match (cognitive 22): sealSecurity.Match has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20, boolean chains 1, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/detector/library/seal/seal.go"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"257093c05bbcd7dece3a76d06eff4631dd52dbb7fe2f391e23d3a178cedde024"}},{"ruleId":"D2","level":"warning","message":{"text":"Artifact.Inspect (cognitive 22): Artifact.Inspect has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20, boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/artifact/local/fs.go"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb77f6684edbd4a2cd5cfdc788f4fde91ec97f4170262812600d4c6edda50475"}},{"ruleId":"D2","level":"warning","message":{"text":"msk.getClusters (cognitive 22): msk.getClusters has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/cloudformation/aws/msk/cluster.go"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6cd40b904588f2989a6ec756fd03c7a618680f1711867b345098e21d9ce111a"}},{"ruleId":"D2","level":"warning","message":{"text":"iam.parseStatement (cognitive 22): iam.parseStatement has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17, loops 2, match/switch 2, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/aws/iam/convert.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a1a35324643983f8d874d56dee3b40bf209bf23d4c92f6a3bc82098c9ba0441"}},{"ruleId":"D2","level":"warning","message":{"text":"inventory.LoadSourceVars (cognitive 22): inventory.LoadSourceVars has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, loops 2, boolean chains 1 (nesting depth added 12). Of this number, 18 points are the body\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/ansible/inventory/inventory_vars.go"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"26ef56918d5537459276580739e950314cb263040f157c830ed52674c5d393d2"}},{"ruleId":"D2","level":"warning","message":{"text":"inventory.LoadFromSources (cognitive 22): inventory.LoadFromSources has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12, loops 8, match/switch 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/ansible/inventory/load.go"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a2a2c29c86864363c1a1145ddf84705a01d37d400bf30aacf08be7c59518572"}},{"ruleId":"D2","level":"warning","message":{"text":"functions.Take (cognitive 22): functions.Take has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, match/switch 3 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/azure/functions/take.go"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"247ae957a282507f2162db5efdaa6b565770fc1cfeab03f9dd9081ad9fb17cb5"}},{"ruleId":"D2","level":"warning","message":{"text":"Scanner.ScanFS (cognitive 22): Scanner.ScanFS has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, loops 4 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/terraform/scanner.go"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3f36024e8dd01fa7da66d91bf05418a6010324c9f45f2d09b58c51f7d880e44"}},{"ruleId":"D2","level":"warning","message":{"text":"Parser.Parse (cognitive 21): Parser.Parse has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, loops 4, boolean chains 2 (nesting depth added 6). Of this number, 20 points are the body\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/nodejs/bun/parse.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"8146c553c3577355685aaa599ba1617bea898a23cdd60f1f46cb34320904823c"}},{"ruleId":"D2","level":"warning","message":{"text":"Scanner.Detect (cognitive 21): Scanner.Detect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, loops 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/detector/ospkg/echo/echo.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9fc9340cfbd15d5ebde86559af0650a58eabfe7bc400daddf741a53b6ae996b"}},{"ruleId":"D2","level":"warning","message":{"text":"builder.readStruct (cognitive 21): builder.readStruct has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, loops 2, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/rego/schemas/builder.go"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dad82ce8402cd530987198872d7cc13d16d70a35651b78192f97d091c181e19"}},{"ruleId":"D2","level":"warning","message":{"text":"evaluator.expandBlockForEaches (cognitive 21): evaluator.expandBlockForEaches has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16, 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\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/terraform/parser/evaluator.go"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"94b0a0208745f8d3e5c7d37c6fd1998ab1e97b25d2c3acef2b0348c41166c3bd"}},{"ruleId":"D2","level":"warning","message":{"text":"evaluator.getValuesByBlockType (cognitive 21): evaluator.getValuesByBlockType has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, match/switch 2, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/terraform/parser/evaluator.go"},"region":{"startLine":532}}}],"partialFingerprints":{"codehealthFindingId/v1":"c062a222e0adfe6ede376ca7164bb204124d51628223b4e634af36ac54510ee8"}},{"ruleId":"D2","level":"warning","message":{"text":"evaluator.localHasDynamicValues (cognitive 21): evaluator.localHasDynamicValues has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16, loops 5 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/terraform/parser/evaluator.go"},"region":{"startLine":671}}}],"partialFingerprints":{"codehealthFindingId/v1":"03ed81adda62278b0d4193f4ff9b269a300688a138c40ed201385628cc439f1b"}},{"ruleId":"D2","level":"warning","message":{"text":"snapshot.parseSnapshot (cognitive 21): snapshot.parseSnapshot has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17, loops 2, match/switch 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/terraformplan/snapshot/snapshot.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"32a32ae8e9bcb2a353b69e1ab871ad9a9782c364eecc7597eb1fa33cf41add18"}},{"ruleId":"D2","level":"warning","message":{"text":"Attribute.GetRawValue (cognitive 21): Attribute.GetRawValue has cognitive complexity 21 (threshold 15). Drivers by points: loops 12, match/switch 6, if/else 3 (nesting depth added 14). Most of this is not in the body itself: 0 of the 21 points are its own statements and the rest belongs 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\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/terraform/attribute.go"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"6705b9c5655af6be7b69c0cf7a1d06e89e0bc3dfea9a550e547393e7f52bb5e3"}},{"ruleId":"D2","level":"warning","message":{"text":"Encoder.component (cognitive 21): Encoder.component has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13, boolean chains 4, loops 4 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/sbom/io/encode.go"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f9f1f7830dd8d8c64770a7a538d391a661d46c5d46272984202c323a9d3f04a"}},{"ruleId":"D2","level":"warning","message":{"text":"testutil.purgeMetadata (cognitive 20): testutil.purgeMetadata has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, loops 6, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/testutil/util.go"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7fc958b08417846b5f2a6c739c7cc4060d357f031b47dfb6d2314b30f6ade8b"}},{"ruleId":"D2","level":"warning","message":{"text":"main.fixtureVMImages (cognitive 20): main.fixtureVMImages has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, loops 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"magefiles/fixture.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"53d30e8f4390d8205495608fe9881c39145adfe97e6d9bcebc5965d8275787eb"}},{"ruleId":"D2","level":"warning","message":{"text":"Scanner.detect (cognitive 20): Scanner.detect has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/detector/ospkg/redhat/redhat.go"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a4ef2a1860beb8d63de7b9101490fe837c6c1762c588e7bc9509219f6d03f43"}},{"ruleId":"D2","level":"warning","message":{"text":"gomodAnalyzer.fillAdditionalData (cognitive 20): gomodAnalyzer.fillAdditionalData has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, loops 3 (nesting depth added 9). Of this number, 17 points are the body\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/language/golang/mod/mod.go"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"da2cf8a5eaea18b5648bb6c8bb139d5999592cefbaf837498dcb918ea1a6d4bb"}},{"ruleId":"D2","level":"warning","message":{"text":"apkRepoAnalyzer.Analyze (cognitive 20): apkRepoAnalyzer.Analyze has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, boolean chains 3, match/switch 2, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/repo/apk/apk.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ef9773de4461fc70e331821e294176bc73afaf1871cfe5d3c3bb83a4375356d"}},{"ruleId":"D2","level":"warning","message":{"text":"Scanner.scanChunk (cognitive 20): Scanner.scanChunk has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, loops 4, boolean chains 1 (nesting depth added 8). Of this number, 19 points are the body\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/secret/scanner.go"},"region":{"startLine":734}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b7c4c85fbed4d224d4f2ce9780c065001c3b23003dba85d7c568a739e68dbe7"}},{"ruleId":"D2","level":"warning","message":{"text":"LayerTar.Walk (cognitive 20): LayerTar.Walk has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, match/switch 2, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/walker/tar.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"28171662db9019caf1f58f9d5eb9d2799176c341fbeda1f6de3982ecfb55556d"}},{"ruleId":"D2","level":"warning","message":{"text":"msk.adaptCluster (cognitive 20): msk.adaptCluster has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/aws/msk/adapt.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f23541cd66bf09bd0412cc5515c75852595e14b643a97724430b4bf93436640"}},{"ruleId":"D2","level":"warning","message":{"text":"adapter.adaptPublicAccessBlocks (cognitive 20): adapter.adaptPublicAccessBlocks has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, loops 4, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/aws/s3/public_access_block.go"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9468e1bd4044315e4e861e962b9c918fe96074b9b8fe9647e4878834d802743"}},{"ruleId":"D2","level":"warning","message":{"text":"adapter.adaptBindings (cognitive 20): adapter.adaptBindings has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/google/storage/iam.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b88b4c053160be0c70d984aa7efbf5046f3a8bc79e48bd20cd2ecde85d7f7b7"}},{"ruleId":"D2","level":"warning","message":{"text":"Value.UnmarshalJSONFrom (cognitive 20): Value.UnmarshalJSONFrom has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18, boolean chains 1, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/azure/value.go"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d7d7f6057879ab97022a81350f83b35441f46dfd0f2e697123fe46891586cca"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.expandProperties (cognitive 20): parser.expandProperties has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, loops 4, match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/cloudformation/parser/file_context.go"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee4cf4a9e056d71320162b2843afc5c2f24688d450519164c761ab6d9046bfb2"}},{"ruleId":"D2","level":"warning","message":{"text":"Metadata.UnmarshalJSON (cognitive 20): Metadata.UnmarshalJSON has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/types/metadata.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1d24dd2b41008dcb8531006dc54154033c71172c80eac6ae04eae58f2a1b75e"}},{"ruleId":"D2","level":"warning","message":{"text":"Marshaler.ratings (cognitive 20): Marshaler.ratings has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, boolean chains 4, loops 1 (nesting depth added 7). Of this number, 16 points are the body\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/sbom/cyclonedx/marshal.go"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eadb6151176bbbca1e41e4d6e6c2937de9b5d7e6799f20fd69d49fdc62e9b12"}},{"ruleId":"D2","level":"warning","message":{"text":"testutil.DecompressSparseGzip (cognitive 19): testutil.DecompressSparseGzip has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/testutil/gzip.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3a5e72e58100f937207267072f87cc094b533b2c8090da700b3b11ac5156a00"}},{"ruleId":"D2","level":"warning","message":{"text":"runner.initScannerConfig (cognitive 19): runner.initScannerConfig has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/commands/artifact/run.go"},"region":{"startLine":568}}}],"partialFingerprints":{"codehealthFindingId/v1":"5880be9e5d849364ecfa5f2a52e55bbcf2bca4f9b449c8ff37756e7582c6a2c1"}},{"ruleId":"D2","level":"warning","message":{"text":"Scanner.Detect (cognitive 19): Scanner.Detect has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, loops 3 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/detector/ospkg/debian/debian.go"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"418b4be352a82e7323e7b77bdd433b65965406f6106db0be63c6918ea6913279"}},{"ruleId":"D2","level":"warning","message":{"text":"analyzer.NewAnalyzerGroup (cognitive 19): analyzer.NewAnalyzerGroup has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/analyzer.go"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c4b47cb12fabc7de95849061f00a0f6134d765b898c63cc815085a2da360f7b"}},{"ruleId":"D2","level":"warning","message":{"text":"funcs.parseTimestamp (cognitive 19): funcs.parseTimestamp has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, match/switch 5, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/terraform/parser/funcs/datetime.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"35257ebb4b67df7ed5d7ab157295b4763301e32c5d8ab48446c90488f8d1f9cb"}},{"ruleId":"D2","level":"warning","message":{"text":"module.newWASMPlugin (cognitive 19): module.newWASMPlugin has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/module/module.go"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"682a0ca8e6ed3b31d635995bbd9af6189a7f13fda3647a408f5b48ad6c5ea464"}},{"ruleId":"D2","level":"warning","message":{"text":"Service.Scan (cognitive 19): Service.Scan has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, loops 2, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/scan/local/service.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"cde3821d1f91b31a2e09d984323b42698acc587d3cb197e70eaf3c4bf847d8e6"}},{"ruleId":"D2","level":"warning","message":{"text":"version.NewVersionInfo (cognitive 19): version.NewVersionInfo has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/version/version.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2cd4345e6d189516b850a4c5b62f1ff02d78f7342b3d55ce7e91d9da954ff56"}},{"ruleId":"D2","level":"warning","message":{"text":"vex.New (cognitive 19): vex.New has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, match/switch 2, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/vex/vex.go"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0d1d97932bf211c23cb2e6abafef2f0a2c5352d2b4435cd1e98da60285d47a8"}},{"ruleId":"D2","level":"warning","message":{"text":"clean.Run (cognitive 18): clean.Run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/commands/clean/run.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"8934db162310bbf45900fe6c9f93530b71541c6bd3721574f08f22a95d7e90ce"}},{"ruleId":"D2","level":"warning","message":{"text":"AnalyzerGroup.PostAnalyze (cognitive 18): AnalyzerGroup.PostAnalyze has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, loops 6 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/analyzer.go"},"region":{"startLine":556}}}],"partialFingerprints":{"codehealthFindingId/v1":"c274291daa658b53b5148012a299b105a628c2027848abdd831c8c5d027b73ae"}},{"ruleId":"D2","level":"warning","message":{"text":"alpinePkgAnalyzer.parseApkInfo (cognitive 18): alpinePkgAnalyzer.parseApkInfo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, match/switch 2, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/pkg/apk/apk.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef9ffcbc8beba248421c89c8a6609526761f3817454f3eee8201e33b1793d5a7"}},{"ruleId":"D2","level":"warning","message":{"text":"image.getOCIImage (cognitive 18): image.getOCIImage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/image/oci.go"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"b25c26c7178ecd176d8830b68a5ab7cfda2b32c8f197e1860867c9d8dc24f10a"}},{"ruleId":"D2","level":"warning","message":{"text":"ec2.getInstances (cognitive 18): ec2.getInstances has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, loops 9 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/aws/ec2/adapt.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"67c87dfffc203bab3ca0ab378a69eb97d825962a5747171940f749c217b8589e"}},{"ruleId":"D2","level":"warning","message":{"text":"iam.ConvertTerraformDocument (cognitive 18): iam.ConvertTerraformDocument has cognitive complexity 18 (threshold 15). Drivers by points: loops 11, if/else 7 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/aws/iam/convert.go"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3f943bde6715486c3e868f47455525cfc254b963510e5b78584cd7ea7b11ac0"}},{"ruleId":"D2","level":"warning","message":{"text":"s3.applyForBucketRelatedResource (cognitive 18): s3.applyForBucketRelatedResource has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/aws/s3/bucket.go"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4b827cd9813f70c292895ac22b339328d69b45f548a985aac5ef3758cc0b396"}},{"ruleId":"D2","level":"warning","message":{"text":"adapter.adaptQueue (cognitive 18): adapter.adaptQueue has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/aws/sqs/adapt.go"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"eea7ffc516fa40030a3477479723b9ba58325fa04aa71dbb85d3de06de973a2d"}},{"ruleId":"D2","level":"warning","message":{"text":"container.adaptCluster (cognitive 18): container.adaptCluster has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/azure/container/adapt.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"da2a94e17115c4f1f4c9745f796027f7c757f6efd6dfd4b84362d0ebe5d5db01"}},{"ruleId":"D2","level":"warning","message":{"text":"compute.adaptFirewallRule (cognitive 18): compute.adaptFirewallRule has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, loops 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/google/compute/networks.go"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b015d9e44ec1bf692a3441eb4782ac9bdbbe8e00ec4aea0cdfbaa9d7229b53c"}},{"ruleId":"D2","level":"warning","message":{"text":"functions.First (cognitive 18): functions.First has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, match/switch 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/azure/functions/first.go"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9cdfa18d26de1594b3d8a89311292d08f745c86df6e64bdaa1e26157829ab0d"}},{"ruleId":"D2","level":"warning","message":{"text":"functions.Last (cognitive 18): functions.Last has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, match/switch 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/azure/functions/last.go"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"54b2816c82ca6b1f576af5465d2a79c5593868f65861a460f573026493624410"}},{"ruleId":"D2","level":"warning","message":{"text":"Parameters.UnmarshalJSONFrom (cognitive 18): Parameters.UnmarshalJSONFrom has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, loops 5, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/cloudformation/parser/parameter.go"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"e39f39db0ee5e553106b4109748121a3e44f3bcb7fe8d1bce718e64c48470b34"}},{"ruleId":"D2","level":"warning","message":{"text":"Property.inferBool (cognitive 18): Property.inferBool has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/cloudformation/parser/property.go"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c93360d89f5b04011af886df7335cfa1a74e20995f4363ee3ca55b6b6c6f34d"}},{"ruleId":"D2","level":"warning","message":{"text":"Resource.inferBool (cognitive 18): Resource.inferBool has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/cloudformation/parser/resource.go"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa3ecb5915bfe048a5e40630c8467b6d16611dfda55c14e2a8a7e991520a4de9"}},{"ruleId":"D2","level":"warning","message":{"text":"executor.ignoreByParams (cognitive 18): executor.ignoreByParams has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 2, match/switch 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/terraform/executor/executor.go"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b1a8208a7dd541285950e7c91a58247a9e09bc0833bf946d6307aaeb4faf741"}},{"ruleId":"D2","level":"warning","message":{"text":"funcs.MakeTemplateFileFunc (cognitive 18): funcs.MakeTemplateFileFunc has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, loops 3, boolean chains 2 (nesting depth added 3). Most of this is not in the body itself: 0 of the 18 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 98, 157, 82, \u2026). 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\u0027 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/terraform/parser/funcs/filesystem.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"a78a20d9e105ea6db5d6032d9b6ccadfc287d31263cef18dceacc4d53bf67159"}},{"ruleId":"D2","level":"warning","message":{"text":"Parser.ParseFS (cognitive 18): Parser.ParseFS has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/terraform/parser/parser.go"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"17798775a41531a47bfd54305d090745fa657e8db99c919e3b5f127e02b1d51e"}},{"ruleId":"D2","level":"warning","message":{"text":"terraform.NewBlock (cognitive 18): terraform.NewBlock has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, loops 6, match/switch 2, boolean chains 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/terraform/block.go"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"a05935cd16013b3ffba96b0299a72bf314e410e5662f6d48d7f7412cc42fe970"}},{"ruleId":"D2","level":"warning","message":{"text":"Module.GetReferencedBlock (cognitive 18): Module.GetReferencedBlock has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, loops 3 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/terraform/module.go"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd95b4b5ac9b29a2fb2c63ac2af69a08fbe5d1f9e45261e8aeaf1be4facddef6"}},{"ruleId":"D2","level":"warning","message":{"text":"Module.GetReferencingBlocks (cognitive 18): Module.GetReferencingBlocks has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, loops 4 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/terraform/module.go"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7cd6dc7a1dbf8cf73ec80370f85f0eb4485759e76b5b89cd5a18c3263f48c7f"}},{"ruleId":"D2","level":"warning","message":{"text":"Pipeline.Do (cognitive 18): Pipeline.Do has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8, loops 5, match/switch 5 (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\u0027 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/parallel/pipeline.go"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5005bb5dad04e855428244577d3ea388761e297caa63787111a5021cce82d52"}},{"ruleId":"D2","level":"warning","message":{"text":"SarifWriter.Write (cognitive 18): SarifWriter.Write has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, loops 9 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/report/sarif.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"df59299a814ed5a3ffb157d53e1cda575726374a0243a3dc88d57f8c305dfcca"}},{"ruleId":"D2","level":"warning","message":{"text":"SPDX.parsePackage (cognitive 18): SPDX.parsePackage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, loops 5, boolean chains 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/sbom/spdx/unmarshal.go"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f1089bb6857d0d796d6405367653215df7503056dc2637f12f88bfc4ce7eb95"}},{"ruleId":"D2","level":"warning","message":{"text":"pom.resolvePomRepos (cognitive 17): pom.resolvePomRepos has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, boolean chains 4, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/java/pom/repository.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"125c6eb9deca08c55da53a73fa07b9733ca2b759ce602886cd81f6111c01cbcd"}},{"ruleId":"D2","level":"warning","message":{"text":"pom.listProperties (cognitive 17): pom.listProperties has cognitive complexity 17 (threshold 15). Drivers by points: loops 7, if/else 6, boolean chains 2, match/switch 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/java/pom/pom.go"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"18cce91d4ba919eaef73ef058c9ddd4dafb690f6b00bafe2fa6985fd01ce152d"}},{"ruleId":"D2","level":"warning","message":{"text":"Parser.Parse (cognitive 17): Parser.Parse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/julia/manifest/parse.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7221a02af44ee81af7ab89d6dd1474e3a68421c500cf96cc4fb910bfd23e8c1"}},{"ruleId":"D2","level":"warning","message":{"text":"Parser.Parse (cognitive 17): Parser.Parse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, loops 7 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/nuget/lock/parse.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"472cf12e01444fb635265f5121a9c83f65f624743fbb203bb6577b11ace3e797"}},{"ruleId":"D2","level":"warning","message":{"text":"Scanner.Detect (cognitive 17): Scanner.Detect has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 3, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/detector/ospkg/amazon/amazon.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"116bc2719262111bd720b6ddd1f7b776be6bdb49b1183c0e9052d853701ec2a0"}},{"ruleId":"D2","level":"warning","message":{"text":"AnalyzerGroup.AnalyzeFile (cognitive 17): AnalyzerGroup.AnalyzeFile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, match/switch 3, boolean chains 1, loops 1 (nesting depth added 7). Of this number, 12 points are the body\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/analyzer.go"},"region":{"startLine":469}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e2fa2887188682fff660e97ba18fa5bdd7362d9d19d13edf7671aece4977fad"}},{"ruleId":"D2","level":"warning","message":{"text":"AnalysisResult.Merge (cognitive 17): AnalysisResult.Merge has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/analyzer.go"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"919038c249ba073c8cb7044e8bd54aec5e88844c3cd500360bdfcb13a275b676"}},{"ruleId":"D2","level":"warning","message":{"text":"alpineCmdAnalyzer.parseCommand (cognitive 17): alpineCmdAnalyzer.parseCommand has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7, loops 6, match/switch 3, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/imgconf/apk/apk.go"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b74253d18380f96caf0b34a8e15a80bb9707dbeb3af95ea8bf71b4835bca732"}},{"ruleId":"D2","level":"warning","message":{"text":"cargoAnalyzer.removeDevDependencies (cognitive 17): cargoAnalyzer.removeDevDependencies has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, loops 5, match/switch 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/language/rust/cargo/cargo.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"5aacb1a489aa57bbb69f39e5ae97c374722b3a40dd0cae0e871267c92b492c15"}},{"ruleId":"D2","level":"warning","message":{"text":"sam.setFunctionPolicies (cognitive 17): sam.setFunctionPolicies has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/cloudformation/aws/sam/function.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"d78ed8e8aaff055e8cd10ed62ffcc6349e32f429ad00f677745ad54ec43fe85c"}},{"ruleId":"D2","level":"warning","message":{"text":"ec2.adaptVPC (cognitive 17): ec2.adaptVPC has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/aws/ec2/vpc.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"afcfd83385616deeabc68d49c10a37451035111e1aeed792d7244ebc66864f6c"}},{"ruleId":"D2","level":"warning","message":{"text":"adapter.adaptBuckets (cognitive 17): adapter.adaptBuckets has cognitive complexity 17 (threshold 15). Drivers by points: loops 9, if/else 7, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/google/storage/adapt.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"893b225349daefde98734703b0dc80f3d8370485458a27e49071d9c8864e277f"}},{"ruleId":"D2","level":"warning","message":{"text":"kubernetes.adaptNetworkPolicy (cognitive 17): kubernetes.adaptNetworkPolicy has cognitive complexity 17 (threshold 15). Drivers by points: loops 12, if/else 5 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/kubernetes/adapt.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"acc6ce308f9a73aad695992ba9017e61a593ad29b8f8439e4d806b55225c654c"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.ResolveFindInMap (cognitive 17): parser.ResolveFindInMap has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 2, loops 2, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/cloudformation/parser/fn_find_in_map.go"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"42f90157e84e6346ca4b44619d6adf70f9fe9b979c9699ed1a2281aa16dc179f"}},{"ruleId":"D2","level":"warning","message":{"text":"Property.Contains (cognitive 17): Property.Contains has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, loops 4, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/cloudformation/parser/property_helpers.go"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8191178a72dd04ae04f5db761b43441e301f6897ef834dcdf93f8006ad25ff0"}},{"ruleId":"D2","level":"warning","message":{"text":"funcs.MakeToFunc (cognitive 17): funcs.MakeToFunc has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 4, match/switch 4 (nesting depth added 6). Most of this is not in the body itself: 0 of the 17 points are its own statements and the rest belongs 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\u0027 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/terraform/parser/funcs/conversion.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"c338489778072c55b98be7bce88af424c426e7862f0205e32a11b93f68588c12"}},{"ruleId":"D2","level":"warning","message":{"text":"counter.countBlockRecursion (cognitive 17): counter.countBlockRecursion has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 4 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/terraform/parser/sort.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f3c27ea3d9a99f42a9b753902320385ca7ca4007695a1726107f8178eb001d4"}},{"ruleId":"D2","level":"warning","message":{"text":"State.Merge (cognitive 17): State.Merge has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/state/merge.go"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"2acb738f9e2a34bf7c8a6d0c8418ae702e18e78b6bb2fce452d6b9ba8fd00196"}},{"ruleId":"D2","level":"warning","message":{"text":"misconf.CreatePolicyFS (cognitive 17): misconf.CreatePolicyFS has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/misconf/scanner.go"},"region":{"startLine":437}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c38cf2faedd87dbd10abcc90e0df9b3a30729968be52e174e77a59d8c615bb4"}},{"ruleId":"D2","level":"warning","message":{"text":"Decoder.decodeComponents (cognitive 17): Decoder.decodeComponents has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 2, match/switch 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/sbom/io/decode.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"7be7f7a775b35c1fdb0bcb9a0405e54b9c031d001598f88866251e1ebd92fa90"}},{"ruleId":"D2","level":"warning","message":{"text":"jsoncParser.processNormalToken (cognitive 17): jsoncParser.processNormalToken has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, match/switch 3 (nesting depth added 10). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/x/json/jsonc.go"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5fc54dd4a65e13d93c12cedcea5d7874e028fc2a5e05d300352e25aa31dc45a"}},{"ruleId":"D2","level":"warning","message":{"text":"main.fixtureTerraformPlanSnapshots (cognitive 16): main.fixtureTerraformPlanSnapshots has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, loops 5, boolean chains 1 (nesting depth added 5). Of this number, 11 points are the body\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"magefiles/terraformplan.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"63088714ef87514ce35d1075c31dbd8a9c46e4dfdf198af01bfff9784e60298c"}},{"ruleId":"D2","level":"warning","message":{"text":"Parser.parseV1 (cognitive 16): Parser.parseV1 has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 4 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/c/conan/parse.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"2348185ffdcfb4c53f8307be28315589563a31a031a7b49f8a19f03cbf28144a"}},{"ruleId":"D2","level":"warning","message":{"text":"Parser.resolveLinks (cognitive 16): Parser.resolveLinks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (nesting depth added 7). Of this number, 14 points are the body\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/nodejs/npm/parse.go"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3542f96b761da02d633b5f7c1a26bf7a87899afc8a94e23d2183880953f56cb"}},{"ruleId":"D2","level":"warning","message":{"text":"Scanner.Detect (cognitive 16): Scanner.Detect has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 3, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/detector/ospkg/alpine/alpine.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"032fd1e312834b7ebd4c730a42b5cd07898d35a3456bbff515bc3772d15caf62"}},{"ruleId":"D2","level":"warning","message":{"text":"Scanner.Detect (cognitive 16): Scanner.Detect has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/detector/ospkg/ubuntu/ubuntu.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae78c87a76f65e6ee6105e49f6b08a49fc78fe0cf372b61d2e5f58bd9d0d5d7f"}},{"ruleId":"D2","level":"warning","message":{"text":"alpineCmdAnalyzer.guessVersion (cognitive 16): alpineCmdAnalyzer.guessVersion has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, loops 5, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/imgconf/apk/apk.go"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"c15fe97c84884794f5bc5ea0cca3a191fdbb73c3dd4f0104ba7534726d76df84"}},{"ruleId":"D2","level":"warning","message":{"text":"mod.findLicense (cognitive 16): mod.findLicense has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, match/switch 4, boolean chains 3, loops 1 (nesting depth added 5). Of this number, 8 points are the body\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/language/golang/mod/mod.go"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"819fc55155a4fda0b7bf27154aadf561fde261ec5704f6039be24949362ca7c5"}},{"ruleId":"D2","level":"warning","message":{"text":"eks.adaptCluster (cognitive 16): eks.adaptCluster has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, loops 4, match/switch 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/aws/eks/adapt.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"543f72ee2a202d22ecce7cad2947c32cec887ef2f633e3c90060287b569340e7"}},{"ruleId":"D2","level":"warning","message":{"text":"adapter.adaptBucketResource (cognitive 16): adapter.adaptBucketResource has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/google/storage/adapt.go"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"3576d2c1d55998dffd1672104e8299d320747820727d9a8aed94ef9a2c55db7c"}},{"ruleId":"D2","level":"warning","message":{"text":"rego.LoadPoliciesFromDirs (cognitive 16): rego.LoadPoliciesFromDirs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, 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\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/rego/embed.go"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"195b3dd309ff56b2a58f3991692397cbf8f63c20ba0deb02d43377a90827823e"}},{"ruleId":"D2","level":"warning","message":{"text":"rego.parseCause (cognitive 16): rego.parseCause has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/rego/result.go"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"61dbcadf44b76851cb62826d9b126a5ddbbf741ef3093332cace910d0b81e16c"}},{"ruleId":"D2","level":"warning","message":{"text":"inventory.splitFields (cognitive 16): inventory.splitFields has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, match/switch 2, loops 1 (nesting depth added 8). Of this number, 15 points are the body\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/ansible/inventory/ini.go"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"f41750b2851c045d5362b5442beb8228fa4c990c372a0d694f56348ff94ee11d"}},{"ruleId":"D2","level":"warning","message":{"text":"Parser.ParseFile (cognitive 16): Parser.ParseFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 2, match/switch 2 (nesting depth added 2). Of this number, 15 points are the body\u0027s 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 \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/cloudformation/parser/parser.go"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"f84feb2b8dc2301ef541ce68e79a7359fe5d26d07e9e5e79dc0e13cecadab431"}},{"ruleId":"D2","level":"warning","message":{"text":"ValueOptions.MergeValues (cognitive 16): ValueOptions.MergeValues has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 4 (nesting depth added 6). Of this number, 14 points are the body\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/helm/parser/vals.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"78a7602a317a9c443bc42321956a12ed072f6df3720b77e621c59c5223b589e9"}},{"ruleId":"D2","level":"warning","message":{"text":"Scanner.scanChart (cognitive 16): Scanner.scanChart has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/helm/scanner.go"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"9972fc2c18a8d3197f8e843268c1af5d2be23379c0ffbadc27eb8d8088acbb8d"}},{"ruleId":"D2","level":"warning","message":{"text":"Scanner.findModules (cognitive 16): Scanner.findModules has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 3, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/terraform/scanner.go"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"81fd80e2f33f4e9157c925e7e7fe7d197288f4d2add68841624374a901ef3bcd"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.clusterRun (cognitive 16): commands.clusterRun has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/k8s/commands/cluster.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"f35edb4285ec0f3639f3282324aebca6eede83a5a080a47a5683590b1a4874be"}},{"ruleId":"D2","level":"warning","message":{"text":"licensing.SplitLicenses (cognitive 16): licensing.SplitLicenses has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/licensing/normalize.go"},"region":{"startLine":610}}}],"partialFingerprints":{"codehealthFindingId/v1":"d56a445f35ffb8bbc4aeb4e06b03993c93dae1aa78f08c01c163c672d82675b6"}},{"ruleId":"D2","level":"warning","message":{"text":"parallel.WalkDir (cognitive 16): parallel.WalkDir has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 4, 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\u0027 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/parallel/walk.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd7d7a531e0e09ea62efdfe74a985b422328200e03ed6e320c0554677b03722c"}},{"ruleId":"D2","level":"warning","message":{"text":"remote.tryGet (cognitive 16): remote.tryGet has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/remote/remote.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"f332f3913837f3f0754699c5cdf8dd7324d4e7294476a062bad342445ed6b08c"}},{"ruleId":"D2","level":"warning","message":{"text":"vulnerabilityRenderer.setVulnerabilityRows (cognitive 16): vulnerabilityRenderer.setVulnerabilityRows has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/report/table/vulnerability.go"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"c344eed82320e772c575e2ce9e25b7d7b6af26a155e692f9175d654664a06dee"}},{"ruleId":"D2","level":"warning","message":{"text":"Marshaler.marshalVulnerabilities (cognitive 16): Marshaler.marshalVulnerabilities has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/sbom/cyclonedx/marshal.go"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"91e51e2f19fbf7f095753f53077b1d86e2003daf4f686184c9e39a4f66761644"}},{"ruleId":"D2","level":"warning","message":{"text":"BOM.parseBOM (cognitive 16): BOM.parseBOM has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 4 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/sbom/cyclonedx/unmarshal.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"92eb4952b29e739e8979ad8c2382333646af97c639f64f34a6e875d3d7c1b828"}},{"ruleId":"D2","level":"warning","message":{"text":"Encoder.encodePackages (cognitive 16): Encoder.encodePackages has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 5 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/sbom/io/encode.go"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1da2ad31f8db9a1003eb8ac36e5019f987fb765485dbb41f3a3d56e16f724af"}},{"ruleId":"D2","level":"warning","message":{"text":"traceTransport.redactBody (cognitive 16): traceTransport.redactBody has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, loops 5, boolean chains 2 (nesting depth added 6). Of this number, 14 points are the body\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/x/http/trace.go"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7df8fc086672e4a6254f150803b189bd2d024b9e5de55086d595329bfa9c45f"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Property: TooManyMethods \u2014 63 methods, declared across 3 files: parser/property.go (28), parser/property_helpers.go (27), parser/property_conversion.go (8). 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/cloudformation/parser/property.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a623a18fe708ddd809650bc78c19541206ae0ef32691e13d2ba98addad0b747"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: npm/parse_testcase.go: FileTooLong \u2014 1023 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/nodejs/npm/parse_testcase.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0057edeb7a0d6565b73b25f7330bbed7126ad3d2d6fbd3901e0b6d3348e1dce9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/app.go: FileTooLong \u2014 1007 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/commands/app.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b9cc14308b7a56050a203b6511dda19f9f58ce7c5b8f9b4fee649ceee2f675b"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Block: TooManyMethods \u2014 50 methods, declared across 2 files: terraform/block.go (49), terraform/export.go (1). 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/terraform/block.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebae477552d0fcb72eb48de1e7a615d21841d4938c112e5c33916cebe518cbf1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: rpc/convert.go: FileTooLong \u2014 784 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/rpc/convert.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a2fd986ab93f25a734f25252f1c9002910c825dd697ff848121c3d2372dedbd"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Attribute: TooManyMethods \u2014 47 methods, declared across 2 files: terraform/attribute.go (46), terraform/export.go (1). 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/terraform/attribute.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc65d630c73a787a42ba92d7d8c83ba33716443993c31be4f29f4c7ffc515e61"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: pnpm/parse_testcase.go: FileTooLong \u2014 669 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/nodejs/pnpm/parse_testcase.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f11035054d341f6f1d4703cdf1dab10d98d44e60451598f65a82403d3b00a56"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: pom/parse.go: FileTooLong \u2014 629 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/java/pom/parse.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cd9798295cbf4df4bcb6a7c7ddbbf62c6f120e3b93246fdf281aaab6864c535"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: terraform/attribute.go: FileTooLong \u2014 626 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/terraform/attribute.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ceac9c6ca963db0daf5f8a2adfce1034eb6c8cd1769d3081edbb4cf32e163b7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: lock/parse_testcase.go: FileTooLong \u2014 594 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/nuget/lock/parse_testcase.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffd11809193eebee39ac7cde0e59764f1f4156fce6697620e99849ca61e91635"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: licensing/normalize.go: FileTooLong \u2014 566 significant lines (blank, comment-only and punctuation-only lines excluded), about 74% of them inside a single declaration: mapping (17-453). 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/licensing/normalize.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee9b5bcd95c7f45cf9a360daa8b8f82f6b292bd1d820d4a823f7530f0d6a56eb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: secret/scanner.go: FileTooLong \u2014 517 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/secret/scanner.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a256e1507beba9595a0d0b38ab4eb93178949d6345ee5bbeb4ea9019576323a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): pkg/report/table/misconfig.go:200-215 | pkg/report/table/secret.go:155-169 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/report/table/misconfig.go:200\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/report/table/misconfig.go"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d30447945aa5a3da3ceb1f779164f6abcf5622347b2e8630976048687a693d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): pkg/detector/ospkg/oracle/oracle.go:77-90 | pkg/detector/ospkg/photon/photon.go:66-79 | pkg/detector/ospkg/suse/suse.go:143-156 \u2014 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 \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060pkg/detector/ospkg/oracle/oracle.go:77\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/detector/ospkg/oracle/oracle.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"eeb30c57077a8f2b28c75a18075207683c414833aca2f28a8fb6c64e4bfde2f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): pkg/k8s/scanner/scanner.go:277-290 | pkg/k8s/scanner/scanner.go:323-336 | pkg/k8s/scanner/scanner.go:358-371 \u2014 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 \u2014 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 \u0060pkg/k8s/scanner/scanner.go:277\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/k8s/scanner/scanner.go"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"523cdad34135f696c119ad2b8faaa7f37a5c4b04f81d0b64cfef2aaaf1ad57cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): pkg/fanal/artifact/image/image.go:481-494 | pkg/fanal/artifact/vm/vm.go:119-133 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060pkg/fanal/artifact/image/image.go:481\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/artifact/image/image.go"},"region":{"startLine":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"391eba5cd3ed9c13d5d13eb3f6539e047ca42b8cae2fedbf6f70671a363ee577"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): pkg/detector/ospkg/chainguard/chainguard.go:51-63 | pkg/detector/ospkg/minimos/minimos.go:52-64 | pkg/detector/ospkg/wolfi/wolfi.go:52-64 \u2014 before extracting anything, compare \u0060pkg/detector/ospkg/chainguard/chainguard.go\u0060 and \u0060pkg/detector/ospkg/minimos/minimos.go\u0060 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 \u0060pkg/detector/ospkg/chainguard/chainguard.go:51\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/detector/ospkg/chainguard/chainguard.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc9232436ee7404f6d92fb5dacc3f43c7b23d479c6940fe0809a486e52fba8ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): pkg/dependency/parser/java/pom/pom.go:313-325 | pkg/fanal/analyzer/language/java/gradle/pom.go:54-66 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060pkg/dependency/parser/java/pom/pom.go:313\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/java/pom/pom.go"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"7179a97a6f01c0e0a81e84f5226775e221b223404ff671cafd1a18250d4d17bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): pkg/detector/ospkg/alma/alma.go:71-83 | pkg/detector/ospkg/rocky/rocky.go:66-78 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060pkg/detector/ospkg/alma/alma.go:71\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/detector/ospkg/alma/alma.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d9cb0c8575eea8482525782a6cfe047ddbb9db46343bc6ee4de3cc0ec5222ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): pkg/detector/ospkg/debian/debian.go:111-123 | pkg/detector/ospkg/ubuntu/ubuntu.go:144-156 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060pkg/detector/ospkg/debian/debian.go:111\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/detector/ospkg/debian/debian.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"18cdb614931c66fbe608c47a5370a8cbf8924f62fe8a6de0eb911e262db88280"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): pkg/iac/scanners/helm/parser/parser.go:85-97 | pkg/iac/scanners/helm/scanner.go:68-82 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060pkg/iac/scanners/helm/parser/parser.go:85\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/helm/parser/parser.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"51e4dea91094ce6c522797645c1721d6cc4bdb6b83136fa444e9c5e3c607313d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): pkg/detector/ospkg/alpine/alpine.go:104-115 | pkg/detector/ospkg/chainguard/chainguard.go:51-62 | pkg/detector/ospkg/minimos/minimos.go:52-63 | pkg/detector/ospkg/wolfi/wolfi.go:52-63 \u2014 before extracting anything, compare \u0060pkg/detector/ospkg/chainguard/chainguard.go\u0060 and \u0060pkg/detector/ospkg/minimos/minimos.go\u0060 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 \u0060pkg/detector/ospkg/alpine/alpine.go:104\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/detector/ospkg/alpine/alpine.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"31388c02ab192b6369c66ac456509aabdf26658da58186c81bf34b67b9f38c9d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): pkg/detector/ospkg/rootio/rootio.go:128-139 | pkg/detector/ospkg/seal/seal.go:159-170 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060pkg/detector/ospkg/rootio/rootio.go:128\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/detector/ospkg/rootio/rootio.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d5b37471583684fde54eee939f1f7406b64a5ff319a42a9fbd0479e86830c00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): pkg/iac/scanners/cloudformation/scanner.go:78-89 | pkg/iac/scanners/helm/scanner.go:99-110 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/cloudformation/scanner.go"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dbd4d76eb197b316275383446b9563df7016e797b75ebe237f65a2bdf9ac37e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): pkg/detector/ospkg/chainguard/chainguard.go:34-44 | pkg/detector/ospkg/minimos/minimos.go:34-44 | pkg/detector/ospkg/wolfi/wolfi.go:34-44 \u2014 before extracting anything, compare \u0060pkg/detector/ospkg/chainguard/chainguard.go\u0060 and \u0060pkg/detector/ospkg/minimos/minimos.go\u0060 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 \u0060pkg/detector/ospkg/chainguard/chainguard.go:34\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/detector/ospkg/chainguard/chainguard.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4748dfd3919268c1f6b44ff77bffa038c5da4132a67905bf9c04c24eff57fea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/commands/app.go:948-958 | pkg/commands/app.go:972-982 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060pkg/commands/app.go:948\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/commands/app.go"},"region":{"startLine":948}}}],"partialFingerprints":{"codehealthFindingId/v1":"976f615f6562ddb2807cfc66e354cbf9632aa403dbac2a9718fca06ef6bb992f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/detector/ospkg/rootio/rootio.go:90-101 | pkg/detector/ospkg/seal/seal.go:115-125 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060pkg/detector/ospkg/rootio/rootio.go:90\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/detector/ospkg/rootio/rootio.go"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd1d66c5da6175e1ebadf0c0499f3039143cab54fb1e318f5306817f1811fff7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/iac/adapters/terraform/azure/appservice/adapt.go:46-56 | pkg/iac/adapters/terraform/azure/appservice/adapt.go:94-104 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060pkg/iac/adapters/terraform/azure/appservice/adapt.go:46\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/azure/appservice/adapt.go"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca292ef80911db4fc7f6fac28dd9420443f345b04cf1450b8d3482fb82913bef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/iac/scan/code.go:310-320 | pkg/iac/scanners/terraform/parser/parser.go:240-250 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060pkg/iac/scan/code.go:310\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scan/code.go"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ad10610e0e8cf9c884aec317242f0473e0a7bd205436c3f9f18fda2a22e70cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/iac/scanners/cloudformation/parser/property.go:151-161 | pkg/iac/scanners/kubernetes/parser/manifest_node.go:219-229 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060pkg/iac/scanners/cloudformation/parser/property.go:151\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/cloudformation/parser/property.go"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"86a2465a75147de07f11f15f6e322471b467d6ff1f4bb96f8a5649dab401652a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/iac/scanners/cloudformation/parser/property.go:366-376 | pkg/iac/scanners/cloudformation/parser/resource.go:261-271 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/iac/scanners/cloudformation/parser/property.go:366\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/cloudformation/parser/property.go"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"45b090503ca7026f12bc808c0c6f8aa5426e3cf50435a933a7e5a194bb25a889"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/report/table/licensing.go:41-51 | pkg/report/table/licensing.go:123-133 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/report/table/licensing.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"22228f8370891e4a7b7d7807f7484e575433162bdd5b234cb4b07899281436d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/iac/adapters/cloudformation/aws/sam/function.go:39-49 | pkg/iac/adapters/cloudformation/aws/sam/state_machines.go:65-75 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/iac/adapters/cloudformation/aws/sam/function.go:39\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/cloudformation/aws/sam/function.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf6f72ce7dfdc8b23e12525249ed5d88bf121232d51407fc3e354a12fb8e319d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): pkg/iac/adapters/terraform/google/storage/iam.go:32-41 | pkg/iac/adapters/terraform/google/storage/iam.go:63-72 | pkg/iac/adapters/terraform/google/storage/iam.go:86-95 \u2014 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 \u2014 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 \u0060pkg/iac/adapters/terraform/google/storage/iam.go:32\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/google/storage/iam.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"55f5f92f894f935ff8d18be51b5e698e38943c13c60f2a1fc9a97ead6d5131a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/commands/app.go:389-399 | pkg/commands/app.go:750-759 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060pkg/commands/app.go:389\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/commands/app.go"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bec41d39f9b018164e4119f40b54449829ec6bcdd88b952b9ad7f37fa889ddc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/commands/app.go:1270-1280 | pkg/commands/app.go:1318-1327 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060pkg/commands/app.go:1270\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/commands/app.go"},"region":{"startLine":1270}}}],"partialFingerprints":{"codehealthFindingId/v1":"60303b2a909e8105dafc7dba2133a85d9dd83096f955675369e86a33caa46e2a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/commands/artifact/scanner.go:41-50 | pkg/commands/artifact/scanner.go:137-146 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/commands/artifact/scanner.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"0faa3b0e0fd05f4b7847d93694eed5752ff8af702058faa3525e7ba00aa19b90"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/detector/ospkg/azure/azure.go:44-54 | pkg/detector/ospkg/photon/photon.go:46-55 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060pkg/detector/ospkg/azure/azure.go:44\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/detector/ospkg/azure/azure.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"3995812a14d90a0e8909dc1c1c0304dbda3d3b87b6666ea07fb09e45bb1a5d7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/fanal/analyzer/language/analyze.go:25-34 | pkg/fanal/analyzer/language/analyze.go:39-48 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060pkg/fanal/analyzer/language/analyze.go:25\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/language/analyze.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"aaf0c60f9d40729ea7328dde984ed1fa5e89b1d7759425d15de5eb19dce3dc12"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/fanal/analyzer/licensing/license.go:128-137 | pkg/fanal/utils/utils.go:68-77 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060pkg/fanal/analyzer/licensing/license.go:128\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/licensing/license.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea810d5cd7000f97151a764bbd42274bdd2f9df28171ea1f0b4aa227ed0ec22c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/fanal/analyzer/pkg/apk/apk.go:179-188 | pkg/fanal/analyzer/pkg/rpm/rpm.go:303-312 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060pkg/fanal/analyzer/pkg/apk/apk.go:179\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/pkg/apk/apk.go"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"f39b174adbe95e8a7ce5db422ba0f8b9bddbe22c84ab2d1955c131bf39969533"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/fanal/artifact/image/image.go:55-65 | pkg/fanal/artifact/vm/vm.go:40-49 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060pkg/fanal/artifact/vm/vm.go:40\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/artifact/image/image.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"2119c32285b203c7db9adb3ed5a6176ae11da3fccc9e09725338e57805701206"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/iac/adapters/terraform/azure/compute/adapt.go:74-83 | pkg/iac/adapters/terraform/azure/compute/adapt.go:114-125 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060pkg/iac/adapters/terraform/azure/compute/adapt.go:74\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/azure/compute/adapt.go"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"03aa590de9b9141b5cb372784f978e11d23e8a5ffde5868a0ef6efeb8e704d55"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/iac/scan/result.go:187-196 | pkg/iac/scan/result.go:203-212 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060pkg/iac/scan/result.go:187\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scan/result.go"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"e643af3cd957b28338e1596a65af837462d92caf2f507d81e4406af93fbe5a0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/testutil/gzip.go:21-30 | internal/testutil/gzip.go:38-47 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/testutil/gzip.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"78fcd2e6f624b12a59252d7dec764a100ab336d470a888d905b14cccba790ff3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/commands/artifact/scanner.go:60-68 | pkg/commands/artifact/scanner.go:156-164 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/commands/artifact/scanner.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"bed549978ce6b7e887d89ddf6c509a66e8b59863261c3f9db9dde2ab1b84f64d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/compliance/report/json.go:32-41 | pkg/report/json.go:41-49 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060pkg/compliance/report/json.go:32\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/compliance/report/json.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e01cae0877023d40515fe789f34ecfb067bc3b1fac6c3f3748f7aa12f1b5da1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/dependency/parser/julia/manifest/naive_pkg_parser.go:30-38 | pkg/dependency/parser/rust/cargo/naive_pkg_parser.go:31-39 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060pkg/dependency/parser/julia/manifest/naive_pkg_parser.go:30\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/julia/manifest/naive_pkg_parser.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8ca752b494bc0cd4c04117f57db8629ff38929ce5d6529e01cdf1263cce234f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/fanal/analyzer/language/nodejs/bun/bun.go:111-119 | pkg/fanal/analyzer/language/nodejs/npm/npm.go:113-121 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060pkg/fanal/analyzer/language/nodejs/bun/bun.go:111\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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 \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/language/nodejs/bun/bun.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e607e95e5238686e310e69d8588f9126da900c4957abef24875b5a4a3fed67f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/fanal/analyzer/language/python/poetry/poetry.go:162-170 | pkg/fanal/analyzer/language/python/pylock/pylock.go:150-158 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060pkg/fanal/analyzer/language/python/poetry/poetry.go:162\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/language/python/poetry/poetry.go"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"da1e1c7bf0e0cb1aabf482f114d55819097f1d70b92b0521e5f10cdf29006b8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/flag/options.go:291-299 | pkg/flag/options.go:310-318 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060pkg/flag/options.go:291\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/flag/options.go"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc1aee005ad11c608c660faf0f8951d34eabfe1f56ebee03a270dd314da9723d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/k8s/scanner/scanner.go:265-273 | pkg/k8s/scanner/scanner.go:346-354 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060pkg/k8s/scanner/scanner.go:265\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/k8s/scanner/scanner.go"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"22eece74212ec327f9f964fc1d6c0fe99ffafc030cf1d5a913d6e8d5c613370e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/commands/artifact/scanner.go:77-84 | pkg/commands/artifact/scanner.go:173-180 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060pkg/commands/artifact/scanner.go:77\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/commands/artifact/scanner.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"5086b5bef4b314b5a047d86198ddc809f767e662911351a358998e073731cd52"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/commands/artifact/scanner.go:91-98 | pkg/commands/artifact/scanner.go:187-194 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060pkg/commands/artifact/scanner.go:91\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/commands/artifact/scanner.go"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb2c72f580b6adb39b678705582c43b3f266791a0acb477b9828b45712a3cf6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/commands/artifact/scanner.go:118-125 | pkg/commands/artifact/scanner.go:214-221 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060pkg/commands/artifact/scanner.go:118\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/commands/artifact/scanner.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"a001e2bc0ec3455770d7c5909bc008a74f46ad99d7e18d92770a1ba14396338b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/fanal/analyzer/language/python/poetry/poetry.go:99-107 | pkg/fanal/analyzer/language/python/pylock/pylock.go:116-123 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/language/python/poetry/poetry.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"869dc910c5c10de646c9e7af315d01c0b1ef8d9f5d79882bea6f609136a16278"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/iac/adapters/cloudformation/aws/sqs/queue.go:49-56 | pkg/iac/adapters/cloudformation/aws/ecr/repository.go:70-77 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060pkg/iac/adapters/cloudformation/aws/sqs/queue.go:49\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/cloudformation/aws/sqs/queue.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a6ef4741bb6638c25513a5a8670b355fdf78bae68ec6ee8baad10a5c514ede8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/iac/adapters/terraform/aws/dynamodb/adapt.go:41-48 | pkg/iac/adapters/terraform/aws/dynamodb/adapt.go:67-74 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060pkg/iac/adapters/terraform/aws/dynamodb/adapt.go:41\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/aws/dynamodb/adapt.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c94884174324a1703e4ec47eba97a4a21f32d9aae8113f315c7d9042f720ef2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/iac/adapters/terraform/azure/keyvault/adapt.go:40-47 | pkg/iac/adapters/terraform/azure/keyvault/adapt.go:60-67 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060pkg/iac/adapters/terraform/azure/keyvault/adapt.go:40\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/azure/keyvault/adapt.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf543945449b6364302916abf56ad890069e3d83391d935d6a861e4588f44d92"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/iac/adapters/terraform/kubernetes/adapt.go:51-58 | pkg/iac/adapters/terraform/kubernetes/adapt.go:75-82 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060pkg/iac/adapters/terraform/kubernetes/adapt.go:51\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/kubernetes/adapt.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"557332062ace5da16a04896787dd916a4e884845727d9cc15784bcde80f5d11a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/x/json/jsonc.go:183-190 | pkg/x/json/jsonc.go:195-202 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/x/json/jsonc.go"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd62844470a2d33109da484de3633cd563ae7c0557ae0e4baff44d8c757941d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/iac/adapters/terraform/azure/database/mysql.go:31-38 | pkg/iac/adapters/terraform/azure/database/postgresql.go:35-42 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/iac/adapters/terraform/azure/database/mysql.go:31\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/azure/database/mysql.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"c37f2af1e4977c06a4cc3bdbaf5a5d0a0a616ae78a3aa60c58420cc097158f82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/iac/adapters/terraform/google/iam/convert.go:12-19 | pkg/iac/adapters/terraform/google/iam/project_iam.go:101-108 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/google/iam/convert.go"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfc43c0d7daeaa02b2ee623a58b8b50ba2b875ccc6df407d23424b6625bdbe78"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 10): pkg/commands/app.go:313-322 | pkg/commands/app.go:375-381 | pkg/commands/app.go:443-449 | pkg/commands/app.go:505-511 | pkg/commands/app.go:556-562 | pkg/commands/app.go:612-618 | pkg/commands/app.go:729-735 | pkg/commands/app.go:1070-1076 | pkg/commands/app.go:1140-1146 | pkg/commands/app.go:1223-1229 \u2014 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 \u2014 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 \u0060pkg/commands/app.go:313\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/commands/app.go"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b5aa62fb0de50680c717241db2b53fbd0c4edff692501553336034385f706e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/commands/artifact/scanner.go:105-111 | pkg/commands/artifact/scanner.go:201-207 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060pkg/commands/artifact/scanner.go:105\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/commands/artifact/scanner.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eb0af127a65dc6e2202e2c163083f28e89b39bb3f1b0fb144a6899110c2063c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/detector/ospkg/oracle/oracle.go:50-56 | pkg/detector/ospkg/suse/suse.go:123-129 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060pkg/detector/ospkg/oracle/oracle.go:50\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/detector/ospkg/oracle/oracle.go"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c3267b82e6385e1bc001a7117d4d86a14ee864d629128476541f950c87213cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/detector/ospkg/photon/photon.go:45-51 | pkg/detector/ospkg/suse/suse.go:122-128 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060pkg/detector/ospkg/photon/photon.go:45\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/detector/ospkg/photon/photon.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9b75e0b202be10d5ed0588651e79dc0c2b0273d276082149742a8bc93e49c60"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/fanal/analyzer/language/python/poetry/poetry.go:57-63 | pkg/fanal/analyzer/language/python/pylock/pylock.go:56-63 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060pkg/fanal/analyzer/language/python/poetry/poetry.go:57\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/language/python/poetry/poetry.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"66589166dc5f0d3b3146f0a2a099cd009eb3ec9e20a0e984802923f3f2bb4aca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/fanal/artifact/sbom/sbom.go:111-117 | pkg/fanal/artifact/vm/file.go:106-112 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/artifact/sbom/sbom.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"d322ab0c6e98ed053167401561be1eee3a3b25f769f41fdfd1e68fa2990a070c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/fanal/secret/scanner.go:725-731 | pkg/fanal/secret/scanner.go:810-816 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060pkg/fanal/secret/scanner.go:725\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/secret/scanner.go"},"region":{"startLine":725}}}],"partialFingerprints":{"codehealthFindingId/v1":"635160d0d3e273b837b79e807559d36813914b3facb83ca618f77eecb73b066f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/iac/adapters/terraform/aws/ec2/vpc.go:191-197 | pkg/iac/adapters/terraform/aws/ec2/vpc.go:212-218 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060pkg/iac/adapters/terraform/aws/ec2/vpc.go:191\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/aws/ec2/vpc.go"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe24554919680bc799a84e863963f10e905c0c30cef6fde8bdc8fa80e0789467"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/iac/adapters/terraform/aws/sqs/adapt.go:35-41 | pkg/iac/adapters/terraform/aws/sqs/adapt.go:108-114 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060pkg/iac/adapters/terraform/aws/sqs/adapt.go:35\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/aws/sqs/adapt.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ea510ac337fc710218486e1c26c9105b2700d5561ccf80ac7cdb4cff9e3ac50"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/iac/adapters/terraform/google/gke/adapt.go:84-90 | pkg/iac/adapters/terraform/google/gke/adapt.go:191-197 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/google/gke/adapt.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3cd494507363d3b64190a9676422c8a18b7739ce8c8899e38746ec24eaaeb42"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/iac/scanners/terraform/parser/resolvers/registry.go:86-92 | pkg/iac/scanners/terraform/parser/resolvers/registry.go:123-129 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/terraform/parser/resolvers/registry.go"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"d308529ea680bd336e5cd04d671d7465e438b1b2b98b362ff42908ee271ddc31"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/module/module.go:199-207 | pkg/module/module.go:248-254 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060pkg/module/module.go:199\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/module/module.go"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e19a5b4db6bfbac761d4ee0d5c34b87acb5cdcd0799e9ea152739fbc95dd62b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/version/version.go:47-53 | pkg/version/version.go:63-69 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060pkg/version/version.go:47\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/version/version.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ae987deb7f9b9e81f005ee193d7bdbb4ca79e48d3518c5154515daf837897fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/iac/adapters/terraform/aws/apigateway/apiv1.go:108-115 | pkg/iac/adapters/terraform/aws/apigateway/apiv2.go:63-69 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/iac/adapters/terraform/aws/apigateway/apiv1.go:108\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/aws/apigateway/apiv1.go"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"d221a511f1801c02a21a83ce2f687f0ed3c038dce9e4aa23a6a24d355f33341f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/iac/adapters/terraform/google/compute/instances.go:70-76 | pkg/iac/adapters/terraform/google/compute/instances.go:82-88 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060pkg/iac/adapters/terraform/google/compute/instances.go:70\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/google/compute/instances.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"faa35b43417c25f54ac660de8a058fe2cab69db5614d3df032ccb1bdd1663ae3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/iac/scanners/terraform/parser/funcs/crypto.go:229-235 | pkg/iac/scanners/terraform/parser/funcs/crypto.go:249-255 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060pkg/iac/scanners/terraform/parser/funcs/crypto.go:229\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/terraform/parser/funcs/crypto.go"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"358bb0dd2e33fbbbea4f8c09d4e0489e0dfc90ff536ce5f5418124205ba7974c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): pkg/fanal/analyzer/language/nodejs/bun/bun.go:57-62 | pkg/fanal/analyzer/language/nodejs/npm/npm.go:56-61 | pkg/fanal/analyzer/language/nodejs/pnpm/pnpm.go:54-60 \u2014 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 \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/language/nodejs/bun/bun.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e5fa8ca6d4385721562406e36e2ca8caa23a2533d7bd6c495588d3620b63636"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): pkg/iac/adapters/arm/database/mssql.go:34-40 | pkg/iac/adapters/arm/database/postgresql.go:28-33 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/iac/adapters/arm/database/mssql.go:34\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/arm/database/mssql.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"e17bf0640ad8177b2f6adba270d4697c39a5d4d9aad56e0dc831f4f2dba8d725"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): pkg/iac/adapters/cloudformation/aws/sam/function.go:31-36 | pkg/iac/adapters/cloudformation/aws/sam/state_machines.go:58-63 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/iac/adapters/cloudformation/aws/sam/function.go:31\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/cloudformation/aws/sam/function.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"042f54d88d5b9726df2df03a31ccbd7ebec6df1b042af61995904dfa457874a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): pkg/iac/adapters/terraform/aws/s3/policies.go:29-35 | pkg/iac/adapters/terraform/aws/s3/public_access_block.go:19-24 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/iac/adapters/terraform/aws/s3/policies.go:29\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/aws/s3/policies.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a5537f2e7977843725a3e47333d88a7576a4e519721c0493f6764cc20e75019"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): pkg/cache/fs.go:100-104 | pkg/cache/fs.go:158-162 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060pkg/cache/fs.go:100\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/cache/fs.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"072eea21fcb804a7f8efa446cf4b7d93ac0b675e285a39bbd1a87f2738fdaef9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): pkg/iac/adapters/cloudformation/aws/iam/iam.go:13-17 | pkg/iac/adapters/terraform/aws/iam/passwords.go:14-18 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/cloudformation/aws/iam/iam.go"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"e02043303a1794d95bf0abe8ab02e3a08612c9e66d263425e0898fda5dbad6ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): pkg/iac/adapters/terraform/aws/ecr/adapt.go:105-109 | pkg/iac/adapters/terraform/aws/redshift/adapt.go:88-92 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/aws/ecr/adapt.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"cba26a582111f83d21903363e41865c7a6a2ce34451d7736f418ec2db4f53935"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): pkg/iac/adapters/terraform/aws/s3/bucket.go:153-157 | pkg/iac/adapters/terraform/aws/s3/bucket.go:165-169 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060pkg/iac/adapters/terraform/aws/s3/bucket.go:153\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/adapters/terraform/aws/s3/bucket.go"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"02bee48a13b74c84c60c2fad3721e4ee422b883f5f258ccf5082062c5252334d"}},{"ruleId":"D13","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5382b3eaac05d50cbdf20853ec0a506411559f543f06b38b6380e41802b9cade"},"taxa":[{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pkg/dependency/parser/java/jar/parse.go: pkg/dependency/parser/java/jar/parse.go changed 4 times in last 90 days, max complexity 18. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/java/jar/parse.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d24231f4c7910cb3b1fbb9f7c913549c5178740a01b1d6edc3c39d2c3599c3dd"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pkg/dependency/parser/java/pom/parse.go: pkg/dependency/parser/java/pom/parse.go changed 3 times in last 90 days, max complexity 23. 1 of those changes was a fix/bug commit, and the other 2 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/java/pom/parse.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"36e29465aa467d90e039993df4e1675b77238002deea4c02621c14d284c5f212"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pkg/fanal/applier/docker.go: pkg/fanal/applier/docker.go changed 2 times in last 90 days, max complexity 34. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/applier/docker.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3c6d6b39d57e378800c64338d1b6b4f1ca92d26254aecc6e1e034525b570dc2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pkg/detector/library/driver.go: pkg/detector/library/driver.go changed 3 times in last 90 days, max complexity 18. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/detector/library/driver.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dce8a2c534b3427df3bed2478eaf28c60cb9d16aa1a96574a6dec8b2e00eb1f4"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pkg/detector/library/seal/seal.go: pkg/detector/library/seal/seal.go changed 3 times in last 90 days, max complexity 18. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/detector/library/seal/seal.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fced7304c8c29eca8690909f8facee085eb644cbe78bd35e1e69859a21112ae9"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pkg/sbom/spdx/marshal.go: pkg/sbom/spdx/marshal.go changed 3 times in last 90 days, max complexity 16. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/sbom/spdx/marshal.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad80a61eb352195f526cfd44963ea774be91f9268deb2d5ff5e483d18bcf00df"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pkg/dependency/parser/nodejs/npm/parse.go: pkg/dependency/parser/nodejs/npm/parse.go changed 2 times in last 90 days, max complexity 18. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/nodejs/npm/parse.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"818c148c9ea20079dae5092015ebc952747463b71a2cefc4eb4708d245a7fd5f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pkg/fanal/artifact/local/fs.go: pkg/fanal/artifact/local/fs.go changed 2 times in last 90 days, max complexity 17. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/artifact/local/fs.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"59ef90e394d17eeec22711f0de9208935bc895f199c6bc3a9198d8ec8551c6ff"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pkg/dependency/parser/java/pom/mirror.go: pkg/dependency/parser/java/pom/mirror.go changed 2 times in last 90 days, max complexity 16. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/dependency/parser/java/pom/mirror.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5796f3d058372a3d190c38e5ac6bea900885c8f9121f8cf78c049977c928a9d7"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pkg/iac/rego/schemas/builder.go: pkg/iac/rego/schemas/builder.go changed 2 times in last 90 days, max complexity 15. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/rego/schemas/builder.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbded218e71711d005d3d4a2bb4a0253073208e257c9e3c28d4e2434e0b467c8"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 21 significant file(s) lose their only recent owner: pkg/iac/adapters/terraform/google/gke/adapt.go, pkg/iac/adapters/terraform/aws/s3/bucket.go, pkg/iac/scanners/ansible/parser/node.go, pkg/iac/scan/result.go, pkg/iac/scanners/terraformplan/tfjson/parser/parser.go, pkg/mapfs/file.go, pkg/iac/adapters/terraform/aws/iam/convert.go, pkg/iac/scanners/helm/scanner.go (\u002B13 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6f12cc91ecc9ac025c84ee714f0c1434baebb041e134e203a0f02724009a3df5"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #2: If anonymized user #2 becomes unavailable, 6 significant file(s) lose their only recent owner: pkg/dependency/parser/nodejs/npm/parse_testcase.go, pkg/detector/ospkg/seal/seal.go, pkg/dependency/parser/java/pom/mirror.go, pkg/fanal/analyzer/language/analyze.go, pkg/scan/langpkg/scan.go, pkg/fanal/handler/sysfile/filter.go. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"47ef500211fafd39224ee27ead845ca42333048af7f9620a86bb6a3de13c304c"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #3: If anonymized user #3 becomes unavailable, 4 significant file(s) lose their only recent owner: pkg/plugin/manager.go, pkg/scan/service.go, pkg/vex/repo.go, pkg/version/version.go. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"07197a26a360b3199163b5319ec92ee9f58cb1381dcdd2cbe84b16fd3e75df81"}},{"ruleId":"D16","level":"note","message":{"text":"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 \u2014 folded into the bus-factor score and metrics (36 single-owned of 428 analysed files in total, counted over production source files of roughly 100 lines or more, excluding tests, vendored, generated and example/demo trees, largest first). 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)) \u2014 spread or document their files in the same way, at lower priority than the named off-boarding risks above."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6eac528f2429e724e1a97ed868f79eefbcf1888dab4af9a9e673429369bb5b2f"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3455d0c07801a19637d30299a478c811d65535b63de2abfb3d5ad819854060dc"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1ef9eb2cacb45b2df0b65556dbd42dd0e079e0a4e061d2b07a798571f7f768ad"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b7bfa09ccd641862f07a4fb8d1eab3274a60185dd7ed9323d387a673177821ea"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a921b9103d6ffd2859a5dfe1f1b849290a3c2ba5b9165a6a040fe78ff5bf84ae"}},{"ruleId":"D28","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3cdfd7beb31b791ae18dcb425e21eb157c842e7bbcd522cc330573c1a6538db1"}},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"2874c68fbb52e1ec2cb27f8642072dfb75f9621e37c5ff6fb7564b26161af224"},"taxa":[{"id":"CWE-328","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c5f4d4e74b5ab9ef808daadd5592feb0d704d4005a47a293378abb9188a88e7c"},"taxa":[{"id":"CWE-328","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"475655c6d12611acccb8a7fca09ffccd50651328030ed1a9533812f730dd51e7"},"taxa":[{"id":"CWE-328","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"025deb9abad97a4827432ff032ad1d2b295319f6f6663dd47c87eb6babff64d1"},"taxa":[{"id":"CWE-338","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6f6b8df7935f9f272dd164b9837cf3a491582e69d2a381202d169066d36ea8d9"},"taxa":[{"id":"CWE-242","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a1dcaa79f1eb9f7a14e1700f44d88ebfd5a167e3f1f53cfad74d661834ab0220"},"taxa":[{"id":"CWE-242","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"08a91a88e65d6c78b3ae201d562d9b76540893222d2bcb0da6899feb258de713"},"taxa":[{"id":"CWE-242","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"fb8c2d594446dd896b3e5c17582e86a2829f2b51f014152501c93fc7039a39b3"},"taxa":[{"id":"CWE-242","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a7308ff28fbae4751bbf62e97e30b230b8dbccbab9238f9c3f34ff6bddd9207e"},"taxa":[{"id":"CWE-327","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d1b1611ac9f1952552997130a3c072a4124c7c35b0819f1fd98c204194c63a54"},"taxa":[{"id":"CWE-327","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"fe2d688610b51e0a5a02c7c5dd1724a4986e40f2689fb84510e2ec0164c27d6a"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7188a4010efeac60480f44dffa617f45b0d253cbbcb5d0da262a71a4e46b231a"}},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ca2b30cc23e4b3e9fc4565b65e0007e101c17ce2df333a1e524ddca3d3cbd2ba"}},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"2001f853cf6fb6f100cd7d5dc1e0542d6f40e14f2318bbbaf7eb50203ea6bb4c"}},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"01781d1ce2edcb403332b00a2d6398b262c43fec41a2d50751a7c8ee944992c1"}},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0e1c094d88ac00c73e3d127cc22a4aa18d33aa01f7979b39d2662322655eed53"}},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b67787f58bbdcde79a43cc08af597219f8bc8ccd5a82b8588a8f7af6b62ec402"}},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7e66d87c4a34a496093a5083728a3a85d413c1491a2b3e17f9c64fd6e19b9f7a"}},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4df82bef54d12fa864e2b489817e1f43c6f5b46d02a51aacf0f62566973fe6e2"}},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"43feae29a81e685d1d5ca8bbd892561a9514a4bc4ee684a248b7fa109bd69a80"}},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"8061301ffc8c1c20bf7395ae75bd822819786983fabcda89bfd5c5721462733e"}},{"ruleId":"D31","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"2a110966ca93d420f595cb55a9c1798d8e0a216ada55eb40d28b9eaf8b9d8e99"}},{"ruleId":"D31","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d7c188ac9dfb68debba16a8b2fc33e23eac8da14ef3310dde7b3ac402af35724"}},{"ruleId":"D31","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"61c5895591d1c5485e762d1039c85e570f2e13a1e313134d2c0f631875f28ef7"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/iac/scanners/terraform/parser/funcs/collection.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d74c3f888b0bad9ebaa6c334a9d2610ca7d972c040b6626c31e5b4025f420667"}},{"ruleId":"D34","level":"note","message":{"text":"Further orphaned files (smaller): 85 smaller file(s) also have no living knowledge \u2014 folded into the freshness score and metrics rather than listed individually (86 orphaned of 428 analysed files in total, counted over production source files of roughly 100 lines or more, excluding tests, vendored, generated and example/demo trees, largest first)."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ce861fd78f6935114d3a342cb90ad25870f984e1042954fcbbe27c0e23be3658"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: import.go \u2194 const.go: \u0060pkg/fanal/analyzer/all/import.go\u0060 and \u0060pkg/fanal/analyzer/const.go\u0060 change together 100% of the time (20 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) with no explicit dependency \u2014 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 \u2014 the registration is the link, and it is meant not to be an import \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/all/import.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bb2397a2f5d784c0acdc58a75627f85f4f5d7c8176a01f5bbd8b62729aafc48"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: import.go \u2194 const.go: \u0060pkg/fanal/analyzer/all/import.go\u0060 and \u0060pkg/fanal/types/const.go\u0060 change together 90% of the time (18 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) with no explicit dependency \u2014 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 \u2014 the registration is the link, and it is meant not to be an import \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/all/import.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dd63ccdeb0064f8e8d8b58b44d82b894e2f8614323f95029b06adb5b3c28e3c"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: driver.go \u2194 import.go: \u0060pkg/detector/library/driver.go\u0060 and \u0060pkg/fanal/analyzer/all/import.go\u0060 change together 80% of the time (16 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) with no explicit dependency \u2014 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 \u2014 the registration is the link, and it is meant not to be an import \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/detector/library/driver.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9805286b2fa1995d95a8e35c65c74744f8d602abf299eba474106b706e78fb1b"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: import.go \u2194 purl.go: \u0060pkg/fanal/analyzer/all/import.go\u0060 and \u0060pkg/purl/purl.go\u0060 change together 75% of the time (15 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) with no explicit dependency \u2014 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 \u2014 the registration is the link, and it is meant not to be an import \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/all/import.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4941051392b27b6718d5c14bd91f28720cb48b4fc958206033cbb3e782d2484e"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: detect.go \u2194 release.go: \u0060pkg/detector/ospkg/detect.go\u0060 and \u0060pkg/fanal/analyzer/os/release/release.go\u0060 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) with no explicit dependency \u2014 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 \u2014 the registration is the link, and it is meant not to be an import \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/detector/ospkg/detect.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c87cbbbead79b0f3597bf19c7a28f6791a93b7cff1cf00631004ed776cb4ae0"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: const.go \u2194 const.go: \u0060pkg/fanal/analyzer/const.go\u0060 and \u0060pkg/fanal/types/const.go\u0060 change together 66% of the time (21 of the 32 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) with no explicit dependency \u2014 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 \u2014 the registration is the link, and it is meant not to be an import \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/fanal/analyzer/const.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c95af22b9f418097801e77debcdaf4897e804ec2f6126645b9b5dffc991e6a2"}},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0752d0df7434000fcabf1048e2de30a7a1a8b982b3db9a19898c4dec199856b4"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"180098ad28b8ec88ea6d9d65ee5bc15f4d0baa3b9973c6b6be6d625ae224abce"}},{"ruleId":"D38","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c3101d36131a52584dde37b042bdfe9fc6a1d1edad6398c91ef166385743b007"}},{"ruleId":"D38","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"50c379534161bb30611d421e82af3666b891a67b9a6a35df5a4fc4b4977e653b"}},{"ruleId":"D38","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"83a4d7355234a6169357aad13b00ab9129f899f3f02ec737868c64ecc42da81f"}},{"ruleId":"D40","level":"note","message":{"text":"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."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"295828650a2aaa1b03ae9b32ae6843a0c38011e5a70b1926442c4fa7187de5f0"}},{"ruleId":"D41","level":"note","message":{"text":"No seccomp profile: Workloads do not set a seccomp profile (RuntimeDefault or a Localhost profile). Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"3f418e9f76c3ac90484e0e94a454bfe9b08e914e1cdd218e1fc9e3b261a3bf6e"}},{"ruleId":"D41","level":"note","message":{"text":"No AppArmor/SELinux confinement: Workloads declare no AppArmor or SELinux profile. A mandatory-access-control profile confines what a compromised container can touch on the host, complementing seccomp\u0027s syscall filter."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"e83fbc31033373d6c51983ed230eb4ba61f7775ed02afb30f5fc1840bde01d4f"}},{"ruleId":"D42","level":"note","message":{"text":"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."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"aade9827a37dfc7ee064f80a997f47b5d11e31bc09704e26b9252bef00aa0c58"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-1032","guid":"5f21e517-68aa-a650-9a25-5771ef024637","name":"OWASP Top Ten \u2014 Security Misconfiguration category","shortDescription":{"text":"OWASP Top Ten \u2014 Security Misconfiguration category"},"helpUri":"https://cwe.mitre.org/data/definitions/1032.html"},{"id":"CWE-1059","guid":"a2381a08-60f6-9554-a8b8-f3018cfaaca5","name":"Insufficient Technical Documentation","shortDescription":{"text":"Insufficient Technical Documentation"},"helpUri":"https://cwe.mitre.org/data/definitions/1059.html"},{"id":"CWE-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"id":"CWE-1395","guid":"800e09e7-c11a-8654-9fa6-86f398995fed","name":"Dependency on Vulnerable Third-Party Component","shortDescription":{"text":"Dependency on Vulnerable Third-Party Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1395.html"},{"id":"CWE-16","guid":"659db3ea-affc-8453-8add-c1218fbfcb92","name":"Configuration","shortDescription":{"text":"Configuration"},"helpUri":"https://cwe.mitre.org/data/definitions/16.html"},{"id":"CWE-242","guid":"5c147e5c-be37-b051-9928-764ef5a8f3d3","name":"CWE-242","shortDescription":{"text":"CWE-242"},"helpUri":"https://cwe.mitre.org/data/definitions/242.html"},{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-327","guid":"e51910ff-67b5-3c51-aa3d-92837d9eab90","name":"CWE-327","shortDescription":{"text":"CWE-327"},"helpUri":"https://cwe.mitre.org/data/definitions/327.html"},{"id":"CWE-328","guid":"f0ffc869-97c3-dc5c-8825-be1159f1fc5f","name":"CWE-328","shortDescription":{"text":"CWE-328"},"helpUri":"https://cwe.mitre.org/data/definitions/328.html"},{"id":"CWE-338","guid":"e89b7604-c3f7-8b53-bc8c-4d4718c28617","name":"CWE-338","shortDescription":{"text":"CWE-338"},"helpUri":"https://cwe.mitre.org/data/definitions/338.html"},{"id":"CWE-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-732","guid":"1da27e8f-b330-7650-ab63-bd61953eae5d","name":"Incorrect Permission Assignment for Critical Resource","shortDescription":{"text":"Incorrect Permission Assignment for Critical Resource"},"helpUri":"https://cwe.mitre.org/data/definitions/732.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Command Injection","shortDescription":{"text":"Command Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"OS Command Injection","shortDescription":{"text":"OS Command Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Cross-site Scripting (XSS)","shortDescription":{"text":"Cross-site Scripting (XSS)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"SQL Injection","shortDescription":{"text":"SQL Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Code Injection","shortDescription":{"text":"Code Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":35,"secretScannerRunsExcluded":0}},"redactionTokens":["A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."]}]}