Services.Approvals.Shell (fnord v0.8.83)

View Source

Summary

Functions

Delegate to the pure prefix extraction logic.

Returns a sorted, de-duplicated list of user-configured prefix approvals for shell commands (kind: "shell") across both global and project scopes.

Returns a sorted, de-duplicated list of user-configured full-command regex approvals for shell commands (kind: "shell_full") across both global and project scopes.

Types

args()

@type args() :: {String.t(), [map()], String.t()}

decision()

@type decision() :: Services.Approvals.Workflow.decision()

state()

Functions

customize(state, stages)

@spec customize(state(), [{String.t(), String.t()}]) :: {:approved, state()}

extract_prefix(map)

Delegate to the pure prefix extraction logic.

full_cmd_preapproved?(state, full)

list_user_prefixes()

@spec list_user_prefixes() :: [String.t()]

Returns a sorted, de-duplicated list of user-configured prefix approvals for shell commands (kind: "shell") across both global and project scopes.

list_user_regexes()

@spec list_user_regexes() :: [String.t()]

Returns a sorted, de-duplicated list of user-configured full-command regex approvals for shell commands (kind: "shell_full") across both global and project scopes.

preapproved_cmds()

prefix_approved?(state, prefix)