{"$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":"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":"Artifact.FilesReferencedByTest (cyclomatic 30): Artifact.FilesReferencedByTest has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 2 of the 30 points are its own statements and the rest belongs to one function literal inside it that branches (line 466). 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":"internal/artifact.go"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cd7eef6d49297700fe0d589a0bb4f2d1794d8f2d0b56183191ecd43ad1f393f"}},{"ruleId":"D1","level":"warning","message":{"text":"Artifact.UnorderedDeclarations (cyclomatic 29): Artifact.UnorderedDeclarations has cyclomatic complexity 29 (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":"internal/artifact.go"},"region":{"startLine":560}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3408264e8a05e9f446d5df3188e841981f5dc5a908e6c128ff7a7da182cbe5a"}},{"ruleId":"D1","level":"warning","message":{"text":"Artifact.UnusedPublicDeclarations (cyclomatic 21): Artifact.UnusedPublicDeclarations 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":"internal/artifact.go"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"f44048efe37a43213cfa10d687cc294dbfe29b219925a496df5182085ac9ec92"}},{"ruleId":"D1","level":"warning","message":{"text":"Artifact.ContextKeyWithPublicType (cyclomatic 17): Artifact.ContextKeyWithPublicType has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 407). 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":"internal/artifact.go"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"597b1225a1da88fe88bfebedb61f46d576b39b8bea11c22a5f62f08efe693fd4"}},{"ruleId":"D1","level":"warning","message":{"text":"archunit.itemDependencies (cyclomatic 16): archunit.itemDependencies 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":"matcher.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a16895b17d235cd1905cf11e18957acaf52fb6738a72f8965d0c72572ba7e3f"}},{"ruleId":"D2","level":"warning","message":{"text":"Artifact.FilesReferencedByTest (cognitive 68): Artifact.FilesReferencedByTest has cognitive complexity 68 (threshold 15). Drivers by points: if/else 45, loops 12, boolean chains 9, match/switch 2 (nesting depth added 40). Most of this is not in the body itself: 1 of the 68 points is its own statement and the rest belongs to one function literal inside it that branches (line 466). 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":"internal/artifact.go"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bb99b75b49344d8aa910e0a36a60eed86432d9bcb6971493bc654811c3b226a"}},{"ruleId":"D2","level":"warning","message":{"text":"Artifact.UnorderedDeclarations (cognitive 68): Artifact.UnorderedDeclarations has cognitive complexity 68 (threshold 15). Drivers by points: if/else 46, loops 11, boolean chains 6, match/switch 4, jumps 1 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/artifact.go"},"region":{"startLine":560}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf984632d11aee4a668aa8a4dc0ce472f3dac4fdc3fd7d3dccd3d399ff55a77b"}},{"ruleId":"D2","level":"warning","message":{"text":"Artifact.ContextKeyWithPublicType (cognitive 55): Artifact.ContextKeyWithPublicType has cognitive complexity 55 (threshold 15). Drivers by points: if/else 51, loops 3, boolean chains 1 (nesting depth added 40). Most of this is not in the body itself: 8 of the 55 points are its own statements and the rest belongs to one function literal inside it that branches (line 407). 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":"internal/artifact.go"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cdfc3a16ce24c37188417307a5bcdd60bf014c540137632bf47d816ea23328b"}},{"ruleId":"D2","level":"warning","message":{"text":"Artifact.UnusedPublicDeclarations (cognitive 48): Artifact.UnusedPublicDeclarations has cognitive complexity 48 (threshold 15). Drivers by points: if/else 33, loops 13, boolean chains 2 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/artifact.go"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dcedb8121a66e34d59f065507c57480cbd94774ff7ad4acc3ecdee86e4a98b0"}},{"ruleId":"D2","level":"warning","message":{"text":"archunit.shouldOnlyBeReferredBy (cognitive 24): archunit.shouldOnlyBeReferredBy has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14, loops 9, boolean chains 1 (nesting depth added 11). Most of this is not in the body itself: 0 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 257). 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":"rule.go"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd4a64b1a4818888bf1bda748f909b30e648d061e77263034a5dbf80ef44ea4f"}},{"ruleId":"D2","level":"warning","message":{"text":"archunit.itemDependencies (cognitive 22): archunit.itemDependencies has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15, loops 6, match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"matcher.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bdc24a77a9fc3d4cd76bc18cc158e4b8ebfa9562ad87bd0f42f7dd4bdc05082"}},{"ruleId":"D2","level":"warning","message":{"text":"archunit.shouldResideInLayers (cognitive 22): archunit.shouldResideInLayers has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16, loops 6 (nesting depth added 12). Most of this is not in the body itself: 0 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 499). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\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":"rule.go"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"275f189dba53aa6fc53e41c67200d713302db0e3331d147a6cab7fc2214e19bf"}},{"ruleId":"D2","level":"warning","message":{"text":"Package.VariablesNotUsedInDefiningFile (cognitive 21): Package.VariablesNotUsedInDefiningFile has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17, loops 3, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/artifact.go"},"region":{"startLine":687}}}],"partialFingerprints":{"codehealthFindingId/v1":"d83c0152db1718e71236b5e0f05ea322a83247d6888eefcedd7578ec83908a19"}},{"ruleId":"D2","level":"warning","message":{"text":"archunit.shouldNotRefer (cognitive 19): archunit.shouldNotRefer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, loops 6, boolean chains 1 (nesting depth added 8). Most of this is not in the body itself: 0 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 101). 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":"rule.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"24bfcf25cb095de8ce81b65737bac7b9320d5695548c66fb1518b9575b57fd0d"}},{"ruleId":"D2","level":"warning","message":{"text":"archunit.resolveReferableToPackageIDs (cognitive 18): archunit.resolveReferableToPackageIDs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, loops 6, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"matcher.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7f3531d70c7ccf0d155144ddb179437e6011e212155de0a40c629faf16978d2"}},{"ruleId":"D2","level":"warning","message":{"text":"archunit.shouldOnlyRefer (cognitive 18): archunit.shouldOnlyRefer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, loops 6, boolean chains 1 (nesting depth added 8). 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 156). 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":"rule.go"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"34fd077b28717c7107c4fe2ea857c773dfdbca5b757fa874791ecc4d95d7cf77"}},{"ruleId":"D2","level":"warning","message":{"text":"archunit.ErrorShouldBeLastReturn (cognitive 17): archunit.ErrorShouldBeLastReturn has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, loops 7, boolean chains 1 (nesting depth added 9). Most of this is not in the body itself: 0 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 357). 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":"global.go"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f90dac975b316f95ff7eecdbee437a5bc7d720e75842efc9dad11fbe8084946"}},{"ruleId":"D2","level":"warning","message":{"text":"archunit.ContextShouldBeFirstParam (cognitive 17): archunit.ContextShouldBeFirstParam has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, loops 7, boolean chains 1 (nesting depth added 9). Most of this is not in the body itself: 0 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 524). 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":"global.go"},"region":{"startLine":523}}}],"partialFingerprints":{"codehealthFindingId/v1":"94b41c4cd05c646e0076092a34e2eb3d74bf80cd6531011821c5755f1c814e4d"}},{"ruleId":"D2","level":"warning","message":{"text":"archunit.NoPublicReAssignableVariables (cognitive 16): archunit.NoPublicReAssignableVariables has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (nesting depth added 9). Most of this is not in the body itself: 0 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 219). 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":"global.go"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"917cffcf9f158038361d2fa1d6af91776130b1ce75ecee7a7d05001def09e78e"}},{"ruleId":"D2","level":"warning","message":{"text":"archunit.shouldNotBeReferredBy (cognitive 16): archunit.shouldNotBeReferredBy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, loops 6 (nesting depth added 7). Most of this is not in the body itself: 0 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 209). 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":"rule.go"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"a70208f9adc3a27b3adb606e328eff5d56e6f875efb0685447b0752f2a1d5961"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): rule.go:333-355 | rule.go:383-404 \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 \u0060rule.go:333\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":"rule.go"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ef82c18a49b7e428b5a95d41d79b349b52af6bc1ea9ee43873ac8b62ac708f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): rule.go:159-170 | rule.go:279-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 \u0060rule.go:159\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":"rule.go"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3abef0eac3f5df3572f6e7c58a6a809d3ffa3c20d82736076d70ca77396f071"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): rule.go:466-477 | rule.go:499-510 \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 \u0060rule.go:466\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":"rule.go"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"b44eec76e98efd8638efa61d783c76a669dd225440c5ffb8c0f0299f70106d4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): rule.go:124-134 | rule.go:175-185 \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 \u0060rule.go:124\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":"rule.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"54ed787f09d1e716927f5a1e57088cabac9555057b2a666334412cbfa2c0d967"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): rule.go:217-226 | rule.go:265-274 \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 \u0060rule.go:217\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":"rule.go"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e5fe701b8e7dc10906634f82c9d81de74b13a2f268d2bc83aa53d2c8146fc88"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): object.go:294-302 | object.go:558-566 \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 \u0060object.go:294\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":"object.go"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"566e3dba3f770aa16e67aa69d576729c77f5f8ab9fce07d84b5c5ba5b6fa23c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): global.go:362-369 | global.go:529-536 \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 \u0060global.go:362\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":"global.go"},"region":{"startLine":362}}}],"partialFingerprints":{"codehealthFindingId/v1":"68a6530d82464f5028e20952764e8f5760019ee49a91860fdb57acd6224d5fc8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/artifact.go:806-813 | internal/artifact.go:819-826 \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 \u0060internal/artifact.go:806\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":"internal/artifact.go"},"region":{"startLine":806}}}],"partialFingerprints":{"codehealthFindingId/v1":"b00403bab98ea7aec193f18966dbfd8bb96325b4a45ab94a55101d3f3ff1dd71"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): object.go:793-800 | object.go:811-818 \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 \u0060object.go:793\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":"object.go"},"region":{"startLine":793}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdd23bf08af580e9fb22fbaf2b3c460b049c8264192b458fa8e7fdf93087e42b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): object.go:373-379 | object.go:460-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060object.go:373\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":"object.go"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdd7fd418f07829aa4724c1fcbca1f6397632c8aae98c90bd530d61e7261f1d4"}},{"ruleId":"D16","level":"warning","message":{"text":"single-maintainer \u2014 knowledge-concentration (bus factor) risk: single-maintainer \u2014 knowledge-concentration (bus factor) risk (1 author(s) across 135 commit(s) sampled)."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"b4b49d961df742f0e507f4cc5c8094fb077ba0391a27fd015d18320865187719"}},{"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":"be82002869094debafd47ffc0021bdb17eacecac471c254f8f1b3bfbd31ecf12"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","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":"c4d2b670254bdd235733b2a63edd2f78184944739589dc19e542df937a8f37f2"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","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":"2e702d9db1d477603d753bbf0453cda3227c32a54d7a1f5913c3cef5c4ecd150"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D34","level":"note","message":{"text":"Further orphaned files (smaller): 2 of 6 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: suite/suite.go, matcher.go. 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":"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":"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":"67513cec8df302e3c695c940a21ce26f1e0c439713f432fd28a391e78264f4b5"}}],"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-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-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-353","guid":"09d7e902-d4ee-f05d-ae6c-0a1554d0c18f","name":"CWE-353","shortDescription":{"text":"CWE-353"},"helpUri":"https://cwe.mitre.org/data/definitions/353.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":6,"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."]}]}