Commit 79658d7
Fix CRITICAL production safety issues from CodeRabbit PR #266
CRITICAL FIXES (Priority 1 - Production Safety):
1. Docker dev stack target mismatch (rails-8-docker-deployment-production-guide.md)
- Changed web and worker services from 'target: production' to 'target: base'
- Fixes: Dev environment building production image breaks hot-reload/tooling
- Impact: Development workflow now uses correct base image
2. Invalid docker-compose rollback command (rails-8-docker-deployment-production-guide.md)
- Replaced non-existent 'docker-compose rollback' with tag-based rollback
- Fixes: Rollback procedure that wouldn't work in production
- Impact: Production rollback now uses proper docker tag reversion
3. SECURITY: Credentials leak via redirect params (rails-8-authentication-generator-devise-migration.md)
- Changed redirect_to rails8_session_path(params: params) to only forward email
- Fixes: Passwords/emails exposed in URL/logs during authentication redirect
- Impact: Prevents credential leakage in production logs and URLs
4. Rake task mutates production passwords (rails-8-authentication-generator-devise-migration.md)
- Replaced password mutation with read-only digest format validation
- Fixes: Task permanently corrupts production user credentials
- Impact: Validation now checks digest format without writing user data
5. Cache warmer uses KEYS blocking Redis (rails-8-solid-cache-performance-redis-migration.md)
- Replaced redis.keys('*') with cursor-based SCAN batching
- Fixes: KEYS command blocks Redis in production during cache warming
- Impact: Non-blocking cache warming via SCAN iteration
6. uses_redis_specific_features? uses KEYS (rails-8-solid-cache-performance-redis-migration.md)
- Replaced redis.keys('*') with cursor-based SCAN iteration
- Fixes: KEYS command blocks Redis during feature detection
- Impact: Non-blocking feature detection via SCAN
Tests: All critical tests passing (bin/rake test:critical)
Reference: CodeRabbit PR #266 review feedback
Methodology: XP pair programming (coder + reviewer)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 87cba8e commit 79658d7
3 files changed
Lines changed: 61 additions & 32 deletions
Lines changed: 10 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
819 | 819 | | |
820 | 820 | | |
821 | 821 | | |
822 | | - | |
| 822 | + | |
| 823 | + | |
823 | 824 | | |
824 | 825 | | |
825 | 826 | | |
| |||
904 | 905 | | |
905 | 906 | | |
906 | 907 | | |
907 | | - | |
| 908 | + | |
908 | 909 | | |
909 | 910 | | |
910 | 911 | | |
911 | | - | |
912 | | - | |
913 | | - | |
914 | | - | |
915 | | - | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
916 | 919 | | |
917 | 920 | | |
918 | 921 | | |
| |||
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
| 314 | + | |
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
| 346 | + | |
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
| |||
552 | 552 | | |
553 | 553 | | |
554 | 554 | | |
555 | | - | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
556 | 559 | | |
557 | 560 | | |
558 | 561 | | |
| |||
Lines changed: 45 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
338 | | - | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
339 | 352 | | |
340 | 353 | | |
341 | 354 | | |
| |||
478 | 491 | | |
479 | 492 | | |
480 | 493 | | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
492 | 498 | | |
493 | | - | |
| 499 | + | |
494 | 500 | | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
501 | 521 | | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
502 | 525 | | |
503 | 526 | | |
504 | | - | |
| 527 | + | |
505 | 528 | | |
506 | 529 | | |
507 | | - | |
| 530 | + | |
508 | 531 | | |
509 | 532 | | |
510 | 533 | | |
| |||
0 commit comments