Skip to main content

Module prefix

Module prefix 

Source
Expand description

Command prefix extraction for permission rule matching.

Given a bash command AST, extracts a stable prefix string that can be matched against allow/deny rules. The prefix must be a literal prefix of the original command.

Inspired by telos-agent’s utils/bash/commands.ts and utils/shell/prefix.ts.

Enums§

PrefixResult

Functions§

extract_prefix
Extract a command prefix from a simple command node.