256 Commits

Author SHA1 Message Date
google-labs-jules[bot]
882d06e001
feat: Add cryptfs storage backend for filename encryption (#3249)
* feat: Add cryptfs storage backend for filename encryption

This commit introduces a new storage backend called `cryptfs`. This backend encrypts the filenames of secrets to enhance privacy while maintaining compatibility with existing VCS backends like Git.

Key features:
- For each secret, a cryptographically secure hash (SHA-256) of its name is generated and used as the filename for the underlying storage.
- A mapping from the original secret name to the hashed filename is maintained in an encrypted file (`.gopass-mapping.age`) within the repository.
- The mapping file is encrypted using the `age` encryption backend, with recipients read from the store's `.age-recipients` file.
- The `cryptfs` backend is implemented as a wrapper around any existing storage backend (e.g., `gitfs`, `fs`), which can be configured by the user.
- The backend is registered with gopass and can be enabled by setting `storage: cryptfs` in the store's configuration.

This implementation addresses issue #2634.

* [fix] Fix lint errors

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [chore] Fix the remaining tests and add some docs.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Dominik Schulz <dominik.schulz@gauner.org>
2025-09-24 08:47:09 +02:00
google-labs-jules[bot]
86720090b6
docs: Add GoDoc to pkg and improve markdown files (#3251)
This change adds GoDoc comments to many of the public symbols in the
`pkg/` directory. It also includes various improvements to the
documentation in `README.md` and other markdown files in the `docs/`
directory.

This is a partial documentation effort, as requested by the user, to
get a pull request submitted quickly.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2025-09-22 19:37:15 +02:00
google-labs-jules[bot]
8c60b17c24
feat(age): Add unlock command to age agent (#3244)
* feat(age): Add unlock command to age agent

This change introduces a proper lock/unlock mechanism for the age agent.

The issue was that after locking the agent with `gopass age lock`, there was no way to unlock it without restarting the agent. This made the lock command mostly useless.

This change introduces a new `unlock` command for the agent and a `locked` state.

- The `lock` command now sets a `locked` flag to `true` in addition to clearing identities.
- The `decrypt` function in the agent now checks this `locked` flag and returns an error if the agent is locked.
- When the gopass client receives the "agent is locked" error, it will ask the user for their passphrase, reload the identities, and send them to the agent.
- A new `gopass age agent unlock` CLI command is added to trigger this new functionality.
- The `gopass age agent status` command is enhanced to report whether the agent is locked.
- The old top-level `gopass age lock` command is hidden, and a new `gopass age agent lock` command is introduced for consistency.

Fixes #3242

* feat(age): Add unlock command to age agent

This change introduces a proper lock/unlock mechanism for the age agent.

The issue was that after locking the agent with `gopass age lock`, there was no way to unlock it without restarting the agent. This made the lock command mostly useless.

This change introduces a new `unlock` command for the agent and a `locked` state.

- The `lock` command now sets a `locked` flag to `true` in addition to clearing identities.
- The `decrypt` function in the agent now checks this `locked` flag and returns an error if the agent is locked.
- When the gopass client receives the "agent is locked" error, it will ask the user for their passphrase, reload the identities, and send them to the agent.
- A new `gopass age agent unlock` CLI command is added to trigger this new functionality.
- The `gopass age agent status` command is enhanced to report whether the agent is locked.
- The old top-level `gopass age lock` command is hidden, and a new `gopass age agent lock` command is introduced for consistency.

I have also addressed the PR comment about the import alias. I have removed the alias and used a dot import instead to avoid the name collision.

Fixes #3242

* feat(age): Add unlock command to age agent

This change introduces a proper lock/unlock mechanism for the age agent.

The issue was that after locking the agent with `gopass age lock`, there was no way to unlock it without restarting the agent. This made the lock command mostly useless.

This change introduces a new `unlock` command for the agent and a `locked` state.

- The `lock` command now sets a `locked` flag to `true` in addition to clearing identities.
- The `decrypt` function in the agent now checks this `locked` flag and returns an error if the agent is locked.
- When the gopass client receives the "agent is locked" error, it will ask the user for their passphrase, reload the identities, and send them to the agent.
- A new `gopass age agent unlock` CLI command is added to trigger this new functionality.
- The `gopass age agent status` command is enhanced to report whether the agent is locked.
- The old top-level `gopass age lock` command is hidden, and a new `gopass age agent lock` command is introduced for consistency.

To avoid name collisions with the imported `filippo.io/age` package, the local `age` package has been renamed to `agecrypto`.

Fixes #3242

* feat(age): Add auto-lock feature to age agent

This change introduces an auto-lock feature for the age agent. The agent will now automatically lock itself after a configurable period of inactivity.

This change also includes the initial fix for issue #3242, which introduced a proper lock/unlock mechanism for the age agent.

- A new config option `age.agent-timeout` is added to specify the inactivity timeout in seconds.
- The agent now has a timer that is reset on every successful decryption operation.
- If the timer expires, the agent locks itself.
- A new `set-timeout` command is added to the agent protocol to configure the timeout.
- The gopass client sends the timeout to the agent when it starts or when it unlocks the agent.
- A new test `TestAgentAutoLock` is added to verify the new functionality.

To avoid name collisions with the imported `filippo.io/age` package, the local `age` package has been renamed to `agecrypto`.

Fixes #3242

* [fix] Fix lint issues

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Dominik Schulz <dominik.schulz@gauner.org>
2025-09-20 17:09:12 +02:00
google-labs-jules[bot]
5f61510ab7
docs: Add note about pass compatibility (#3229)
gopass is in fact compatible with pass (aka password-store.org)
and can be used as a drop-in replacement.

This commit adds a note about this to the README, the FAQ, and
the setup documentation. It also explains some of the differences
in features.

Fixes #3195

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2025-09-17 21:52:40 +02:00
google-labs-jules[bot]
baad47c7ef
feat(age): add agent for passphrase caching (#3218)
* This change introduces an agent for the age backend to cache passphrases for age identities.

The agent is a long-running process that listens on a Unix domain socket. Gopass communicates with the agent to request decryption of secrets. The agent caches the passphrases for the identities and performs the decryption, so the passphrases never leave the agent process. This addresses the security concerns with the initial implementation.

The agent can be controlled with the following commands:
- `gopass age agent`: starts the agent in the foreground.
- `gopass age lock`: locks the agent, clearing all cached passphrases.

The age backend will automatically start the agent if it's not already running and the `age.agent-enabled` configuration option is set to `true` (the default).

This change includes:
- The implementation of the age agent in `internal/backend/crypto/age/agent/`.
- Modifications to the age backend to communicate with the agent.
- A new configuration option `age.agent-enabled`.
- Unit tests for the agent.
- Updated documentation for the age backend.

The integration test for this feature (`TestAgeAgent`) is currently failing. The issue is that the test environment is non-interactive, and the code path for initializing a new age store requires a password for the identity keyring, which triggers a `pinentry` call that fails without a TTY. I have tried several approaches to work around this, including setting the `GOPASS_PASSWORD` environment variable and providing a custom pinentry script, but none have been successful so far. The core implementation of the agent is believed to be correct, but the integration test needs further work to run in a non-interactive environment.

* This change introduces an agent for the age backend to cache passphrases for age identities.

The agent is a long-running process that listens on a Unix domain socket. Gopass communicates with the agent to request decryption of secrets. The agent caches the passphrases for the identities and performs the decryption, so the passphrases never leave the agent process. This addresses the security concerns with the initial implementation.

The agent can be controlled with the following commands:
- `gopass age agent`: starts the agent in the foreground.
- `gopass age lock`: locks the agent, clearing all cached passphrases.

The age backend will automatically start the agent if it's not already running and the `age.agent-enabled` configuration option is set to `true` (the default).

This change includes:
- The implementation of the age agent in `internal/backend/crypto/age/agent/`.
- Modifications to the age backend to communicate with the agent.
- A new configuration option `age.agent-enabled`.
- Unit tests for the agent.
- Updated documentation for the age backend.

* This change introduces an agent for the age backend to cache passphrases for age identities.

The agent is a long-running process that listens on a Unix domain socket. Gopass communicates with the agent to request decryption of secrets. The agent caches the passphrases for the identities and performs the decryption, so the passphrases never leave the agent process. This addresses the security concerns with the initial implementation.

The agent can be controlled with the following commands:
- `gopass age agent`: starts the agent in the foreground.
- `gopass age lock`: locks the agent, clearing all cached passphrases.

The age backend will automatically start the agent if it's not already running and the `age.agent-enabled` configuration option is set to `true` (the default).

This change includes:
- The implementation of the age agent in `internal/backend/crypto/age/agent/`.
- Modifications to the age backend to communicate with the agent.
- A new configuration option `age.agent-enabled`.
- Unit tests for the agent.
- Updated documentation for the age backend.

* This change introduces an agent for the age backend to cache passphrases for age identities.

The agent is a long-running process that listens on a Unix domain socket. Gopass communicates with the agent to request decryption of secrets. The agent caches the passphrases for the identities and performs the decryption, so the passphrases never leave the agent process. This addresses the security concerns with the initial implementation.

The agent can be controlled with the following commands:
- `gopass age agent`: starts the agent in the foreground.
- `gopass age lock`: locks the agent, clearing all cached passphrases.

The age backend will automatically start the agent if it's not already running and the `age.agent-enabled` configuration option is set to `true` (the default).

This change includes:
- The implementation of the age agent in `internal/backend/crypto/age/agent/`.
- Modifications to the age backend to communicate with the agent.
- A new configuration option `age.agent-enabled`.
- Unit tests for the agent.
- Updated documentation for the age backend.

* Fix some test failures and add more logging.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Fix lint error

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [fix] Fix integration tests

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Dominik Schulz <dominik.schulz@gauner.org>
2025-09-15 22:03:33 +02:00
Dominik Schulz
39dcc4f311
[feat] Add Age custom ssh path options (#3199)
* [feat] Add Age custom ssh path options

This commit adds a new flag `--age-ssh-key-path` and a new config option
`age.ssh-key-path` to specify the path to an additional SSH Key file
directory or file.

Fixes #2933

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [fix] Fix docs

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [fix] Fix lint issues

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [fix] Remove GetSSHKeyPath

Not needed.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2025-08-15 18:52:25 +02:00
Michael
0b13ed7cb5
Fix the link to open a show command (#3177)
Signed-off-by: Michael <80940180+michael-freling@users.noreply.github.com>
2025-06-30 12:49:44 +02:00
Parham Alvani
46dfddaef0
Handle referencing in passwords (#3163)
* feat: handle referencing in passwords

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>

* feat: use seq over slice to improve performance

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>

* feat: handle error during reference following

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>

* feat: provide a flag for not following references

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>

* feat: disable ref following on edit and remove the flag

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>

* feat: provide a configuration for follow-references

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>

* fix: correct configuration tests

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>

* fix: correct tests and document the new flag

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>

* fix: correct integration test

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>

* fix: correct tests

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>

---------

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>
2025-05-28 18:10:54 +02:00
Dominik Schulz
98928c59d2
Clarify API stability (#3150)
Or the lack thereof.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2025-05-08 08:23:12 +02:00
Fabio Alessandro Locati
b7a43e6485
Add otp.onlyclip, otp.alsoclip and the -C parameter to otp (#3093)
Signed-off-by: Fabio Alessandro Locati <mail@fale.io>
2025-04-25 19:57:59 +02:00
Tom Payne
7e3c54d1f9
[feat] Remove expensive and unmaintained zxcvbn-go strength checker (#3133)
Signed-off-by: Tom Payne <twpayne@gmail.com>
2025-04-20 20:47:26 +02:00
Fabio Alessandro Locati
fe936e41e1
Add capability to chain the otp to the password. Fixes #3052 (#3059)
* Add capability to chain the otp to the password. Fixes #3052

Signed-off-by: Fabio Alessandro Locati <me@fale.io>

* Fix empty line

Signed-off-by: Fabio Alessandro Locati <me@fale.io>

---------

Signed-off-by: Fabio Alessandro Locati <me@fale.io>
2025-03-01 16:19:57 +01:00
Fabio Alessandro Locati
2ff5f124ec
Ensure that otpauths are properly hidden from being displayed in safecontent mode (#3055)
* Ensure that otpauths are properly hidden from being displayed in safecontent mode. Fixes #3051

Signed-off-by: Fabio Alessandro Locati <me@fale.io>

* More complete implementation

Signed-off-by: Fabio Alessandro Locati <me@fale.io>

---------

Signed-off-by: Fabio Alessandro Locati <me@fale.io>
2025-02-26 08:48:18 +01:00
Joel Lau
ecb848ff4b
specify ssh dir (#2981)
* specify ssh dir

Signed-off-by: Joel Lau <joellau@protonmail.com>

* added documentation, prefer GOPASS_SSHDIR

Signed-off-by: Joel Lau <joellau@protonmail.com>

* check for empty path

Signed-off-by: Joel Lau <joellau@protonmail.com>

---------

Signed-off-by: Joel Lau <joellau@protonmail.com>
2024-11-09 10:30:15 +01:00
AnomalRoil
4c2caf3e9b
[FEATURE] Allow for non-interactive age setup (#2970)
* [FEATURE] Allow for non-interactive age setup

Also updates Go to Go 1.23.2 and get rid of min and max functions

Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>

* [n/a] also renaming clear for Windows

Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>

* [n/a] bumping our GHA to Go 1.23

Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>

* [n/a] make our harden runner softer

Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>

* [n/a] make our harden runner accept go.dev

Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>

* [n/a] applying code review changes

Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>

---------

Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>
2024-10-14 19:32:26 +02:00
AnomalRoil
2c268d25a5
[FEATURE] Adding support for age.Plugin identities (#2960)
* Feat: support age plugin identities, including age-plugin-yubikey ones.

Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>

* Applying code review comments and adding test

Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>

---------

Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>
2024-10-07 13:21:03 +02:00
AnomalRoil
46799f5c88
Docs: linking docs about parsing and secrets format together (#2962)
* Adding link to doc about parsing in secrets.md

Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>

* Adding link to secrets.md in show docs

Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>

---------

Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>
2024-10-05 18:53:17 +02:00
Dominik Schulz
7c5db4d144
[feat] Add verbosity levels to the debug package (#2851)
* [feat] Add verbosity levels to the debug package

Use debug.V(N).Log instead of debug.Log to indicate message
verbosity (higher numbers indicate more verbose messages).

Use GOPASS_DEBUG_VERBOSE=N to control the desired level
of verbosity in the log output.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Document the verbosity env vars.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Allow negative verbosity values

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2024-03-29 19:18:36 +01:00
Dominik Schulz
9b41761dfa
[feat] Add option to disable notification icon (#2845)
* [feat] Add option to disable notification icon

Fixes #2810

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [chore] Document new config option

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2024-03-29 09:49:27 +01:00
Dominik Schulz
056204539f
[feat] Add .gopass-audit-ignore support to ignore secrets from audits (#2822)
* [feat] Add .gopass-audit-ignore support to ignore secrets from audits

This PR adds a new exclude file that is used during gopass audit to
ignore entries from auditing. The file itself is using RE2 syntax.

Fixes #2806

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Add some documentation

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2024-03-13 14:12:38 +01:00
Dominik Schulz
9edbf3070c
[feat] Allow supression of password generation in create templates (#2821)
* [feat] Allow supression of password generation in create templates

This PR adds a new always_prompt boolean that allows suppressing the
question that ask for generating a password in create templates. Use
this is you always want to force entering the credentials, e.g. if
you use a specific template for vendor-supplied credentials.

Fixes #2819

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Remove failing integration test

The messages have changed and the removed one is not expected anymore.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Fix lint check

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2024-03-13 14:11:52 +01:00
inkch
ed38234a19
[DOCUMENTATION] Fix typo: initilize -> initialize (#2796)
Signed-off-by: inkch <inkch@posteo.jp>
2024-02-07 13:53:44 +01:00
Felix Kröner
a0f82c09b8
Fix some typos and missing commas in hooks.md (#2780)
Signed-off-by: Felix Kröner <36126706+Crown0815@users.noreply.github.com>
2024-01-23 15:45:50 +01:00
Daniel Lublin
bf426e64a1
[feature] Allow setting autosync.interval in different time units (#2731)
Solves https://github.com/gopasspw/gopass/issues/2730

Signed-off-by: Daniel Lublin <daniel@lublin.se>
2023-12-01 12:04:49 +01:00
Yolan Romailler
5f18942781
[BUGFIX] Try to always honor local config for mounts (#2724)
* [BUGFIX] Try to always honor local config for mounts

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [BUGFIX] Better propagate mount to config

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [n/a] CR nit fix

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

---------

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
2023-11-25 17:48:37 +01:00
Yolan Romailler
d168602f77
Improved config handling and bugfixes (#2716)
* [CLEANUP] Misc changes around debug logging and configs

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [BUGFIX] Handle uninitialized stores with gopass config

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [BUGFIX] Do not always commit upon config changes

Fixes #2673

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [n/a] Following code review comments

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [n/a] More code review changes

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [n/a] Forgot one change

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

---------

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
2023-11-24 18:00:58 +01:00
Dominik Schulz
2e2fe828f5
[feature] Add new pwgen options to capitalize and include numbers in (#2703)
* [feature] Add new pwgen options to capitalize and include numbers in
xkcd style passwords.

Depends on martinhoefling/goxkcdpwgen#10

Fixes #2573

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Recommend bash-completion

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Replace the goxkcdgenerator dependency with the fork until it is merged.
Also adds and fixes some config options related to the xkcd pwgen.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2023-11-20 21:35:11 +01:00
Marc
15a834ce83
Fix typo introduced in PR #2696 (#2707)
* Updated bash autocompletion setup commands

Signed-off-by: Marc <fetwar@fetwar.com>

* Fix typo with bash completions command in setup.md

Signed-off-by: Marc <fetwar@fetwar.com>

---------

Signed-off-by: Marc <fetwar@fetwar.com>
2023-11-20 19:42:42 +01:00
Yonas Yanfa
d77be31311
Add BLAKE-3 to templates.go (#2701) 2023-11-19 10:52:09 +01:00
Marc
55ea5cf369
Updated bash autocompletion setup commands (#2696)
Signed-off-by: Marc <fetwar@fetwar.com>
2023-11-18 07:43:59 +01:00
Yolan Romailler
d56639fcd7
[CLEANUP] Migration of options to more appropriate sections (#2681)
* [CLEANUP] Moving options to the correct config section

This adds an easy migration path to our config handling, which should
allow us to migrate option names around much more easily in the future.

Any system level config or env variables options are not migrated.

This also fixes a bug in our test code, where the root mount path was
not properly set in our config, because we used "path:" instead of
"path=" to set it.

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [DOCUMENTATION] Document legacy options and their migration path

This also makes sure that legacy options aren't used in the code anymore using the docs test and its regexp

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [n/a] Removing weird spaces from changelog

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [DOCUMENTATION] Reformatting our Markdown tables properly

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [TESTING] Patching a timezone bug in tests

This is a fun one where if your Timezone isn't UTC and you are past midnight but it's not past midnight UTC, the tests would fail because you're not using the right date to validate it.

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [n/a] Fix a typo and use the correct Env variables in the doc about the custom Env variables

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [BREAKING] Custom Env options moved from GOPASS_CONFIG_CONFIG_KEY_i to GOPASS_CONFIG_KEY_i

As discussed in #2617, this actually reflects the way GIT_CONFIG works.

It also fixes a potential Panic in our codebase when IsSet was called
without any Preset config on a non-existing key.

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [CLEANUP] Patching all of the new linter complaints

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [CLEANUP] Use Go1.21 everywhere

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [n/a] Increase our Golangci timeout

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [n/a] code review comment and extra regression test

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

---------

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
2023-11-03 18:40:58 +01:00
Dominik Schulz
c391b0784b
[bugfix] Do not remove unused keys on import by default (#2657)
The cleanup during import is currently buggy on some scenarios
so as a workaround we'll disable auto-cleanup by default and
introduce `recipients.remove-extra-keys` to allow users to turn
it back on.

See GH-2620

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2023-09-11 15:24:49 +02:00
Sylvain Pelissier
b0c5ce7e00
Use default length defined in config file (#2652)
* Use default length define in config file

Signed-off-by: Sylvain Pelissier <sylvain.pelissier@gmail.com>

* Change default password length name

Signed-off-by: Sylvain Pelissier <sylvain.pelissier@gmail.com>

---------

Signed-off-by: Sylvain Pelissier <sylvain.pelissier@gmail.com>
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Co-authored-by: Dominik Schulz <dominik.schulz@gauner.org>
2023-09-11 15:24:33 +02:00
Leo Lou
63534c5f92
Add config generate.strict (#2655)
Signed-off-by: Leo Lou <louyuhong@gmail.com>
2023-09-09 20:44:01 +02:00
Daniel Possenriede
b81d8ba2de
[docs] add/update choco, scoop, winget instructions (#2647)
* add/update choco, scoop, winget instructions

Signed-off-by: Daniel Possenriede <possenriede@gmail.com>

* remove Windows warning

Signed-off-by: Daniel Possenriede <possenriede@gmail.com>

* typo

Signed-off-by: Daniel Possenriede <possenriede@gmail.com>

* specify to add extras bucket if it's not present yet

Signed-off-by: Daniel Possenriede <possenriede@gmail.com>

---------

Signed-off-by: Daniel Possenriede <possenriede@gmail.com>
2023-09-09 09:26:04 +02:00
Yolan Romailler
eb6c1014b5
Adding screen parsing for OTP QR code (#2597)
* [FEATURE] Screen parsing for OTP QR code with 'otp -snip entry'
[CLEANUP] Fixing issues from linter

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [CLEANUP] Updating our dependencies

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* Tweaking license-lint.yml to accept these new deps

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

---------

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
2023-06-10 18:29:37 +02:00
Dominik Schulz
b3a410215a
Add ov pager (#2510)
* Add ov pager

RELEASE_NOTES=[ENHANCEMENT] Add internal pager (ov).

Fixes #2507

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Document output.internal-pager.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Fix default value.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Update license check

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2023-04-07 18:30:11 +02:00
sudoforge
9fdb08b210
feat: add core.autopush to separate push/autosync behavior (#2569)
This change adds a `core.autopush` configuration option (which defaults
to a value of `true`). This new configuration option is used in
post-write-ish actions, to determine if the remote repository should be
pushed to. In doing this, we support workflows where a user may want to
always push to the remote, but disable the behavior of "sync", which
fetches updates from remotes for all mounts (including the root store).

Closes: gopasspw/gopass#2551

Signed-off-by: sudoforge <9c001b67637a@sudoforge.com>
2023-04-07 17:18:23 +02:00
Dominik Schulz
d3c8739908
Commit changes to per-mount config files (#2542)
* Commit changes to per-mount config files

Fixes #2530

RELEASE_NOTES=[BUGFIX] Commit changes to mount config changes.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Fix config tests

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2023-02-08 15:53:44 +01:00
Dominik Schulz
8bc952d5bd
Add edit.auto-create option (#2538)
This will allow to restore the old behaviour where gopass edit would
automatically create a secret if a non-existing name was given.

RELEASE_NOTES=[ENHANCEMENT] Add edit.auto-create

Fixes #2531

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2023-02-05 15:54:11 +01:00
Dominik Schulz
79c055240c
Clarify fsck description (#2541)
Fixes #2522

RELEASE_NOTES=n/a

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2023-02-05 15:52:10 +01:00
Yolan Romailler
ef50d06550
Fixing typo in mount docs (#2527)
* Fixing typo in mount docs

RELEASE_NOTES[DOCUMENTATION]=mounts cmd was misspelled in docs

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* Patching related link

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

---------

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
2023-02-05 12:25:11 +01:00
Dominik Schulz
932d7a1d54
Rewrite gopass audit (#2506)
* Start new auditor

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Add new files

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Rewrite gopass audit

Fixes #2504

RELEASE_NOTES=[ENHANCEMENT] Rewrite gopass audit. Add HTML and CSV
exports.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Fix tests

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Add template flag

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2023-01-03 21:03:42 +01:00
Dominik Schulz
c702df1ce1
Add some hooks (#2499)
* Add some hooks

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Add generic hooks

Fixes #2500

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Address some review comments and fix some tests.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Document options

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Error formatting

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-12-31 13:47:13 +01:00
Dominik Schulz
858664f2ff
Add audit.concurrency and debug logging (#2498)
See #1017

RELEASE_NOTES=n/a

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-12-28 17:17:07 +01:00
Dominik Schulz
5d5e83d789
Check existing recipients before trying to add a new one (#2487)
* Check existing recipients before trying to add a new one

Fixes #1918

RELEASE_NOTES=[ENHANCEMENT] Check recipients before adding a new one.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Add test for CheckRecipients with an invalid key.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Add custom error type and a better error message.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Initialize InvalidRecipientsError

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Skip CheckRecipients tests on Windows

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-12-24 19:16:41 +01:00
Dominik Schulz
dc295b9ae1
Add recipients.hash checking (#2481)
This PR adds a new attempt at validating recipients files to prevent
malicious actors from updating them and tricking users into sharing
their new and updated secrets with a wider-than-inteded audience.

This includes two new config options (`recipients.hash` and
`recipients.check`) and one new command `gopass recipients ack`
to update the hash after validating it's content.

Fixes #2478

RELEASE_NOTES=[ENHANCEMENT] Add recipients hash checking.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-12-18 18:20:58 +01:00
Dominik Schulz
d9199cd9c2
Incorporate cleanup and simplifications ideas from kpitt/gopass (#2468)
* Improve test isolation

These test shouldn't pick up user configs.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Use correct flag names for rcs init test

These flags must use the canonical names since they are not processed
by the CLI library and as such aliases are not applied.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Remove obsolete warning in fsck help

The default format should be fully compatible with other
password store implementations.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Remove unused "Verbose" context property

This was never set anywhere, so we can safely remove it.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Remove --clip option for the find command

When this is invoked as `gopass find` there is actually no
code path that leads to this flag being used.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Remove mount versions from the `version` command

The `version` command should generally only print the version and not
load the full config, trigger auto-sync and other operations the
happend when initializing the mounts.

Moving the mount point information to the new `mounts versions` command.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Update find integration test

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Do not run auto-sync if the command is `sync`

Otherwise sync might run twice.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Reset auto-sync if a full `sync` succeeds

Since a `gopass sync` without the `--store` option is the same
operation as an auto-sync we should reset the interval if it
was successfull.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Remove sync messages about importing and exporting keys

These usually don't take a lot of time and don't need a mention unless
they fail.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Refactor OTP action to reduce code complexity and duplication

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Clean up outdated Git documentation

`gopass` isn't configuring `git` to sign commits anymore.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-12-11 23:08:46 +01:00
Dominik Schulz
4c4f8218fa
Add domain alias documentation and fix lookup logic (#2455)
Fixes #2453

RELEASE_NOTES=[BUGFIX] Fix domain alias lookup

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-12-07 19:13:45 +01:00
Dominik Schulz
3276ea4504
Support german language for the xkcd generator (#2454)
Fixes #2451

RELEASE_NOTES=[ENHANCEMENT] Support german language in the password
generator

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-12-07 09:08:34 +01:00