项目简介
PentAGI 是创新自动化安全测试工具,利用AI自主执行渗透测试步骤,内置20+专业安全工具,具备智能记忆系统、知识图谱集成和Web界面,支持多种LLM提供商,完全自托管。
README 预览
# PentAGI\n\n\n Penetration testing Artificial General Intelligence\n\n\n\n\n> **Join the Community!** Connect with security researchers, AI enthusiasts, and fellow ethical hackers. Get support, share insights, and stay updated with the latest PentAGI developments.\n\n[](https://discord.gg/2xrMh7qX6m)⠀[](https://t.me/+Ka9i6CNwe71hMWQy)\n\n\n\n\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Features](#features)\n- [Architecture](#architecture)\n - [Agent Supervision](#advanced-agent-supervision)\n- [Quick Start](#quick-start)\n- [How to Use PentAGI After Login](#how-to-use-pentagi-after-login)\n- [API Access](#api-access)\n - [LLM Provider Configuration](#custom-llm-provider-configuration)\n - [Ollama](#ollama-provider-configuration)\n - [OpenAI](#openai-provider-configuration)\n - [Anthropic](#anthropic-provider-configuration)\n - [Google AI (Gemini)](#google-ai-gemini-provider-configuration)\n - [AWS Bedrock](#aws-bedrock-provider-configuration)\n - [DeepSeek](#deepseek-provider-configuration)\n - [GLM](#glm-provider-configuration)\n - [Kimi](#kimi-provider-configuration)\n - [Qwen](#qwen-provider-configuration)\n- [Advanced Setup](#advanced-setup)\n - [Langfuse Integration](#langfuse-integration)\n - [Monitoring and Observability](#monitoring-and-observability)\n - [Knowledge Graph (Graphiti)](#knowledge-graph-integration-graphiti)\n - [OAuth Integration](#github-and-google-oauth-integration)\n - [Docker Image Configuration](#docker-image-configuration)\n- [Development](#development)\n- [Testing LLM Agents](#testing-llm-agents)\n- [Embedding Configuration and Testing](#embedding-configuration-and-testing)\n- [Function Testing with ftester](#function-testing-with-ftester)\n- [Building](#building)\n- [Credits](#credits)\n- [License](#license)\n\n## Overview\n\nPentAGI is an innovative tool for automated security testing that leverages cutting-edge artificial intelligence technologies. The project is designed for informati
常见问题 (3)
故障排除在 Graphiti 已禁用的情况下运行 ./installer restart 时,如何修复 "docker-compose-graphiti.yml does not exist" 错误?
将 PentAGI 升级到 2.2.0 或更高版本,该版本包含更新后的安装程序,可在重启时跳过缺失的可选 Compose 文件(如 docker-compose-graphiti.yml)。升级后,再次运行 ./installer restart。此错误发生在安装程序构建版本 v2.0.0-87ac00f 中,当 GRAPHITI_ENABLED=false 时,重启过程仍会尝试停止 Graphiti 堆栈。
故障排除如何修复 PentAGI 容器逃逸漏洞,即 AI 代理可以通过提示词注入访问 /var/run/docker.sock 的问题?
升级到 PentAGI 2.2.0 或更高版本,该版本包含沙箱加固和 Docker socket 代理的更改。然后确保已禁用 Docker-in-Docker(除非明确需要):在 docker-compose.yml 中设置 DOCKER_INSIDE=false,移除对 /var/run/docker.sock 的任何绑定挂载,并使用 docker compose up -d --force-recreate 重新创建堆栈。验证沙箱无法访问该 socket,例如:docker exec pentagi-terminal-<id> ls -l /var/run/docker.sock;它应返回 "No such file or directory"。如果确实需要 DinD,请勿挂载宿主机 socket。将 DOCKER_INSIDE_HOST 指向一个独立、隔离的 Docker 守护进程,并在其前面放置授权代理或 Tecnativa/docker-socket-proxy,使用最小权限的 API 允许列表。no-new-privileges、capability 移除以及其他容器加固措施是有用的纵深防御手段,但当容器对宿主机 Docker socket 拥有不受限制的访问权限时,它们无法阻止逃逸。
故障排除如何修复在使用本地 Ollama 模型(例如 qwen2.5:14b)时出现的 PentAGI 错误 "missing the OpenAI API key"?
升级到 PentAGI 2.2.0 或更高版本;该 provider 初始化 bug 已在该版本中修复。不要为 Ollama 使用假的 OPENAI_API_KEY——该变量名是错误的。原生 OpenAI provider 使用 OPEN_AI_KEY,而 Ollama 或其他 OpenAI 兼容服务器必须通过 PentAGI 文档中记载的 Ollama/自定义 provider 设置进行配置。使用模型 qwen2.5:14b 和容器可访问的 Ollama URL,在 Docker Desktop 上通常为 http://host.docker.internal:11434/v1,在 Linux 上则为 http://<host-LAN-IP>:11434/v1 或 host-gateway。确保 Ollama 监听所有接口(OLLAMA_HOST=0.0.0.0),并且模型已拉取:ollama pull qwen2.5:14b。然后使用 docker compose down && docker compose pull && docker compose up -d 重启,并使用 docker compose logs -f 查看日志。仅在使用真实的 OpenAI provider 或 OpenAI 反向代理时,才同时设置 OPEN_AI_KEY 和 OPEN_AI_SERVER_URL。