lean_ctx/core/shell_allowlist/
mod.rs1mod case_construct;
9mod compound;
10mod config;
11mod enforcement;
12mod heredoc;
13mod mode;
14mod powershell;
15mod substitution;
16mod tokenizer;
17
18use crate::core::error::ShellError;
19
20use case_construct::find_shell_word;
21use compound::expand_to_leaf_segments;
22use config::{allowlist_block_message, effective_allowlist};
23use enforcement::SHELL_BUILTINS;
24#[cfg(test)]
25use enforcement::{
26 check_all_segments, check_pipe_to_bare_interpreter, check_unconditional_blocked_only,
27 enforce_shell_allowlist, is_bare_interpreter_stdin, is_project_root_binary,
28 normalize_line_continuations,
29};
30use tokenizer::{
31 extract_all_commands, extract_base_from_segment, quote_aware_token_end, skip_env_assignments,
32 split_on_operators,
33};
34
35pub(crate) use case_construct::{contains_double_semicolon, rewrite_case_constructs};
36pub use config::*;
37pub use enforcement::*;
38pub(crate) use heredoc::heredoc_delims;
39pub(crate) use heredoc::read_heredoc_delim;
40pub use heredoc::strip_all_heredoc_bodies;
41pub(crate) use heredoc::{strip_comments, strip_quoted_heredoc_bodies};
42pub use mode::ShellSecurity;
43pub(crate) use substitution::check_substitution_in_args;
44#[cfg(test)]
45pub(crate) use substitution::has_expanding_substitution_in_args;
46#[cfg(test)]
47pub(crate) use tests::allow;
48pub use tokenizer::*;
49
50#[cfg(test)]
51mod tests;
52#[cfg(test)]
53mod tests_multiword;
54#[cfg(test)]
55mod tests_tokenizer;