Resolve gopass:// password references - #965
Open
1995parham wants to merge 1 commit into
Open
Conversation
agrahn
force-pushed
the
develop
branch
5 times, most recently
from
July 21, 2026 21:10
96cc5ae to
f10d4ea
Compare
Add support for gopass-style cross-secret password references: an entry whose password is `gopass://<path>` now resolves at read time to the referenced entry's password, so a canonical credential need not be duplicated. Rotating the canonical entry updates every reference. - Detect references on PasswordEntry (isReference/referencePath). - PasswordReferenceResolver substitutes the referenced entry's password and, only when the origin lacks them, inherits its username/OTP. Resolution is recursive with cycle detection, a depth limit, and path-traversal guards. - Reuse the existing interactive unlock flow (passphrase/biometric/PIN) to decrypt referenced entries requiring a different key, via a reference-decrypt sink in BasePGPActivity; non-reference entries are unaffected. - Resolve references in the decrypt screen (editing still shows the raw gopass:// reference) and in autofill.
1995parham
force-pushed
the
feat/gopass-password-references
branch
from
July 22, 2026 11:19
05d129d to
c42eca6
Compare
agrahn
force-pushed
the
develop
branch
4 times, most recently
from
July 23, 2026 15:30
79f8aaf to
8c172aa
Compare
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.
What
Adds support for gopass-style cross-secret password references. An entry whose password is
gopass://<path>now resolves, at read time, to the password of the entry at<path>(relative to the store root), so a canonical credential need not be duplicated. Rotating the canonical entry automatically updates every reference.Behaviour
gopass://reference rather than the resolved password.Implementation
PasswordEntry.isReference()/referencePath()— pure detection informat:common.PasswordReferenceResolver— UI/crypto-agnostic orchestration + a pure, unit-testedmergestep. Decryption of the referenced file is injected by the caller.BasePGPActivitygains a reference-decrypt sink so the shared unlock state machine can decrypt an arbitrary referenced file and hand back its plaintext;decryptWithPassphraseand the passkey/creation activities are untouched.DecryptActivityandAutofillDecryptActivityresolve references before rendering/filling.Tests
PasswordEntryTest— reference detection (scheme case-insensitivity, first-line-only, non-references).PasswordReferenceResolverTest— password substitution, username/OTP fallback vs. origin's own fields, nested chains, cycle detection, depth limit, path-traversal rejection, aborted-unlock fallback.All unit tests and
spotlessCheckpass. Runtime flows (different-key prompt, circular reference, edit-shows-reference) should be verified on device.