Expand description
The ask pack: built-in ask rules for commands that lose data or reach
past the machine. Database drops and resets, infrastructure and cluster
teardown, cloud and container deletes, publishing a package, reading a
secret, emptying or deleting a config file, mirroring a delete into the
home directory, dropping a stash, and putting a world-writable directory
ahead of $PATH each ask the person first, with a reason and a safer
form. The pack is on by default. LJOS_ASK_PACK=off turns it
off, and a list such as LJOS_ASK_PACK=db,cloud keeps only those
classes. A seat rule in the pack is read first, so a person’s own deny
or ask on the same line wins.
Constants§
- ASK_
PACK_ CLASSES - The classes of the pack, in the order a refusal is looked for.
- ASK_
PACK_ ENV - The environment variable that turns the pack or its classes off.
Functions§
- ask_
pack_ classes - The classes
LJOS_ASK_PACKleaves on: every class when unset, empty oron; none foroff,0,falseornone; else the listed ones. - ask_
pack_ switched_ off - The ask the pack would give the line with every class on, when the
setting in
LJOS_ASK_PACKturned that class off, with the setting. - ask_
pack_ verdict - The pack’s verdict on a shell line under
LJOS_ASK_PACK: anaskrule, or none. - ask_
pack_ verdict_ with ask_pack_verdictwith the setting passed in.- destructive_
sql - A SQL text with a statement that drops or empties data:
DROP TABLE,DROP DATABASE,TRUNCATE,DELETE FROMwith noWHERE, orALTER TABLE ... DROP. A statement is read from its start, soSELECT 'DROP TABLE x'is a select. - secret_
path - A path that holds a secret: an env file (not
.env.exampleand the like), a private SSH key, cloud or registry credentials,.netrc.