envpass

package
v1.35.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package envpass forwards host environment variables an external environment provider (a secrets manager, direnv, a shell wrapper) injected into lerd's own process on into the one-shot commands lerd runs in a container.

The contract is an allowlist of names, never values, following the shape systemd's PassEnvironment=, ssh's SendEnv and sudo's env_keep already use: the provider sets LERD_PASSTHROUGH_ENV to the names it injected, glob patterns allowed, and lerd forwards each match as a bare `--env NAME` so podman reads the value out of lerd's environment and nothing lands in argv or on disk.

Index

Constants

View Source
const EnvVar = "LERD_PASSTHROUGH_ENV"

EnvVar is the variable an external environment provider sets before it execs lerd, holding the names it injected.

Variables

This section is empty.

Functions

func Args

func Args(dir string, environ []string) []string

Args returns the podman exec flags forwarding the variables the project at dir, or the provider that started lerd, asked for. Names that match nothing in environ are skipped silently, as they are in systemd.

func Names

func Names(patterns []string, environ []string) []string

Names expands patterns against environ, returning the variable names to forward, deduplicated and sorted so an exec argv is stable.

func Patterns

func Patterns(dir string, environ []string) []string

Patterns collects the requested name patterns from both sources: the provider contract in environ, and env_passthrough in the project's .lerd.yaml for people whose provider is direnv or a shell function and who have no wrapper command to carry the variable.

Types

This section is empty.

Jump to

Keyboard shortcuts

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