Commit 13e6549
fix: address all CodeRabbit and PR AutoForgeAI#137 review comments
Security fixes:
- Add path traversal protection in restore_backup (validates paths stay within project)
- Implement copy-then-delete backup approach (prevents data loss on partial failures)
- Add manifest version validation and structure checks
- Fix stale lock recovery with PID/timestamp tracking
API improvements:
- Remove TOCTOU race condition in detach endpoint (rely on detach module's check)
- Add agent lock check to reattach endpoint for consistency
- Change async def to def for blocking I/O endpoints (FastAPI threadpool)
- Return relative backup_path instead of absolute (security)
UI fixes:
- Make is_detached non-optional in ProjectSummary type
- Add loadingLabel prop to ConfirmDialog (fixes hardcoded "Deleting...")
- Add cache invalidations for project-specific queries in detach/reattach
CLI fixes:
- Use mutually exclusive group for --include-artifacts/--no-artifacts
- Add KeyboardInterrupt handling with proper exit code
- Fix import ordering (ruff I001)
Other:
- Fix gitignore substring check to use line-based matching
- Add 53 security tests (path traversal, manifest validation, lock recovery)
- Update CLAUDE.md documentation for detach feature
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent f43e9da commit 13e6549
9 files changed
Lines changed: 559 additions & 122 deletions
File tree
- server
- routers
- ui/src
- components
- hooks
- lib
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
136 | 188 | | |
137 | 189 | | |
138 | 190 | | |
| |||
312 | 364 | | |
313 | 365 | | |
314 | 366 | | |
315 | | - | |
| 367 | + | |
| 368 | + | |
316 | 369 | | |
317 | 370 | | |
318 | 371 | | |
| |||
0 commit comments