Repository navigation
Harden copy, scan, feedback and updates after security review - #41
Merged
Merged
Conversation
Native app (Swift): - Copy: read/write with throwing FileHandle APIs so I/O errors fail one item and remove the partial file instead of aborting the app. - Copy: open sources O_NOFOLLOW|O_NONBLOCK and require a regular file; create destinations O_CREAT|O_EXCL|O_NOFOLLOW; re-check destination containment. - Refuse a download folder inside the source card/folder. - Settings preservation plans regular files only. - Fixed-name metadata reads (SafeFileRead) don't follow links and are bounded. - Merged GoPro exports write to a hidden temporary file and are published with link(2), so an interrupted export never sits under the final name. - fsync copies before verification; verification reads bypass the cache. - Cap scan enumeration at 500,000 entries (matches Electron). - Saturating byte totals; clamped frame/size conversions in multicam export. - Fix 70mai YYYYMMDD-HHMMSS parsing (never matched the 8+6 form, skipped the year in the six-field form). - Reveal sources with selectFile instead of NSWorkspace.open; render card names with Text(verbatim:); feedback uses an ephemeral session that refuses redirects; stream the update archive hash. Electron: copy re-validates each source at copy time (no-follow, regular file, inode match, containment), exclusive destination create, Windows drive containment fix, Windows reserved names and trailing dots. Feedback Worker: IPv6 /64 rate-limit buckets, stricter field shapes, hemisphere-tagged coordinates rejected in basenames (shared fixture with the app), null entries dropped, browser-originated posts refused. Updates Worker: malformed percent-encoding returns 404. Tests: HostileCardVerification, 70mai timestamp and size-sum checks in --verify; desktop hostile-card and Windows-name tests; Worker hardening tests, now run in CI. Docs updated to match retention of opt-in private basenames. Privacy impact: narrows what is sent (extension keys, field shapes, coordinate-like basenames); nothing new is collected.
…undici - scripts/ingest-submitted-scans.py: same hemisphere-tagged coordinate rule as the app and Worker, so the shared basename fixture agrees across all three. - desktop: electron 43.7.8 -> 43.8.12 (certificate mitigation advisory) and undici patch updates via npm audit fix; npm audit --audit-level=high clean.
… names in test safeRelativePath split only on path.sep, so on Windows '../x.mp4' was one component that basename() happened to flatten. Split on both separators so traversal is refused explicitly. The hostile-name test skips names Windows cannot create.
vortexopenclaw
added a commit
that referenced
this pull request
Nov 20, 2026
* Harden copy, scan, feedback and updates after security review Native app (Swift): - Copy: read/write with throwing FileHandle APIs so I/O errors fail one item and remove the partial file instead of aborting the app. - Copy: open sources O_NOFOLLOW|O_NONBLOCK and require a regular file; create destinations O_CREAT|O_EXCL|O_NOFOLLOW; re-check destination containment. - Refuse a download folder inside the source card/folder. - Settings preservation plans regular files only. - Fixed-name metadata reads (SafeFileRead) don't follow links and are bounded. - Merged GoPro exports write to a hidden temporary file and are published with link(2), so an interrupted export never sits under the final name. - fsync copies before verification; verification reads bypass the cache. - Cap scan enumeration at 500,000 entries (matches Electron). - Saturating byte totals; clamped frame/size conversions in multicam export. - Fix 70mai YYYYMMDD-HHMMSS parsing (never matched the 8+6 form, skipped the year in the six-field form). - Reveal sources with selectFile instead of NSWorkspace.open; render card names with Text(verbatim:); feedback uses an ephemeral session that refuses redirects; stream the update archive hash. Electron: copy re-validates each source at copy time (no-follow, regular file, inode match, containment), exclusive destination create, Windows drive containment fix, Windows reserved names and trailing dots. Feedback Worker: IPv6 /64 rate-limit buckets, stricter field shapes, hemisphere-tagged coordinates rejected in basenames (shared fixture with the app), null entries dropped, browser-originated posts refused. Updates Worker: malformed percent-encoding returns 404. Tests: HostileCardVerification, 70mai timestamp and size-sum checks in --verify; desktop hostile-card and Windows-name tests; Worker hardening tests, now run in CI. Docs updated to match retention of opt-in private basenames. Privacy impact: narrows what is sent (extension keys, field shapes, coordinate-like basenames); nothing new is collected. * Apply coordinate basename rule to ingest script; update Electron and undici - scripts/ingest-submitted-scans.py: same hemisphere-tagged coordinate rule as the app and Worker, so the shared basename fixture agrees across all three. - desktop: electron 43.7.8 -> 43.8.12 (certificate mitigation advisory) and undici patch updates via npm audit fix; npm audit --audit-level=high clean. * Treat forward slashes as separators on Windows; Windows-valid hostile names in test safeRelativePath split only on path.sep, so on Windows '../x.mp4' was one component that basename() happened to flatten. Split on both separators so traversal is refused explicitly. The hostile-name test skips names Windows cannot create. * Prepare 0.1.45 security hardening release * Count expected hostile-name media explicitly so the Windows subset is correct --------- Co-authored-by: Vortex Openclaw <274593135+vortexopenclaw@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A security review by Claude Mythos (offline, isolated sandbox), followed by verification and further fixes on macOS. There is no remote compromise. The most serious issues were in the native copy path: a hostile or failing card could crash the app, leave a truncated file under its final name, write onto the card, or follow links off the card. All 12 confirmed issues are fixed, plus the review's unconfirmed leads wherever a safe fix existed.
Fixed
Native app
Electron: copy-time re-validation of every source (link swap, pipe, containment), exclusive create, Windows cross-drive containment, Windows reserved names.
Feedback Worker: IPv6 /64 rate limiting, field shape checks, hemisphere-tagged coordinates in basenames, null entries, browser-origin posts.
Updates Worker: malformed URL encoding.
Tests (macOS arm64, Xcode)
swift build;swift run DashcamOffloader --verify: all passes (19 PASS lines, 0 FAIL), including new hostile-card, 70mai and size checks.--verifyfail.npm test: 22/22. Feedback Worker: 36 pass, 6 skipped (need a native snapshot, as before). Updates Worker: 7/7.scripts/privacy-audit.shpassed.Behaviour changes
[other].40.71N_74.00W.mp4are no longer retained in private evidence.ALLOWED_ORIGINSallows them.Not changed
.smith) and words in owner-chosen basenames can't be distinguished from technical tokens. This is documented in the Worker README.Workers need redeploying after merge.