Commit Graph

19 Commits

Author SHA1 Message Date
vinland100 6c2a15ad90 Optimize parallel LLM calls while addressing the circular issue in Agent auditing.
Build and Push CodeReview / build (push) Has been cancelled Details
2026-01-09 17:30:18 +08:00
lintsinghua b0f17d50db docs(agent): 添加防止幻觉的验证指南和使用警告
在多个agent文件中添加详细的防止幻觉验证指南,包括:
1. 必须验证文件存在性和代码匹配性
2. 禁止猜测文件路径和行号
3. 知识库示例与实际代码的区分警告
4. 添加语言检测功能以提醒语言不匹配情况
2025-12-19 19:14:23 +08:00
lintsinghua 80704fdcb4 feat(agent): 增强文件路径验证防止幻觉报告
添加文件路径验证规则和检查逻辑,确保漏洞报告中的文件真实存在
移除LLM响应中的Markdown格式标记,统一解析处理
更新报告工具和端点以支持项目根目录验证
2025-12-19 19:08:36 +08:00
lintsinghua 8fe96a83cf feat(agent): 使用用户配置的LLM参数替代硬编码值
重构所有Agent和LLM服务,移除硬编码的temperature和max_tokens参数
添加get_analysis_config函数统一处理分析配置
在LLM测试接口中显示用户保存的配置参数
前端调试面板默认显示LLM测试详细信息
2025-12-19 16:08:26 +08:00
lintsinghua 22b1610825 feat(agent): 新增通用代码执行工具和函数提取工具
添加 RunCodeTool 和 ExtractFunctionTool 用于 LLM 驱动的漏洞验证
放宽沙箱命令限制以支持更灵活的测试
更新验证代理提示词以优先使用动态代码验证
2025-12-18 15:03:30 +08:00
lintsinghua 1b495edb99 feat(agent): 扩展事件管理器的调试日志范围并增强工具调用循环检测
添加 tool_call, tool_result 和 llm_action 到重要事件调试日志
实现智能循环检测机制,当工具重复调用超过3次时进行干预
2025-12-18 01:53:05 +08:00
lintsinghua 6c080fc5d6 feat(agent): 增加漏洞文件统计功能并优化agent提示词
- 在AgentTask模型中添加files_with_findings字段统计有漏洞发现的文件数
- 更新前后端接口和界面展示漏洞文件统计
- 优化各Agent的系统提示词,移除冗余内容并增强工具使用约束
- 增加LLM的max_tokens至8192避免截断
- 添加生产环境docker-compose配置和更新README部署说明
2025-12-16 22:08:45 +08:00
lintsinghua cd79242b3e feat: 一键部署沙箱 + Docker 镜像发布工作流
- docker-compose: 移除沙箱 profiles 配置,支持一键 docker compose up -d
- pyproject.toml: 迁移 dev-dependencies 到 dependency-groups (PEP 735)
- 新增 docker-publish.yml 工作流,支持手动发布镜像(不创建 tag)
- 优化 orchestrator 和 verification agent

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 20:00:00 +08:00
lintsinghua 5974323a71 feat(agent): 实现任务取消和超时处理机制
添加对Agent任务的取消和超时处理支持,包括:
- 在工具执行、子Agent运行和项目初始化阶段检查取消状态
- 为不同工具和Agent类型设置合理的超时时间
- 使用asyncio实现取消检查和超时控制
- 优化取消响应速度,减少资源浪费
2025-12-16 17:31:29 +08:00
lintsinghua cdf360dcf7 feat: 增加文件上传大小限制至500MB并优化大文件处理
增加ZIP文件上传大小限制从100MB到500MB
在agent工具中添加失败调用追踪和自动跳过机制
优化大文件读取性能,支持流式处理指定行范围
2025-12-15 09:21:37 +08:00
lintsinghua c64eddac7c feat(agent): 新增多语言代码测试和漏洞验证工具并增强错误处理
新增 PHP、Python、JavaScript 等多语言代码测试工具和命令注入、SQL 注入等专用漏洞验证工具
优化错误处理逻辑,提供更详细的错误信息和堆栈跟踪
增强 JSON 解析器,优先使用 json-repair 库处理复杂格式
改进 Agent 响应解析逻辑,更健壮地提取思考内容和操作指令
完善沙箱管理器的初始化和错误处理机制
2025-12-14 17:20:54 +08:00
lintsinghua 95929a467b feat(沙箱): 强制使用沙箱验证并增强沙箱功能
- 移除 LLM 模拟验证工具,强制使用沙箱进行漏洞验证
- 增强沙箱容器配置,添加/tmp挂载点
- 扩展沙箱基础镜像,增加多种语言环境支持
- 添加RCE漏洞验证脚本用于测试沙箱功能
- 更新验证Agent的系统提示,明确必须使用沙箱工具
2025-12-14 12:43:44 +08:00
lintsinghua 4e4dd05ddb feat(agent): 增强漏洞发现处理流程和前端兼容性
- 后端添加对旧事件类型'finding'的兼容支持
- 改进漏洞发现标准化和去重逻辑
- 新增PoC生成要求和相关字段
- 优化沙箱配置初始化流程
- 前端添加ADD_FINDING操作和状态管理
- 增强事件流处理和序列号过滤
- 改进历史事件加载和SSE连接逻辑
- 添加漏洞验证状态和PoC信息到报告
2025-12-13 18:45:05 +08:00
lintsinghua 6d98f29fa6 feat: 新增安全工具集成和漏洞知识库扩展
- 添加 Bandit 和 Safety 安全工具到依赖项
- 新增 CSRF、业务逻辑和开放重定向漏洞知识文档
- 实现安全工具一键安装脚本和文档
- 改进模式匹配工具支持直接文件扫描
- 增强遥测模块和 Agent 审计功能
- 修复验证节点中 findings 合并逻辑
- 优化前端 Agent 审计界面和状态展示
2025-12-13 12:35:03 +08:00
lintsinghua f05c0073e1 feat(agent): implement comprehensive agent architecture with knowledge base and persistence layer
- Add database migrations for agent checkpoints and tree node tracking
- Implement core agent execution framework with executor, state management, and message handling
- Create knowledge base system with framework-specific modules (Django, FastAPI, Flask, Express, React, Supabase)
- Add vulnerability knowledge modules covering authentication, cryptography, injection, XSS, XXE, SSRF, path traversal, deserialization, and race conditions
- Introduce new agent tools: thinking tool, reporting tool, and agent-specific utilities
- Implement LLM memory compression and prompt caching for improved performance
- Add agent registry and persistence layer for checkpoint management
- Refactor agent implementations (analysis, recon, verification, orchestrator) with enhanced capabilities
- Remove legacy agent implementations (analysis_v2, react_agent)
- Update API endpoints for agent task creation and project management
- Add frontend components for agent task creation and enhanced audit UI
- Consolidate agent service architecture with improved separation of concerns
- This refactoring provides a scalable foundation for multi-agent collaboration with knowledge-driven decision making and state persistence
2025-12-12 15:27:12 +08:00
lintsinghua 147dfbaf5e feat(agent): enhance streaming with in-memory event manager and fallback polling
- Implement dual-mode streaming: prioritize in-memory EventManager for running tasks with thinking_token support
- Add fallback to database polling for completed tasks without thinking_token replay capability
- Introduce SSE event formatter utility for consistent event serialization across streaming modes
- Add 10ms micro-delay for thinking_token events to ensure proper TCP packet separation and frontend incremental rendering
- Refactor stream_agent_with_thinking endpoint to support both runtime and historical event streaming
- Update event filtering logic to handle both in-memory and database event sources
- Improve logging with debug markers for thinking_token tracking and stream mode selection
- Optimize polling intervals: 0.3s for running tasks, 2.0s for completed tasks
- Reduce idle timeout from 10 minutes to 1 minute for completed task streams
- Update frontend useAgentStream hook to handle unified event format from dual-mode streaming
- Enhance AgentAudit UI to properly display streamed events from both sources
2025-12-12 10:39:32 +08:00
lintsinghua 70776ee5fd feat: Introduce structured agent collaboration with `TaskHandoff` and `analysis_v2` agent, updating core agent logic, tools, and audit UI. 2025-12-11 23:29:04 +08:00
lintsinghua 8938a8a3c9 feat(agent): enhance agent functionality with LLM-driven decision-making and event handling
- Introduce LLM-driven decision-making across various agents, allowing for dynamic adjustments based on real-time analysis.
- Implement new event types for LLM thinking, decisions, actions, and observations to enrich the event streaming experience.
- Update agent task responses to include additional metrics for better tracking of task progress and outcomes.
- Refactor UI components to highlight LLM-related events and improve user interaction during audits.
- Enhance API endpoints to support new event structures and improve overall error handling.
2025-12-11 21:14:32 +08:00
lintsinghua 9bc114af1f feat(agent): implement Agent audit module with LangGraph integration
- Introduce new Agent audit functionality for autonomous code security analysis and vulnerability verification.
- Add API endpoints for managing Agent tasks and configurations.
- Implement UI components for Agent mode selection and embedding model configuration.
- Enhance the overall architecture with a focus on RAG (Retrieval-Augmented Generation) for improved code semantic search.
- Create a sandbox environment for secure execution of vulnerability tests.
- Update documentation to include details on the new Agent audit features and usage instructions.
2025-12-11 19:09:10 +08:00