Skip to main content

Module analyzer

Module analyzer 

Source
Expand description

Main bash command security analyzer.

Combines AST parsing, quote context, redirect validation, command prefix extraction, recursive command substitution analysis, and zsh/advanced shell checks into a single fail-closed classification.

Enums§

CommandSafety
Outcome of analyzing a shell command.
SecurityAnalysis
Result of analyzing a command string for security.

Functions§

analyze
Analyze a bash command string and return its safety classification.
analyze_security
Analyze a bash command string and return detailed results.
classify_simple_command
Classify a single simple command as safe or needing review.
extract_command_prefix
Extract the command prefix for permission rule matching.