# contains_dangerous_patterns

> **Function** in `deepagents_acp`

📖 [View in docs](https://reference.langchain.com/python/deepagents-acp/utils/contains_dangerous_patterns)

Check if a command contains dangerous shell patterns.

These patterns can be used to bypass allow-list validation by embedding
arbitrary commands within seemingly safe commands.

## Signature

```python
contains_dangerous_patterns(
    command: str,
) -> bool
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `command` | `str` | Yes | The shell command to check. |

## Returns

`bool`

True if dangerous patterns are found, False otherwise.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/bb27e62ebe44dd6e8104a504b1718ce87acc7ffa/libs/acp/deepagents_acp/utils.py#L127)