Commit 18be364
committed
fix: Critical security and reliability fixes for integration tests
Security Fixes:
- CRITICAL: Fixed shell injection vulnerability in Claude Code CLI provider
- Replaced exec() with execFile() to prevent command injection
- Arguments now passed as array instead of interpolated string
Type Safety:
- Renamed TestResult to IntegrationTestResult to avoid namespace collision
- Prevents conflicts with core test framework types
Data Integrity:
- Added input validation in cost tracker (prevents NaN/negative/Infinity)
- Fixed JSON export with explicit Date serialization and error handling
- Added overflow checks for token counts exceeding MAX_SAFE_INTEGER
Error Handling:
- Added try-catch in anthropic-api.ts buildSystemPrompt()
- Configuration errors now properly reported with descriptive messages
Testing Infrastructure:
- Added integration test support for Anthropic API provider
- Added integration test support for Claude Code CLI provider
- Added cross-provider consistency testing (47 test cases per provider)
- Implemented cost tracking and reporting for API usage
Documentation:
- Consolidated temporary docs into PLAN (archived)
- Updated README with current status and testing overview
- Added CHANGELOG.md with version history
- Kept only README.md, TESTING.md, and CHANGELOG.md active
Files Changed:
- test/integration/providers/* - Multi-provider architecture (383 lines)
- test/integration/fixtures/* - 47 comprehensive test cases (270 lines)
- test/integration/utils/* - Cost tracking utility (150 lines)
- test/integration/suites/* - AVA test suites (285 lines)
Verification: Build passes, 15/15 structure tests passing
Known Issues: 11 minor test isolation improvements pending (~2.5 hours work)
See ~/.claude/plans/cozy-discovering-badger.md for complete tracking1 parent 590191e commit 18be364
21 files changed
Lines changed: 2391 additions & 400 deletions
File tree
- plugins/ui5-guidelines
- test
- config
- integration
- fixtures
- providers
- suites
- utils
- lib
- suites
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
10 | 16 | | |
11 | 17 | | |
12 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
255 | 257 | | |
256 | 258 | | |
257 | 259 | | |
258 | | - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
259 | 279 | | |
260 | 280 | | |
261 | 281 | | |
262 | 282 | | |
263 | 283 | | |
264 | 284 | | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
265 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
266 | 295 | | |
267 | 296 | | |
268 | | - | |
| 297 | + | |
269 | 298 | | |
270 | | - | |
271 | | - | |
272 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
273 | 302 | | |
274 | 303 | | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | 304 | | |
282 | 305 | | |
283 | 306 | | |
284 | | - | |
285 | | - | |
286 | | - | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
287 | 319 | | |
288 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
289 | 330 | | |
290 | 331 | | |
291 | 332 | | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
296 | 337 | | |
297 | 338 | | |
298 | | - | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
299 | 345 | | |
300 | 346 | | |
301 | 347 | | |
| |||
0 commit comments