{"$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":"D7","name":"Architectural Integrity","shortDescription":{"text":"Architectural Integrity"},"helpUri":"https://codehealth.canine.dev/dimensions/D7"},{"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":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"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":"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"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"server.run (cyclomatic 103): server.run has cyclomatic complexity 103 (threshold 15). Of this number, 99 points are the body\u0027s own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/cli/server/server.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"fee83d20328f3ffd6f417636a54b2cbf5a2a3a47917cb7c3dfe79c20a205f597"}},{"ruleId":"D1","level":"warning","message":{"text":"config.get (cyclomatic 52): config.get has cyclomatic complexity 52 (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/agent/config/config.go"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"0769bd387096c47abb433af74bf72bde3b4e2de26eab8f6ea3334b8f70c96f5a"}},{"ruleId":"D1","level":"warning","message":{"text":"ETCD.reconcileSnapshotData (cyclomatic 40): ETCD.reconcileSnapshotData has cyclomatic complexity 40 (threshold 15). Of this number, 26 points are the body\u0027s own statements and 14 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/etcd/snapshot.go"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9a880248fe2667f6c9cf6c76b0aeed6f934e869e28473399242111c881372a1"}},{"ruleId":"D1","level":"warning","message":{"text":"agent.run (cyclomatic 36): agent.run has cyclomatic complexity 36 (threshold 15). Of this number, 33 points are the body\u0027s own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/agent/run.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"6621f8384f998954d83959128159133bf96a424c2cad4a3500d2f29626cbfbed"}},{"ruleId":"D1","level":"warning","message":{"text":"Cluster.ReconcileBootstrapData (cyclomatic 34): Cluster.ReconcileBootstrapData has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/cluster/bootstrap.go"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"c185df857b9f932f33859bf56d920d182272179e49bb894ccf48211e00ddba17"}},{"ruleId":"D1","level":"warning","message":{"text":"Config.Start (cyclomatic 33): Config.Start has cyclomatic complexity 33 (threshold 15). Of this number, 29 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/spegel/spegel.go"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe9dd2ada56d76b33fab09930a49230d52c1094ed9bcb5f2430e14cfbf202204"}},{"ruleId":"D1","level":"warning","message":{"text":"etcdSnapshotHandler.reconcile (cyclomatic 32): etcdSnapshotHandler.reconcile has cyclomatic complexity 32 (threshold 15). Of this number, 26 points are the body\u0027s own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/etcd/snapshot_controller.go"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a29367467b73cde5a55b4d70030aadbb0d4ac57dad7313caaaaeddb870871b0"}},{"ruleId":"D1","level":"warning","message":{"text":"ETCD.Reset (cyclomatic 28): ETCD.Reset has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 13 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 324). 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/etcd/etcd.go"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c7723a31b7570cc547b3e49ea7b8795fea9e3f9b653762afca89a6d0db911cf"}},{"ruleId":"D1","level":"warning","message":{"text":"handler.updateCoreDNSConfigMap (cyclomatic 28): handler.updateCoreDNSConfigMap has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/node/controller.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a23d3861015d3d5b09e6d37aaa6b002794c6cf6173a8ba8eba2d0f1f48298e9"}},{"ruleId":"D1","level":"warning","message":{"text":"handlers.encryptionEnable (cyclomatic 27): handlers.encryptionEnable has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/server/handlers/secrets-encrypt.go"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"08a0e8ae3c5c3d7909b8d74df6674a6c9120f17023ae0aa4407b2444952712e6"}},{"ruleId":"D1","level":"warning","message":{"text":"ETCD.snapshot (cyclomatic 26): ETCD.snapshot has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/etcd/snapshot.go"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab14d7c212b373dbd5716a6bb650dd320d035dae7f2f7a34f7f623b82ff09465"}},{"ruleId":"D1","level":"warning","message":{"text":"deps.genClientCerts (cyclomatic 25): deps.genClientCerts has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/daemons/control/deps/deps.go"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d0a6eabc515f78e5338eb6306b848a4bdecc0bccf5b708eba702ae5d44311c9"}},{"ruleId":"D1","level":"warning","message":{"text":"main.extract (cyclomatic 24): main.extract has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/k3s/main.go"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce687b7a3eb5ee036d95c0fff708f54b75b1483acd8b16e8a56933b84b41653d"}},{"ruleId":"D1","level":"warning","message":{"text":"handlers.encryptionStatus (cyclomatic 24): handlers.encryptionStatus has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/server/handlers/secrets-encrypt.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc55bc9d4142cd543c7dac226b183367e92339df0e695cc3f99ffbd8021748ba"}},{"ruleId":"D1","level":"warning","message":{"text":"flannel.createFlannelConf (cyclomatic 23): flannel.createFlannelConf 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/agent/flannel/setup.go"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f0dbb39e620dae8f41722c7990dfe7c451ce1fc65290174e1a70a5e3c79e885"}},{"ruleId":"D1","level":"warning","message":{"text":"netpol.Run (cyclomatic 23): netpol.Run has cyclomatic complexity 23 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 7 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/agent/netpol/netpol.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"218a75b7fa5654df4cf76ca39b371072f69bffa58759208b39af66f56e6494af"}},{"ruleId":"D1","level":"warning","message":{"text":"cgroups.CheckCgroups (cyclomatic 23): cgroups.CheckCgroups has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/cgroups/cgroups_linux.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ab4d6ef207f236ca8d132c8efb5a833288e439a881998a2f632b8ddfabc26cd"}},{"ruleId":"D1","level":"warning","message":{"text":"ETCD.manageLearners (cyclomatic 23): ETCD.manageLearners has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 1151). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\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/etcd/etcd.go"},"region":{"startLine":1142}}}],"partialFingerprints":{"codehealthFindingId/v1":"e266be5caec0f542a7b787f560d0f9fcb86b21ce0d971fc075bf676dbfb0dd12"}},{"ruleId":"D1","level":"warning","message":{"text":"agent.kubeletArgsAndConfig (cyclomatic 22): agent.kubeletArgsAndConfig has cyclomatic complexity 22 (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/daemons/agent/agent_linux.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"c19ea8d2f26e4a24b1308b369dd2400f88fd1c148511eafad028f5a452c5dab4"}},{"ruleId":"D1","level":"warning","message":{"text":"Controller.GetClient (cyclomatic 21): Controller.GetClient has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/etcd/s3/s3.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a0afa8b2281d12b914eda438b65d146e517d59adb1b569d9b58ae5305cc69d1"}},{"ruleId":"D1","level":"warning","message":{"text":"watchqueue.processImageEvent (cyclomatic 20): watchqueue.processImageEvent 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/agent/containerd/watcher.go"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a5314d1b73e7bd6671ad363c748be9f0e45587cbf67fd95c94af12cf95beebe"}},{"ruleId":"D1","level":"warning","message":{"text":"containerd.getHostConfigs (cyclomatic 19): containerd.getHostConfigs has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/agent/containerd/config.go"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9f1537beab3ebe8f1efd457329b5177c461b3da1085db272c8eb9cf5a40cd3f"}},{"ruleId":"D1","level":"warning","message":{"text":"k3s.InstanceMetadata (cyclomatic 19): k3s.InstanceMetadata has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/cloudprovider/instances.go"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"df62d38642ab3e03238c167eda0fc2b8a3925df477e31b06bcc77e5815346f75"}},{"ruleId":"D1","level":"warning","message":{"text":"ETCD.join (cyclomatic 19): ETCD.join has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/etcd/etcd.go"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccaaf63bdfd4a1f0e4e55eaba7c4d48fb4c4401619fe2dad2322897837cac2ec"}},{"ruleId":"D1","level":"warning","message":{"text":"serverList.recordSuccess (cyclomatic 18): serverList.recordSuccess has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/agent/loadbalancer/servers.go"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"34aa68fc7c8dc8fec49d19b4ae608e0ffbeebb106be7be70c0bf664ed3283c73"}},{"ruleId":"D1","level":"warning","message":{"text":"Cluster.storageBootstrap (cyclomatic 18): Cluster.storageBootstrap has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body\u0027s own statements and 8 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/cluster/storage.go"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"3250db983a52522e09eacd70ae19c7259f7ffa2409786cd190474425c9b3d591"}},{"ruleId":"D1","level":"warning","message":{"text":"ETCD.RemovePeer (cyclomatic 18): ETCD.RemovePeer has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/etcd/etcd.go"},"region":{"startLine":1078}}}],"partialFingerprints":{"codehealthFindingId/v1":"705dbe5af3c441a78ed3a8a343d9603688618454cb9caeb36fd889c59cc66535"}},{"ruleId":"D1","level":"warning","message":{"text":"Controller.getConfigFromSecret (cyclomatic 18): Controller.getConfigFromSecret has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/etcd/s3/config_secret.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cd8977ba93a46f7bf6cdfe87258365afa2383ced00e17bf9cf32b0ab1c4d6e1"}},{"ruleId":"D1","level":"warning","message":{"text":"Cluster.Start (cyclomatic 17): Cluster.Start has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body\u0027s own statements and 8 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/cluster/cluster.go"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa4471e0cc41ce568ff65024d86079ec4e5a4cbb20a3f883f2224f2c1b67e0f9"}},{"ruleId":"D1","level":"warning","message":{"text":"ETCDConfig.ToConfigFile (cyclomatic 17): ETCDConfig.ToConfigFile has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/daemons/executor/executor.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5ec41569a9e8d44fbd39c465cbed16846b8c33b39d77d03f540affa7102d7d5"}},{"ruleId":"D1","level":"warning","message":{"text":"embed.New (cyclomatic 17): embed.New has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/executor/embed/embed.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"2503efec07ee7ebe94cc8fbd9b661758d20c14eefccfec159ab1389a65bc7d78"}},{"ruleId":"D1","level":"warning","message":{"text":"k3s.podIPs (cyclomatic 16): k3s.podIPs has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/cloudprovider/servicelb.go"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"c55226c80e38f1dbe2093c7298eb8a9858a1f81e0a515dea43a10ca941bb327c"}},{"ruleId":"D1","level":"warning","message":{"text":"configfilearg.readConfigFile (cyclomatic 16): configfilearg.readConfigFile has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/configfilearg/parser.go"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"70a07f814b0d973043f85cb2a00c02d47c3f00ca5f632876fbe10fe51d532d74"}},{"ruleId":"D1","level":"warning","message":{"text":"etcdSnapshotHandler.sync (cyclomatic 16): etcdSnapshotHandler.sync has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/etcd/snapshot_controller.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f737d87914040d1524a2a7368f230b717f9c763693e7fc2a9d7b1bdd2c6dc1e"}},{"ruleId":"D1","level":"warning","message":{"text":"rootless.createParentOpt (cyclomatic 16): rootless.createParentOpt has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/rootless/rootless.go"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"410dff54bbdfcfe97c2c224fb2f336493e88f7c3ef99451a58a4d94e88c0e267"}},{"ruleId":"D1","level":"warning","message":{"text":"secretsencrypt.GetEncryptionConfigMetrics (cyclomatic 16): secretsencrypt.GetEncryptionConfigMetrics has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 338). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\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/secretsencrypt/config.go"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f43a0fc76565ee2b835b7c7a521141b154a5a00fea227ed4cd4de14be2494d2"}},{"ruleId":"D1","level":"warning","message":{"text":"server.printTokens (cyclomatic 16): server.printTokens has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/server/server.go"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"17d4157909a9c9bdd8fd0f70b284ea766189fdc6cb47fd6a3ff1fc401ef75caf"}},{"ruleId":"D1","level":"warning","message":{"text":"handlers.reencryptAndRemoveKey (cyclomatic 16): handlers.reencryptAndRemoveKey has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/server/handlers/secrets-encrypt.go"},"region":{"startLine":394}}}],"partialFingerprints":{"codehealthFindingId/v1":"2de169ff3c0a493bd3a4db7b1a8189b49131cbd653c82fe3913c0508b95ee4cc"}},{"ruleId":"D2","level":"warning","message":{"text":"server.run (cognitive 169): server.run has cognitive complexity 169 (threshold 15). Drivers by points: if/else 146, boolean chains 14, loops 9 (nesting depth added 58). Of this number, 164 points are the body\u0027s own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/cli/server/server.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9ebf197dbc31b5716b688f3532b0f33a97e4072d7929bb174cfdf28baf9d720"}},{"ruleId":"D2","level":"warning","message":{"text":"config.get (cognitive 65): config.get has cognitive complexity 65 (threshold 15). Drivers by points: if/else 61, boolean chains 2, loops 2 (nesting depth added 11). 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/agent/config/config.go"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a8f758bea6a4f8880ba2a80f6804cd497bed38933f33dd6fa7df22c9f2d6d35"}},{"ruleId":"D2","level":"warning","message":{"text":"ETCD.reconcileSnapshotData (cognitive 64): ETCD.reconcileSnapshotData has cognitive complexity 64 (threshold 15). Drivers by points: if/else 50, loops 9, boolean chains 5 (nesting depth added 22). Of this number, 41 points are the body\u0027s own statements and 23 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/etcd/snapshot.go"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdc026b83f1cb84270f4e0f258e6a02aad4acc76672d00b4fee6c6cc5959ad13"}},{"ruleId":"D2","level":"warning","message":{"text":"Cluster.ReconcileBootstrapData (cognitive 57): Cluster.ReconcileBootstrapData has cognitive complexity 57 (threshold 15). Drivers by points: if/else 51, boolean chains 5, loops 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/cluster/bootstrap.go"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"efb1271a42bd359f43d1e60031c4a35954a833b954c233dfc70e57f15332cfa4"}},{"ruleId":"D2","level":"warning","message":{"text":"ETCD.snapshot (cognitive 54): ETCD.snapshot has cognitive complexity 54 (threshold 15). Drivers by points: if/else 53, boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/etcd/snapshot.go"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9ca3cb3283ce26e0ba47b772684c3d75829795fea8b9f1fb56e7fd6a810e068"}},{"ruleId":"D2","level":"warning","message":{"text":"agentTunnel.watchPods (cognitive 52): agentTunnel.watchPods has cognitive complexity 52 (threshold 15). Drivers by points: if/else 35, loops 15, match/switch 2 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/agent/tunnel/tunnel.go"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"eda60b4bdedd6e2fe9288f1c920c1259ba7600c0053e279d850d9c8dd374aea2"}},{"ruleId":"D2","level":"warning","message":{"text":"etcdSnapshotHandler.reconcile (cognitive 52): etcdSnapshotHandler.reconcile has cognitive complexity 52 (threshold 15). Drivers by points: if/else 42, loops 6, boolean chains 4 (nesting depth added 20). Of this number, 44 points are the body\u0027s own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/etcd/snapshot_controller.go"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"086f40a985fa7e2b641969fa6cdc070e9ee4fd50b17ac30a6bd23f18d64858d8"}},{"ruleId":"D2","level":"warning","message":{"text":"ETCD.Reset (cognitive 50): ETCD.Reset has cognitive complexity 50 (threshold 15). Drivers by points: if/else 47, match/switch 2, boolean chains 1 (nesting depth added 24). Of this number, 25 points are the body\u0027s own statements and 25 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/etcd/etcd.go"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"daf6f9f514293838a969a79b15e99d3d6b37ea104053b90686ff0cd870ac88b9"}},{"ruleId":"D2","level":"warning","message":{"text":"cgroups.CheckCgroups (cognitive 47): cgroups.CheckCgroups has cognitive complexity 47 (threshold 15). Drivers by points: if/else 31, loops 10, boolean chains 3, match/switch 3 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/cgroups/cgroups_linux.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"9af6ba216a06feedcc065634305f8881018b85b422657cb2a5a92ce60636baba"}},{"ruleId":"D2","level":"warning","message":{"text":"ETCD.RemovePeer (cognitive 44): ETCD.RemovePeer has cognitive complexity 44 (threshold 15). Drivers by points: if/else 38, loops 4, boolean chains 2 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/etcd/etcd.go"},"region":{"startLine":1078}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d4628bb744e2415e88723ef4749494cdecdda3903e39c8b0a75fec141f0badd"}},{"ruleId":"D2","level":"warning","message":{"text":"Config.Start (cognitive 41): Config.Start has cognitive complexity 41 (threshold 15). Drivers by points: if/else 36, boolean chains 3, loops 2 (nesting depth added 6). Of this number, 35 points are the body\u0027s own statements and 6 belong 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, 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/spegel/spegel.go"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cda0a544168e76e71a4eb0b41747425b7a5fb1147b6d0788e9b0e1969619424"}},{"ruleId":"D2","level":"warning","message":{"text":"containerd.getHostConfigs (cognitive 40): containerd.getHostConfigs has cognitive complexity 40 (threshold 15). Drivers by points: if/else 33, loops 5, boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/agent/containerd/config.go"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"8495ec9df50924822f8d321a7f284f3e0284186a7461d04768cc5232f5061724"}},{"ruleId":"D2","level":"warning","message":{"text":"handler.updateCoreDNSConfigMap (cognitive 40): handler.updateCoreDNSConfigMap has cognitive complexity 40 (threshold 15). Drivers by points: if/else 35, loops 3, boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/node/controller.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"61018f752d53135423055b10417dd86ce19647e5f3192b560660ff1b857fecc1"}},{"ruleId":"D2","level":"warning","message":{"text":"main.extract (cognitive 39): main.extract has cognitive complexity 39 (threshold 15). Drivers by points: if/else 36, boolean chains 2, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/k3s/main.go"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6264a5510178490752b9639cd11fa38e2e9d0238ab645236d9184efafc7ef53"}},{"ruleId":"D2","level":"warning","message":{"text":"flannel.createFlannelConf (cognitive 38): flannel.createFlannelConf has cognitive complexity 38 (threshold 15). Drivers by points: if/else 26, loops 8, match/switch 3, boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/agent/flannel/setup.go"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc82bc5943326f80940c26666b4de5716a544e5859351573190404231770e4a5"}},{"ruleId":"D2","level":"warning","message":{"text":"handlers.encryptionStatus (cognitive 38): handlers.encryptionStatus has cognitive complexity 38 (threshold 15). Drivers by points: if/else 24, boolean chains 7, loops 7 (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/server/handlers/secrets-encrypt.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"a851c89ec3526cafc2ecd61b2dc2c413cb1d6c56248ea19238c15e5403a28aa6"}},{"ruleId":"D2","level":"warning","message":{"text":"agent.run (cognitive 37): agent.run has cognitive complexity 37 (threshold 15). Drivers by points: if/else 25, boolean chains 12 (nesting depth added 4). Of this number, 34 points are the body\u0027s own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth \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/agent/run.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"5035160fdb18bff39cec09aec3ace2a91476c03f9a97c49fca68b9ebf40e9802"}},{"ruleId":"D2","level":"warning","message":{"text":"server.printTokens (cognitive 37): server.printTokens has cognitive complexity 37 (threshold 15). Drivers by points: if/else 37 (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/server/server.go"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cb3440623bbe0ae431f7d590e2458003002760452c8447ddae89a096f355408"}},{"ruleId":"D2","level":"warning","message":{"text":"ETCD.join (cognitive 35): ETCD.join has cognitive complexity 35 (threshold 15). Drivers by points: if/else 29, boolean chains 3, loops 3 (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/etcd/etcd.go"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b5e33d41da3eaacc023c2fc7633dea519bd7602990e31016604158c74aea13a"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.ListSnapshots (cognitive 35): Client.ListSnapshots has cognitive complexity 35 (threshold 15). Drivers by points: if/else 33, loops 2 (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/etcd/s3/s3.go"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"cedc628c7afce03b0a876e33730a0cf0889a9e5fe3f49196cf21f50efeb6de7a"}},{"ruleId":"D2","level":"warning","message":{"text":"Cluster.Start (cognitive 34): Cluster.Start has cognitive complexity 34 (threshold 15). Drivers by points: if/else 28, match/switch 3, loops 2, boolean chains 1 (nesting depth added 19). Most of this is not in the body itself: 10 of the 34 points are its own statements and the rest belongs to one function literal inside it that branches (line 80). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\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/cluster/cluster.go"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"d18795930b09209ea938c74c0496cd654660cf5b4e68c49e3dd10de5cd5f94a7"}},{"ruleId":"D2","level":"warning","message":{"text":"ETCD.manageLearners (cognitive 34): ETCD.manageLearners has cognitive complexity 34 (threshold 15). Drivers by points: if/else 27, loops 5, match/switch 2 (nesting depth added 13). Most of this is not in the body itself: 3 of the 34 points are its own statements and the rest belongs to one function literal inside it that branches (line 1151). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\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/etcd/etcd.go"},"region":{"startLine":1142}}}],"partialFingerprints":{"codehealthFindingId/v1":"c16d88bbce4ba3b2e38ecc8ae6b7145891bcf55165fbaf80edf0e6723a5fe283"}},{"ruleId":"D2","level":"warning","message":{"text":"embed.New (cognitive 33): embed.New has cognitive complexity 33 (threshold 15). Drivers by points: if/else 28, loops 3, boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/executor/embed/embed.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"b52d876e2984e81f9ecb91a838dcf9c736c70725e7f0f6931d6d867e0126ba18"}},{"ruleId":"D2","level":"warning","message":{"text":"serverList.recordSuccess (cognitive 31): serverList.recordSuccess has cognitive complexity 31 (threshold 15). Drivers by points: if/else 25, match/switch 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/agent/loadbalancer/servers.go"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc1db54275afa79023ac4efba23e8a5c725c7ef7799a220a8991733bc03d23e5"}},{"ruleId":"D2","level":"warning","message":{"text":"Cluster.storageBootstrap (cognitive 31): Cluster.storageBootstrap has cognitive complexity 31 (threshold 15). Drivers by points: if/else 31 (nesting depth added 12). Of this number, 16 points are the body\u0027s own statements and 15 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/cluster/storage.go"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"2aa632ac8bdd380f5d87ad4faa9782c96f4fcadcf966ef81e9cff17fce5068cc"}},{"ruleId":"D2","level":"warning","message":{"text":"TunnelServer.onChangePod (cognitive 31): TunnelServer.onChangePod has cognitive complexity 31 (threshold 15). Drivers by points: if/else 26, loops 3, boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/daemons/control/tunnel.go"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a5c8da24a2ef7d3a1cc76cf7f0972ba5778540c88015f90b8cf39a3dbc71a0f"}},{"ruleId":"D2","level":"warning","message":{"text":"Controller.getConfigFromSecret (cognitive 31): Controller.getConfigFromSecret has cognitive complexity 31 (threshold 15). Drivers by points: if/else 25, loops 6 (nesting depth added 9). 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/etcd/s3/config_secret.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3c41f45a0d1647667c68d5b997196bdc4bd7c95a24afe50627478ce4aac2826"}},{"ruleId":"D2","level":"warning","message":{"text":"handlers.encryptionEnable (cognitive 31): handlers.encryptionEnable has cognitive complexity 31 (threshold 15). Drivers by points: if/else 21, boolean chains 8, 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/server/handlers/secrets-encrypt.go"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbdd6b8e0b20dd77cb5706988ebdcc9ffa6d1437afbbcacdf408b130dfa0fd11"}},{"ruleId":"D2","level":"warning","message":{"text":"configfilearg.readConfigFile (cognitive 30): configfilearg.readConfigFile has cognitive complexity 30 (threshold 15). Drivers by points: if/else 21, loops 7, boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/configfilearg/parser.go"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"50fda72653f657ff922ef88769cfe10c3f01f72f73de30e70523988e3916ce1b"}},{"ruleId":"D2","level":"warning","message":{"text":"agent.kubeletArgsAndConfig (cognitive 30): agent.kubeletArgsAndConfig has cognitive complexity 30 (threshold 15). Drivers by points: if/else 29, boolean chains 1 (nesting depth added 6). 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/daemons/agent/agent_linux.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1f4849bd1021d6e47cb1203b7504eb99f4f4663e1643f8d2a9a6641ea040866"}},{"ruleId":"D2","level":"warning","message":{"text":"deps.genClientCerts (cognitive 30): deps.genClientCerts has cognitive complexity 30 (threshold 15). Drivers by points: if/else 30 (nesting depth added 6). 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/daemons/control/deps/deps.go"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"43beda3b4821245aa6c7f7823262c3c00a32c9dd611ce53c99156e920efd10dc"}},{"ruleId":"D2","level":"warning","message":{"text":"Controller.GetClient (cognitive 30): Controller.GetClient has cognitive complexity 30 (threshold 15). Drivers by points: if/else 29, 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/etcd/s3/s3.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c0634d1954c074facb71691282f596035cb833266a3be23420f7eabd7125240"}},{"ruleId":"D2","level":"warning","message":{"text":"handler.toBindPorts (cognitive 30): handler.toBindPorts has cognitive complexity 30 (threshold 15). Drivers by points: if/else 20, loops 10 (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/rootlessports/controller.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"a086ce0189ac4a2c95c45faccef42f3127fba04ac3d039f7d56d57a5c7ab2615"}},{"ruleId":"D2","level":"warning","message":{"text":"netpol.Run (cognitive 28): netpol.Run has cognitive complexity 28 (threshold 15). Drivers by points: if/else 24, loops 3, boolean chains 1 (nesting depth added 6). Of this number, 19 points are the body\u0027s own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/agent/netpol/netpol.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2963753540411ee5fc70d51bdf97dfb43bda0f77a85531a423f3354f565ac49"}},{"ruleId":"D2","level":"warning","message":{"text":"TunnelServer.dialBackend (cognitive 27): TunnelServer.dialBackend has cognitive complexity 27 (threshold 15). Drivers by points: if/else 25, 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/daemons/control/tunnel.go"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e71b0debb98b3ecf4ae439a097caa365b5d44c89f7a10fafd3d2c07c22ba624"}},{"ruleId":"D2","level":"warning","message":{"text":"util.GetArgs (cognitive 27): util.GetArgs has cognitive complexity 27 (threshold 15). Drivers by points: if/else 21, loops 6 (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/util/args.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"2541e9cbc8bca7736811bc74857b2546ccb800614bfa4127626513613443496d"}},{"ruleId":"D2","level":"warning","message":{"text":"ETCDConfig.ToConfigFile (cognitive 26): ETCDConfig.ToConfigFile has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17, match/switch 5, boolean chains 2, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/daemons/executor/executor.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2dfb5eb9e41c4abae4da7808f13f47d0271d50ed791334d210510e8558c15f4"}},{"ruleId":"D2","level":"warning","message":{"text":"ETCD.DeleteSnapshots (cognitive 26): ETCD.DeleteSnapshots has cognitive complexity 26 (threshold 15). Drivers by points: if/else 25, 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/etcd/snapshot.go"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1d14135e6a46e007de3af95b49ccef779b5fa64001e91e4dece7839fb2a7580"}},{"ruleId":"D2","level":"warning","message":{"text":"watchqueue.processImageEvent (cognitive 25): watchqueue.processImageEvent has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19, loops 4, 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/agent/containerd/watcher.go"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"5281e694eebc49058521bb2a747e70bd4f23b71f56dbc7e12dcc08f718c7f074"}},{"ruleId":"D2","level":"warning","message":{"text":"agentTunnel.startWatches (cognitive 24): agentTunnel.startWatches has cognitive complexity 24 (threshold 15). Drivers by points: if/else 20, boolean chains 2, match/switch 2 (nesting depth added 10). 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/agent/tunnel/tunnel.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"c86c5e715db2e62c36827a39e54e5f89e615b692e9bccdc1a61856774333f54a"}},{"ruleId":"D2","level":"warning","message":{"text":"k3s.InstanceMetadata (cognitive 24): k3s.InstanceMetadata has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15, loops 8, 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/cloudprovider/instances.go"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"393387f3ff1517f93762674f17f30967d402f5453a2d92f2a5132edda450ed1c"}},{"ruleId":"D2","level":"warning","message":{"text":"Parser.findStart (cognitive 24): Parser.findStart has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, loops 4, boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/configfilearg/parser.go"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cdd37c33b6160151b1b26b5520be7ba8bb1a89d90983f6d5e0fd649d4b779e7"}},{"ruleId":"D2","level":"warning","message":{"text":"etcdSnapshotHandler.sync (cognitive 24): etcdSnapshotHandler.sync has cognitive complexity 24 (threshold 15). Drivers by points: if/else 23, boolean chains 1 (nesting depth added 9). Of this number, 13 points are the body\u0027s own statements and 11 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/etcd/snapshot_controller.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e0e1769beac814dacca5b45aaed0b65f9301ce0869f5b7bea8940271e063133"}},{"ruleId":"D2","level":"warning","message":{"text":"rootless.createParentOpt (cognitive 24): rootless.createParentOpt has cognitive complexity 24 (threshold 15). Drivers by points: if/else 24 (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/rootless/rootless.go"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"20f17295e9074e25504424effaa8fb9ca45bb056f97983853290d425a776b392"}},{"ruleId":"D2","level":"warning","message":{"text":"serverBootstrapper.Get (cognitive 24): serverBootstrapper.Get has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, loops 4, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/spegel/bootstrap.go"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d4f68ed64ff74dd2b9d1874762c605f2656fa1956abbdb486e5475af1b4eafd"}},{"ruleId":"D2","level":"warning","message":{"text":"containerd.prePullImages (cognitive 23): containerd.prePullImages has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18, loops 4, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/agent/containerd/containerd.go"},"region":{"startLine":432}}}],"partialFingerprints":{"codehealthFindingId/v1":"2720759a105101b1bffcb8dee8d1d57f27b4dcc46bd77f166afaf793d198c1eb"}},{"ruleId":"D2","level":"warning","message":{"text":"cert.rotate (cognitive 23): cert.rotate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, loops 4 (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/cli/cert/cert.go"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e38fcf9e239bc5d7022501a75094b83ef857fb27c6a57d3d6cb420aa6a7b000"}},{"ruleId":"D2","level":"warning","message":{"text":"k3s.podIPs (cognitive 23): k3s.podIPs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, boolean chains 3, 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/cloudprovider/servicelb.go"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"522707fe1fab76f64701852d796c4b633403e809c36d234932e4cc0f6d2d98ff"}},{"ruleId":"D2","level":"warning","message":{"text":"Cluster.Bootstrap (cognitive 22): Cluster.Bootstrap has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21, 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/cluster/bootstrap.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"37145475d03579425f6d237f01a423f9d9fdc9b5cb7cd0485a8cb9c2a13ed81d"}},{"ruleId":"D2","level":"warning","message":{"text":"containerd.watchImages (cognitive 21): containerd.watchImages has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10, match/switch 10, loops 1 (nesting depth added 13). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to one function literal inside it that branches (line 312). 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/agent/containerd/watcher.go"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ee04ec157473a4fdaf4b12c6519e27d0af0a4c50a91bca39cb04d2877c9574b"}},{"ruleId":"D2","level":"warning","message":{"text":"cluster.Save (cognitive 21): cluster.Save has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20, 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/cluster/storage.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"a158d628fdaca14959be33002c7a86ff6506dfc8b87ea2038a69a60438b710a8"}},{"ruleId":"D2","level":"warning","message":{"text":"Parser.FindString (cognitive 21): Parser.FindString has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, 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/configfilearg/parser.go"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"f39cd1d43ae4caf3fe0d87cdb976842e43a89dd3bab4978a7395588fb996d271"}},{"ruleId":"D2","level":"warning","message":{"text":"etcd.ClientURLs (cognitive 21): etcd.ClientURLs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13, match/switch 4, loops 3, 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/etcd/etcd.go"},"region":{"startLine":1460}}}],"partialFingerprints":{"codehealthFindingId/v1":"71822d7ed15e4419927b81fc414af550501a767bf50d17112eb94762ddf13aae"}},{"ruleId":"D2","level":"warning","message":{"text":"etcdMemberHandler.sync (cognitive 21): etcdMemberHandler.sync has cognitive complexity 21 (threshold 15). Drivers by points: if/else 21 (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/etcd/member_controller.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3a9141eb020cb2faf5f8789eae3e22a39f34c8acc7beed291f09a6505640a0b"}},{"ruleId":"D2","level":"warning","message":{"text":"watcher.listFilesIn (cognitive 20): watcher.listFilesIn has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/deploy/controller.go"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"583aefd1283403f82a19a2d74488e83a86e2518784c89833c7ed0e81dbb4beeb"}},{"ruleId":"D2","level":"warning","message":{"text":"File.ToETCDSnapshotFile (cognitive 20): File.ToETCDSnapshotFile has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20 (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/etcd/snapshot/types.go"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"7577b5dbfe21546407942ba03504d59266c1e370e53b937b304e8da3748e74b8"}},{"ruleId":"D2","level":"warning","message":{"text":"server.writeKubeConfig (cognitive 20): server.writeKubeConfig has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20 (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/server/server.go"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"7182f72adfb4696cfc35a41c1f472cb4dd0942f3f5ca66120f40bbdb86d24316"}},{"ruleId":"D2","level":"warning","message":{"text":"flannel.LookupExtInterface (cognitive 19): flannel.LookupExtInterface has cognitive complexity 19 (threshold 15). Drivers by points: if/else 19 (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/agent/flannel/flannel.go"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"665c0f83da8cfad08cf394dbf43eb07d2559c627b504dc2080ef411f73d913ec"}},{"ruleId":"D2","level":"warning","message":{"text":"agentTunnel.authorized (cognitive 19): agentTunnel.authorized has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/agent/tunnel/tunnel.go"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"1589bd99a945d4650e921dd16a9f0c4e6251e80b20e243ccfd5cc97e5eeb3cd7"}},{"ruleId":"D2","level":"warning","message":{"text":"agent.extractConfigArgs (cognitive 19): agent.extractConfigArgs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, boolean chains 2, match/switch 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/daemons/agent/agent.go"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fccf94b4df2a94a44ffc48de3f0b267a6aad65f5ee28b0e38ce413c85163f67"}},{"ruleId":"D2","level":"warning","message":{"text":"ETCD.Register (cognitive 19): ETCD.Register has cognitive complexity 19 (threshold 15). Drivers by points: if/else 19 (nesting depth added 10). Of this number, 12 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/etcd/etcd.go"},"region":{"startLine":651}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe331029600cc20edfe7051301cd8d0e0bf49601ca150b5f7a31cb78c4b8e37e"}},{"ruleId":"D2","level":"warning","message":{"text":"handler.serviceChanged (cognitive 19): handler.serviceChanged has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, loops 7 (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/rootlessports/controller.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"2039a2feeed0d402d1978e0ff8471b272675d3eb7b2312138cca9815230c1822"}},{"ruleId":"D2","level":"warning","message":{"text":"util.getIPFromInterface (cognitive 19): util.getIPFromInterface has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/util/net.go"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3551e6b21e32e17cb945b0675f2f3a8cb1273a2938c09905b6be48e00dde49f"}},{"ruleId":"D2","level":"warning","message":{"text":"agent.waitForAPIServerAddresses (cognitive 18): agent.waitForAPIServerAddresses has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, loops 4, 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/agent/run.go"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"45b4bc662104af587702ff8c87d54d951c6839e770b8318fe431b08b81d3d02d"}},{"ruleId":"D2","level":"warning","message":{"text":"agent.Run (cognitive 18): agent.Run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 2 (nesting depth added 3). Of this number, 16 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth \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/cli/agent/agent.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1c1e73e530b1676fcc67f86cd05baf75817e6c5c032f687b26981144679b9a4"}},{"ruleId":"D2","level":"warning","message":{"text":"secretsencrypt.Status (cognitive 18): secretsencrypt.Status has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, loops 2, boolean chains 1 (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/cli/secretsencrypt/secrets_encrypt.go"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"31c12d3b82cac6ce34f8860ba806659e40a76af47a5dac8caf660189717927f7"}},{"ruleId":"D2","level":"warning","message":{"text":"k3s.getStatus (cognitive 18): k3s.getStatus has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, loops 6, boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/cloudprovider/servicelb.go"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"aafe955bb33be4c29c6091a341f3394993c708836910ac93812d5ef2c8be5647"}},{"ruleId":"D2","level":"warning","message":{"text":"etcd.backupDirWithRetention (cognitive 18): etcd.backupDirWithRetention has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/etcd/etcd.go"},"region":{"startLine":1559}}}],"partialFingerprints":{"codehealthFindingId/v1":"65a09917d2c55805adda0f202fd590b585ffeaa0a193efbe9d0bb9825c1f5eb1"}},{"ruleId":"D2","level":"warning","message":{"text":"ETCD.Test (cognitive 18): ETCD.Test has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, loops 3, boolean chains 1 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/etcd/etcd.go"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"d65cea7ce06503d5c544dc24d1593b296b2f483f902a6add627f983e110fa5cb"}},{"ruleId":"D2","level":"warning","message":{"text":"handlers.reencryptAndRemoveKey (cognitive 18): handlers.reencryptAndRemoveKey has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 4, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \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/server/handlers/secrets-encrypt.go"},"region":{"startLine":394}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9985c84095609a83eadc3d7ba4092183a5a379f88c17dffdcd33c3536251d55"}},{"ruleId":"D2","level":"warning","message":{"text":"containerd.labelContent (cognitive 17): containerd.labelContent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, 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/agent/containerd/containerd.go"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdbeedf385338a209a28509184d2d5737d04ac22f52968c767dd73770ba51992"}},{"ruleId":"D2","level":"warning","message":{"text":"flannel.syncAnnotations (cognitive 17): flannel.syncAnnotations has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, 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/agent/flannel/setup.go"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"65a4f3cffb0ce84808ce35feaa8b1a6c48890ffe4bfed3b4556b0de57f2d00ec"}},{"ruleId":"D2","level":"warning","message":{"text":"Cluster.shouldBootstrapLoad (cognitive 17): Cluster.shouldBootstrapLoad has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, 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/cluster/bootstrap.go"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cc87fa2d40369edf37044982fb7de763777b6a1cd82b8bf56b7914911d9fd43"}},{"ruleId":"D2","level":"warning","message":{"text":"TunnelServer.onChangeNode (cognitive 17): TunnelServer.onChangeNode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 2, 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/daemons/control/tunnel.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"67587f91d516183d730b50c87e009b031ac3e9ef995489286e02d732ad4266bf"}},{"ruleId":"D2","level":"warning","message":{"text":"deploy.Stage (cognitive 17): deploy.Stage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, loops 5, jumps 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/deploy/stage.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"12459c61c4f39596f83dc13486cf0910dc92e001dd5e31ff2af28190aa222d80"}},{"ruleId":"D2","level":"warning","message":{"text":"ETCD.Start (cognitive 17): ETCD.Start has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, match/switch 2 (nesting depth added 6). 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, split the body into named stages: move each independent 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/etcd/etcd.go"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba4fa837cb81c00bbe2d9042f5f1fbe941764814595aa12b91440389771709de"}},{"ruleId":"D2","level":"warning","message":{"text":"File.FromETCDSnapshotFile (cognitive 17): File.FromETCDSnapshotFile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, boolean chains 1 (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/etcd/snapshot/types.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc9dee9b237ed91297d57889e2eadb690e23352b2ca65d48896e053d4330dccd"}},{"ruleId":"D2","level":"warning","message":{"text":"secretsencrypt.GetEncryptionConfigMetrics (cognitive 17): secretsencrypt.GetEncryptionConfigMetrics has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, loops 3, boolean chains 2 (nesting depth added 3). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 338). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\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/secretsencrypt/config.go"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2fd192fc19b4412fb1f48786d035bdd37f302b8610fafe21e31baf8f7501232"}},{"ruleId":"D2","level":"warning","message":{"text":"containerd.getDigests (cognitive 16): containerd.getDigests 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/agent/containerd/containerd.go"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8a65bf061391a0d17cae031ee376792f566654b03f153ba7bd131b78d3b6d60"}},{"ruleId":"D2","level":"warning","message":{"text":"serverList.setAddresses (cognitive 16): serverList.setAddresses has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 3, boolean chains 2 (nesting depth added 4). Of this number, 13 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/agent/loadbalancer/servers.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d5340bc2ee6aea7699101d3800e6ccfa0b98faf473f7eba0ec030c7f7e83b55"}},{"ruleId":"D2","level":"warning","message":{"text":"cert.backupCertificates (cognitive 16): cert.backupCertificates has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, 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/cli/cert/cert.go"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b8b377f9aded5ab7262bbaee825a48930a4063237ad3b0ec1c7acca6a020a51"}},{"ruleId":"D2","level":"warning","message":{"text":"token.list (cognitive 16): token.list has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 3, 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/cli/token/token.go"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"190d2223533bc55642441e8e6fa12cdfc02af1624ef618fc24227132c11f6d71"}},{"ruleId":"D2","level":"warning","message":{"text":"k3s.newDaemonSet (cognitive 16): k3s.newDaemonSet has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 2, match/switch 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/cloudprovider/servicelb.go"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"b776c12710342d6e34c095ebfb11510128973c1d445af37a9ba4d84fb4c22fc4"}},{"ruleId":"D2","level":"warning","message":{"text":"deploy.walkFiles (cognitive 16): deploy.walkFiles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16 (nesting depth added 8). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 174). 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/deploy/controller.go"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"4afbf0ff94dfd0c66a7f0e620f06dce1284ffeda8eab8f2da173acde36fdb66c"}},{"ruleId":"D2","level":"warning","message":{"text":"watcher.delete (cognitive 16): watcher.delete has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 1, loops 1 (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/deploy/controller.go"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"8493717342d0ce4761ad312d6b9fa92a749a13d931a8893e8412770fc8fc6f4a"}},{"ruleId":"D2","level":"warning","message":{"text":"Embedded.Bootstrap (cognitive 16): Embedded.Bootstrap has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, match/switch 2, loops 1 (nesting depth added 7). Of this number, 13 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/executor/embed/embed.go"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbc72f140dd1f10d80f84064ee66848514253a445e44dc7e79539ef1a4e30ef4"}},{"ruleId":"D2","level":"warning","message":{"text":"handlers.validateBootstrap (cognitive 16): handlers.validateBootstrap 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/server/handlers/cert.go"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"56ec3a2276848a626d87fb3eaaac14abfccd421e43bdba360b1673ee5c9050ad"}},{"ruleId":"D2","level":"warning","message":{"text":"handlers.validateCA (cognitive 16): handlers.validateCA has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 2, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/server/handlers/cert.go"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"18767df919cc3fbecb5e38ad01249c08b50bd7f2e11b8c6e19cdb6226b87f8d0"}},{"ruleId":"D2","level":"warning","message":{"text":"util.GetAddressesFromSlices (cognitive 16): util.GetAddressesFromSlices has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, loops 7, 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/util/api.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b535ad49459e022c2f35d0d11cb74427ff76314e8a0c1706b075490b53e4553"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ETCD: TooManyMethods \u2014 63 methods, declared across 3 files: etcd/etcd.go (40), etcd/snapshot.go (16), etcd/snapshot_handler.go (7). 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/etcd/etcd.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"8061f847859521ec8dcb619640d3d31485246cd06dca863ee52f1264b6acae25"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: etcd/etcd.go: FileTooLong \u2014 984 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/etcd/etcd.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d4eb8832f9d05b9d8879bc17642f164d2925d0b7df6473c303f1d99689f2420"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: k3s: TooManyMethods \u2014 41 methods, declared across 4 files: cloudprovider/servicelb.go (24), cloudprovider/cloudprovider.go (9), cloudprovider/loadbalancer.go (5), cloudprovider/instances.go (3). 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/cloudprovider/cloudprovider.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfa66e49127e0cc6282d2eb6df050277f58ac536c77e0c7fbe2533d66346c12d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: etcd/snapshot.go: FileTooLong \u2014 600 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/etcd/snapshot.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec672ea1b54914b5b555c268d1b4d994deaa295baf177e55f7dd6dcb8fa6906b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cmds/server.go: FileTooLong \u2014 565 significant lines (blank, comment-only and punctuation-only lines excluded), about 70% of them inside a single declaration: ServerFlags (191-665). 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/cli/cmds/server.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"83d21e8d9e6a45d8d3d92708ba610b9d9fb2d86b4a782d1664b8ec55319e6a51"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: deps/deps.go: FileTooLong \u2014 551 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/daemons/control/deps/deps.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b76cf16445ddd542a2829a1c212a25228c1eb24550110ee731cd6726665e7b7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: config/config.go: FileTooLong \u2014 519 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/agent/config/config.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c098c441f704820391689a9e38d64b903beff3e6f1abbb99cb882c105a598ee9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): cmd/server/main.go:81-99 | main.go:51-69 \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 \u0060cmd/server/main.go:81\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":"cmd/server/main.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"502898b32c6e772769c4b628c1e1ad474b842d5d093feb907a2d9409acb0b440"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): pkg/etcd/snapshot.go:113-128 | pkg/etcd/snapshot.go:164-179 \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/etcd/snapshot.go:113\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 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/etcd/snapshot.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c3cec7766c753d78194290a15ce342e36d4a1c293b526c2341b3fff250b574c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): pkg/clientaccess/token.go:452-466 | pkg/clientaccess/token.go:509-523 \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/clientaccess/token.go:452\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/clientaccess/token.go"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5c263e676d50aef08335d6234fcc36db47010082c357349b1d9289ea3114f0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): pkg/daemons/control/deps/deps.go:831-845 | pkg/secretsencrypt/config.go:190-204 \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/daemons/control/deps/deps.go:831\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/daemons/control/deps/deps.go"},"region":{"startLine":831}}}],"partialFingerprints":{"codehealthFindingId/v1":"b746867d4c6fbf4ba80b391168182e2905edcede2a844581bb4cba5fddc38aa5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): pkg/cli/cert/cert.go:203-216 | pkg/cli/cert/cert.go:262-275 \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/cli/cert/cert.go:203\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/cli/cert/cert.go"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"13e9a2a27eb2614eaa032bc313625395076d64780f1a761b072dbf2e4dce7498"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): pkg/agent/config/config.go:250-262 | pkg/agent/config/config.go:355-367 \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/agent/config/config.go:250\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/agent/config/config.go"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"55e03cb3ecbb6d3319936c41a7f8fc379bf2b65f52b11c3b61d60233b24d6642"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): pkg/authenticator/passwordfile/passwordfile.go:55-66 | pkg/passwd/passwd.go:37-48 \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/authenticator/passwordfile/passwordfile.go:55\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/authenticator/passwordfile/passwordfile.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"03e77fd5331542e7027cb5200d7125b7b1304c1498f2bf0844c762af2aa9d175"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): pkg/cli/secretsencrypt/secrets_encrypt.go:32-43 | pkg/cli/token/token.go:178-189 \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/cli/secretsencrypt/secrets_encrypt.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. 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/cli/secretsencrypt/secrets_encrypt.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"c47697d05db054e92511f7587c9a254008493b1cd6539763c3f15c9b70c8114d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/cli/etcdsnapshot/etcd_snapshot.go:174-184 | pkg/cli/etcdsnapshot/etcd_snapshot.go:292-302 \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/cli/etcdsnapshot/etcd_snapshot.go"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae0b10deec2f1231359562fb1487cfb9fb6ee5ab762f5d449d1eef50137f6f73"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/clientaccess/token.go:315-325 | pkg/clientaccess/token.go:347-357 \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/clientaccess/token.go"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"61bee679f7c75cf2e0c66c8c4bab1bbfaf7f9635ab4aa4da6f92f5669068434f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/cli/etcdsnapshot/etcd_snapshot.go:58-67 | pkg/cli/server/server.go:224-233 \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/cli/etcdsnapshot/etcd_snapshot.go"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b41efee868e9aa57d8999d0ed015dd3356ab77060931a9462ac436d906fb323"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/cli/etcdsnapshot/etcd_snapshot.go:126-135 | pkg/cli/etcdsnapshot/etcd_snapshot.go:285-294 \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/cli/etcdsnapshot/etcd_snapshot.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad4a4a334a4e2fdb36d6e89ac995a538feb9270b9c568abeb931c45268ee2bdd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/dataverify/dataverify.go:35-44 | pkg/dataverify/dataverify.go:61-70 \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/dataverify/dataverify.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/dataverify/dataverify.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"536e27d445a01ca17ccc7ddb24f8a840fa678cb2fb099946e3ec49f442715234"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/agent/config/config.go:193-201 | pkg/agent/config/config.go:207-215 \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/agent/config/config.go:193\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/agent/config/config.go"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2f81985b1ee2249828bdd52a4f57ea987f0d5e15ef43d204e7d638b488016ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/agent/run.go:127-135 | pkg/agent/run.go:282-290 \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/agent/run.go:127\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/agent/run.go"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bdd545ae22a65ed8784b79d679c8dceb78e453d4776e511b75ecef86d12797d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/etcd/member_controller.go:53-61 | pkg/etcd/member_controller.go:123-131 \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/etcd/member_controller.go"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"77dc273e5176b7ccd352b6829a672083c7aa4d6065b84d6783579f97c1f21cd9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/etcd/snapshot_controller.go:119-127 | pkg/etcd/snapshot_controller.go:314-322 \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/etcd/snapshot_controller.go:119\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/etcd/snapshot_controller.go"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"47615495391379108ae972f0ba161f0b4a9fbd304dce92f98926a2ddec4aca14"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): pkg/etcd/snapshot_handler.go:71-78 | pkg/etcd/snapshot_handler.go:88-95 | pkg/etcd/snapshot_handler.go:105-112 | pkg/etcd/snapshot_handler.go:122-129 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \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/etcd/snapshot_handler.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"d330d94d7db16fc3167ed2e87d1e3d011926f5ee2d19a97edb64d7d85aa7121d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/util/patch.go:68-75 | pkg/util/patch.go:86-93 \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/util/patch.go:68\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/util/patch.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"97e0d833de393086b8f9a2ef5e1eeff6a704278dfb1c3682d7e61e321e995af8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmd/server/main.go:58-64 | main.go:36-42 \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 \u0060cmd/server/main.go:58\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":"cmd/server/main.go"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ea087846cee7dcff12ad33e39c5532ef0b50df6d9e9ac0ccf1bc9b2666f747f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/server/handlers/secrets-encrypt.go:536-542 | pkg/server/handlers/secrets-encrypt.go:563-569 \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/server/handlers/secrets-encrypt.go:536\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/server/handlers/secrets-encrypt.go"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"004aaedd92d7a8cab1379cb2ad67253e7d8d42278f3fe402eae404ee6e195da1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): pkg/agent/flannel/flannel.go:242-247 | pkg/agent/flannel/flannel.go:276-281 \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/agent/flannel/flannel.go:242\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/agent/flannel/flannel.go"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"810d1068ba9b9af7a21d8ae7969157bea7bdfadd646fac2f502b7020a7fbf3f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): pkg/etcd/snapshot.go:356-361 | pkg/etcd/snapshot.go:742-747 \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/etcd/snapshot.go:356\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/etcd/snapshot.go"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6f4dbac490441b7716ef75058a962a7822154109a85261031ba7520c966ab22"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): pkg/etcd/s3/s3.go:450-454 | pkg/etcd/s3/s3.go:462-466 \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/etcd/s3/s3.go"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c59eda639e87206267e02f65df3715f6c35586cb025f76cdec566ea8811656b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pkg/cli/server/server.go: pkg/cli/server/server.go changed 5 times in last 90 days, max complexity 103. 2 of those changes were fix/bug commits, 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/cli/server/server.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6eff8166a5a8a874d2e50f5f542219fb5ab9fa43fab2abfe2f8c6b4985eac73f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pkg/etcd/snapshot.go: pkg/etcd/snapshot.go changed 3 times in last 90 days, max complexity 40. 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/etcd/snapshot.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d94e4ff35fcd8634834245d9cc81d2ab2ae21b01a83c399fd0f5daa3329cafdb"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pkg/agent/config/config.go: pkg/agent/config/config.go changed 2 times in last 90 days, max complexity 52. 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/agent/config/config.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dfcddf0b58744dbcefe6a1dabcf52aab59da086df974d9fb2a38b5f3b3755b9"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pkg/agent/run.go: pkg/agent/run.go changed 2 times in last 90 days, max complexity 36. 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/agent/run.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bf50080f15c94a5224afd6755cd19b60bc893db2932537bf70e3a12c7f1d2d7"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pkg/cluster/cluster.go: pkg/cluster/cluster.go changed 3 times in last 90 days, max complexity 17. 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/cluster/cluster.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8490ed99844827f6b1f5de820e746ecac42c6468f97f1419bb278ed0e1ebc022"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pkg/server/server.go: pkg/server/server.go changed 3 times in last 90 days, max complexity 16. 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/server/server.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e71e833443fe566c4cdd6a6383c1ff2a246f553ca82eff30b1e2041d5a99e18e"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pkg/etcd/s3/s3.go: pkg/etcd/s3/s3.go changed 2 times in last 90 days, max complexity 21. 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/etcd/s3/s3.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f1332ab1f4f909aa3ac0afce31361fdaefa01dc64a85c97e2360324ae65fd1f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pkg/agent/containerd/watcher.go: pkg/agent/containerd/watcher.go changed 2 times in last 90 days, max complexity 20. 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/agent/containerd/watcher.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"794c8e52ffc01fed1eeccd5531b7258db356a268088cbae29bc273eb26ae23df"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pkg/executor/embed/embed.go: pkg/executor/embed/embed.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/executor/embed/embed.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"91b6934946b7d9397c46a27de9d6155cd6ee6752705b1ef4c6a24b3334ae1256"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 35 significant file(s) lose their only recent owner: pkg/agent/tunnel/tunnel.go, pkg/cluster/bootstrap.go, pkg/daemons/control/server.go, pkg/agent/containerd/containerd.go, pkg/agent/loadbalancer/servers.go, pkg/etcd/snapshot_controller.go, pkg/spegel/spegel.go, pkg/util/net.go (\u002B27 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"be96341032b2a3ecd236770bba2328e700a417414a626b4d505a5910be42f218"}},{"ruleId":"D19","level":"note","message":{"text":"The non-Linux prerequisites section recommends Docker with the Dapper build environment but does not state how to run builds locally on a non-WSL2 system, which is critical for contributors who cannot use WSL2.: Add a brief note under Windows Setup or macOS Setup about local builds on non-WSL2 environments."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"docs/contrib/development.md"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"01c833542f5523e3f9634ecbbb8656542a38772ca08e82073d837b10829dfc21"}},{"ruleId":"D19","level":"note","message":{"text":"The Drone pipeline section mentions the URLs \u003Cdrone-pr.k3s.io\u003E and \u003Cdrone-publish.k3s.io\u003E, but there is no guidance on how to test locally against these clusters.: Add a short \u0027Running locally\u0027 subsection noting that PR builds can be triggered against drone-pr.k3s.io without cluster access."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"docs/contrib/continuous_integration.md"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"34d1db426b857a2522070cadc8ea3397289d6248f88635e08d50f5fb8132514c"}},{"ruleId":"D20","level":"warning","message":{"text":"Consequences are only Good and Bad (no trade-offs) with no detail on how much new dependency is added: Add a Consequences section noting the exact new dependency name and its version so the trade-off is clear"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"docs/adrs/add-auto-import-containerd.md"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcdc196b39605061072692e7104c8cf96aa857cbce173ec891320286bd595b79"}},{"ruleId":"D20","level":"warning","message":{"text":"Context and consequences are boilerplate filler; the body states neither what decisions were recorded nor any trade-offs: Replace Context with a real problem (e.g. lack of centralized decision archive) and Consequences with actual trade-offs (e.g. maintenance burden, linking overhead) plus an adoption path"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"docs/adrs/record-architecture-decisions.md"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f925cdc0f07dead1cab8768a20259adb2cde6b8a5d32827d4e6819addeb51fd8"}},{"ruleId":"D20","level":"warning","message":{"text":"Consequences are thin and trade-offs are not stated (e.g. false positives from non-status changes): Add a Consequences section noting any negative risks such as falsely assuming a node is healthy when it isn\u0027t"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"docs/adrs/status-for-etcd-node.md"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"381e8e1679f9e6937bb0ab037230db692d43bdd1e8480f303459c111f75205f1"}},{"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":"039c6d572d7054fda7855380c24a7f038e155b90ce43fa7da9735d8439083c6c"}},{"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":"ddd1cb796294bb3e9369891670d34a9b359b92fc7d500354232e1ce0772224a9"}},{"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":"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":"d5b8f11381d61a58459ffc7c595fd52d09c03c711894a63a9578043d2338412b"},"taxa":[{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","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":"f1da970c06e18ea392bc486166497597d158170479b685d08dab63dfc5aa5e5e"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","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":"f1b966c70d2e5f6ab697ac6d268d54938c60e802d8ea58ea6ff9cb7e10a35f70"},"taxa":[{"id":"CWE-78","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":"01be1f988aae05ac9e49fa257fdf23610fcc1e2d1be889ee415559ec361da444"},"taxa":[{"id":"CWE-732","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":"5a15911d5c860450533055e93ddb39c730b67a4034ddf6b93dd94b035a79f79d"},"taxa":[{"id":"CWE-319","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":"0dcc68a8e455b6fa2090dd76ab28712b70f0efb7cbc089719a66ec23765e3618"},"taxa":[{"id":"CWE-338","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":"96f4fa9962fc4149a14bdc7d6946f6adce22e019fcc28ae232f29148db412b20"},"taxa":[{"id":"CWE-400","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":"f857a28130ba228e32e0b804eec9acea2b93ff5b063452d9378d920bb63dff9a"},"taxa":[{"id":"CWE-400","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":"d04e451dba024b09324188b682ca766ae76d3e9f4f1977bdace92caafd5a6c82"},"taxa":[{"id":"CWE-300","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":"b37cc7761bffd0d8f12e0d7c5d10ed190184db80b2a41e2f01d59b0b496e45b3"},"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":"e30184b8f391089d8b2db20f9ff3dbd476be406645b4173e120aaf1382c04264"},"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":"d85e2ea4e6fd757404fb0d1ee3df7f35cee2c97fa53f686523a370ce511e3c29"},"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":"62a3f6b661ebba4cc3af7b49f53a2d1087e7fad41f09ea35d152827b692f317e"},"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":"f363c475ff931fdcf58c1b5f19538f6e18206afb7725c1775d11b47aa4015575"},"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":"15bac60a6e832f6270107de90060c52792cbc0823de5fdf10a486a73920eb4e8"},"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":"8178ad6b49bf16972f469ed3924db206171ff685ab998242b924a3b7ab1bc4c8"}},{"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":"cbb39f69ee77a2ec1f20d9dfb0c77e89866e9b3e3e8e02d739b7c03f22ae6ac5"}},{"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":"08d45b30989d2834f194a6b1bd388f2c2eb8462b19cb4c7046c52ae7653fe9c7"}},{"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":"2819a6ed322a2bfc8509554d808a983119a7e1d3deb5f9807e0c61c6698e0fc1"}},{"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":"396315de20116d1e11591b7a08f1e9d8ad4817a287a0d13ac94c4e24c44d4a68"}},{"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":"e16d77008702faf9519f4c8fe78a6895976d77fb57d19a321f95112b6bc71a6e"}},{"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":"8f505f5468cc55ddce6c61a94da166e18257f7104f6ac9282d277bd0758c3909"}},{"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":"c8bfeab5dd27e48c2ee1310fd5bf88af1d14d17516fcb68e09e40a3652456af9"}},{"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":"db8c8c1d74374e296b405a28e8c7aeeee42d226c8e4ef628dee717313e721ec7"}},{"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":"3423a48e937062096eed508bb8ca9a0f82b17279b09409442aaeacedc857f906"}},{"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":"63158ffcf033bcc46796a29e3bcf294e1065b5506138171e787fd8633b5a2608"}},{"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":"47b1723ac9910ffae6b43bdfa658cf790ae35e30a0c34401ad0d99e76e53d0dd"}},{"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":"6a54be5158cb654520748c46bcb267c3d53e010d050f3d86928d4612febadf5d"}},{"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":"6e8511d0d1475a75267fcd71e1eedf592f19b6b5b9f62b9ac686c885257b613b"}},{"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":"c3b8407fa6ff8d5a2a859f8a2fa5ad21c1502cf9dd5ee4c78b6268c72fee8924"}},{"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":"2bd90cfdf6cbe132a314160c9a95caaf0d7dd4322f79e9e3a5d8797eee8bbb49"}},{"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":"d2313acd21252835efa93e3f7990d40e7957784e9da3b388e2c4aac751835517"}},{"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":"55456714041a7681eabf17e0ff445b96251ddaa4cdb41f5b8c6f737a9326ad77"}},{"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":"d8cc6ada84ba4283eea6268fb54d86ba799bbb96b473cc377bd6be7876d19e22"}},{"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":"c033c9184547b9e5f8b1687aadf23823e905cc0679b7be5f4eab90cfbffd936c"}},{"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":"8139b50e4e7ab696324226aa7e5caf47c41b02c15562d4743b003b810b9d6acb"}},{"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":"f6ec10f1706e75b7084b86de168ad2590973fe55d0456e1cc6401aa4ee9e20d3"}},{"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":"f1c1a8621bfbda22ac33084bc89ce29dd080cc54fe9798b58601c2e63d026b61"}},{"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":"472367dec2a9378fed4a2be6b829944c111e09b7df730f44b85fcee5a4e2efd9"}},{"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":"ea622941fe7599236a24e2036f5bf7408f5ae339e2295e42116693ab7aa80f29"}},{"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":"86228bb9bf415d10ff1f83859e914091b7ddf15186840c62e0ef349635d97fe4"}},{"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":"5b9e2f9f6cbaa5330347c7573810529ee79b2204c798931ef5c67ea2319c8456"}},{"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":"2b152f754a2622b1912562daa16ad9bc708d140d535c12b8096e4e265f5480c4"}},{"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":"f6bea14c56d002c5148f79529bf0187de80bcd5bbb8b231c361a22d4c096690a"}},{"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":"436914bb9ffd671b664bb2e2e8a50bdd09b8f9f2599f2c477ffda756ed1893c8"}},{"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":"3ffe46a8b59396a13979c1743bf7433838c50ffed7f59da175f568b616247527"}},{"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":"b22cb789260a6fa4610bd827c44d0466588b61d1e3f759659c2622f13fbc3956"}},{"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":"0b41d96f38537b9e5d49af1c0c2f36c9fc6245ee76b19afd21aa90417b420f55"}},{"ruleId":"D34","level":"note","message":{"text":"Further orphaned files (smaller): 5 of 101 analysed file(s) have no living knowledge left \u2014 their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 100 lines or more, excluding tests, vendored, generated and example/demo trees, largest first). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each \u2014 largest first: pkg/untar/untar.go, pkg/dataverify/dataverify.go, pkg/authenticator/passwordfile/passwordfile.go (and 2 more). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ce861fd78f6935114d3a342cb90ad25870f984e1042954fcbbe27c0e23be3658"}},{"ruleId":"D36","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":"0e17f71490e4d120a48b2b2881ab866c93b272bef2febb673a3e8e42b2c288ab"}},{"ruleId":"D36","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":"eb00976a698a5d68999b7ee6d27206fd374e916853e7ff1ead5eed42386f043f"}},{"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":"5e3545524e8875b4c7eba7c1011fc73f5980286a976278c5029e01d01e301600"}},{"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":"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":"24fcae53239a1ac72bc974dcc3442f0bef6a331b9ed40849b5e99c9cb4cbc05a"}},{"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":"adba530543fd28e20fb5ae77e7d88a60dd406542b9de5956bf12a60fc313739a"}},{"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":"eada0957a9040a40a4a25a2b8ff555d5d1f65c7e2c85fee972c1fd8d311efba4"}},{"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":"4f1d9b98a08d7a03db59edc08569dac3b0295f78bb90e717ec54238cd1606f81"}},{"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":"b150f37d387ee15c56816233b46cdf9a750001ab11b0c4bbd6f80362ca244a5b"}},{"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":"7bbe92900f195ac6aa9a631c6ba404e452f30e9bc188f72d036fe01a4e366b92"}},{"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":"c8e6740321a9758be2667eea6842293616ba35402441f8df0a0ca2a8f6a5fa68"}},{"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":"94e02eea5764fec7c68881dfaf08794994cb5f5915475658189d0ffad65d6e22"}},{"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":"be217444638ac33aa1bd5044cfc99a2e92b284c1cc1654e8220d2ef2ef47944d"}},{"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":"231ad4dc838e4a2768e6f7a1e67ca410b16632a9e046ea516d551978147d4308"}},{"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"}}],"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-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-300","guid":"c5969c2f-022a-5059-bb13-5ac56ccacbd0","name":"CWE-300","shortDescription":{"text":"CWE-300"},"helpUri":"https://cwe.mitre.org/data/definitions/300.html"},{"id":"CWE-319","guid":"7af97476-9f0d-4458-9163-3d2043918a1a","name":"CWE-319","shortDescription":{"text":"CWE-319"},"helpUri":"https://cwe.mitre.org/data/definitions/319.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-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-400","guid":"ca529a89-676d-8857-aac1-84359c77bb6c","name":"CWE-400","shortDescription":{"text":"CWE-400"},"helpUri":"https://cwe.mitre.org/data/definitions/400.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-829","guid":"13c33925-97fb-5a5e-b40c-56d328b8a4d7","name":"CWE-829","shortDescription":{"text":"CWE-829"},"helpUri":"https://cwe.mitre.org/data/definitions/829.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":67,"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."]}]}