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§
Functions§
- extract_
prefix - Extract a command prefix from a simple command node.