CLI command
skarbiec warnings
Print what each Skarbiec functionality does that its caller must confirm before it runs, such as purging an item for good, withdrawing every grant or writing secrets to a plain-text file, and hold every confirmation a command asks for to a declared warning.
Invocation#
skarbiec warnings list [--markdown]
skarbiec warnings show <functionality>
skarbiec warnings check [--repository <dir>] [--baseline <file>]Purpose#
Print what each Skarbiec functionality does that its caller must confirm before it runs, such as purging an item for good, withdrawing every grant or writing secrets to a plain-text file, and hold every confirmation a command asks for to a declared warning.
Required inputs and options#
- list takes nothing; --markdown prints the documentation section of every functionality that warns instead of JSON. show takes one functionality id. check takes --repository <dir>, a checkout in which every warning's declared test is looked up, and --baseline <file>, a JSON list of the commands whose confirmation may still go unexplained; it may only shrink. POST /v1/operator/warnings takes an optional functionality.
Output and state effects#
- list prints every functionality that warns, each warning with its hazard, effect, consequence, safeguard, confirmation, test and documentation anchor, and what every hazard means. show prints one functionality's warnings, an empty list for one that warns of nothing. check prints ok, functionalities, warnings, confirming_commands, unexplained_confirmations and findings: a malformed warning, a declared test the repository does not hold, a command whose usage asks for --yes or --confirm with no warning declaring what for, a warning on a functionality none of whose commands asks for a confirmation, and a baseline entry no longer needed. An unconfirmed call of a warning functionality answers its declared warning and does nothing. It reads no vault and writes nothing; Skarbiec Desktop reads the route to show the warning in its confirming dialog before it sends the confirmation.
Refusals#
- Every refusal is a declared cause of skarbiec.warnings or, for its flags, skarbiec.arguments under /docs/errors. A form other than list, show <functionality> or check is form-unknown, exit 2: `warnings <given> is not one of its forms`. A flag other than --markdown, --repository and --baseline is arguments-flag-unknown, exit 2: `warnings takes no --<flag>, so it cannot do what the flag asks`; it used to be ignored. An id no functionality declares is functionality-unknown, exit 2, naming every declared one. A baseline that cannot be read, or is not a JSON list of command names, is baseline-unreadable or baseline-malformed, exit 2. Findings are printed as the answer and the run exits 1 (findings).
- skarbiec.warnings form-unknown — exit 2: reading what skarbiec warnings is asked; fix: run skarbiec warnings list, skarbiec warnings show <functionality> or skarbiec warnings check
- skarbiec.warnings functionality-unknown — exit 2: showing the warnings of {id}; fix: name one of the declared functionalities; skarbiec warnings list prints those that warn
- skarbiec.warnings baseline-unreadable — exit 2: reading the unexplained-confirmation baseline {path}; fix: name the baseline file the repository holds, ci/warnings-baseline.json
- skarbiec.warnings baseline-malformed — exit 2: reading the unexplained-confirmation baseline {path}; fix: write it as a JSON list of the commands whose confirmation no warning explains yet, e.g. ["lockdown"]; skarbiec warnings check prints them as unexplained_confirmations
- skarbiec.warnings findings — exit 1: checking the declared warnings; fix: fix each finding as it says: correct the warning in src/failures, write the declared test, declare the warning a confirmation is for, or remove the command from the baseline
- skarbiec.warnings warnings-declaration-unreadable — exit 1: listing what {id} warns of; fix: install a skarbiec build whose wisent-errors renders warnings as JSON (the skarbiec release installer at stado://releases/skarbiec/<version>/<platform>/install.sh)