rdmbair15m5-changelog-20260822-1638-icloudmonitor-adversarial-review-fixes
rdmbair15m5-changelog-20260822-1638-icloudmonitor-adversarial-review-fixes
Hardened iCloudMonitor macOS utility against memory safety crashes on NULL network interface pointers, resolved log truncation and false-positive quota alerts, protected corrupt SQLite queries, and expanded test coverage to 27 unit tests.
Summary
- Scope:
rdmbair15m5(macOS 27.0) - Application:
iCloudMonitor.app(/Users/richh/dev/apps/iCloudMonitor) - Bundle Identifier:
com.eastcoastscience.iCloudMonitor - Team Identifier:
ZU2882L4HT
Files Modified
Sources/iCloudMonitorCore/BandwidthTelemetry.swift: Added nil check forinterface.ifa_addrbefore dereferencing.pointeeto prevent SIGSEGV during interface transitions.Sources/iCloudMonitorCore/OSLogMonitor.swift: Prevented false-positive quota alerts on routine telemetry; fixed log truncation to buffer and retain the newest log events.Sources/iCloudMonitorCore/FileSystemScanner.swift: Added finite float checks for corrupt SQLite DBs; enhanced FDA detection with dual system and user TCC paths.Sources/iCloudMonitorCore/BrctlParser.swift: Implemented delimiter-aware status token extraction; added support for key-value quota and budget throttle line formats.Sources/iCloudMonitorCore/Models.swift: Reused staticDateFormatterinLogEvent.timeString.Sources/iCloudMonitorCore/iCloudStateManager.swift: Streamlined async status refresh and addedtask.waitUntilExit()to eliminate zombie processes.Sources/iCloudMonitorCore/AppIntents.swift: Added@Property(title:)annotations toiCloudSyncStatusEntityand setshortcutTileColor = .blue.Tests/iCloudMonitorTests/*: Added tests for key-value quotas, budget throttling, container boundaries, corrupt SQLite DBs, and benign quota telemetry (27/27 passing).STATUS.md: Updated test ledger and verification results.
Verification
swift test: 27/27 passing unit tests across 5 test suites.swift build -c release: 0 errors / warnings../build.sh: Valid.appbundle packaged and code signed.