> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Has Traversal Component • AI Agent SDK

> has_traversal_component: Check if a path contains directory traversal components.

# has\_traversal\_component

<div className="flex items-center gap-2">
  <Badge color="teal">Function</Badge>
</div>

> This function is defined in the [**workspace**](../modules/workspace) module.

Check if a path contains directory traversal components.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def has_traversal_component(path: str) -> bool
```

## Parameters

<ParamField query="path" type="str" required={true}>
  Path string to check
</ParamField>

### Returns

<ResponseField name="Returns" type="bool">
  True if path contains '..' or other suspicious patterns
</ResponseField>

## Uses

* `Path`

## Used By

* [`Workspace.resolve`](../functions/Workspace-resolve)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/workspace/__init__.py#L170">
  `praisonaiagents/workspace/__init__.py` at line 170
</Card>
