Skip to main content

Module bash_parse

Module bash_parse 

Source
Expand description

Tree-sitter based bash command parser.

Parses bash commands into an AST and extracts structured information for security analysis. Catches obfuscation that regex-based detection misses: quote splitting, command substitution, variable indirection, subshells, and process substitution.

Structs§

ParsedCommand
Parsed representation of a bash command for security analysis.

Functions§

check_parsed_security
Check a parsed command against security rules. Returns a list of security violations found.
parse_bash
Parse a bash command string into a structured representation.