Repository navigation
fix(app): open dotfile edit copies locally on macOS and Linux - #1608
Merged
smart-ssh-coordinator[bot] merged 3 commits intoNov 27, 2026
Merged
smart-ssh-coordinator[bot] merged 3 commits into
smart-ssh-coordinator[bot] merged 3 commits into
Conversation
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The Windows test binary linked tauri's webview and aborted at load. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
6 tasks
There was a problem hiding this comment.
Review
Verdict: approved
Review level: normal
Blocking
None.
Non-blocking
apps/smart-ssh-community/tests/opener_dotfile_scope.rs:55-80: the scope tests rebuildtauri::fs::Scopethe way the plugin does (tauri-plugin-opener2.5.5scope.rs::is_path_allowed). They do not go through the plugin itself. The config test covers the wiring fromtauri.conf.json, and I checked in the plugin source thatplugins.opener.requireLiteralLeadingDotis read intoOpener::require_literal_leading_dotand passed to the scope. Together that is enough for this issue.
Verified
- AC1, the config contains the setting:
tauri.conf.jsonhasplugins.opener.requireLiteralLeadingDot: false(read: diff). - AC2, the scope test:
opener_dotfile_scope.rs:scope::dotfile_edit_copy_allowed_and_everything_else_rejectedchecks four paths..env.localinside edit-sessions is allowed..ssh/id_ed25519andsmart-ssh/other/.envare rejected.edit-sessions/../../.ssh/id_ed25519is rejected; the target file exists, so canonicalisation really runs. The counter-proof isscope::counter_proof_literal_leading_dot_rejects_dotfile, which setsSome(true)and expects a rejection (read + executed). - AC3, the config guard:
config_disables_literal_leading_dot_for_opener;capability_scope_stays_the_edit_session_folderalso pins the capability scope. - AC4, the spec: updated (see Spec).
- AC5, macOS: manual check pending.
- Counter-proof: I restored
tauri.conf.jsonfromorigin/release/0.8.0.config_disables_literal_leading_dot_for_openerthen failed, and passed again once the PR version was back (executed:cargo test --locked -q -p smart-ssh-community --test opener_dotfile_scope config_disables). - Plugin wiring: in
tauri-plugin-opener2.5.5,lib.rsreads the setting fromapi.config(), andscope.rs::is_path_allowedandcommands::open_pathuse it. The frontend opens edit copies throughopenPath(useLocalEditSession.ts:126), so this is the path that gets checked (read). - Widening: the only opener path scopes are
default.jsonandmobile.json, both$CACHE/smart-ssh/edit-sessions/**withapp: true, and neither changed.opener:defaultadds URL scopes andreveal_item_in_dir, which has no path scope; neither is affected by the leading-dot setting (read: capabilities, pluginpermissions/default.toml,commands.rs). - Edge cases (read): a symlink or
..in the path is canonicalised before matching, so it stays rejected. On Android/iOS the mobile capability has the same scope, so dotfiles now open there too, which matches the goal. On Windows the setting is a no-op, because the default there is alreadyfalse. - Callers checked:
tauri_plugin_opener::init()(2 registrations inapp-shell/src/lib.rs) gets the config automatically;diagnostics_export.rsuses the Rustopen_path, which has no scope check, so it is unaffected. - Dependencies:
serde_jsonis now a normal dependency, whichgenerate_context!needs; it was already in the workspace. Thetauritestfeature is only a Unix dev-dependency.Cargo.lockis unchanged and--lockedpasses. - Tests run locally:
cargo test --locked -q -p smart-ssh-community --test opener_dotfile_scope→ 4 passed, run 5 times in a row (executed). - CI: all checks green on head
79e66f98(executed:gh pr checks 1608). - files read: 1/1 logic files (plus Cargo.toml, tauri.conf.json, spec, changelog).
- UI: not a UI change (config only).
- Data: not touched.
Timing analysis
- 1 test file analysed: no likely timing dependency. One possible point: the two scope tests build two mock apps in parallel; each uses its own temp directory. That is non-blocking, and 5 local runs were stable.
Spec
- Visible behaviour changed: dotfile edit copies can now be opened locally on macOS and Linux.
- Spec search:
rg -il 'lokal öffnen|Bearbeitungskopie|open locally|Punkt-Datei' docs/specs/→ 0054 Part 4 covers it. - Verdict: the spec change is present at the end of 0054 Part 4 and matches the code. It names the setting and the reason, as the issue asks, and says the scope is not widened.
Security checks
- Review level
normal: the PR touches no path insecurity-paths.txt. The opener scope is a trust boundary for the webview, so I checked it by hand. The leading-dot setting applies only to the opener plugin, and the scope still allows only the edit-session folder. I tried 5 paths against it:~/.ssh/id_ed25519,edit-sessions/../../.ssh/x, a sibling folder's.env, a symlink inside edit-sessions, and a Windows path. All stay rejected through canonicalisation or the pattern prefix. - Threat model: the PR body says
Threat model: no change – only dot components inside the already allowed edit-session folder now match. That reason holds. - Release branch: the change stays within the issue, with no scope creep. The changelog fragment is in English and named per
changelog.d/README.md. Its file name differs from the one in open PR #1606, so the two do not collide. - Public boundary: title, body and commits are in English; no internals.
Manual checks pending
- macOS: opening a remote
.env.localwith "Open locally" opens it in the default editor.
Follow-ups
None.
smart-ssh-coordinator
Bot
deleted the
issue-1607-open-locally-fails-for-dotfiles-env
branch
November 27, 2026 12:09
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.
Closes #1607
Summary
The opener plugin's fs scope defaults
require_literal_leading_dotto true on Unix, so**never matched.env.localin an edit session.tauri.conf.jsonnow setsplugins.opener.requireLiteralLeadingDot: false. The capability scope is unchanged ($CACHE/smart-ssh/edit-sessions/**,app: true); file names are unchanged.Acceptance Criteria
tests/opener_dotfile_scope.rs:config_disables_literal_leading_dot_for_opener)dotfile_edit_copy_allowed_and_everything_else_rejectedcovers allowed dotfile,.ssh/id_ed25519,..traversal;counter_proof_literal_leading_dot_rejects_dotfilefortrue)capability_scope_stays_the_edit_session_folder)cargo test -p smart-ssh-community)Tests
Counter-proof: the
Some(true)case rejects the dotfile. The config test asserts the exact value.Assumptions
serde_jsonbecame a normal dependency of the app crate (needed bygenerate_context!once apluginssection exists);tauritestfeature added as dev-dependency for the scope test. The test uses a temp dir with the same pattern shape, since$CACHEmust not be touched.Spec: updated 0054
Threat model: no change – only dot components inside the already allowed edit-session folder now match.
Manual test steps
.env.localvia 'Open locally'; it opens in the default editor.Follow-ups
None.
🤖 Generated with Claude Code