Has Traversal Component • AI Agent SDK

has_traversal_component: Check if a path contains directory traversal components.

has_traversal_component

Function

</div>

This function is defined in the workspace module.

Check if a path contains directory traversal components.

Signature

python
def has_traversal_component(path: str) -> bool

Parameters

ParamField str

Path string to check

Returns

ResponseField bool

True if path contains ‘..’ or other suspicious patterns

Uses

  • Path

Used By

Source

View on GitHub

praisonaiagents/workspace/__init__.py at line 170