eb-local.secrets¶
- module eb-local.secrets src/secrets.zig[source][autodoc]¶
Secrets for a build: each names the variable eb receives and where its value comes from. A build reads the ones it gets (config.buildSecrets), after every other check;
config --checkanddoctorread each one and say only whether it can be read. Values go only into eb’s environment and are never printed. A failed read reports why without the value. After the build, logs written during it are scanned and every occurrence of a value is replaced.
Types¶
- pub const Resolved = struct[source][autodoc]¶
A secret’s value, read for one build: the variable eb receives, and what it is set to.
- pub const Failure = struct[source][autodoc]¶
Why a secret could not be read, filled in when
error.Unavailableis returned. It names the secret and its source, never a value.
- pub const RedactReport = struct[source][autodoc]¶
What
redactTreedid: how many logs it rewrote without the values, and the logs it left as they were, by reason.
Error sets¶
Functions¶
- pub fn resolve( a: Allocator, secrets: []const config.Secret, env: *const std.process.Environ.Map, envp: proc.Envp, nv: Nimvault, f: *Failure) Error![]Resolved[source][autodoc]¶
The value of every secret, in order.
- pub fn placeholder(a: Allocator, name: []const u8) Allocator.Error![]const u8[source][autodoc]¶
What stands in for a value in a redacted log.
- pub fn redactText(a: Allocator, bytes: []const u8, values: []const Resolved) Allocator.Error!?[]u8[source][autodoc]¶
Replace every value, in each of its forms, in
bytes; null when none occurs. The longest form wins where several start at the same byte, so a shorter secret that is a prefix of a longer one does not leave the rest behind. Percent-encoding matches either hex case.
- pub fn redactTree(a: Allocator, dir_path: []const u8, since: i64, values: []const Resolved, filter: Filter, tools: Tools, report: *RedactReport) (fsx.Error || Allocator.Error)!void[source][autodoc]¶
Redact regular files below
dir(never through a symbolic link) modified at or aftersince(seconds); compressed ones through the program their suffix names, fromtools.
Constants¶
- pub const nimvault_timeout_ms = 30_000[source][autodoc]¶
How long nimvault may take (a GPG agent may ask for a passphrase).
- pub const min_redacted_len = 4[source][autodoc]¶
Shorter values would match ordinary text everywhere; they are not redacted, and a build that has one is told so.