secret

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package secret resolves a secret by running a command and reading its stdout, so a passphrase or key never lands in a flag value, in argv, or on disk. It is the single "run a command, read a secret" path — shared by the export passphrase here and, when it lands, the provider API key (LORE_API_KEY_CMD).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromCommand

func FromCommand(ctx context.Context, command string) (string, error)

FromCommand runs command through the platform shell and returns its stdout, stripped of a trailing newline, as the secret. A non-zero exit or empty output is an error. Running via the shell lets callers write real invocations like `op read op://vault/lore/passphrase` or `pass show lore/export`.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL