{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D16","name":"Bus Factor","shortDescription":{"text":"Bus Factor"},"helpUri":"https://codehealth.canine.dev/dimensions/D16"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D21","name":"Naming Consistency","shortDescription":{"text":"Naming Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D21"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"]}},{"id":"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":"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"]}}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"echo.bindValue (cyclomatic 53): echo.bindValue has cyclomatic complexity 53 (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":"binder_generic.go"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"05a9275b30d3c62237eb1015beb834aa01349554ef68bcb797510a416603c89d"}},{"ruleId":"D1","level":"warning","message":{"text":"echo.bindData (cyclomatic 46): echo.bindData has cyclomatic complexity 46 (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":"bind.go"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6f6659da7e9e384fdc4d719fc580048b0d391e5ce31f94d5869b98ddc6eb03c"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultRouter.Route (cyclomatic 46): DefaultRouter.Route has cyclomatic complexity 46 (threshold 15). Of this number, 43 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"router.go"},"region":{"startLine":886}}}],"partialFingerprints":{"codehealthFindingId/v1":"4532b7e1024cf33daf8a975257b77544544590019c4aaef7affa2fbae8842d0b"}},{"ruleId":"D1","level":"warning","message":{"text":"RequestLoggerConfig.ToMiddleware (cyclomatic 39): RequestLoggerConfig.ToMiddleware has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 5 of the 39 points are its own statements and the rest belongs to one function literal inside it that branches (line 268). 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":"middleware/request_logger.go"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"f878ba59bf9fd975a3a1cc09181176d14848a67cbc84c69f478e05c7999ce13a"}},{"ruleId":"D1","level":"warning","message":{"text":"StaticConfig.ToMiddleware (cyclomatic 32): StaticConfig.ToMiddleware has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 9 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 213). 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":"middleware/static.go"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f166e508d7c44325e2a0eb975ee89e132876de6359c88a808a05086ceceb338"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultRouter.Remove (cyclomatic 31): DefaultRouter.Remove has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"router.go"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7716392440311fd276c0eb516a6cb9652c7fae4fbba5712307970771d7f3f21"}},{"ruleId":"D1","level":"warning","message":{"text":"CSRFConfig.ToMiddleware (cyclomatic 28): CSRFConfig.ToMiddleware has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 12 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 164). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\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":"middleware/csrf.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"1500113b5d971bdbd0cbf030e72f692d192a983f7f5c528f53ed9fad98a5d005"}},{"ruleId":"D1","level":"warning","message":{"text":"ValueBinder.ints (cyclomatic 26): ValueBinder.ints 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":"binder.go"},"region":{"startLine":577}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea4a60b366bfcd85a66a5bdfbfca9d259d2ac70ef9e595397ac2892e3cbad1c5"}},{"ruleId":"D1","level":"warning","message":{"text":"ValueBinder.uints (cyclomatic 26): ValueBinder.uints 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":"binder.go"},"region":{"startLine":805}}}],"partialFingerprints":{"codehealthFindingId/v1":"2211aa59c8d6cb7a6e78624c4340bb337475fbae09122eec61d06e1e983ef877"}},{"ruleId":"D1","level":"warning","message":{"text":"CORSConfig.ToMiddleware (cyclomatic 26): CORSConfig.ToMiddleware has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 10 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 192). 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":"middleware/cors.go"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8a45229201b96729192cf2bb7d529bcfe555358de06a24bad38c258328e257d"}},{"ruleId":"D1","level":"warning","message":{"text":"ProxyConfig.ToMiddleware (cyclomatic 25): ProxyConfig.ToMiddleware has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 8 of the 25 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 337, 317). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/proxy.go"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"0aae759b48ccf8a9b581fa09bdea68b98f8ec1b7cb7a80229a09e1250af3c4b0"}},{"ruleId":"D1","level":"warning","message":{"text":"routeMethods.updateAllowHeader (cyclomatic 24): routeMethods.updateAllowHeader has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"router.go"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"28249fdf2ec2b4e647ce126582f0d183c09ab869995656bf7cbfa0c2fa99f904"}},{"ruleId":"D1","level":"warning","message":{"text":"ContextConfig.ToContextRecorder (cyclomatic 22): ContextConfig.ToContextRecorder has cyclomatic complexity 22 (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":"echotest/context.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"005e6faca01137916599d75653e519889795f5009da32de18e78d5f83559bb94"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultRouter.insert (cyclomatic 21): DefaultRouter.insert 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":"router.go"},"region":{"startLine":626}}}],"partialFingerprints":{"codehealthFindingId/v1":"543ebd7f2fb26765df267f1806195be7229c1bd2322f0b1b52ed0b5214e12c61"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultRouter.Add (cyclomatic 20): DefaultRouter.Add 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":"router.go"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c07c5e87c9a16573a92a3c4940033031383546f15f22df0a2671887217d8d8b"}},{"ruleId":"D1","level":"warning","message":{"text":"echo.ProblemDetailsHTTPErrorHandler (cyclomatic 17): echo.ProblemDetailsHTTPErrorHandler has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 69). 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":"rfc9457.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e9bd38cd35ea41bd6e5bd4ba2216bcdb19a55d92146245dc10874883f1f19fe"}},{"ruleId":"D1","level":"warning","message":{"text":"KeyAuthConfig.ToMiddleware (cyclomatic 17): KeyAuthConfig.ToMiddleware has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 159). 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":"middleware/key_auth.go"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"10eec500d5bdad3cc8922bc7448cbc59881f16dbfa670a455c36294d039a35ae"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultRouter.Route (cognitive 95): DefaultRouter.Route has cognitive complexity 95 (threshold 15). Drivers by points: if/else 74, loops 12, boolean chains 6, jumps 3 (nesting depth added 40). Of this number, 90 points are the body\u0027s own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"router.go"},"region":{"startLine":886}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a2b8ed3eefaf11cea4f5f8cf584301d3af774c444b8f6d115d15f0f4fc59fcb"}},{"ruleId":"D2","level":"warning","message":{"text":"echo.bindData (cognitive 87): echo.bindData has cognitive complexity 87 (threshold 15). Drivers by points: if/else 70, loops 9, boolean chains 8 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bind.go"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"d73ec4fb3ec7cd1770cc3b230b71fb528143626560b59cc1e23015000a0acada"}},{"ruleId":"D2","level":"warning","message":{"text":"echo.bindValue (cognitive 73): echo.bindValue has cognitive complexity 73 (threshold 15). Drivers by points: if/else 65, match/switch 6, loops 2 (nesting depth added 41). To reduce it, split the body into named stages: move each independent 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":"binder_generic.go"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bb9a733631d107930d2d930880413318055a55fada94ec4946b62d6f822bc6e"}},{"ruleId":"D2","level":"warning","message":{"text":"RequestLoggerConfig.ToMiddleware (cognitive 53): RequestLoggerConfig.ToMiddleware has cognitive complexity 53 (threshold 15). Drivers by points: if/else 44, loops 7, boolean chains 2 (nesting depth added 15). Most of this is not in the body itself: 4 of the 53 points are its own statements and the rest belongs to one function literal inside it that branches (line 268). 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":"middleware/request_logger.go"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b5d4ec615e3f30be776c4694ba8b713dd80f118de1703a5d5c61891c4bd66fc"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultRouter.Remove (cognitive 48): DefaultRouter.Remove has cognitive complexity 48 (threshold 15). Drivers by points: if/else 29, loops 8, boolean chains 6, match/switch 5 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"router.go"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"b712e7141bf57f461bd5ca8bb566368399ca03cb29e4bc7fa8e31224920c1147"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultRouter.insert (cognitive 46): DefaultRouter.insert has cognitive complexity 46 (threshold 15). Drivers by points: if/else 36, loops 6, match/switch 3, boolean chains 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"router.go"},"region":{"startLine":626}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ef138aeb3787621163231f02cee53221a2852cd82c78df5312369a90cb2c079"}},{"ruleId":"D2","level":"warning","message":{"text":"StaticConfig.ToMiddleware (cognitive 44): StaticConfig.ToMiddleware has cognitive complexity 44 (threshold 15). Drivers by points: if/else 42, boolean chains 2 (nesting depth added 13). Most of this is not in the body itself: 10 of the 44 points are its own statements and the rest belongs to one function literal inside it that branches (line 213). 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":"middleware/static.go"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4149f1fd2bb159676ff670ce584c1778c8add0766bb6eba0558c3ca551493f2"}},{"ruleId":"D2","level":"warning","message":{"text":"CSRFConfig.ToMiddleware (cognitive 42): CSRFConfig.ToMiddleware has cognitive complexity 42 (threshold 15). Drivers by points: if/else 35, loops 5, jumps 1, match/switch 1 (nesting depth added 13). Most of this is not in the body itself: 12 of the 42 points are its own statements and the rest belongs to one function literal inside it that branches (line 164). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\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":"middleware/csrf.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"8895ef4b9ecacfcd9a40b3c81d066f77265a2b76947bdd6603cced891c9819c3"}},{"ruleId":"D2","level":"warning","message":{"text":"ValueBinder.ints (cognitive 41): ValueBinder.ints has cognitive complexity 41 (threshold 15). Drivers by points: if/else 25, loops 10, boolean chains 5, match/switch 1 (nesting depth added 20). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"binder.go"},"region":{"startLine":577}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b78ee733271679864f2e223a91c9e685a351f56b4f3d9e8a3d892accb6c9cd4"}},{"ruleId":"D2","level":"warning","message":{"text":"ValueBinder.uints (cognitive 41): ValueBinder.uints has cognitive complexity 41 (threshold 15). Drivers by points: if/else 25, loops 10, boolean chains 5, match/switch 1 (nesting depth added 20). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"binder.go"},"region":{"startLine":805}}}],"partialFingerprints":{"codehealthFindingId/v1":"a091ab15c17008d291033e79a9039cd503ea5718a00d2ef2e58f30aa1ceabfa6"}},{"ruleId":"D2","level":"warning","message":{"text":"CORSConfig.ToMiddleware (cognitive 40): CORSConfig.ToMiddleware has cognitive complexity 40 (threshold 15). Drivers by points: if/else 36, boolean chains 2, loops 2 (nesting depth added 13). Of this number, 18 points are the body\u0027s own statements and 22 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":"middleware/cors.go"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"52d48e310fc20efa849af17cba375dac9ff0de298a33e496e8fdbc09992af551"}},{"ruleId":"D2","level":"warning","message":{"text":"ContextConfig.ToContextRecorder (cognitive 37): ContextConfig.ToContextRecorder has cognitive complexity 37 (threshold 15). Drivers by points: if/else 31, loops 6 (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":"echotest/context.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"352f72fc505fde7d04d0da0f0e0e08f5684e24ddcceedd0cf8a80b0a9ffc9a18"}},{"ruleId":"D2","level":"warning","message":{"text":"ProxyConfig.ToMiddleware (cognitive 34): ProxyConfig.ToMiddleware has cognitive complexity 34 (threshold 15). Drivers by points: if/else 28, boolean chains 3, match/switch 2, loops 1 (nesting depth added 9). Most of this is not in the body itself: 8 of the 34 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 337, 317). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/proxy.go"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"9025a4cc87f8ab716c5bc9ac0af575238f0031efe1be4c0f3013dee3d116aea4"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultRouter.Add (cognitive 30): DefaultRouter.Add has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17, loops 6, boolean chains 5, match/switch 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"router.go"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca7a03533086c33dfb1957c67d1f38024dc620ac9e54fd2fa087352fe261603f"}},{"ruleId":"D2","level":"warning","message":{"text":"echo.ProblemDetailsHTTPErrorHandler (cognitive 29): echo.ProblemDetailsHTTPErrorHandler has cognitive complexity 29 (threshold 15). Drivers by points: if/else 27, boolean chains 1, match/switch 1 (nesting depth added 12). Most of this is not in the body itself: 0 of the 29 points are its own statements and the rest belongs to one function literal inside it that branches (line 69). 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":"rfc9457.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ddf246eab1005f489ccc61a897ed6c10bb7dc971ac8ddf56c81242fedfbb1c0"}},{"ruleId":"D2","level":"warning","message":{"text":"KeyAuthConfig.ToMiddleware (cognitive 23): KeyAuthConfig.ToMiddleware has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, loops 3, boolean chains 1 (nesting depth added 7). Most of this is not in the body itself: 5 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 159). 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":"middleware/key_auth.go"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"61e9d5beb37f803571f7f4bab976853db2406e416e0e623cd93d06931b114773"}},{"ruleId":"D2","level":"warning","message":{"text":"routeMethods.updateAllowHeader (cognitive 23): routeMethods.updateAllowHeader has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 11, if/else 11, loops 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"router.go"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"077159867cb056a80ab5b627a5d2ae6b39f6f51742cdc5416e552eb93f784bbd"}},{"ruleId":"D2","level":"warning","message":{"text":"GzipConfig.ToMiddleware (cognitive 21): GzipConfig.ToMiddleware has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20, boolean chains 1 (nesting depth added 8). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 86). 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":"middleware/compress.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e6401c72c137ab06f83a518a4b590b92d639985fbedd00a96b0093a93388761"}},{"ruleId":"D2","level":"warning","message":{"text":"BasicAuthConfig.ToMiddleware (cognitive 19): BasicAuthConfig.ToMiddleware has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, boolean chains 1, loops 1 (nesting depth added 6). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 111). 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":"middleware/basic_auth.go"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"cae51777ea9c43698a9eb8c4206a13a59370a84e1bd12b02fed09768bb72d9d5"}},{"ruleId":"D2","level":"warning","message":{"text":"echo.DefaultHTTPErrorHandler (cognitive 18): echo.DefaultHTTPErrorHandler has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 1, match/switch 1 (nesting depth added 6). Most of this is not in the body itself: 0 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 453). 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":"echo.go"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fa1de6b0cb1ef0ca56859d99e73f8af401a2c9f49aaf48a6e0b8d07148f0f53"}},{"ruleId":"D2","level":"warning","message":{"text":"SecureConfig.ToMiddleware (cognitive 18): SecureConfig.ToMiddleware has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 2 (nesting depth added 3). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 121). 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":"middleware/secure.go"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"79586cf2c15573f99a6195ddc3357d576af16dd675a204ff98aa247b263b1f5f"}},{"ruleId":"D2","level":"warning","message":{"text":"echo.BindBody (cognitive 17): echo.BindBody has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bind.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"64a7ea02353f1a75f78f37b92a9669b770cf5d0a3869bacd7a81e91a44201042"}},{"ruleId":"D2","level":"warning","message":{"text":"ValueBinder.floats (cognitive 17): ValueBinder.floats has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, loops 4, boolean chains 2, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"binder.go"},"region":{"startLine":1058}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7075b9d4e81309704a1a76bb382e70ca1e8d4bfa719b9e81d02edc51d205dc4"}},{"ruleId":"D2","level":"warning","message":{"text":"middleware.valuesFromHeader (cognitive 16): middleware.valuesFromHeader has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 1, loops 1 (nesting depth added 6). 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 129). 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":"middleware/extractor.go"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"884cc9300b156b3b518a1be3de83268f2284b74503cb99eab612aa4f8ffa980f"}},{"ruleId":"D2","level":"warning","message":{"text":"CSRFConfig.checkSecFetchSiteRequest (cognitive 16): CSRFConfig.checkSecFetchSiteRequest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 3, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/csrf.go"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cc023b86cc7b4d4c9e117e8cf71efd1375f46a1ef4844cde722416b9b24e1fb"}},{"ruleId":"D2","level":"warning","message":{"text":"StartConfig.start (cognitive 16): StartConfig.start has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, 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":"server.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"90bb95ca1a8ea3ee3440f85354242f071f88c68e44ed7c8d8f462628a7eb41c3"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ValueBinder: TooManyMethods \u2014 110 methods. 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":"binder.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8a604fa0eab19221decdce4ad47b6a5073d58c91a1c2152f49ac67700782a20"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Context: TooManyMethods \u2014 62 methods. 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":"context.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d9df811cb61c194d188292a72cad5da50711aee24bc7b645ffe3f041eac5ee5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ./router.go: FileTooLong \u2014 712 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":"router.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad336ba4f3085f5650bf8473d3d7e24bf468750ed1e52ab3195ebb3dd68ddc67"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ./binder.go: FileTooLong \u2014 697 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":"binder.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"be028809fec0d177f6f4b5e57b9aa090ed3e3907e3a52d8454850325c6e57536"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Echo: TooManyMethods \u2014 33 methods. 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":"echo.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"5520abf726b9f4eefacd867e5bb8de8c56dab922447bff66b6450530c02e8f39"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): echo.go:601-616 | group.go:113-128 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060echo.go:601\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":"echo.go"},"region":{"startLine":601}}}],"partialFingerprints":{"codehealthFindingId/v1":"a030b8a644464263478f4d8fe012bced538cd8dbc22ade4e090ea36661ec7137"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): binder.go:953-964 | binder.go:1044-1055 | binder.go:1220-1231 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. 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":"binder.go"},"region":{"startLine":953}}}],"partialFingerprints":{"codehealthFindingId/v1":"657595bfe3d5bf7092ba0c92041db198e0a36382c965f0bd811422f3cc66135f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): binder.go:1117-1128 | binder.go:1189-1200 | binder.go:1323-1335 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. 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":"binder.go"},"region":{"startLine":1117}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9f28dd312544200f8ce6806be3de9ac1cf34def02a5a2203568b5f0caa64930"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): binder_generic.go:116-127 | binder_generic.go:220-231 \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 \u0060binder_generic.go:116\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":"binder_generic.go"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"52ca1a42c37f498cb9c74be75ed5df041f6184f5019876a5cbd90f1168f4de8c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): binder.go:433-443 | binder.go:1148-1160 \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. 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":"binder.go"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f058897bb036fa27bcdd71d945b4c58a45e8ce6b49bad0fa08b68e7ee701fb6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): binder.go:581-590 | binder.go:592-601 | binder.go:603-612 | binder.go:614-623 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"binder.go"},"region":{"startLine":581}}}],"partialFingerprints":{"codehealthFindingId/v1":"d113ebca4d5f73ca8554e6768b7c0fb87f25daed4d3cfe81d281aad277cffce0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): binder.go:809-818 | binder.go:820-829 | binder.go:831-840 | binder.go:842-851 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"binder.go"},"region":{"startLine":809}}}],"partialFingerprints":{"codehealthFindingId/v1":"59655683fc5ac96e8c54c724d7a3057362447ee8a9373a1a6eb7aab98c128b8b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): binder_generic.go:146-155 | binder_generic.go:255-264 \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 \u0060binder_generic.go:146\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":"binder_generic.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"912e6d2c66a46fd7e9cb8ee4d28fee11cb11a292f2cd307edf483665e6c883ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): middleware/slash.go:48-57 | middleware/slash.go:112-121 \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 \u0060middleware/slash.go:48\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":"middleware/slash.go"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"42b42f041c736fa967cb349f881a715a117e875fc4dd2ca0e07ddb5170a8eaa6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): middleware/cors.go:192-200 | middleware/request_id.go:53-61 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060middleware/cors.go:192\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":"middleware/cors.go"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"c605adb06ee901e85603194a2ce1bba73bb5170a76fb06854918fb79cd500c1e"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: router.go: router.go changed 6 times in last 90 days, max complexity 46. 2 of those changes were fix/bug commits, and the other 4 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":"router.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ad3ddd18d2600d06990329eef318476d6e3ff1a0d26470f3a328f6d761214c4"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: bind.go: bind.go changed 5 times in last 90 days, max complexity 46. 1 of those changes was a fix/bug commit, and the other 4 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":"bind.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e77bd56ef9f797e8f78bac1811f3c47bee5c67b4b5725bd5f41c131eb69de868"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: middleware/static.go: middleware/static.go changed 4 times in last 90 days, max complexity 32. 4 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/static.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd09cc4de15a8799d648d21865f127431ae2622f07600558778ea6bd7cb39fba"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: middleware/proxy.go: middleware/proxy.go changed 3 times in last 90 days, max complexity 25. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/proxy.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"68f69ef3bf95ed47b834a7740fb71e6e981ee33cdb5ba074caf9473ca8511c48"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: middleware/csrf.go: middleware/csrf.go changed 2 times in last 90 days, max complexity 28. 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":"middleware/csrf.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"678db4b2680fc9dbba2582bef63863a97a6bd5d1cf5b02416c4d69e473a4ae67"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: middleware/cors.go: middleware/cors.go changed 2 times in last 90 days, max complexity 26. 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":"middleware/cors.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"42bb8974cda9c6487721c118ca21d23381a4263ac19c992bb7d65b938b9f54f1"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: binder.go: binder.go changed 2 times in last 90 days, max complexity 26. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"binder.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f4fe9aa2fa5bb55588b3b536c6e2525b2bfc4aef7ca13295b97b2e43acfd64a"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 3 significant file(s) lose their only recent owner: middleware/compress.go, middleware/recover.go, middleware/body_limit.go. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"0d4d2878f4366bd382aca12a080ce94a835060f72f1a2791f6889415ddf9744f"}},{"ruleId":"D16","level":"note","message":{"text":"Further sole-owners (lower concentration): 3 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold \u2014 folded into the bus-factor score and metrics (6 single-owned of 33 analysed files in total, counted over production source files of roughly 100 lines or more, excluding tests, vendored, generated and example/demo trees, largest first). They are anonymized user #2 (1 file(s)), anonymized user #3 (1 file(s)), anonymized user #4 (1 file(s)) \u2014 spread or document their files in the same way, at lower priority than the named off-boarding risks above."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6eac528f2429e724e1a97ed868f79eefbcf1888dab4af9a9e673429369bb5b2f"}},{"ruleId":"D19","level":"note","message":{"text":"The feature overview mentions \u0027a fast radix-tree router\u0027 but does not explain how it compares to other routers or what benchmarks it passes.: Add a brief benchmark section comparing Echo\u0027s performance against standard net/http and third-party alternatives."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"README.md"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"605ee944ef7769eadbd91d58064924d176867105a43e3e8921e43f9db5f45083"}},{"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":"e4736286501c15dfb50a7aaabfbcbe7426119d0ef0c4350cb503b66812326561"}},{"ruleId":"D28","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3cdfd7beb31b791ae18dcb425e21eb157c842e7bbcd522cc330573c1a6538db1"}},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6fadc76ebe53a2136d9d3e55b29ce4252021b9b16f58163cadeb5cda93c181d1"},"taxa":[{"id":"CWE-338","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"08f96bff2322d5e7a9235bbf52dc20c18e496dfbb7c2952d081b4b39ab478b16"},"taxa":[{"id":"CWE-242","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"844ba548034f2e15ee947a6b25c2b973786bf5ccb93c31e7a86f655a84390a82"},"taxa":[{"id":"CWE-1004","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":"0b9b671e04ae9f2801423f316ac11c77c1259cd349e6be3e49fdbb0bc37649e0"},"taxa":[{"id":"CWE-614","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"626e01eacf94c3b3382809ff8a91277880813d4497b12c2cdcf28b0d8c94458b"}}],"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-1004","guid":"872195c9-bb07-cf51-8a32-865f4bb753ca","name":"CWE-1004","shortDescription":{"text":"CWE-1004"},"helpUri":"https://cwe.mitre.org/data/definitions/1004.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-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-242","guid":"5c147e5c-be37-b051-9928-764ef5a8f3d3","name":"CWE-242","shortDescription":{"text":"CWE-242"},"helpUri":"https://cwe.mitre.org/data/definitions/242.html"},{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-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-614","guid":"faa8a6a5-7e9d-5d5e-afc9-020ff49d250a","name":"CWE-614","shortDescription":{"text":"CWE-614"},"helpUri":"https://cwe.mitre.org/data/definitions/614.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Command Injection","shortDescription":{"text":"Command Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"OS Command Injection","shortDescription":{"text":"OS Command Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Cross-site Scripting (XSS)","shortDescription":{"text":"Cross-site Scripting (XSS)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"SQL Injection","shortDescription":{"text":"SQL Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Code Injection","shortDescription":{"text":"Code Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":7,"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."]}]}