Skip to content

Commit 6686f8f

Browse files
author
camel-docs-bot
committed
Auto-update documentation after merge [skip ci]
1 parent ee7b2ad commit 6686f8f

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

docs/mintlify/reference/camel.toolkits.terminal_toolkit.utils.mdx

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
<a id="camel.toolkits.terminal_toolkit.utils"></a>
22

3-
<a id="camel.toolkits.terminal_toolkit.utils.contains_command_chaining"></a>
3+
<a id="camel.toolkits.terminal_toolkit.utils.check_command_safety"></a>
44

5-
## contains_command_chaining
5+
## check_command_safety
66

77
```python
8-
def contains_command_chaining(command: str):
8+
def check_command_safety(command: str, allowed_commands: Optional[Set[str]] = None):
99
```
1010

11-
Check if command contains chaining operators that could be used to
12-
bypass security.
11+
Check if a command (potentially with chaining) is safe to execute.
12+
13+
**Parameters:**
14+
15+
- **command** (str): The command string to check
16+
- **allowed_commands** (Optional[Set[str]]): Set of allowed commands (whitelist mode)
17+
18+
**Returns:**
19+
20+
Tuple[bool, str]: (is_safe, reason)
1321

1422
<a id="camel.toolkits.terminal_toolkit.utils.sanitize_command"></a>
1523

0 commit comments

Comments
 (0)