Files
Roger f36790d4dd refactor: pass secrets as values, fetched once per scope (#713)
* refactor: pass secrets as values, fetched once per scope

A master key travelled through five layers of function values and three
sync.Once guarded reuse; holding each secret where its scope lives shows
where it comes from. Only the keychain prompt still waits for first use.

* docs(rfcs): fetch secrets per extraction, not per record
2026-11-22 23:52:12 +08:00

19 lines
478 B
Go

//go:build darwin
package app
import (
"path/filepath"
"github.com/moond4rk/hackbrowserdata/internal/keychain"
)
// newLoginKeychain builds the run's login keychain without opening it, so a run that never decrypts never prompts.
func newLoginKeychain(path string, password keychain.PasswordFunc) loginKeychain {
return keychain.New(path, password)
}
func loginKeychainPath(home string) string {
return filepath.Join(home, "Library", "Keychains", "login.keychain-db")
}