{"$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":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D8","name":"Code Coverage","shortDescription":{"text":"Code Coverage"},"helpUri":"https://codehealth.canine.dev/dimensions/D8"},{"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":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"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":"D22","name":"Internal API Consistency","shortDescription":{"text":"Internal API Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D22"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"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":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"]}},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX4","name":"Dependency direction","shortDescription":{"text":"Dependency direction"},"helpUri":"https://codehealth.canine.dev/dimensions/AX4"},{"id":"AX9","name":"CQS / query purity","shortDescription":{"text":"CQS / query purity"},"helpUri":"https://codehealth.canine.dev/dimensions/AX9"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P10","name":"Library API \u0026 versioning","shortDescription":{"text":"Library API \u0026 versioning"},"helpUri":"https://codehealth.canine.dev/dimensions/P10"},{"id":"P12","name":"CI test-gate honesty","shortDescription":{"text":"CI test-gate honesty"},"helpUri":"https://codehealth.canine.dev/dimensions/P12"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"TLPhotosPickerViewController.photoLibraryDidChange (cyclomatic 22): TLPhotosPickerViewController.photoLibraryDidChange 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":"TLPhotoPicker/Classes/TLPhotosPickerViewController.swift"},"region":{"startLine":684}}}],"partialFingerprints":{"codehealthFindingId/v1":"95af6f80cb69b4ef2c80f3e6ad495d32fac4b719c8bdbf1bf2082f448d59a0af"}},{"ruleId":"D1","level":"warning","message":{"text":"TLPHAsset.tempCopyMediaFile (cyclomatic 20): TLPHAsset.tempCopyMediaFile 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":"TLPhotoPicker/Classes/TLAssetsCollection.swift"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd8de826c1069a5a5a5492b3d8ad304843624238fdec0807505c2772cebf2dd4"}},{"ruleId":"D1","level":"warning","message":{"text":"TLPhotoLibrary.fetchCollection (cyclomatic 18): TLPhotoLibrary.fetchCollection has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"TLPhotoPicker/Classes/TLPhotoLibrary.swift"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"8da4a8f84d865845a878d8dcfafa156ab5e963a882ea4658873850eebd213619"}},{"ruleId":"D2","level":"warning","message":{"text":"TLPhotosPickerViewController.photoLibraryDidChange (cognitive 40): TLPhotosPickerViewController.photoLibraryDidChange has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (32 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"TLPhotoPicker/Classes/TLPhotosPickerViewController.swift"},"region":{"startLine":684}}}],"partialFingerprints":{"codehealthFindingId/v1":"994c763e3a4e660751f8a7890276c7e0f4b1b46c06ef6cb4cb0d7dd947ae96b1"}},{"ruleId":"D2","level":"warning","message":{"text":"TLPHAsset.tempCopyMediaFile (cognitive 31): TLPHAsset.tempCopyMediaFile has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 5, error handling 1 (2 pts), ternaries 1 (2 pts), 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":"TLPhotoPicker/Classes/TLAssetsCollection.swift"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"f53a8200d17ff65807673d81055e1dc696d58fc9aa91a86884b7666407387cbe"}},{"ruleId":"D2","level":"warning","message":{"text":"TLPhotoLibrary.fetchCollection (cognitive 31): TLPhotoLibrary.fetchCollection has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"TLPhotoPicker/Classes/TLPhotoLibrary.swift"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"942fbae90adfe704011ee31b22ba45bd4994c770bd41a7b9252f46885c3bd7a8"}},{"ruleId":"D2","level":"warning","message":{"text":"TLVideoPlayerService.playVideo (cognitive 21): TLVideoPlayerService.playVideo has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"TLPhotoPicker/Classes/TLVideoPlayerService.swift"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"182925fd7411e17cc997686fbee86ce8f0ad14ffb2663149772be550da4c171a"}},{"ruleId":"D2","level":"warning","message":{"text":"TLCollectionViewAdapter.collectionView (cognitive 20): TLCollectionViewAdapter.collectionView has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (14 pts), ternaries 2 (6 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"TLPhotoPicker/Classes/TLCollectionViewAdapter.swift"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bd3c0f824918b99823f79f3948e7ec5c4dde9a1735f28a72d4bca74ae163a61"}},{"ruleId":"D2","level":"warning","message":{"text":"TLCameraService.showCamera (cognitive 19): TLCameraService.showCamera has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 1, ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"TLPhotoPicker/Classes/TLCameraService.swift"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8bc5a640b70e07e2e3a19f3a3b53acf2709245f40b381da40937556acceae9a"}},{"ruleId":"D2","level":"warning","message":{"text":"TLCameraService.saveCapturedAsset (cognitive 16): TLCameraService.saveCapturedAsset has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"TLPhotoPicker/Classes/TLCameraService.swift"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"09d7bf850409442c33efbf7633100f27f1a4152b933aa1564343829d820315e2"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: TLPhotosPickerViewController.custom: MethodTooLong \u2014 custom runs 220 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 120 over it, 2.20\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"TLPhotoPicker/Classes/TLPhotosPickerViewController.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e8d3bec279f2012f07e69b96b993b83e75db366ec7270477a153bd072451877"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: TLPhotosPickerViewController: TooManyMethods \u2014 60 methods. The bar is 30 methods; this is 30 over it, 2.00\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"TLPhotoPicker/Classes/TLPhotosPickerViewController.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"85b8c9724f69f8a6a41588314806f132d7334cae40c3789b7dc39ae8c87f5688"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Classes/TLPhotosPickerViewController.swift: FileTooLong \u2014 618 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 118 over it, 1.24\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"TLPhotoPicker/Classes/TLPhotosPickerViewController.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bab7bfbf98c27d0e0ce43b52f040131f4ab7a13ba8d63fd7fb50f419c23750ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): TLPhotoPicker/Classes/TLCollectionViewAdapter.swift:111-126 | TLPhotoPicker/Classes/TLCollectionViewAdapter.swift:140-155 \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 \u0060TLPhotoPicker/Classes/TLCollectionViewAdapter.swift:111\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"TLPhotoPicker/Classes/TLCollectionViewAdapter.swift"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f57e97c512349fbd67f448fa590e2a78c8b0c4ff0a6674152f60e35f249b018"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): TLPhotoPicker/Classes/TLCollectionViewAdapter.swift:299-308 | TLPhotoPicker/Classes/TLCollectionViewAdapter.swift:319-328 \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 \u0060TLPhotoPicker/Classes/TLCollectionViewAdapter.swift:299\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060TLPhotoPicker/Classes/TLCollectionViewAdapter.swift:317\u0060 calls \u0060cancelRequest\u0060 and \u0060TLPhotoPicker/Classes/TLCollectionViewAdapter.swift:298\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"TLPhotoPicker/Classes/TLCollectionViewAdapter.swift"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"767e9817e5ac887e71fa33123b9cde3378767bb9ec4d2e5726c08b1a72e055dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): TLPhotoPicker/Classes/TLAssetsCollection.swift:225-229 | TLPhotoPicker/Classes/TLAssetsCollection.swift:308-312 \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 \u0060TLPhotoPicker/Classes/TLAssetsCollection.swift:225\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"TLPhotoPicker/Classes/TLAssetsCollection.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"707a41d48d929ef62fbf4876eab6432148a07bbe14eddce4250b287b345d7358"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201316 lines \u00D7 2): Example/TLPhotoPicker/ViewController.swift:387-399 | Example/TLPhotoPicker/ViewController.swift:409-424 \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 \u0060Example/TLPhotoPicker/ViewController.swift:387\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, 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":"Example/TLPhotoPicker/ViewController.swift"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c9a1a8de6f4d1adf371f8c9906d48a15d5a170b543275a39f1bf115a54353eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Example/TLPhotoPicker/CustomPhotoPickerViewController.swift:17-23 | Example/TLPhotoPicker/PhotoPickerWithNavigationViewController.swift:17-23 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Example/TLPhotoPicker/CustomPhotoPickerViewController.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"939793bd0134d49d181269f73b4b38a0ca9bfdf55cfe0def276ebf90e69b8cd4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Example/TLPhotoPicker/ImagePreviewViewController.swift:36-43 | Example/TLPhotoPicker/PhotoPickerWithNavigationViewController.swift:36-43 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Example/TLPhotoPicker/ImagePreviewViewController.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b27beaedbd943cc7f771605a76b7534b2be24f4a835e44affac7bd7ef1598cf"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: ViewController (LCOM4 7): ViewController\u0027s methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Example/TLPhotoPicker/ViewController.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"c86935ffcc9e0fe8cb510e1f2845f613374f59a695f618108d7e96eb6a3622f1"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: TLPhotoCollectionViewCell (LCOM4 7): TLPhotoCollectionViewCell\u0027s methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"TLPhotoPicker/Classes/TLPhotoCollectionViewCell.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"88a6612409f21f608739b35cb3701d1b6b3cc6c11a609b1d9b8dac045c17a81b"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AppDelegate (LCOM4 6): AppDelegate\u0027s methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Example/TLPhotoPicker/AppDelegate.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"66dbe64f010bb67475c7bf7f03f36cdf03b346c9e69c915e9381a5c9cc4b82f7"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: TLPhotosPickerViewController (LCOM4 6): TLPhotosPickerViewController\u0027s methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"TLPhotoPicker/Classes/TLPhotosPickerViewController.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"192ba7198f9b57035e2b9f1297d894471bb9b433d64885209e56bf3d79e5bb2f"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: TLCollectionViewAdapter (LCOM4 5): TLCollectionViewAdapter\u0027s methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"TLPhotoPicker/Classes/TLCollectionViewAdapter.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"731d520ce5858763b0586a86d16a0eac445c348943ff11609ea53e5cfce49f08"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: PhotoCaptureProcessor (LCOM4 4): PhotoCaptureProcessor\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Example/TLPhotoPicker/PhotoCaptureDelegate.swift"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8014cffe74c3369de21a2ad337c13a80de1cd83c430cbcf03ba37c50c208912"}},{"ruleId":"D8","level":"warning","message":{"text":"Coverage not measured \u2014 Swift suite: Coverage NOT MEASURED: the Swift half could not be measured \u2014 the Swift suite in . produced no coverage export. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository\u0027s maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"62e63e619c28f057e129f2997c965d32a457366a9ce18ca019ffb6bdfba85c99"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: TLPhotoPicker/Classes/TLCameraService.swift: TLPhotoPicker/Classes/TLCameraService.swift changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 14 (its worst body is TLCameraService.showCamera at line 68), UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: self-dismiss media URL callback\u201D; \u201Cfix: restore camera media URL callback timing (#385)\u201D; \u201Cfix: avoid duplicate camera picker dismiss\u201D; \u201Cfix: address review feedback on didCaptureMediaURL callback\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-03-18..2026-06-16, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-03-18 22:57:36 \u002B09:00\u0027 --until=\u00272026-06-16 22:57:36 \u002B09:00\u0027 --full-history --no-merges -- TLPhotoPicker/Classes/TLCameraService.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"TLPhotoPicker/Classes/TLCameraService.swift"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef1466525a1037996e00885035cf2b856e27b0597d23d3c86c7936fb86cd3b38"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 1 significant file(s) lose their only recent owner: TLPhotoPicker/Classes/TLPhotoLibrary.swift. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"7998ec0385c7589f1bf5dacbf09a6f8665d917b88bc146d671a0818fb3a66337"}},{"ruleId":"D19","level":"note","message":{"text":"Documentation: no architecture or design documentation: The summary states architecture/design docs exist but no markdown files are shown in this review. Verify architecture/Design docs exist and appear in the repository; if not, add a note or remove the \u0027missing-architecture-docs\u0027 label."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"84cad5aa969f5ef844b476779546edef18771267fa062b44c62e3faed24d67b7"}},{"ruleId":"D22","level":"warning","message":{"text":"Duplicate intent: Property and Method with identical name and signature: Remove the method \u0060fullResolutionImage()\u0060 and rely solely on the property \u0060fullResolutionImage\u0060, or vice versa, to avoid confusion about whether the value is cached or fetched on access. (signatures: TLPHAsset.fullResolutionImage: UIImage? | TLPHAsset.fullResolutionImage(): UIImage?)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"4aa09ca01f427dda8d316c713e1efb1f3acf8211de4d6653d031300fe21a6abb"}},{"ruleId":"D22","level":"warning","message":{"text":"Inconsistent domain abstraction: Mixing raw PHAsset and wrapper TLPHAsset in public API: Standardize on the wrapper type \u0060TLPHAsset\u0060 for the public API surface to hide implementation details, or provide a single unified method/initializer that accepts a generic or base type, rather than having parallel signatures for raw and wrapped assets. (signatures: TLPhotosPickerViewController.init(withPHAssets: (([PHAsset]) -\u003E Void)?, didCancel: (() -\u003E Void)?) | TLPhotosPickerViewController.init(withTLPHAssets: (([TLPHAsset]) -\u003E Void)?, didCancel: (() -\u003E Void)?) | TLPhotosPickerViewControllerDelegate.dismissPhotoPicker(withPHAssets: [PHAsset]) | TLPhotosPickerViewControllerDelegate.dismissPhotoPicker(withTLPHAssets: [TLPHAsset]))"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"4ec8b2ed02fdc2fe6c7295346771de525ca1d7532f1d7b8c4b2043e51c387736"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned files with no living knowledge: 1 of 12 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 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 12 of the 23 production source files in this repository met that bar). 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 most significant first: TLPhotoPicker/Classes/TLAssetPreviewViewController.swift. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ce861fd78f6935114d3a342cb90ad25870f984e1042954fcbbe27c0e23be3658"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ace515990e7ee0f17b5c17e44dd168a5bdecf90804a3a3dd845cf05540978013"}},{"ruleId":"M2","level":"note","message":{"text":"No ADRs: No Architecture Decision Records found \u2014 no conventional ADR directory, no numbered \u0060NNNN-title\u0060 documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"670b3d6e36a756d63097d0dfbf90afd5fc761308800b9354894a07c3f4e4aa14"}},{"ruleId":"M2","level":"note","message":{"text":"No architecture diagram/doc: No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named \u0060architecture\u0060 or \u0060design\u0060 in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape \u2014 no \u0060## Architecture\u0060 heading, no \u0022architecture overview\u0022/\u0022high-level design\u0022 phrasing, no \u0022the architecture is \u2026\u0022 introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document \u2014 not evidence that nobody wrote the shape down."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"0c190e7c159d1850ee706c3ac4486e151e8a4fe169de4bf61436b9f399654f06"}},{"ruleId":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add CodeQL\u0027s Swift pack (Swift/Xcode) (or \u0060semgrep --config=auto\u0060, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 524 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge\u0027s web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen \u2014 if that is your case the row is wrong, and saying so is more useful than adding a second scanner."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"P6","level":"note","message":{"text":"No changelog: No CHANGELOG/HISTORY/RELEASES file \u2014 what shipped when isn\u0027t easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"dda5aa5aed8cbb292c3ef2b733bc138f614293ae6426c85e98bf31ef330d9415"}}],"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-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-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-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-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":1,"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."]}]}