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
def has_traversal_component(path: str) -> boolParameters
ParamField
strPath string to check
Returns
ResponseField
boolTrue if path contains ‘..’ or other suspicious patterns
Uses
Path
Used By
Source
View on GitHubpraisonaiagents/workspace/__init__.py at line 170