diff --git a/lib/crewai-tools/src/crewai_tools/tools/grep_tool/grep_tool.py b/lib/crewai-tools/src/crewai_tools/tools/grep_tool/grep_tool.py index 352faf9fb..6d1abaa60 100644 --- a/lib/crewai-tools/src/crewai_tools/tools/grep_tool/grep_tool.py +++ b/lib/crewai-tools/src/crewai_tools/tools/grep_tool/grep_tool.py @@ -262,7 +262,9 @@ class GrepTool(BaseTool): return sorted(files) @staticmethod - def _safe_search(compiled_pattern: re.Pattern[str], line: str) -> re.Match[str] | None: + def _safe_search( + compiled_pattern: re.Pattern[str], line: str + ) -> re.Match[str] | None: """Run a regex search with a per-line timeout to mitigate ReDoS. On platforms that support SIGALRM (Unix), a timeout is enforced.