Commit Graph

230 Commits

Author SHA1 Message Date
lintsinghua 58c918f557 feat(agent): implement streaming support for agent events and enhance UI components
- Introduce streaming capabilities for agent events, allowing real-time updates during audits.
- Add new hooks for managing agent stream events in React components.
- Enhance the AgentAudit page to display LLM thinking processes and tool call details in real-time.
- Update API endpoints to support streaming event data and improve error handling.
- Refactor UI components for better organization and user experience during audits.
2025-12-11 20:33:46 +08:00
lintsinghua a43ebf1793 refactor(agent): update task completion fields and enhance status handling
- Rename 'finished_at' to 'completed_at' in AgentTaskResponse and related functions for clarity.
- Introduce 'RUNNING' status in AgentTaskStatus to better represent task states.
- Update task configuration handling in AgentRunner to improve initialization logic.
- Enhance UI to reflect new 'RUNNING' and 'REPORTING' statuses in the AgentAudit component.
2025-12-11 19:26:47 +08:00
lintsinghua 129112e4d7 refactor(agent): rename metadata fields and enhance task configuration
- Rename 'metadata' columns to 'event_metadata' and 'finding_metadata' for clarity in database schema.
- Update AgentRunner to construct task configuration from task fields, ensuring default values are applied.
- Improve UI to handle potential null values for progress percentage and security score, enhancing user experience.
2025-12-11 19:23:21 +08:00
lintsinghua a33f60bd44 refactor(agent_tasks): streamline task configuration parameters
- Simplify the creation of agent tasks by directly assigning parameters instead of using a config dictionary.
- Set default values for verification level, max iterations, and timeout seconds to enhance usability.
2025-12-11 19:11:09 +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
lintsinghua 7c9b9ea933
Update README.md 2025-12-10 19:36:37 +08:00
lintsinghua ebfe9fa19d style(audit): simplify file selection dialog header layout
- Refactor DialogTitle structure to use flexbox gap instead of nested flex containers
- Consolidate icon, title, and badge into single flex row with improved spacing
- Add ml-auto to badge for automatic right alignment instead of justify-between
- Remove unnecessary nested div wrapper around icon and title text
- Add flex-shrink-0 to icon to prevent scaling in flex layout
- Add pr-8 padding to DialogTitle for better spacing with close button
- Improve code readability and reduce DOM nesting complexity
2025-12-10 19:22:54 +08:00
lintsinghua a995bef28c feat(audit): enhance file selection and exclude patterns UI
- Update demo data to mark running task as completed with audit results
- Add reset to defaults button for exclude patterns in CreateTaskDialog
- Implement quick-add buttons for common exclude patterns (.test., .spec., .min., coverage/, docs/, .md)
- Improve exclude patterns input with better placeholder text and visual feedback
- Refactor FileSelectionDialog with tree-based folder structure for better file organization
- Add file type icons (code files, config files, generic files) for improved visual distinction
- Implement folder expansion/collapse functionality with chevron indicators
- Add file filtering by extension and search capabilities
- Enhance UI with better spacing, visual hierarchy, and user guidance
- Improve accessibility with proper icon imports and component organization
2025-12-10 19:20:31 +08:00
lintsinghua b872dc63fe Merge branch 'v2.0.0-test' of https://github.com/lintsinghua/XCodeReviewer into v2.0.0-test 2025-12-10 18:46:48 +08:00
lintsinghua b0861c1690 feat(file-selection): add custom exclude patterns for file filtering
- Add exclude_patterns parameter to get_project_files endpoint for custom file filtering
- Support JSON-formatted exclude patterns array in API requests
- Integrate custom exclude patterns into ZIP and repository file scanning workflows
- Update should_exclude and is_text_file functions to support user-defined patterns
- Pass exclude_patterns through scan configuration in both scan_zip and scan_stored_zip endpoints
- Add ScanRequest model field for exclude_patterns to support pattern specification
- Implement file filtering logic that respects both default and custom exclusion rules
- Add comprehensive unit and E2E tests for file selection and exclusion pattern functionality
- Enable users to customize which files are scanned by specifying glob patterns like ["node_modules/**", "*.log"]
2025-12-10 18:46:33 +08:00
lintsinghua 51df124df6
Update README.md 2025-12-10 18:16:57 +08:00
lintsinghua a4b7efb1c9 fix(rules): fix unicode encoding error in rule set export filename
Use RFC 5987 filename*=UTF-8'' format for Content-Disposition header to support Chinese characters in exported filename
2025-12-10 17:43:56 +08:00
lintsinghua 82b9733e92 docs: enhance README with audit rules and prompt manager features
- Add new feature showcase section for audit rules management and prompt templates
- Include screenshots for audit rules and prompt manager UI components
- Restructure core capabilities section using table format for better readability
- Update instant analysis description to reflect file upload capability
- Convert LLM platforms section to table format with platform categories
- Add API relay station note for network accessibility
- Reorganize documentation links into table format with descriptions
- Update configuration documentation reference to include audit rules and prompt templates
- Add CHANGELOG.md to documentation links
- Improve visual hierarchy and information organization throughout README
2025-12-10 00:45:11 +08:00
lintsinghua d89b3c91d6 docs: update version to 2.0.0-beta.7 and add detailed prompt/rules documentation
- Update version to 2.0.0-beta.7 in package.json, pyproject.toml, README.md
- Add audit rules and prompt templates to core features in README
- Remove 'custom rules' from roadmap (now implemented)
- Add comprehensive documentation for audit rules configuration
- Add complete system prompt examples and architecture explanation
- Document all built-in rule sets (OWASP Top 10, Code Quality, Performance)
- Document all built-in prompt templates with full content
- Add prompt composition structure diagram
2025-12-09 23:45:08 +08:00
lintsinghua d84f4074f8 feat(audit): auto-select default rule sets and prompt templates
- Auto-select default rule set on dialog load, fallback to first item if no default exists
- Auto-select default prompt template on dialog load, fallback to first item if no default exists
- Remove empty option from rule set and prompt template selectors
- Update placeholder text from "默认规则" to "选择规则集" and "默认提示词" to "选择提示词模板"
- Add visual indicator "(默认)" badge to default items in dropdown lists
- Update label text from "提示词" to "提示词模板" for clarity
- Add ruleSets and promptTemplates to useEffect dependency array to maintain default selections on dialog reopen
- Improve UX by ensuring users always have a valid selection without manual intervention
2025-12-09 23:27:53 +08:00
lintsinghua 11107ea455 feat(analysis): unify code analysis workflow with default template support
- Consolidate instant analysis to always use analyze_code_with_rules method
- Add use_default_template parameter to automatically select database default template when none specified
- Implement fallback logic to use hardcoded defaults only when no database template available
- Auto-select default prompt template on frontend page load
- Add visual labels for language and template selection dropdowns
- Improve template selector UX by removing empty default option and showing default indicator
- Simplifies analysis flow by removing conditional branching between analyze_code and analyze_code_with_rules
2025-12-09 23:13:06 +08:00
lintsinghua 4d71ed546a feat(prompts-scan): integrate prompt templates and audit rules into scan and analysis workflows
- Add user configuration retrieval with LLM API key decryption in prompt testing endpoint
- Support output language parameter in prompt template testing
- Integrate rule sets and prompt templates into ZIP file scanning process
- Add rule_set_id and prompt_template_id parameters to ScanRequest model
- Implement analyze_code_with_rules method for custom rule-based code analysis
- Add prompt_template_id support to instant analysis endpoint
- Update scan configuration to include rule set and prompt template selection
- Enhance error handling and logging in prompt testing with traceback output
- Extend InstantAnalysisRequest with optional prompt template ID parameter
- Add test code samples utility for prompt template validation
2025-12-09 23:03:08 +08:00
lintsinghua 357b9cc0a7 feat(prompts-rules): add prompt templates and audit rules management
- Add database migration (004) to create prompt_templates, audit_rule_sets, and audit_rules tables with proper indexes
- Create PromptTemplate and AuditRule models with relationships and validation
- Implement prompt template API endpoints for CRUD operations and testing
- Implement audit rules API endpoints for CRUD operations and rule set management
- Add prompt and rules schemas for request/response validation
- Create prompt template initialization service with default system templates
- Integrate LLM service with prompt template system for dynamic prompt selection
- Add frontend pages for PromptManager and AuditRules management
- Add API client utilities for prompts and rules endpoints
- Update API router to include new prompts and rules endpoints
- Update database initialization to seed default templates and rules
- Update sidebar navigation to include new management pages
- Update frontend routes to support new prompt and rules management pages
2025-12-09 21:42:00 +08:00
lintsinghua 4f0e8a2982 refactor(llm): simplify model name formatting logic in LiteLLMAdapter
- Remove redundant check for CUSTOM_BASE_URL_PROVIDERS
- Consolidate model name prefix logic into single code path
- Move prefix retrieval after model name validation
- Improve code clarity by eliminating unnecessary conditional branches
- Maintain backward compatibility with existing model name formats
2025-12-09 21:13:14 +08:00
lintsinghua 14b7c8cccc fix: 修复时间显示问题,使用带时区的UTC时间
- 将所有 datetime.utcnow() 替换为 datetime.now(timezone.utc)
- 修复 completed_at, started_at, updated_at, resolved_at 等时间字段
- 修复 JWT token 过期时间计算
- 修复数据导出和ZIP上传时间戳
- 调整README中项目管理和审计报告图片显示比例
2025-12-09 17:47:34 +08:00
lintsinghua 4f95f65645 chore(assets): update logo image without background
- Replace logo_nobg.png with optimized version
- Improve image quality and visual consistency
- Update static assets for frontend display
2025-12-09 16:03:16 +08:00
lintsinghua 4eb81a5bca fix(scan): normalize file paths for cross-platform compatibility
- Add normalize_path() utility function to convert backslashes to forward slashes
- Ensure consistent path separators across Windows, Unix, and Mac platforms
- Apply path normalization to relative paths extracted from ZIP files
- Normalize target file paths before matching against scan configuration
- Update file filtering logic to use normalized path set for accurate matching
- Add inline comments explaining cross-platform path handling requirements
2025-12-09 15:38:17 +08:00
lintsinghua f14c175ce7
Enhance README with dashboard and analysis sections
Added visual elements and analysis features to README.
2025-12-08 23:29:51 +08:00
lintsinghua 5241936b36
Update README.md 2025-12-08 23:29:09 +08:00
lintsinghua 582e8b1dca
Update title in README.md from '代理' to '专家' 2025-12-08 22:58:54 +08:00
lintsinghua 2f751bd082
Update README.md 2025-12-08 22:58:38 +08:00
lintsinghua 5d740ec8bb
Update section title in README.md 2025-12-08 22:57:53 +08:00
lintsinghua c52762823c
Update README.md 2025-12-08 22:56:41 +08:00
lintsinghua 195d208078
Update README.md 2025-12-08 22:52:11 +08:00
lintsinghua f2d29efa1e
Update README.md 2025-12-08 21:51:10 +08:00
lintsinghua 3a297dda3f feat: add json-repair library as fallback for LLM response parsing
- Add json-repair>=0.30.0 to dependencies
- Add _repair_json_with_library method as final fallback in JSON parsing
- Update version to 2.0.0-beta.6
2025-12-08 21:45:58 +08:00
lintsinghua 4fa99b7615 Merge remote branch and resolve conflict: rename XCodeReviewer to DeepAudit 2025-12-08 21:36:28 +08:00
lintsinghua e856ad1a8d chore: rebrand XCodeReviewer to DeepAudit across all files
- Update project name from XCodeReviewer to DeepAudit in CI/CD workflows
- Replace Docker image names and release artifact naming conventions
- Update GitHub repository references in documentation files
- Modify database names and container names in setup instructions
- Update contributor badge and issue tracker links
- Rename frontend logo file from logo_deepaudit.png
- Update environment configuration examples and documentation
- Rebrand all references in CONTRIBUTING.md, DISCLAIMER.md, and README.md
- Update backend configuration and deployment documentation
- Ensure consistent naming across frontend and backend configurations
2025-12-08 21:35:09 +08:00
lintsinghua b018525d29
更新 README.md 2025-12-07 18:48:51 +08:00
lintsinghua d190ff4312
Update README.md 2025-12-06 21:32:22 +08:00
lintsinghua e9115af786
Update README.md 2025-12-06 21:29:17 +08:00
lintsinghua 575ab212b8 docs: enhance README with improved star history visualization and analytics
- Replace centered star history chart with dedicated "📈 项目统计" section
- Add dark mode support for star history chart using picture element with media queries
- Include Repobeats analytics embed for repository insights and activity tracking
- Improve visual presentation and accessibility of project statistics
- Better organize documentation structure for improved readability
2025-12-06 21:27:35 +08:00
lintsinghua 293d3018df chore: bump version to 2.0.0-beta.5 2025-12-06 21:22:36 +08:00
lintsinghua 40bd35ab08 feat(scanner): add file skipping logic and enhanced debug logging
- Add skipped_files counter to track empty and oversized files
- Implement file content validation to skip empty files
- Add file size check to skip files exceeding MAX_FILE_SIZE_BYTES limit
- Add detailed debug logging for file fetching, LLM analysis, and completion
- Add comprehensive error logging with traceback information for failed files
- Improve task status determination logic to distinguish between skipped files and LLM failures
- Mark tasks as completed when all files are empty/skipped instead of failing
- Update error messages to show actual failed file count instead of total files
- Enhance observability during code analysis workflow with emoji-prefixed status messages
2025-12-06 21:21:36 +08:00
lintsinghua cd80517f2d fix(llm): add debug logging for custom API base URL configuration
- Add debug print statement to log custom API base URL when configured
- Improves troubleshooting and visibility into LiteLLM adapter initialization
- Helps developers verify correct API endpoint configuration during runtime
2025-12-06 20:59:42 +08:00
lintsinghua 07810b309c feat(audit): refactor task creation with file selection and advanced options
- Add FileSelectionDialog component for granular file selection in audit tasks
- Extract task form logic into useTaskForm and useZipFile custom hooks
- Create modular components: BasicConfig, AdvancedOptions, ExcludePatterns, ProjectSelector, ZipFileSection
- Add file listing endpoint GET /projects/{id}/files with branch support
- Add branch listing endpoint GET /projects/{id}/branches for repository projects
- Implement ScanRequest model with file_paths, exclude_patterns, and branch_name fields
- Update scan endpoint to accept selective file scanning and exclude patterns
- Add branch_name and exclude_patterns fields to AuditTask model
- Enhance scanner service with GitHub and GitLab file/branch retrieval functions
- Improve CreateTaskDialog with better UX for repository and ZIP file scanning
- Support per-scan configuration storage in audit tasks
- Refactor repository scan services to handle file selection and branch parameters
2025-12-06 20:47:28 +08:00
lintsinghua 33c4df9645 refactor: 优化 Docker 部署配置
- 后端使用 uv 管理依赖,镜像内包含所有依赖
- 前端使用生产构建 + serve 提供静态文件
- 添加 WeasyPrint 完整系统依赖
- 修复 PDF 报告 Logo 显示问题
- 添加 .dockerignore 优化构建
- 更新部署文档和 GitHub Actions 工作流
- 前端端口从 5173 改为 3000
2025-12-05 20:51:22 +08:00
lintsinghua db3d8fd9f8 fix: 修复数据库初始化顺序问题
- docker-compose 启动时先运行 alembic upgrade head
- 优化数据库表不存在时的错误提示
2025-12-05 19:32:20 +08:00
lintsinghua d9cd0d73f9
更新 README.md 2025-12-05 15:25:08 +08:00
lintsinghua e3f96aac86
更新 README.md 2025-12-05 15:22:52 +08:00
lintsinghua f982d6a5e6 feat: 添加演示账户和演示数据,完善项目文档
- 添加演示账户 demo@example.com / demo123
- 创建 6 个演示项目和 15 个审计任务
- 完善 DEPLOYMENT.md、CONFIGURATION.md、LLM_PROVIDERS.md、FAQ.md 文档
- 更新 CONTRIBUTING.md、SECURITY.md、DISCLAIMER.md
- 前端版本号自动从 package.json 读取
- 仪表盘项目概览显示 6 个项目
- 版本号更新为 2.0.0-beta.3
2025-12-05 15:09:39 +08:00
lintsinghua 1550e51662
Add footer with creator information to README
Added a footer message indicating the creator of the project.
2025-12-05 14:40:54 +08:00
lintsinghua 4091e3ed13
Update README.md 2025-12-05 14:40:00 +08:00
lintsinghua 4f8823c584
Update README.md 2025-12-05 14:39:30 +08:00
lintsinghua 50d9d71f90 docs: expand contributing guidelines and improve documentation structure
- Restructure CONTRIBUTING.md with comprehensive sections including code of conduct, development setup, and PR workflow
- Add detailed environment requirements table with version specifications and descriptions
- Include step-by-step backend and frontend setup instructions with database initialization
- Document code standards for both Python (Ruff, mypy) and TypeScript (Biome) with example commands
- Add conventional commits specification with type definitions and practical examples
- Provide complete PR process guide from forking through code review
- Include project structure diagram for better navigation
- Expand DISCLAIMER.md with improved formatting, tables, and clearer responsibility sections
- Add AI analysis limitations and technical constraints documentation
- Update SECURITY.md with enhanced security guidelines
- Refresh backend/env.example and frontend/.env.example with current configuration options
- Create new docs/ARCHITECTURE.md for system design documentation
- Update docs/CONFIGURATION.md, docs/DEPLOYMENT.md, docs/FAQ.md, and docs/LLM_PROVIDERS.md with improved clarity and structure
- Improve overall documentation consistency and user experience across all guides
2025-12-05 14:37:07 +08:00