diff --git a/docs/ar/concepts/agents.mdx b/docs/ar/concepts/agents.mdx index fe11b2545..7ae5c668c 100644 --- a/docs/ar/concepts/agents.mdx +++ b/docs/ar/concepts/agents.mdx @@ -250,16 +250,12 @@ analysis_agent = Agent( #### تنفيذ الكود -- `allow_code_execution`: يجب أن يكون True لتشغيل الكود -- `code_execution_mode`: - - `"safe"`: يستخدم Docker (موصى به للإنتاج) - - `"unsafe"`: تنفيذ مباشر (استخدم فقط في بيئات موثوقة) + + `allow_code_execution` و`code_execution_mode` مهجوران. تمت إزالة `CodeInterpreterTool` من `crewai-tools`. استخدم خدمة بيئة معزولة مخصصة مثل [E2B](https://e2b.dev) أو [Modal](https://modal.com) لتنفيذ الكود بأمان. + - - يشغّل هذا صورة Docker افتراضية. إذا أردت تهيئة صورة Docker، - راجع أداة Code Interpreter في قسم الأدوات. أضف أداة - مفسر الكود كأداة في معامل أداة الوكيل. - +- `allow_code_execution` _(مهجور)_: كان يُمكّن تنفيذ الكود المدمج عبر `CodeInterpreterTool`. +- `code_execution_mode` _(مهجور)_: كان يتحكم في وضع التنفيذ (`"safe"` لـ Docker، `"unsafe"` للتنفيذ المباشر). #### الميزات المتقدمة @@ -332,9 +328,9 @@ print(result.raw) ### الأمان وتنفيذ الكود -- عند استخدام `allow_code_execution`، كن حذرًا مع مدخلات المستخدم وتحقق منها دائمًا -- استخدم `code_execution_mode: "safe"` (Docker) في بيئات الإنتاج -- فكّر في تعيين حدود `max_execution_time` مناسبة لمنع الحلقات اللانهائية + + `allow_code_execution` و`code_execution_mode` مهجوران وتمت إزالة `CodeInterpreterTool`. استخدم خدمة بيئة معزولة مخصصة مثل [E2B](https://e2b.dev) أو [Modal](https://modal.com) لتنفيذ الكود بأمان. + ### تحسين الأداء diff --git a/docs/ar/tools/ai-ml/codeinterpretertool.mdx b/docs/ar/tools/ai-ml/codeinterpretertool.mdx index dbcf016eb..bbaea809b 100644 --- a/docs/ar/tools/ai-ml/codeinterpretertool.mdx +++ b/docs/ar/tools/ai-ml/codeinterpretertool.mdx @@ -7,6 +7,10 @@ mode: "wide" # `CodeInterpreterTool` + + **مهجور:** تمت إزالة `CodeInterpreterTool` من `crewai-tools`. كما أن معاملَي `allow_code_execution` و`code_execution_mode` على `Agent` أصبحا مهجورَين. استخدم خدمة بيئة معزولة مخصصة — [E2B](https://e2b.dev) أو [Modal](https://modal.com) — لتنفيذ الكود بشكل آمن ومعزول. + + ## الوصف تمكّن `CodeInterpreterTool` وكلاء CrewAI من تنفيذ كود Python 3 الذي يولّدونه بشكل مستقل. هذه الوظيفة ذات قيمة خاصة لأنها تتيح للوكلاء إنشاء الكود وتنفيذه والحصول على النتائج واستخدام تلك المعلومات لاتخاذ القرارات والإجراءات اللاحقة. diff --git a/docs/ar/tools/file-document/csvsearchtool.mdx b/docs/ar/tools/file-document/csvsearchtool.mdx index f9d5d7bf8..9e4e89658 100644 --- a/docs/ar/tools/file-document/csvsearchtool.mdx +++ b/docs/ar/tools/file-document/csvsearchtool.mdx @@ -74,3 +74,19 @@ tool = CSVSearchTool( } ) ``` + +## الأمان + +### التحقق من صحة المسارات + +يتم التحقق من مسارات الملفات المقدمة لهذه الأداة مقابل مجلد العمل الحالي. يتم رفض المسارات التي تحل خارج مجلد العمل وإطلاق `ValueError`. + +للسماح بالمسارات خارج مجلد العمل (مثلاً في الاختبارات أو خطوط الأنابيب الموثوقة)، عيّن متغير البيئة التالي: + +```shell +CREWAI_TOOLS_ALLOW_UNSAFE_PATHS=true +``` + +### التحقق من صحة الروابط + +يتم التحقق من مدخلات الروابط: يتم حظر مخطط `file://` والطلبات التي تستهدف نطاقات IP الخاصة أو المحجوزة لمنع هجمات تزوير الطلبات من جانب الخادم (SSRF). diff --git a/docs/ar/tools/file-document/directorysearchtool.mdx b/docs/ar/tools/file-document/directorysearchtool.mdx index 2e5595865..577836ad9 100644 --- a/docs/ar/tools/file-document/directorysearchtool.mdx +++ b/docs/ar/tools/file-document/directorysearchtool.mdx @@ -68,3 +68,15 @@ tool = DirectorySearchTool( } ) ``` + +## الأمان + +### التحقق من صحة المسارات + +يتم التحقق من مسارات المجلدات المقدمة لهذه الأداة مقابل مجلد العمل الحالي. يتم رفض المسارات التي تحل خارج مجلد العمل وإطلاق `ValueError`. + +للسماح بالمسارات خارج مجلد العمل (مثلاً في الاختبارات أو خطوط الأنابيب الموثوقة)، عيّن متغير البيئة التالي: + +```shell +CREWAI_TOOLS_ALLOW_UNSAFE_PATHS=true +``` diff --git a/docs/ar/tools/file-document/jsonsearchtool.mdx b/docs/ar/tools/file-document/jsonsearchtool.mdx index 62ef99081..53aebacea 100644 --- a/docs/ar/tools/file-document/jsonsearchtool.mdx +++ b/docs/ar/tools/file-document/jsonsearchtool.mdx @@ -73,3 +73,19 @@ tool = JSONSearchTool( } ) ``` + +## الأمان + +### التحقق من صحة المسارات + +يتم التحقق من مسارات الملفات المقدمة لهذه الأداة مقابل مجلد العمل الحالي. يتم رفض المسارات التي تحل خارج مجلد العمل وإطلاق `ValueError`. + +للسماح بالمسارات خارج مجلد العمل (مثلاً في الاختبارات أو خطوط الأنابيب الموثوقة)، عيّن متغير البيئة التالي: + +```shell +CREWAI_TOOLS_ALLOW_UNSAFE_PATHS=true +``` + +### التحقق من صحة الروابط + +يتم التحقق من مدخلات الروابط: يتم حظر مخطط `file://` والطلبات التي تستهدف نطاقات IP الخاصة أو المحجوزة لمنع هجمات تزوير الطلبات من جانب الخادم (SSRF). diff --git a/docs/ar/tools/file-document/pdfsearchtool.mdx b/docs/ar/tools/file-document/pdfsearchtool.mdx index 86e0272ad..96d4b98ba 100644 --- a/docs/ar/tools/file-document/pdfsearchtool.mdx +++ b/docs/ar/tools/file-document/pdfsearchtool.mdx @@ -105,3 +105,19 @@ tool = PDFSearchTool( } ) ``` + +## الأمان + +### التحقق من صحة المسارات + +يتم التحقق من مسارات الملفات المقدمة لهذه الأداة مقابل مجلد العمل الحالي. يتم رفض المسارات التي تحل خارج مجلد العمل وإطلاق `ValueError`. + +للسماح بالمسارات خارج مجلد العمل (مثلاً في الاختبارات أو خطوط الأنابيب الموثوقة)، عيّن متغير البيئة التالي: + +```shell +CREWAI_TOOLS_ALLOW_UNSAFE_PATHS=true +``` + +### التحقق من صحة الروابط + +يتم التحقق من مدخلات الروابط: يتم حظر مخطط `file://` والطلبات التي تستهدف نطاقات IP الخاصة أو المحجوزة لمنع هجمات تزوير الطلبات من جانب الخادم (SSRF). diff --git a/docs/en/concepts/agents.mdx b/docs/en/concepts/agents.mdx index 5240c5a9f..ffd1a7ec6 100644 --- a/docs/en/concepts/agents.mdx +++ b/docs/en/concepts/agents.mdx @@ -308,16 +308,12 @@ multimodal_agent = Agent( #### Code Execution -- `allow_code_execution`: Must be True to run code -- `code_execution_mode`: - - `"safe"`: Uses Docker (recommended for production) - - `"unsafe"`: Direct execution (use only in trusted environments) + + `allow_code_execution` and `code_execution_mode` are deprecated. `CodeInterpreterTool` has been removed from `crewai-tools`. Use a dedicated sandbox service such as [E2B](https://e2b.dev) or [Modal](https://modal.com) for secure code execution. + - - This runs a default Docker image. If you want to configure the docker image, - the checkout the Code Interpreter Tool in the tools section. Add the code - interpreter tool as a tool in the agent as a tool parameter. - +- `allow_code_execution` _(deprecated)_: Previously enabled built-in code execution via `CodeInterpreterTool`. +- `code_execution_mode` _(deprecated)_: Previously controlled execution mode (`"safe"` for Docker, `"unsafe"` for direct execution). #### Advanced Features @@ -667,9 +663,9 @@ asyncio.run(main()) ### Security and Code Execution -- When using `allow_code_execution`, be cautious with user input and always validate it -- Use `code_execution_mode: "safe"` (Docker) in production environments -- Consider setting appropriate `max_execution_time` limits to prevent infinite loops + + `allow_code_execution` and `code_execution_mode` are deprecated and `CodeInterpreterTool` has been removed. Use a dedicated sandbox service such as [E2B](https://e2b.dev) or [Modal](https://modal.com) for secure code execution. + ### Performance Optimization diff --git a/docs/en/tools/ai-ml/codeinterpretertool.mdx b/docs/en/tools/ai-ml/codeinterpretertool.mdx index 67d371178..660c98a60 100644 --- a/docs/en/tools/ai-ml/codeinterpretertool.mdx +++ b/docs/en/tools/ai-ml/codeinterpretertool.mdx @@ -7,6 +7,10 @@ mode: "wide" # `CodeInterpreterTool` + + **Deprecated:** `CodeInterpreterTool` has been removed from `crewai-tools`. The `allow_code_execution` and `code_execution_mode` parameters on `Agent` are also deprecated. Use a dedicated sandbox service — [E2B](https://e2b.dev) or [Modal](https://modal.com) — for secure, isolated code execution. + + ## Description The `CodeInterpreterTool` enables CrewAI agents to execute Python 3 code that they generate autonomously. This functionality is particularly valuable as it allows agents to create code, execute it, obtain the results, and utilize that information to inform subsequent decisions and actions. diff --git a/docs/en/tools/file-document/csvsearchtool.mdx b/docs/en/tools/file-document/csvsearchtool.mdx index c20f8ec74..ebcfad583 100644 --- a/docs/en/tools/file-document/csvsearchtool.mdx +++ b/docs/en/tools/file-document/csvsearchtool.mdx @@ -75,4 +75,20 @@ tool = CSVSearchTool( }, } ) + +## Security + +### Path Validation + +File paths provided to this tool are validated against the current working directory. Paths that resolve outside the working directory are rejected with a `ValueError`. + +To allow paths outside the working directory (for example, in tests or trusted pipelines), set the environment variable: + +```shell +CREWAI_TOOLS_ALLOW_UNSAFE_PATHS=true +``` + +### URL Validation + +URL inputs are validated: `file://` URIs and requests targeting private or reserved IP ranges are blocked to prevent server-side request forgery (SSRF) attacks. ``` \ No newline at end of file diff --git a/docs/en/tools/file-document/directorysearchtool.mdx b/docs/en/tools/file-document/directorysearchtool.mdx index 9efd2e910..c6bd537e4 100644 --- a/docs/en/tools/file-document/directorysearchtool.mdx +++ b/docs/en/tools/file-document/directorysearchtool.mdx @@ -67,4 +67,16 @@ tool = DirectorySearchTool( }, } ) + +## Security + +### Path Validation + +Directory paths provided to this tool are validated against the current working directory. Paths that resolve outside the working directory are rejected with a `ValueError`. + +To allow paths outside the working directory (for example, in tests or trusted pipelines), set the environment variable: + +```shell +CREWAI_TOOLS_ALLOW_UNSAFE_PATHS=true +``` ``` \ No newline at end of file diff --git a/docs/en/tools/file-document/jsonsearchtool.mdx b/docs/en/tools/file-document/jsonsearchtool.mdx index 7b1737faa..2ef8e95b4 100644 --- a/docs/en/tools/file-document/jsonsearchtool.mdx +++ b/docs/en/tools/file-document/jsonsearchtool.mdx @@ -74,3 +74,19 @@ tool = JSONSearchTool( } ) ``` + +## Security + +### Path Validation + +File paths provided to this tool are validated against the current working directory. Paths that resolve outside the working directory are rejected with a `ValueError`. + +To allow paths outside the working directory (for example, in tests or trusted pipelines), set the environment variable: + +```shell +CREWAI_TOOLS_ALLOW_UNSAFE_PATHS=true +``` + +### URL Validation + +URL inputs are validated: `file://` URIs and requests targeting private or reserved IP ranges are blocked to prevent server-side request forgery (SSRF) attacks. diff --git a/docs/en/tools/file-document/pdfsearchtool.mdx b/docs/en/tools/file-document/pdfsearchtool.mdx index 32e05669e..d8c812f2d 100644 --- a/docs/en/tools/file-document/pdfsearchtool.mdx +++ b/docs/en/tools/file-document/pdfsearchtool.mdx @@ -105,4 +105,20 @@ tool = PDFSearchTool( }, } ) + +## Security + +### Path Validation + +File paths provided to this tool are validated against the current working directory. Paths that resolve outside the working directory are rejected with a `ValueError`. + +To allow paths outside the working directory (for example, in tests or trusted pipelines), set the environment variable: + +```shell +CREWAI_TOOLS_ALLOW_UNSAFE_PATHS=true +``` + +### URL Validation + +URL inputs are validated: `file://` URIs and requests targeting private or reserved IP ranges are blocked to prevent server-side request forgery (SSRF) attacks. ``` \ No newline at end of file diff --git a/docs/ko/concepts/agents.mdx b/docs/ko/concepts/agents.mdx index 21bebbb82..09d3431fc 100644 --- a/docs/ko/concepts/agents.mdx +++ b/docs/ko/concepts/agents.mdx @@ -291,15 +291,13 @@ multimodal_agent = Agent( - `max_retry_limit`: 오류 발생 시 재시도 횟수 #### 코드 실행 -- `allow_code_execution`: 코드를 실행하려면 True여야 합니다 -- `code_execution_mode`: - - `"safe"`: Docker를 사용합니다 (프로덕션에 권장) - - `"unsafe"`: 직접 실행 (신뢰할 수 있는 환경에서만 사용) - - 이 옵션은 기본 Docker 이미지를 실행합니다. Docker 이미지를 구성하려면 도구 섹션에 있는 Code Interpreter Tool을 확인하십시오. - Code Interpreter Tool을 에이전트의 도구 파라미터로 추가하십시오. - + + `allow_code_execution` 및 `code_execution_mode`는 더 이상 사용되지 않습니다. `CodeInterpreterTool`이 `crewai-tools`에서 제거되었습니다. 안전한 코드 실행을 위해 [E2B](https://e2b.dev) 또는 [Modal](https://modal.com)과 같은 전용 샌드박스 서비스를 사용하세요. + + +- `allow_code_execution` _(지원 중단)_: 이전에 `CodeInterpreterTool`을 통한 내장 코드 실행을 활성화했습니다. +- `code_execution_mode` _(지원 중단)_: 이전에 실행 모드를 제어했습니다 (Docker의 경우 `"safe"`, 직접 실행의 경우 `"unsafe"`). #### 고급 기능 - `multimodal`: 텍스트와 시각적 콘텐츠 처리를 위한 멀티모달 기능 활성화 @@ -627,9 +625,10 @@ asyncio.run(main()) ## 중요한 고려사항 및 모범 사례 ### 보안 및 코드 실행 -- `allow_code_execution`을 사용할 때는 사용자 입력에 주의하고 항상 입력 값을 검증하세요 -- 운영 환경에서는 `code_execution_mode: "safe"`(Docker)를 사용하세요 -- 무한 루프를 방지하기 위해 적절한 `max_execution_time` 제한을 설정하는 것을 고려하세요 + + + `allow_code_execution` 및 `code_execution_mode`는 더 이상 사용되지 않으며 `CodeInterpreterTool`이 제거되었습니다. 안전한 코드 실행을 위해 [E2B](https://e2b.dev) 또는 [Modal](https://modal.com)과 같은 전용 샌드박스 서비스를 사용하세요. + ### 성능 최적화 - `respect_context_window: true`를 사용하여 토큰 제한 문제를 방지하세요. diff --git a/docs/ko/tools/ai-ml/codeinterpretertool.mdx b/docs/ko/tools/ai-ml/codeinterpretertool.mdx index f5053d216..1b2ec234e 100644 --- a/docs/ko/tools/ai-ml/codeinterpretertool.mdx +++ b/docs/ko/tools/ai-ml/codeinterpretertool.mdx @@ -7,6 +7,10 @@ mode: "wide" # `CodeInterpreterTool` + + **지원 중단:** `CodeInterpreterTool`이 `crewai-tools`에서 제거되었습니다. `Agent`의 `allow_code_execution` 및 `code_execution_mode` 파라미터도 더 이상 사용되지 않습니다. 안전하고 격리된 코드 실행을 위해 전용 샌드박스 서비스 — [E2B](https://e2b.dev) 또는 [Modal](https://modal.com) — 을 사용하세요. + + ## 설명 `CodeInterpreterTool`은 CrewAI 에이전트가 자율적으로 생성한 Python 3 코드를 실행할 수 있도록 합니다. 이 기능은 에이전트가 코드를 생성하고, 실행하며, 결과를 얻고, 그 정보를 활용하여 이후의 결정과 행동에 반영할 수 있다는 점에서 특히 유용합니다. diff --git a/docs/ko/tools/file-document/csvsearchtool.mdx b/docs/ko/tools/file-document/csvsearchtool.mdx index e962b11e1..99de2cdda 100644 --- a/docs/ko/tools/file-document/csvsearchtool.mdx +++ b/docs/ko/tools/file-document/csvsearchtool.mdx @@ -76,3 +76,19 @@ tool = CSVSearchTool( } ) ``` + +## 보안 + +### 경로 유효성 검사 + +이 도구에 제공되는 파일 경로는 현재 작업 디렉터리에 대해 검증됩니다. 작업 디렉터리 외부로 확인되는 경로는 `ValueError`로 거부됩니다. + +작업 디렉터리 외부의 경로를 허용하려면 (예: 테스트 또는 신뢰할 수 있는 파이프라인), 다음 환경 변수를 설정하세요: + +```shell +CREWAI_TOOLS_ALLOW_UNSAFE_PATHS=true +``` + +### URL 유효성 검사 + +URL 입력도 검증됩니다: `file://` URI와 사설 또는 예약된 IP 범위를 대상으로 하는 요청은 서버 측 요청 위조(SSRF) 공격을 방지하기 위해 차단됩니다. diff --git a/docs/ko/tools/file-document/directorysearchtool.mdx b/docs/ko/tools/file-document/directorysearchtool.mdx index 5a46e53b7..4f9becef5 100644 --- a/docs/ko/tools/file-document/directorysearchtool.mdx +++ b/docs/ko/tools/file-document/directorysearchtool.mdx @@ -68,3 +68,15 @@ tool = DirectorySearchTool( } ) ``` + +## 보안 + +### 경로 유효성 검사 + +이 도구에 제공되는 디렉터리 경로는 현재 작업 디렉터리에 대해 검증됩니다. 작업 디렉터리 외부로 확인되는 경로는 `ValueError`로 거부됩니다. + +작업 디렉터리 외부의 경로를 허용하려면 (예: 테스트 또는 신뢰할 수 있는 파이프라인), 다음 환경 변수를 설정하세요: + +```shell +CREWAI_TOOLS_ALLOW_UNSAFE_PATHS=true +``` diff --git a/docs/ko/tools/file-document/jsonsearchtool.mdx b/docs/ko/tools/file-document/jsonsearchtool.mdx index be0a6f134..3b4a60931 100644 --- a/docs/ko/tools/file-document/jsonsearchtool.mdx +++ b/docs/ko/tools/file-document/jsonsearchtool.mdx @@ -71,3 +71,19 @@ tool = JSONSearchTool( } ) ``` + +## 보안 + +### 경로 유효성 검사 + +이 도구에 제공되는 파일 경로는 현재 작업 디렉터리에 대해 검증됩니다. 작업 디렉터리 외부로 확인되는 경로는 `ValueError`로 거부됩니다. + +작업 디렉터리 외부의 경로를 허용하려면 (예: 테스트 또는 신뢰할 수 있는 파이프라인), 다음 환경 변수를 설정하세요: + +```shell +CREWAI_TOOLS_ALLOW_UNSAFE_PATHS=true +``` + +### URL 유효성 검사 + +URL 입력도 검증됩니다: `file://` URI와 사설 또는 예약된 IP 범위를 대상으로 하는 요청은 서버 측 요청 위조(SSRF) 공격을 방지하기 위해 차단됩니다. diff --git a/docs/ko/tools/file-document/pdfsearchtool.mdx b/docs/ko/tools/file-document/pdfsearchtool.mdx index 573ed4812..f9cf622d5 100644 --- a/docs/ko/tools/file-document/pdfsearchtool.mdx +++ b/docs/ko/tools/file-document/pdfsearchtool.mdx @@ -102,3 +102,19 @@ tool = PDFSearchTool( } ) ``` + +## 보안 + +### 경로 유효성 검사 + +이 도구에 제공되는 파일 경로는 현재 작업 디렉터리에 대해 검증됩니다. 작업 디렉터리 외부로 확인되는 경로는 `ValueError`로 거부됩니다. + +작업 디렉터리 외부의 경로를 허용하려면 (예: 테스트 또는 신뢰할 수 있는 파이프라인), 다음 환경 변수를 설정하세요: + +```shell +CREWAI_TOOLS_ALLOW_UNSAFE_PATHS=true +``` + +### URL 유효성 검사 + +URL 입력도 검증됩니다: `file://` URI와 사설 또는 예약된 IP 범위를 대상으로 하는 요청은 서버 측 요청 위조(SSRF) 공격을 방지하기 위해 차단됩니다. diff --git a/docs/pt-BR/concepts/agents.mdx b/docs/pt-BR/concepts/agents.mdx index 383d501c6..69cb2e9d4 100644 --- a/docs/pt-BR/concepts/agents.mdx +++ b/docs/pt-BR/concepts/agents.mdx @@ -304,17 +304,12 @@ multimodal_agent = Agent( #### Execução de Código -- `allow_code_execution`: Deve ser True para permitir execução de código -- `code_execution_mode`: - - `"safe"`: Usa Docker (recomendado para produção) - - `"unsafe"`: Execução direta (apenas em ambientes confiáveis) + + `allow_code_execution` e `code_execution_mode` estão depreciados. O `CodeInterpreterTool` foi removido do `crewai-tools`. Use um serviço de sandbox dedicado como [E2B](https://e2b.dev) ou [Modal](https://modal.com) para execução segura de código. + - - Isso executa uma imagem Docker padrão. Se você deseja configurar a imagem - Docker, veja a ferramenta Code Interpreter na seção de ferramentas. Adicione a - ferramenta de interpretação de código como um parâmetro em ferramentas no - agente. - +- `allow_code_execution` _(depreciado)_: Anteriormente habilitava a execução de código embutida via `CodeInterpreterTool`. +- `code_execution_mode` _(depreciado)_: Anteriormente controlava o modo de execução (`"safe"` para Docker, `"unsafe"` para execução direta). #### Funcionalidades Avançadas @@ -565,9 +560,9 @@ agent = Agent( ### Segurança e Execução de Código -- Ao usar `allow_code_execution`, seja cauteloso com entradas do usuário e sempre as valide -- Use `code_execution_mode: "safe"` (Docker) em ambientes de produção -- Considere definir limites adequados de `max_execution_time` para evitar loops infinitos + + `allow_code_execution` e `code_execution_mode` estão depreciados e o `CodeInterpreterTool` foi removido. Use um serviço de sandbox dedicado como [E2B](https://e2b.dev) ou [Modal](https://modal.com) para execução segura de código. + ### Otimização de Performance diff --git a/docs/pt-BR/tools/ai-ml/codeinterpretertool.mdx b/docs/pt-BR/tools/ai-ml/codeinterpretertool.mdx index 14c4fd51d..9b48a51e4 100644 --- a/docs/pt-BR/tools/ai-ml/codeinterpretertool.mdx +++ b/docs/pt-BR/tools/ai-ml/codeinterpretertool.mdx @@ -7,6 +7,10 @@ mode: "wide" # `CodeInterpreterTool` + + **Depreciado:** O `CodeInterpreterTool` foi removido do `crewai-tools`. Os parâmetros `allow_code_execution` e `code_execution_mode` do `Agent` também estão depreciados. Use um serviço de sandbox dedicado — [E2B](https://e2b.dev) ou [Modal](https://modal.com) — para execução de código segura e isolada. + + ## Descrição O `CodeInterpreterTool` permite que agentes CrewAI executem códigos Python 3 gerados autonomamente. Essa funcionalidade é particularmente valiosa, pois permite que os agentes criem códigos, os executem, obtenham os resultados e usem essas informações para orientar decisões e ações subsequentes. diff --git a/docs/pt-BR/tools/file-document/csvsearchtool.mdx b/docs/pt-BR/tools/file-document/csvsearchtool.mdx index a2ebd3af7..59a07b3ea 100644 --- a/docs/pt-BR/tools/file-document/csvsearchtool.mdx +++ b/docs/pt-BR/tools/file-document/csvsearchtool.mdx @@ -75,4 +75,20 @@ tool = CSVSearchTool( ), ) ) + +## Segurança + +### Validação de Caminhos + +Os caminhos de arquivo fornecidos a esta ferramenta são validados em relação ao diretório de trabalho atual. Caminhos que resolvem fora do diretório de trabalho são rejeitados com um `ValueError`. + +Para permitir caminhos fora do diretório de trabalho (por exemplo, em testes ou pipelines confiáveis), defina a variável de ambiente: + +```shell +CREWAI_TOOLS_ALLOW_UNSAFE_PATHS=true +``` + +### Validação de URLs + +Entradas de URL também são validadas: URIs `file://` e requisições direcionadas a faixas de IP privadas ou reservadas são bloqueadas para prevenir ataques de falsificação de requisições do lado do servidor (SSRF). ``` \ No newline at end of file diff --git a/docs/pt-BR/tools/file-document/directorysearchtool.mdx b/docs/pt-BR/tools/file-document/directorysearchtool.mdx index 4093bbc8e..50685ff58 100644 --- a/docs/pt-BR/tools/file-document/directorysearchtool.mdx +++ b/docs/pt-BR/tools/file-document/directorysearchtool.mdx @@ -67,4 +67,16 @@ tool = DirectorySearchTool( }, } ) +``` + +## Segurança + +### Validação de Caminhos + +Os caminhos de diretório fornecidos a esta ferramenta são validados em relação ao diretório de trabalho atual. Caminhos que resolvem fora do diretório de trabalho são rejeitados com um `ValueError`. + +Para permitir caminhos fora do diretório de trabalho (por exemplo, em testes ou pipelines confiáveis), defina a variável de ambiente: + +```shell +CREWAI_TOOLS_ALLOW_UNSAFE_PATHS=true ``` \ No newline at end of file diff --git a/docs/pt-BR/tools/file-document/jsonsearchtool.mdx b/docs/pt-BR/tools/file-document/jsonsearchtool.mdx index 11b76044b..ec75920e5 100644 --- a/docs/pt-BR/tools/file-document/jsonsearchtool.mdx +++ b/docs/pt-BR/tools/file-document/jsonsearchtool.mdx @@ -73,4 +73,20 @@ tool = JSONSearchTool( }, } ) + +## Segurança + +### Validação de Caminhos + +Os caminhos de arquivo fornecidos a esta ferramenta são validados em relação ao diretório de trabalho atual. Caminhos que resolvem fora do diretório de trabalho são rejeitados com um `ValueError`. + +Para permitir caminhos fora do diretório de trabalho (por exemplo, em testes ou pipelines confiáveis), defina a variável de ambiente: + +```shell +CREWAI_TOOLS_ALLOW_UNSAFE_PATHS=true +``` + +### Validação de URLs + +Entradas de URL também são validadas: URIs `file://` e requisições direcionadas a faixas de IP privadas ou reservadas são bloqueadas para prevenir ataques de falsificação de requisições do lado do servidor (SSRF). ``` \ No newline at end of file diff --git a/docs/pt-BR/tools/file-document/pdfsearchtool.mdx b/docs/pt-BR/tools/file-document/pdfsearchtool.mdx index 83cac48bb..f547ec80a 100644 --- a/docs/pt-BR/tools/file-document/pdfsearchtool.mdx +++ b/docs/pt-BR/tools/file-document/pdfsearchtool.mdx @@ -101,4 +101,20 @@ tool = PDFSearchTool( }, } ) -``` \ No newline at end of file +``` + +## Segurança + +### Validação de Caminhos + +Os caminhos de arquivo fornecidos a esta ferramenta são validados em relação ao diretório de trabalho atual. Caminhos que resolvem fora do diretório de trabalho são rejeitados com um `ValueError`. + +Para permitir caminhos fora do diretório de trabalho (por exemplo, em testes ou pipelines confiáveis), defina a variável de ambiente: + +```shell +CREWAI_TOOLS_ALLOW_UNSAFE_PATHS=true +``` + +### Validação de URLs + +Entradas de URL também são validadas: URIs `file://` e requisições direcionadas a faixas de IP privadas ou reservadas são bloqueadas para prevenir ataques de falsificação de requisições do lado do servidor (SSRF). \ No newline at end of file