lean_ctx/core/shell_allowlist/
mod.rs1mod approval;
9mod case_construct;
10mod compound;
11mod config;
12mod enforcement;
13mod heredoc;
14mod lexer;
15mod mode;
16mod powershell;
17mod ps_statements;
18mod self_config;
19mod side_doors;
20mod substitution;
21mod tokenizer;
22
23use crate::core::error::ShellError;
24
25use case_construct::find_shell_word;
26use compound::expand_to_leaf_segments;
27use config::{allowlist_block_message, effective_allowlist};
28#[cfg(test)]
29use enforcement::{
30 check_all_segments, check_pipe_to_bare_interpreter, check_unconditional_blocked_only,
31 enforce_shell_allowlist, is_bare_interpreter_stdin, is_project_root_binary,
32 normalize_line_continuations,
33};
34use tokenizer::{
35 extract_all_commands, extract_base_from_segment, quote_aware_token_end, skip_env_assignments,
36 split_on_operators,
37};
38
39pub use approval::{
40 ApprovalMiss, ApprovalRequest, approval_request, check_shell_allowlist_granted,
41};
42pub(crate) use case_construct::{contains_double_semicolon, rewrite_case_constructs};
43pub use config::*;
44pub use enforcement::*;
45pub(crate) use heredoc::heredoc_delims;
46pub(crate) use heredoc::read_heredoc_delim;
47pub use heredoc::strip_all_heredoc_bodies;
48#[cfg(test)]
49pub(crate) use heredoc::{strip_comments, strip_quoted_heredoc_bodies};
50pub use mode::ShellSecurity;
51pub(crate) use substitution::check_substitution_in_args;
52#[cfg(test)]
53pub(crate) use substitution::has_expanding_substitution_in_args;
54#[cfg(test)]
55pub(crate) use tests::allow;
56pub use tokenizer::*;
57
58#[cfg(test)]
59mod tests;
60#[cfg(test)]
61mod tests_conditionals;
62#[cfg(test)]
63mod tests_heredoc_quotes;
64#[cfg(test)]
65mod tests_multiword;
66#[cfg(test)]
67mod tests_pipe_target;
68#[cfg(test)]
69mod tests_ps1930;
70#[cfg(test)]
71mod tests_redaction_marker;
72#[cfg(test)]
73mod tests_tokenizer;
74#[cfg(test)]
75mod tests_warn_only;