macOS menu bar app that tells you, in plain English, what each USB-C cable plugged into your Mac can actually do
This report presents the forensic synthetic code analysis of darrylmorley/whatcable, a Swift project with 8,046 GitHub stars. SynthScan v2.0 examined 113,971 lines of code across 356 source files, recording 685 pattern matches distributed across 7 syntactic categories. The overall adjusted score of 6.1 places this repository in the Low AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 685 distinct pattern matches across 7 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .gitleaks.toml | 1 | # gitleaks configuration for WhatCable. | COMMENT |
| LOW | probes/test-kit/25_usb_bos_descriptor.c | 21 | * Compile: | COMMENT |
| LOW | probes/test-kit/19_pdo_decode_and_usb3_watch.c | 1 | // Decode raw PDO (Power Data Object) integers from PortControllerPortPDO | COMMENT |
| LOW | probes/test-kit/19_pdo_decode_and_usb3_watch.c | 21 | // | COMMENT |
| LOW | probes/test-kit/36_xhci_port_map.c | 1 | // Map each USB host-controller port to its physical USB-C port number and | COMMENT |
| LOW | probes/test-kit/36_xhci_port_map.c | 101 | // probe 35 (35_hpm_port_uuid.c). @N alone is confirmed unreliable as a | COMMENT |
| LOW | probes/test-kit/35_hpm_port_uuid.c | 1 | // Map each USB-C / MagSafe port to its power-controller identity. | COMMENT |
| LOW | probes/test-kit/17_deep_property_dump.c | 1 | // Deep dump of every property on every service in the HPM/IOPort tree, | COMMENT |
| LOW | probes/test-kit/40_hub_port_statistics.c | 1 | // Dump every USB hub node (AppleUSB20Hub / AppleUSB30Hub) and per-downstream-port | COMMENT |
| LOW | probes/test-kit/40_hub_port_statistics.c | 21 | // descriptor strings. Those descriptor strings can include the model / product | COMMENT |
| LOW | probes/test-kit/40_hub_port_statistics.c | 41 | #include <CoreFoundation/CoreFoundation.h> | COMMENT |
| LOW | probes/test-kit/26_displayport_altmode.c | 1 | // Capture connected-display capability as a tree, from the real Apple Silicon | COMMENT |
| LOW | probes/test-kit/26_displayport_altmode.c | 21 | // (DisplayVendorID / DisplayProductID / ManufacturerID), manufacture date, and | COMMENT |
| LOW | probes/test-kit/04_raw_registry_dump.c | 1 | // Dump EVERY property from a wide set of USB-C / Thunderbolt / port-controller | COMMENT |
| LOW | probes/test-kit/04_raw_registry_dump.c | 21 | #include <IOKit/IOKitLib.h> | COMMENT |
| LOW | probes/test-kit/04_raw_registry_dump.c | 41 | COMMENT | |
| LOW | probes/test-kit/37_tb_tunnel_port_map.c | 1 | // Map a Thunderbolt-tunnelled USB device back to its physical USB-C port. | COMMENT |
| LOW | probes/test-kit/37_tb_tunnel_port_map.c | 21 | // is: tunnelled device -> AppleUSBXHCITR -> apciecN ==(by index)== acioN -> | COMMENT |
| LOW | probes/test-kit/37_tb_tunnel_port_map.c | 341 | // Appended 2026-07: HPM UUID map (side-table join by @N). | COMMENT |
| LOW | probes/test-kit/38_usb_device_tree.c | 1 | // Capture the IOUSB device tree with the ancestor walk WhatCable's classifier | COMMENT |
| LOW | probes/test-kit/38_usb_device_tree.c | 21 | // Vendor Name, USB Serial Number; UsbIOPort and USBPortType on ancestors). | COMMENT |
| LOW | probes/test-kit/38_usb_device_tree.c | 121 | if (portType >= 0) printf(" USBPortType=%lld", portType); | COMMENT |
| LOW | Tests/WhatCableCoreTests/VendorDBTests.swift | 41 | COMMENT | |
| LOW | …atCableCoreTests/LocalizedBundleConcurrencyTests.swift | 1 | import Foundation | COMMENT |
| LOW | Tests/WhatCableCoreTests/TRMTransportTests.swift | 101 | #expect(t.transportType == "USB2") | COMMENT |
| LOW | …ts/WhatCableCoreTests/ThunderboltProbeSweepTests.swift | 1 | import Foundation | COMMENT |
| LOW | …ts/WhatCableCoreTests/ThunderboltProbeSweepTests.swift | 421 | #expect(port?.adapterType == .lane) | COMMENT |
| LOW | Tests/WhatCableCoreTests/CableCertLookupTests.swift | 1 | import Foundation | COMMENT |
| LOW | Tests/WhatCableCoreTests/CableCertLookupTests.swift | 41 | COMMENT | |
| LOW | …s/WhatCableCoreTests/PortSummaryCorpusSweepTests.swift | 1 | import Foundation | COMMENT |
| LOW | …s/WhatCableCoreTests/PortSummaryCorpusSweepTests.swift | 21 | /// probe capture (never a decodable array), so `PowerSource.options` is | COMMENT |
| LOW | …sts/WhatCableCoreTests/PowerSourceSynthesisTests.swift | 441 | } | COMMENT |
| LOW | …sts/WhatCableCoreTests/PowerSourceSynthesisTests.swift | 501 | // Rung a is skipped entirely (not attempted with an out-of-range or | COMMENT |
| LOW | …bleCoreTests/PowerSourceSynthesisProbeSweepTests.swift | 1 | import Foundation | COMMENT |
| LOW | …bleCoreTests/PowerSourceSynthesisProbeSweepTests.swift | 421 | } | COMMENT |
| LOW | Tests/WhatCableCoreTests/AppInfoVersionTests.swift | 1 | import Testing | COMMENT |
| LOW | Tests/WhatCableCoreTests/DisplayDiagnosticTests.swift | 81 | // MARK: - Core verdicts | COMMENT |
| LOW | Tests/WhatCableCoreTests/DisplayDiagnosticTests.swift | 261 | func parsesRate() { | COMMENT |
| LOW | Tests/WhatCableCoreTests/DisplayDiagnosticTests.swift | 301 | @Test("4K240 at the DP ceiling (4-lane HBR3) reads as compression, not a warning") | COMMENT |
| LOW | Tests/WhatCableCoreTests/DisplayDiagnosticTests.swift | 561 | // (lanes < maxLanes), so the existing .compressionPlausible block does | COMMENT |
| LOW | Tests/WhatCableCoreTests/DisplayDiagnosticTests.swift | 641 | // threshold, so the helper would NOT call DSC. But the live mode is | COMMENT |
| LOW | Tests/WhatCableCoreTests/DisplayDiagnosticTests.swift | 661 | @Test("nil bpc falls back to the 24bpp default (backwards compatible)") | COMMENT |
| LOW | Tests/WhatCableCoreTests/PDVDOTests.swift | 41 | COMMENT | |
| LOW | Tests/WhatCableCoreTests/PDVDOTests.swift | 61 | COMMENT | |
| LOW | Tests/WhatCableCoreTests/PDVDOTests.swift | 101 | // 1 << 23 = 0x0080_0000 | COMMENT |
| LOW | Tests/WhatCableCoreTests/PDVDOTests.swift | 141 | // speed=3 (USB4 Gen3), current=2 (5A) -> 2<<5=0x40 | COMMENT |
| LOW | Tests/WhatCableCoreTests/PDVDOTests.swift | 181 | func cheap_USB2_3A() { | COMMENT |
| LOW | Tests/WhatCableCoreTests/PDVDOTests.swift | 201 | // But power is clamped to USB-PD's 48V ceiling: 48 * 5 = 240, not 250. | COMMENT |
| LOW | Tests/WhatCableCoreTests/PDVDOTests.swift | 521 | } | COMMENT |
| LOW | Tests/WhatCableCoreTests/PDVDOTests.swift | 561 | #expect(v2.shutdownTempC == 120) | COMMENT |
| LOW | Tests/WhatCableCoreTests/PDVDOTests.swift | 581 | let v2 = PDVDO.decodeActiveCableVDO2(0) | COMMENT |
| LOW | Tests/WhatCableCoreTests/USBDeviceBillboardTests.swift | 41 | // bDeviceClass 9 is a USB hub, the common case next to a dock. | COMMENT |
| LOW | …tCableCoreTests/PowerMonitorSnapshotCodableTests.swift | 61 | #expect(snapshot(externalConnected: true, batteryInstalled: true, chargerAttached: true).externalPowerAbsent == | COMMENT |
| LOW | Tests/WhatCableCoreTests/USBDeviceTreeTests.swift | 141 | let tree = USBDeviceNode.buildTree(from: [grandchild, child2, hub, child1]) | COMMENT |
| LOW | …WhatCableCoreTests/ConnectedDeviceTreeChainTests.swift | 1 | import Foundation | COMMENT |
| LOW | …WhatCableCoreTests/ConnectedDeviceTreeChainTests.swift | 201 | let rows = referenceRows(hubs: .endpointsOnly) | COMMENT |
| LOW | Tests/WhatCableCoreTests/ConnectedDeviceTreeTests.swift | 1 | import Foundation | COMMENT |
| LOW | Tests/WhatCableCoreTests/ConnectedDeviceTreeTests.swift | 601 | #expect(labels.contains("USB bus 0x20")) | COMMENT |
| LOW | Tests/WhatCableCoreTests/ConnectedDeviceTreeTests.swift | 701 | #expect(rows[1].depth == 1) | COMMENT |
| LOW | Tests/WhatCableCoreTests/ConnectedDeviceTreeTests.swift | 941 | // checks is not a check" rule. | COMMENT |
| 606 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …eTests/ReferenceScenarios/JoeshawDaisyChainTests.swift | 26 | /// not sensitive to that field, so this test is robust to that | COMMENT |
| MEDIUM | Sources/WhatCable/Services/Installer.swift | 223 | // so the parse is robust to that (and to any future change in which | COMMENT |
| MEDIUM | …rces/WhatCableWidget/Cable/CableTimelineProvider.swift | 56 | /// discards the objects. This is simpler and more robust than keeping a | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/check-duplicate-readers.py | 250 | CODE | |
| LOW | scripts/check-duplicate-readers.py | 286 | CODE | |
| LOW | scripts/check-localisation.py | 637 | CODE | |
| LOW | scripts/check-localisation.py | 710 | CODE | |
| LOW | scripts/check-localisation.py | 758 | CODE | |
| LOW | scripts/check-localisation.py | 1189 | CODE | |
| LOW | scripts/check-localisation.py | 1266 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/bump-formula.sh | 5 | # Usage: | COMMENT |
| LOW | scripts/bump-cask.sh | 4 | # Usage: | COMMENT |
| LOW | scripts/beta-release.sh | 4 | # Usage: | COMMENT |
| LOW | scripts/release.sh | 4 | # Usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/check-localisation.py | 758 | def scan_triple_quoted_literal(text: str, start: int): | CODE |
| LOW | scripts/check-localisation.py | 1095 | def build_string_returning_funcs(all_contents): | CODE |
| LOW | scripts/check-localisation.py | 1189 | def check_stringsdict_structure(target, lang, path, failures): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docs/blog/feed.xml | 259 | <p>The cable knows what it is. There's a chip inside the connector called an e-marker that declares its capabi | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/build-cable-db.swift | 551 | "Acme Ltd info@example.co.uk", "Acme Ltd"), | STRING |