Repository navigation
Conversation
|
Two source-backed issues affect the new unattended receiver at Verified by source inspection: the helper wires explicit on/off commands to the user unit, the panel queries its active state, and the migration adds The receiver does not enforce the advertised paired-only restrictionThe new unit uses Impact: opting in can permit an unpaired nearby sender that can reach the adapter to submit files. Android's bonded-device picker constrains that client, not other OBEX senders. Discoverability and knowledge of the adapter address affect reachability; no hardware exploit was reproduced. Enabling the unit also preserves this opt-in across later logins. Suggested change: enforce the paired-only policy using verified sender identity at the receiver's authorization decision, or choose a receiver that provides that protection. Remove the paired-only guarantee from the comments and UI/documentation until it is enforced. Receiving a duplicate filename can overwrite an existing downloadThe selected Impact: even a legitimately paired sender can silently replace an existing download. Enforcing pairing alone would not fix this. Suggested change: use a collision-safe destination handoff, such as unique names with atomic no-replace semantics, and check the final move result. Avoid unattended delivery through the unmodified clobbering path. Review informationTest scope: source inspection of this head, BlueZ 5.87 and Arch's pinned bluez-tools source. No runtime tests, Bluetooth transfers or UI validation; the companion packaging PR was not independently reviewed. Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review. Automated AI review: Astra Medium coordinated source inspection and synthesis of independent Opus 5.5 High and GPT 6 Sol Xhigh technical assessments, with claims checked against source evidence. |
|
Both findings hold up in the sources, and Paired-only is now enforced at the authorization decision. Nothing is renamed, so nothing can clobber. The agent names the destination itself and claims it with Evidence
Not reproduced on the air: the unpaired push itself. On the emulated radios an unauthenticated link is refused (with Omarchy's |
Automated AI review
Follow-up at
Verified: obexd's Object Push handler calls the agent's Paired versus Trusted (author's note): the note is accurate. With Omarchy's The receiver also exposes OBEX File Transfer on the downloads directoryThe agent starts File Transfer is registered with Impact: while the receiver is on, a paired peer that uses File Transfer (another computer, or a misbehaving paired device) can overwrite, read or delete files in the downloads directory. That contradicts the stated guarantee that "a push can never land on an existing download" and goes beyond "accept files". Android's share sheet uses Object Push, so the ordinary phone flow is unaffected. Suggested change: start obexd with only the plugins Object Push needs, for example Packaging note: the unit file ships only through the companion omarchy-pkgs#576. Without it, Optional test improvement: the new tests call Review informationTest scope: source inspection of this head, the earlier head AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review (its final report write-up ran on Opus 4.8 after an automatic model fallback) and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check. Opt out: To stop receiving these reviews, reply to this comment saying so. |
|
Thanks for the rework to a real
|
Object Push is the one file transfer every phone already speaks: Android's share sheet offers a Bluetooth target next to Quick Share, and it needs no app, no Wi-Fi and no mDNS on either side — only a paired device and an agent here accepting the push. bt-obex is that agent and writes into the download directory. The unit is the state: omarchy-bluetooth-files enables or disables omarchy-bluetooth-files.service, so once switched on the receiver also comes back at the next login, and `is-on` is the exit code a caller reads back instead of parsing systemd output. Only the panel switch and the CLI enable it, which keeps auto-accept opt-in; the exposure is otherwise bounded by pairing, since a phone only pushes to a bonded device, and pairing runs through the Bluetooth panel. obexd carries the profile and joins the base package set; a migration installs it on machines that predate it.
The row sits under the hero switch, ahead of the device sections, so j/k reaches it and Return flips it like the radio switch above it. It asks the helper for a direction rather than toggling, and reads the unit back on open, right after a switch, and every few seconds while the popup is up, so the switch can never disagree with systemd about whether pushes are being accepted.
…iver Both review findings hold up in the sources: BlueZ registers Object Push with authorize=false and BT_IO_SEC_LOW, so bt-obex --auto-accept stores a push from any sender that can reach the adapter, and its g_rename into the destination directory has no no-replace check, so a duplicate filename replaces an existing download. The receiver is now obexd plus our own Object Push agent. obexd asks the agent before it stores anything, which is where the policy lives: - AuthorizePush reads the sender off the transfer's session, requires a BlueZ Device1 with that address and Paired: true, and rejects with org.bluez.obex.Error.Rejected otherwise. A session rooted anywhere but the directory the agent started obexd with is rejected too, so an obexd the agent did not start cannot be talked into storing a download. - The agent names the destination itself: the incoming name, or the next free "name (1)" variant, claimed with O_EXCL before the transfer starts. obexd opens the claimed path, so nothing is renamed afterwards and a push cannot land on an existing download. The claim resolves the directory from XDG_DOWNLOAD_DIR and user-dirs.dirs, which drops the ~/Downloads hardcode. - The agent starts obexd with that directory as its root, because obexd refuses to store outside it (filesystem_open -> verify_path -> -EPERM). Tests: bluetooth-test.sh covers the agent's decisions (unpaired and unknown senders, foreign root, claim and collision naming, XDG resolution) and asserts the unit runs the agent. Verified with real transfers over obexd 5.87 and bluetoothd 5.87 across two virtual BR/EDR controllers: a paired push lands as report.pdf, a second push of the same name as report (1).pdf with the first file untouched, and the deployed unit writes into ~/Downloads.
|
Pushed: rebased on current |
e90879d to
c0bdfda
Compare
|
Verified |
[Medium impact] The PR appears safe to merge, with a non-blocking request to restore unrelated panel tests. Findings
SummaryAdds opt-in Bluetooth file receiving for paired devices, controlled by the Bluetooth panel and a user service.
|
|
Thanks, |
| run_node_test <<'JS' | ||
| const fs = require('fs') | ||
| const bluetooth = requireFromRoot('shell/plugins/panels/bluetooth/Model.js') |
There was a problem hiding this comment.
Existing panel checks disappear
This removes the existing checks for radio IPC and discovery cleanup, including handing an active scan between monitors. Those parts of Panel.qml are unchanged, and no replacement tests cover them. Future changes could break the radio shortcut or leave scans running without a test catching it.
Restore these checks; only the receiver checks tied to the old detached command need rewriting.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
Closing this. The local deployment was rolled back in September: the phone-with-no-app case is narrow, LocalSend covers the common one, and the feature would ask Omarchy to own a 393-line authorization agent plus its paired/trusted policy. The branch has also drifted from quattro after two months without a maintainer decision. The security reviews from @jandrusk and @llstrk drove real fixes and are preserved in the local record and patches. Reopen or re-propose if the maintainers decide they want the feature. |
What: the Bluetooth panel gains an Accept files switch, and
omarchy-bluetooth-files <on|off|toggle|is-on>moves the user unit behind it. With it on, a file shared from a paired phone (Android's share sheet → Bluetooth) lands in your downloads directory.Why Object Push: it is the one file transfer every phone already speaks, so it needs no app on the phone, no Wi-Fi, no mDNS and no vendor protocol. Quick Share is not an option on Linux today (rquickshare can advertise over mDNS, but current Android drops off Wi-Fi while the share sheet is open and looks for BLE receivers), and LocalSend requires installing its app on the phone.
How it works
omarchy-bluetooth-filesonly moves the unit:onisenable --now, so the receiver also comes back at the next login;offisdisable --now;is-onis the exit code a caller reads instead of parsing systemd output.omarchy-bluetooth-files.servicerunsomarchy-bluetooth-files-agent, an Object Push agent for obexd (bluez-obex). The agent starts obexd itself with the downloads directory as its root (obexd --root …), because obexd refuses to store outside its root folder (filesystem_open→verify_path→-EPERM) and the directory is the agent's to resolve:XDG_DOWNLOAD_DIR, thenuser-dirs.dirs, then~/Downloads.AuthorizePush), which is where the policy lives: the sender is read off the transfer's session and must be a BlueZ device withPaired: true; anything else is answered withorg.bluez.obex.Error.Rejected, and the check fails closed when bluetoothd cannot be reached. A session rooted anywhere but the agent's directory is rejected as well, so an obexd the agent did not start cannot be talked into storing a download.name (1)variant, claimed withO_EXCLbefore the transfer starts. obexd opens the claimed path, so there is no rename afterwards and a push can never land on an existing download.ConditionPathIsDirectoryandExecConditionfollowbt-agent.service, so a machine without Bluetooth hardware, or with bluetoothd down, skips cleanly instead of restarting in a loop.bluez-obexjoins the base package set, and a migration installs it on machines that predate it.Files
bin/omarchy-bluetooth-files— the helperbin/omarchy-bluetooth-files-agent— the Object Push agent: paired-only policy and the claimed destinationdefault/systemd/user/omarchy-bluetooth-files.service— the receiver unitshell/plugins/panels/bluetooth/Panel.qml— the row, thefilescursor section,toggleFilesover IPCshell/plugins/panels/bluetooth/manifest.json— descriptionmanual/05-the-top-bar.md— the panel bulletinstall/omarchy-base.packages,migrations/1789987125.sh— packaging for new and existing installstest/shell.d/bluetooth-test.sh,test/shell.d/config-test.sh— coverageTests
bash test/shell.d/bluetooth-test.sh— 83 assertions pass. The new ones cover the agent: the unit runs it, unpaired and unknown senders are refused with no file created, a session rooted elsewhere is refused, the incoming name is claimed and a duplicate gets the next freename (1), a name carrying a path cannot leave the directory, and the download directory resolves fromXDG_DOWNLOAD_DIR,user-dirs.dirsand the~/Downloadsfallback.bash test/shell.d/config-test.shwithOMARCHY_PKGS_PATH— passes; it caught the missing PKGBUILD install line, which is the companion PR below../test/cli— passes../test/allhere: 246 of 248 test files pass.screenshot-sanity-test.shandsnapper-test.shfail identically on a pristinequattrocheckout in this environment (noomasnap, noomarchy-isocheckout), so they are unrelated to this change.report.pdf, a second push of the same name asreport (1).pdfwith the first file untouched, and the deployed unit writes into~/Downloads.Visual verification — captured from this branch running in a live session, driven by keyboard only, with the unit state checked after each flip:
PUSH → ~/DOWNLOADS, unitactive/enabledPUSH · OFF, unitinactive/disabledCompanion packaging PR: omacom/omarchy-pkgs#576
Suggestion discussion: #12765