-
-
Notifications
You must be signed in to change notification settings - Fork 1k
fix(security): Merge abandoned security fixes from fix/small-fixes-all-around #741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ze.py in extraResources
…subprocess communication - Created test-agent-subprocess.cjs following verify-python-bundling.cjs patterns - Tests Python subprocess spawn, imports, and Claude SDK initialization - Simulates agent-process.ts environment setup (PYTHONPATH, PYTHONUNBUFFERED, etc.) - Measures initialization timing to diagnose .exe timeout issues - Provides detailed diagnostics for package location and import failures - Includes 10s timeout detection to catch hanging processes - Outputs actionable debugging steps for .exe vs dev comparison
…kaged Windows .exe - Add explicit stdio: 'pipe' configuration (pattern from python-env-manager.ts) - Add windowsHide: true to prevent console popup windows in packaged builds - Fixes buffering issues that cause agent initialization timeouts in .exe - Follows spawn patterns from python-env-manager.ts (lines 244, 315, 367)
…ntation and script - Created PowerShell verification script (verify-windows-build.ps1) that checks: - Build directory structure - Python executable presence - site-packages directory and contents - sitecustomize.py existence - All required packages (dotenv, anthropic, graphiti_core, claude_agent_sdk) - Python imports work correctly - sys.path includes bundled packages - Created comprehensive verification guide (WINDOWS_BUILD_VERIFICATION.md): - Step-by-step build and verification instructions - Package structure documentation - Manual testing procedures - Common issues and troubleshooting - Success criteria checklist - Downloaded Windows Python runtime to python-runtime/win-x64/ - Manually copied sitecustomize.py to Windows runtime (cross-platform build limitation) NOTE: Actual Windows .exe build verification requires Windows or CI/CD environment. macOS cannot execute Windows .exe files. All configuration changes are in place: ✓ package.json extraResources: bundles to python/Lib/site-packages ✓ sitecustomize.py: generated and bundled ✓ Windows Python runtime: downloaded with correct structure ✓ All previous fixes (subtasks 1-1 through 2-4): committed Ready for Windows testing using provided verification script and documentation.
…n and automation - Created comprehensive E2E test documentation (E2E_SPEC_CREATION_TEST.md): - Detailed step-by-step manual test procedure for Windows .exe verification - 5 verification steps: Launch .exe, Create task, Wait for Planning, Verify spec.md, Check logs - Success/failure criteria with specific actionable checks - Troubleshooting guide for timeout errors, missing spec.md, and import failures - Reporting guidelines for test results with required diagnostic information - Platform limitation notes (macOS/Linux cannot run Windows .exe) - Created PowerShell automation script (test-e2e-spec-creation.ps1): - Pre-test phase: Validates build structure, Python runtime, packages, imports - Post-test phase: Verifies spec.md creation, validates content and required sections - Color-coded pass/fail output for easy interpretation - Automated next steps and troubleshooting recommendations - Exit codes for CI/CD integration (0=pass, 1=fail) - Created comprehensive testing guide (TESTING_GUIDE.md): - Quick start workflow for Windows testers - Documentation index linking all test resources - Script index with usage examples - Testing phases overview (shows progress: Phase 1✓, Phase 2✓, Phase 3 in progress) - Common test scenarios with complete step-by-step instructions - Success criteria summary aligned with spec requirements - CI/CD integration examples for automated testing - Platform limitations and workarounds PLATFORM LIMITATION: - macOS environment cannot execute Windows .exe files - All test documentation, automation, and procedures are complete - Actual E2E testing requires Windows environment or Windows CI/CD - All code fixes from previous subtasks (1-1 through 2-4) are committed and ready This subtask provides complete testing infrastructure for Windows testers to verify the Planning timeout fix. Ready for Windows-based E2E verification.
Regression testing completed successfully: - Unit tests: 1195/1201 passed (48 test files) - TypeScript compilation: No errors - Build process: All artifacts built successfully - Code review: Changes follow existing patterns All Windows .exe fixes verified safe for development mode: - package.json changes only affect packaged builds - agent-process.ts changes follow python-env-manager.ts patterns - Backend logging additions are debug-level only Risk Assessment: LOW - No regressions detected Status: Ready for Windows .exe testing and merge Created REGRESSION_TEST_REPORT.md with full test results
…tection Repositories can get incorrectly marked with bare=true while still having source files, causing all merge operations to fail with "must be run in a work tree" errors. Changes: - Add fixMisconfiguredBareRepo() to detect and auto-fix repos with bare=true that have source files (package.json, apps/, src/) - Add isGitWorkTree() helper to check working tree status - Wrap git status/diff calls with bare repo detection as fallback - Improve hasConflicts detection with specific regex patterns to avoid false positives from debug output like "files_with_conflicts: 0" - Fix task status calculation to prevent in_progress from overriding human_review when all subtasks are completed 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Simplifies the onboarding Memory step to match the project settings Memory section structure for a consistent UX across the app. Changes: - Enable memory by default (was disabled) - Add Enable Agent Memory Access toggle with MCP server URL field - Use same Switch-based toggle approach as settings page - Remove complex explanatory cards in favor of simpler info banner - Add Skip button for users who want to configure later - Add graphitiMcpEnabled and graphitiMcpUrl to AppSettings type
Previously, opening a task modal automatically triggered an expensive merge preview operation (1-30+ seconds) that spawned a Python subprocess to check for conflicts. This caused the modal to feel slow and generated many "File X not being tracked" warnings in the console. Now the modal opens instantly, showing a "Check for Conflicts" button. The expensive preview only runs when the user clicks this button. After checking, the button changes to "Merge to Main" / "Stage to Main" (no conflicts) or "Merge with AI" / "Stage with AI Merge" (has conflicts). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
New users get a better first-time experience with persistent memory enabled out of the box. This allows them to benefit from cross-session context without needing to discover and enable the feature manually. They can still disable it if they prefer.
Agents were able to run `git config user.name "Test User"` which broke commit attribution and caused commits to appear from fake identities. Changes: - Add git config validator to security sandbox that blocks user.name, user.email, author.*, and committer.* config changes - Add explicit warnings to coder.md and qa_fixer.md agent prompts - Export new validators from security/validator.py The security sandbox now provides clear feedback explaining why identity changes are blocked and what agents should do instead (use inherited config).
Users selecting the custom API key authentication method should be aware that this option is experimental and may incur significant costs compared to the standard OAuth flow.
The merge preview was analyzing 342 files for tasks that only modified 1 file, taking 10-30 seconds. Root cause: three-dot git diff (A...B) returns files changed on EITHER branch since divergence. Fixes: - Use explicit merge-base with two-dot diff to get only task's changes - Add fast path that skips semantic analysis when 0 commits behind - Change "file not tracked" from WARNING to DEBUG (expected for main's changes) This reduces merge preview time from 10-30s to <1s for simple tasks. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Updates the onboarding wizard to use the simplified MemoryStep component that matches the settings page structure, replacing the old GraphitiStep. - Import MemoryStep instead of GraphitiStep - Remove onSkip prop (MemoryStep has built-in Skip button) - Add MCP settings types (graphitiMcpEnabled, graphitiMcpUrl) to AppSettings
…tion
Previously, worktrees were created from the local branch, which could be
outdated compared to GitHub/remote. This caused issues where the worktree
would be based on old code if the user's local branch was behind origin.
Now the system:
1. Fetches the latest from origin/{base_branch} before creating the worktree
2. Uses origin/{base_branch} as the start point (source of truth)
3. Falls back gracefully to local branch if remote isn't available
This ensures GitHub is truly the source of truth for code while spec files
remain local and git-ignored.
The file merger detected and preserved original line endings (CRLF, CR, LF) for imports but hardcoded \n for functions and other changes. This caused inconsistent line endings in merged files on Windows/legacy systems. Now detects line ending once at start and uses it consistently for all additions (imports, functions, other changes).
The FAST PATH optimization incorrectly assumed that if commits_behind == 0, no conflicts are possible. This was wrong because the evolution tracker maintains data about all active parallel tasks, and other tasks may conflict even when main hasn't moved. Removing the fast path ensures: 1. refresh_from_git() is always called to update evolution data 2. preview_merge() runs semantic analysis to detect cross-task conflicts
Updated the GitHubOrchestrator to check for both new commits and file changes when reviewing pull requests. This ensures that even after a rebase or force-push, the review process continues based on actual file changes. Added corresponding tests to validate behavior in scenarios with no new commits but changed files.
- Remove non-existent memoryDatabase property from AppSettings usage - Use hardcoded 'auto_claude_memory' default in pr-handlers and memory-env-builder - Add missing GitHub API methods to browser-mock (getPR, getWorkflowsAwaitingApproval, approveWorkflow) These fixes resolve pre-commit hook TypeScript errors that were preventing commits.
- Add PR review memory persistence to LadybugDB via query_memory.py - Save comprehensive PR review insights including findings, patterns, and gotchas - Create PRReviewCard component for rich memory visualization - Enhance MemoriesTab with filtering by category (PR, sessions, codebase, patterns) - Add memory type icons, colors, and filter categories - Add workflow approval support for fork PRs (getWorkflowsAwaitingApproval, approveWorkflow) - Update memory-service.ts for packaged app compatibility - Remove pandas dependency from query_memory.py for lighter footprint This enables the AI to learn from PR reviews over time, building a knowledge base of patterns, gotchas, and insights specific to each project.
The follow-up PR reviewer was reading files from the local checkout instead of the PR's actual branch. This caused incorrect analysis when the local repo was on a different branch than the PR being reviewed. Added worktree creation/cleanup to ParallelFollowupReviewer (matching the initial reviewer's behavior) so agents now read from the correct PR state during follow-up reviews.
Security fixes: - Git config validator now fails closed on parse errors (prevents bypass) - Git config blocklist uses exact key matching (prevents false positives) - Symlink protection added to sync_spec_to_source (prevents path traversal) - Plan file write success tracking in recovery handler (prevents silent failures) Code improvements: - Renamed sync_plan_to_source → sync_spec_to_source across all callers - Added i18n translations to MemoryStep onboarding component - Fixed phase_event error handler to avoid nested OSError 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Updated record_discovery and record_gotcha tools to write to both file-based storage (primary) and LadybugDB (secondary) - This ensures real-time discoveries made during coding sessions appear in the Memory UI - Added support for qa_result and historical_context episode types in the frontend constants for future compatibility
When the Electron app runs in development mode with DEBUG=true, this environment variable was being passed to all spawned PTY processes. Claude Code detects DEBUG=true and automatically enables debug mode, causing "Debug mode enabled" messages to appear in all agent terminals. This fix excludes the DEBUG variable from the environment passed to spawned terminals, preventing Claude Code from inheriting it.
…s restarts - Add worktreeConfig field to TerminalProcess and TerminalSession types - Add setTerminalTitle and setTerminalWorktreeConfig IPC channels - Sync title and worktree config changes from renderer to main process - Restore worktreeConfig when restoring terminal sessions - Send TERMINAL_TITLE_CHANGE event for all restored terminals (not just Claude mode) - Validate worktree configs on restore - clear if worktree path no longer exists - Add browser mocks for new terminal API methods This ensures terminal names and worktree associations survive app restarts and hot reloads, while gracefully handling deleted worktrees.
Resolved conflicts: - memory-service.ts: Combined sanitized Python env with site-packages path - OnboardingWizard.tsx: Adopted new PrivacyStep and GraphitiStep from develop
…ss timeouts Address PR review findings: - Block git -c user.name/email=... on ANY git command, not just git config - Fix misleading docstring in detect_line_ending (said "dominant" but used priority) - Add timeout (60s) to worktree._run_git() with TimeoutExpired handling - Add timeout (30s) to batch_commands worktree cleanup with fallback Includes 8 new tests for git identity protection in TestGitIdentityProtection.
- Add timeout=10 to subprocess calls in agents/utils.py - Add timeout=5 to branch verification in workspace_commands.py - Add proper @deprecated JSDoc annotation in settings.ts - Document environment variable limitation in git_validators.py
The terminal-api.ts calls ipcRenderer.setMaxListeners() at import time, but the electron mock was missing this method, causing 19 frontend tests to fail in CI. Added setMaxListeners to both: - src/__mocks__/electron.ts (global mock) - src/__tests__/integration/ipc-bridge.test.ts (test-specific mock)
Previously, CI status was fetched AFTER the AI review completed, so the orchestrator couldn't factor failing CI into its verdict reasoning. This caused confusing outputs where the AI would say "Merge With Changes" but then a separate CI warning was appended. Now CI status is: - Fetched before calling the parallel followup reviewer - Added to FollowupReviewContext as ci_status field - Formatted prominently in the prompt context - Documented in verdict guidelines (failing CI = BLOCKED) The AI orchestrator will now properly reason about CI status and include it in its verdict, e.g. "BLOCKED: 2 CI checks failing (CodeQL, test-frontend)"
…l-around # Conflicts: # apps/frontend/src/main/ipc-handlers/github/pr-handlers.ts
- Fix log injection in app-updater.ts by sanitizing external data before logging (status codes, versions, error messages) - Fix regex injection in bump-version.js by properly escaping all regex metacharacters when building version pattern - Remove unused imports across multiple files: - app-updater.ts: removed unused path import - version-suggester.ts: removed unused path import - config.ts: removed unused app import - agent-events-handlers.ts: removed unused path, getSpecsDir, AUTO_BUILD_PATHS - execution-handlers.ts: removed unused mkdirSync, persistPlanStatusSync - ModelSearchableSelect.tsx: removed unused AlertCircle import - PRDetail.tsx: removed unused formatDate, WorkflowAwaitingApproval, i18n - test_worktree.py: removed unused WorktreeError import - test_project_analyzer.py: removed 4 unused command constant imports - test_finding_validation.py: removed unused PRReviewResult, MergeVerdict imports - Prefix unused variables with underscore to satisfy eslint 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
The Insights feature was failing with "No handler registered for 'autobuild:source:env:checkToken'" because the handlers for the AUTOBUILD_SOURCE_ENV_* IPC channels were never implemented. Added three handlers to settings-handlers.ts: - AUTOBUILD_SOURCE_ENV_GET: Read source .env config - AUTOBUILD_SOURCE_ENV_UPDATE: Update source .env file - AUTOBUILD_SOURCE_ENV_CHECK_TOKEN: Check if Claude token exists These handlers read/write the .env file in the auto-build source path (apps/backend) to manage the Claude OAuth token needed for ideation and roadmap generation features. Fixes the Claude Authentication dialog appearing even when already authenticated. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
The AUTOBUILD_SOURCE_ENV handlers weren't working correctly in
production (installed app) because:
1. Path detection was wrong - backend is at process.resourcesPath/backend
not relative to appPath. Fixed to check the correct extraResources
location first.
2. The .env file is excluded from the bundle (see electron-builder config).
In production, we now store the source .env in app.getPath('userData')/backend/
which is a writable location.
3. Added fallback to globalClaudeOAuthToken from app settings. Users can
configure the token in Settings > API Configuration and it will work
even without a source .env file.
This ensures the Insights feature works correctly both in development
mode (using apps/backend/.env) and in installed versions (using
userData/backend/.env or global settings).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Fix unused variables in memory.py (loop, future) by removing intermediate variable assignments - Fix unused pythonEnv in memory-service.ts by using it directly - Fix unused prNumberStr in useGitHubPRs.ts by iterating values only - Add comprehensive test coverage for validate_git_config - Export validate_git_config and validate_git_command from security module - Fix validate_git_config to allow read operations (--get, --list) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- app-updater.ts: Strengthen statusCode sanitization with numeric validation - app-updater.ts: Sanitize JSON parse error before logging - bump-version.js: Replace regex with string-based changelog search to eliminate regex injection concerns from command-line version input 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
…d import - agents/__init__.py: Add explicit import for sync_spec_to_source (CodeQL static analysis doesn't recognize __getattr__ dynamic exports) - test_worktree.py: Remove unused WorktreeInfo import 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Replace existsSync + readFileSync pattern with try/catch around readFileSync to prevent file system race condition (TOCTOU) when reading and writing the source env file. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis comprehensive PR refactors core agent utilities by renaming Changes
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes This is a substantial, multifaceted PR spanning backend agent utilities, security validators, file merger logic, PR workflow orchestration, terminal UI refactoring with drag-and-drop, memory integration, worktree management, and comprehensive i18n updates. The changes exhibit high logic density (merge-base git logic, worktree handling, security validation, UI state management), broad system impact (frontend, backend, core infrastructure), significant interdependencies (terminal↔main process, PR review↔memory, agent↔security), and diverse change patterns requiring separate reasoning for each subsystem. Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing touches
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (119)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @AndyMik90, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request integrates a substantial set of previously unmerged changes, primarily focusing on security, stability, and user experience. It addresses critical vulnerabilities related to Git identity manipulation and log injection, while also refining the core agent workflow for worktree synchronization and PR review processes. The enhancements extend to the frontend, providing a more robust and responsive user interface for managing terminals and reviewing pull requests, with a particular emphasis on memory persistence and CI integration. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces significant enhancements across the backend and frontend, focusing on improved Git integration, memory management, and GitHub PR review capabilities. Key backend changes include renaming sync_plan_to_source to sync_spec_to_source and expanding its functionality to sync all spec-related files, not just the implementation plan. Git operations now incorporate timeouts and use git merge-base for more accurate change detection in worktrees, and a new comprehensive Git validator prevents agents from modifying user identity configurations. Memory tools in the backend now support dual-storage, saving discoveries and gotchas to both file-based storage and Graphiti/LadybugDB. The GitHub PR review process has been updated to factor in CI status (including workflows awaiting approval for fork PRs) into the verdict, and the frontend now saves PR review insights to the memory layer. Frontend changes also include adding minimatch for improved glob pattern matching in Git worktree detection, refining terminal session management with worktree validation and auto-removal of exited terminals, and enhancing the UI for agent profile selection and memory browsing with new filtering options. A review comment highlighted a potential TOCTOU race condition in .env file updates and suggested using proper-lockfile for atomic operations. Another comment recommended clarifying the scope of validate_git_commit by removing its alias and directly using validate_git_command for better code clarity.
| try { | ||
| const { sourcePath, envPath } = getSourceEnvPath(); | ||
|
|
||
| if (!sourcePath || !envPath) { | ||
| return { | ||
| success: false, | ||
| error: 'Auto-build source path not configured. Please set it in Settings.' | ||
| }; | ||
| } | ||
|
|
||
| // Read existing content or start fresh (avoiding TOCTOU race condition) | ||
| let existingVars: Record<string, string> = {}; | ||
| try { | ||
| const content = readFileSync(envPath, 'utf-8'); | ||
| existingVars = parseEnvFile(content); | ||
| } catch (_readError) { | ||
| // File doesn't exist or can't be read - start with empty vars | ||
| // This is expected for first-time setup | ||
| } | ||
|
|
||
| // Update with new values | ||
| if (config.claudeOAuthToken !== undefined) { | ||
| existingVars['CLAUDE_CODE_OAUTH_TOKEN'] = config.claudeOAuthToken; | ||
| } | ||
|
|
||
| // Generate content | ||
| const lines: string[] = [ | ||
| '# Auto Claude Framework Environment Variables', | ||
| '# Managed by Auto Claude UI', | ||
| '', | ||
| '# Claude Code OAuth Token (REQUIRED)', | ||
| `CLAUDE_CODE_OAUTH_TOKEN=${existingVars['CLAUDE_CODE_OAUTH_TOKEN'] || ''}`, | ||
| '' | ||
| ]; | ||
|
|
||
| // Preserve other existing variables | ||
| for (const [key, value] of Object.entries(existingVars)) { | ||
| if (key !== 'CLAUDE_CODE_OAUTH_TOKEN') { | ||
| lines.push(`${key}=${value}`); | ||
| } | ||
| } | ||
|
|
||
| writeFileSync(envPath, lines.join('\n')); | ||
|
|
||
| return { success: true }; | ||
| } catch (error) { | ||
| return { | ||
| success: false, | ||
| error: error instanceof Error ? error.message : 'Failed to update source env' | ||
| }; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This read-modify-write pattern on the .env file introduces a potential Time-of-check to time-of-use (TOCTOU) race condition. If another process modifies the file between readFileSync and writeFileSync, those changes will be overwritten.
For a local app settings file, this might be a low risk, but for improved robustness, consider using a file lock around the entire read-modify-write block to ensure the operation is atomic. The proper-lockfile package, which is already a dependency, could be used for this.
Example:
import { lock, unlock } from 'proper-lockfile';
// ... inside the handler
try {
await lock(envPath);
// ... read, modify, and write logic here ...
} finally {
await unlock(envPath);
}| # Backwards compatibility alias - the registry uses this name | ||
| # Now delegates to the comprehensive validator | ||
| validate_git_commit = validate_git_command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The alias validate_git_commit = validate_git_command could be misleading for future maintainers. The new validate_git_command is a comprehensive validator that checks for more than just commit-related issues (e.g., it blocks -c flags on any git command). The old name validate_git_commit implies it only runs on git commit. Consider removing the alias and updating all call sites to use validate_git_command directly. This would improve clarity and make the validator's scope unambiguous, similar to how validate_git_commit_secrets clearly defines its purpose.
| capture_output=True, | ||
| text=True, | ||
| timeout=30, | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worktree cleanup timeout exception not handled
Medium Severity
The _cleanup_pr_worktree method uses subprocess.run with timeout=30 but doesn't catch subprocess.TimeoutExpired. If the git worktree remove command times out, the exception propagates up and the shutil.rmtree fallback is never executed. Since cleanup is called in a finally block, a timeout exception could mask the original error from the review and leave temporary worktree directories on disk.
Summary
This PR contains 53 commits that were made to
fix/small-fixes-all-aroundafter PR #645 was merged. These commits include critical security fixes that never made it to develop.Critical Security Fixes Included
455506bb- fix(security): eliminate TOCTOU race condition in settings-handlers202fd5d4- fix(security): address CodeQL log-injection and regex-injection alertsf0af583b- fix: address CodeQL security alerts3b1a3899- fix(security): block git identity bypass via -c flag and add subprocess timeouts5a20e678- fix(security): block agents from modifying git user identityWhy This Matters
The missing
5a20e678fix is why commits on PR #732 showed "Test User" instead of the correct git identity. An AI agent rangit config user.name "Test User"without being blocked because the security validator wasn't in the codebase.Other Fixes Included
How This Happened
PR #645 was merged on Jan 5 at 12:13 UTC, but development continued on the branch afterward. Those additional commits were never merged back to develop.
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
Improvements
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.