Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hooks not firing #2887

Open
rexi1e opened this issue May 28, 2024 · 1 comment
Open

Hooks not firing #2887

rexi1e opened this issue May 28, 2024 · 1 comment

Comments

@rexi1e
Copy link

rexi1e commented May 28, 2024

Summary

Cannot get any hooks to fire.

Steps To Reproduce

  1. Build/install gopass.
  2. Run gopass setup.
  3. Add a secret.
  4. Add a hook action to ~/.config/gopass/config, such as core.post-hook: /full/path/to/script.sh
  5. Run a gopass command like gopass show...the command works but the specified script is never run.

Expected behavior

When the config specifies a script for a particular function, that script should run every time that function runs.

Environment

  • OS: Pop!_OS 22.04
  • OS version: Linux 6.8.0 x86_64 GNU/Linux
  • gopass Version: v1.15.13 (also tried v1.15.12)
  • Installation method: built from source, but also tried amd64 release binary on another machine with a different distro

Additional context

Tried variants of the key/hook and property such as:

core.post-hook: /full/path/to/script.sh
core.post-hook: bash /full/path/to/script.sh
core.post-hook: <command>
show.post-hook: ...

Also tried:

  • ensuring specified script has proper permissions
  • rolling back to previous version
  • specifying hooks in other config files (https://github.com/gopasspw/gopass/blob/master/docs/config.md#configuration-precedence)
  • using gopass binary instead of the gopass built from source
  • using another machine with different Linux distro

I know config file was being read because:

  1. Logs show that gopass recognizes the hook config when run with GOPASS_DEBUG=true
  2. Other config settings took effect (e.g. core.cliptimeout = 30)
@dominikschulz
Copy link
Member

Yes, that was me: https://github.com/gopasspw/gopass/blob/master/internal/hook/hook.go#L37

I have disable global hooks since I wasn't sure about potential attack vectors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants