alfredapp / gallery-edits

Suggest edits to the Alfred Gallery
BSD 3-Clause "New" or "Revised" License
5 stars 0 forks source link

Submit Workflow: Pass-Client #19

Closed chrisgrieser closed 8 months ago

chrisgrieser commented 8 months ago

Preflight

The submitted workflow:

Homepage

https://github.com/chrisgrieser/alfred-pass

Alfred Forum page

https://www.alfredforum.com/topic/20664-alfred-as-a-client-for-the-pass-cli/

Gallery page content

Setup

  1. Setup pass with a GPG key. See the Pass Website for further information.
  2. Configure pinentry-mac as your pinentry-program:

    [[ -d "$HOME/.gnupg" ]] || mkdir "$HOME/.gnupg"
    echo "pinentry-program $(brew --prefix)/bin/pinentry-mac" > $HOME/.gnupg/gpg-agent.conf
    gpgconf --kill gpg-agent # restart the agent

Usage

Search your passwords via the keyword pw.

showcase

Tags

password-manager

Test data

No response

Homebrew dependencies

Bundled libraries

No response

vitorgalvao commented 8 months ago

Thank you. Will be live later today at https://alfred.app/workflows/chrisgrieser/pass/.

On another note, in the clear-copy script you have the following:

# INFO password clearing is implemented via this script rather than using pass' # built-in functionality because the built-in functionality requires using pass \# --clip which saves the password to in a non-transiently, meaning it is # readable in Alfred's clipboard history.

I’m not overly familiar with pass, but it’s worth noting Alfred respects org.nspasteboard.ConcealedType, which is a standard way of marking data as private in the clipboard. Apps which store sensitive data (e.g. 1Password) set that flag when copying sensitive information. That means the data will still be in your clipboard but won’t be saved. You can read more at http://nspasteboard.org. I mention it because you may want to submit a PR or discuss it with the pass developers. Note this does not delete data on a timer.

For your own reference, the 1Password workflow implements a simple way to save data that way from JXA.

chrisgrieser commented 8 months ago

yeah, I tried out different variations, and indeed, pass does not respect ConcealedType, which is why I went for that workaround. Good point on raising the info directly with the devs though