CLI command

skarbiec bindings check

Find the line of a committed bindings file that would leave a program without its credential — an item renamed, trashed or reshaped since — before exec, a deploy or ci set runs into it.

Invocation#

Shell
skarbiec bindings check <file> [--refuse]

Purpose#

Find the line of a committed bindings file that would leave a program without its credential — an item renamed, trashed or reshaped since — before exec, a deploy or ci set runs into it.

Required inputs and options#

  • A bindings file as exec --env-from reads it, NAME=<id>:<field> a line, relative to the working directory; --refuse makes a failing line an error. POST /v1/operator/bindings/check takes file, an absolute path on the machine the vault runs on, and an optional refuse.

Output and state effects#

  • Reads every line, then for each says whether the item is live, opens here and holds text in that field. It prints ok, file and bindings — each with variable, item, field and ok, and when ok is false the problem: in the trash with restore as the step, no such item as it may have been renamed or purged, a field the item does not hold or holds empty, or the error opening it gave. It journals bindings-checked with the file and the failing variables; no value is printed.

Refusals#

  • A flag other than --refuse exits 2 before the file is read (arguments-flag-unknown): a mistyped --refuse used to let a failing line pass. Anything but check and one file exits 2 with the usage. A file that cannot be read, holds no binding, or holds a line that is not NAME=<id>:<field> is refused quoting the line, as exec refuses it. With --refuse, a failing line exits non-zero naming each failing variable and its problem.

Examples#

skarbiec bindings check .skarbiec-env skarbiec bindings check deploy/bindings --refuse