Skip to content

Add Bitwarden and Tailscale plugins - #550

Open
dddaniel1 wants to merge 1 commit into
mactools-app:mainfrom
dddaniel1:plugins/bitwarden-tailscale
Open

dddaniel1 wants to merge 1 commit into
mactools-app:mainfrom
dddaniel1:plugins/bitwarden-tailscale

Conversation

@dddaniel1

Copy link
Copy Markdown

Problem and result

The plugin catalog has no password-management or mesh-VPN entries. This PR adds two native plugins:

  • Bitwarden (bitwarden, productivity): a full vault workspace in MacTools driven by the official bw CLI. Users sign in or unlock once, then browse/search/edit their vault without switching apps.
  • Tailscale (tailscale, system): a menu bar switch for the tailnet connection with peer browsing, exit node selection, connectivity checks, and one-tap device-authorization sign-in.

Both plugins follow the PluginKit v7 contract, run entirely on-device, and network only through the user's own Bitwarden server or the Tailscale control plane (declared in privacy).

Changes

  • Plugins/Bitwarden/ — plugin manifest, factory/plugin entry, CLI process wrapper (BitwardenCLI), vault state machine (BitwardenVault), SwiftUI workspace (BitwardenWorkspace), tests, 12-language localization (Vault.xcstrings, Localizable.xcstrings), and user documentation.
    • Login/unlock via --passwordenv (master password never enters argv); dedicated CLI data directory isolated from the desktop app and terminal sessions.
    • Search by name, username, and website; browse by type, folder, collection, favorites, and trash; item editing with custom fields preserved; folder management; password generator; clipboard copy with 30-second auto-clear (TransientType/ConcealedType markers); TOTP code copy.
    • Organization items are read-only; master-password-reprompt items are unavailable in the workspace.
    • Auto-lock on workspace close, system sleep, and after 5 minutes idle.
  • Plugins/Tailscale/ — plugin manifest, factory/plugin entry, CLI status parsing (TailscaleStatus), tests, 12-language localization, and user documentation.
    • Connection switch, device-action menu (pin, copy IP/MagicDNS), exit node selection with verified-state indication, relay/direct reachability checks, and a sign-in button that requests a device authorization URL and opens it in the browser.
  • Changelog fragments, plugin docs, and the generated catalog/backup-inventory data.

Verification

  • make validate-localization (12 languages complete), make validate-changelog, git diff --check — all pass.
  • make build-plugin PLUGIN=bitwarden,tailscale — both packages build and pass codesign --verify --strict; bundles contain all 12 .lproj resources.
  • XCTest: Bitwarden draft round-trip/reprompt-guard tests and Tailscale plugin tests (5 tests) pass under xcrun xctest.
  • A scripted end-to-end run against a mock bw executable passes: unlock → list → read → edit (stdin) → lock cleanup.
  • Dynamic-load probe: both bundles load through MacToolsPluginBundleFactory and return exactly one plugin with matching metadata IDs.

UI evidence

New plugin surfaces: Bitwarden opens a three-pane vault workspace (sidebar filters / item list / detail pane) with sign-in, unlock, editor sheet, folder manager, and password generator; Tailscale adds a feature-panel switch row plus an icon widget and a sign-in button when logged out. Entry points are the MacTools feature panel and settings. Screenshots can be added if reviewers want them attached inline; UI strings are provided in 12 languages.

Checklist

  • Core behavior and relevant risks are verified using existing tests, focused additions, or manual checks; results or limitations are recorded.
  • UI evidence is attached where applicable; shared components, themes, localization, and accessibility are respected.
  • User-facing documentation and changelog fragments are updated when required.
  • Plugin metadata, runtime contracts, action policies, and minimum-host compatibility agree.
  • Licensing and third-party notices are complete; no credentials, local configuration, or unrelated generated files are included.

Bitwarden: full vault workspace in MacTools driven by the official bw CLI.
Sign in or unlock, search by name, username, or website, browse by type,
folder, collection, favorites, and trash, edit items with custom fields,
manage folders, generate passwords, copy values and TOTP codes, and lock
automatically on close, sleep, or after five minutes idle. Organization
items stay read-only and reprompt items are unavailable in the workspace.

Tailscale: menu bar switch for the tailnet connection with peer browsing,
pinned devices, address copy, exit node selection, relay/direct
connectivity checks, and one-tap sign-in that opens the device
authorization page.

Both plugins ship 12-language localization, XCTest coverage, and plugin
docs.
@ggbond268

Copy link
Copy Markdown
Collaborator

Thanks for adding these integrations! I reviewed 2b4083e and found three issues to address before merging:

  1. Confirm external Tailscale toggles. The public run-link action is marked .allowed, so opening a link can connect or disconnect Tailscale without confirmation in MacTools. This can affect other apps and traffic routed through an exit node. Please use .confirmAlways with an ActionConfirmation, or disable external invocation.

  2. Fully end the Bitwarden session on lock. lock() clears the UI and session reference, but does not run bw lock or cancel active CLI processes. A synthetic test confirmed that a cancelled read still completed after the UI locked, although its result correctly stayed hidden. Please cancel and wait for active CLI work, run bw lock in the dedicated data directory, and serialize this with unlocking so an old operation cannot outlive the session.

  3. Complete the Bitwarden manifest. It is missing required product metadata, including productStrings, presentation/license information, discovery, setup, relationships, and the supported metadata locales. Please follow the existing plugin manifests, regenerate the derived catalog data, and rerun make script-tests. The current run has three failing checks caused by these omissions.

The seven existing plugin tests passed in an isolated harness. Thanks for taking care of these boundaries!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants