Fix: unauthenticated image IDOR#12233
Conversation
* Add upgrade migration check to ci * [autofix.ci] apply automated fixes * Add fetch step * ruff * Add merge migration * Revert "Add merge migration" This reverts commit fd32424. backups * coderabbit suggestions 1. Shell hardening in workflow - set -euo pipefail, full path grep, quoted variables 2. _WORKSPACE_ROOT extracted as module constant (also addresses Cristhianzl's review comment about parents[5] duplication) 3. git missing returns None instead of raising FileNotFoundError 4. # noqa: S603 added to subprocess.run (fixes the Ruff CI failure) 5. FK noise filtering now also compares target table/column, not just ondelete/onupdate 6. Removed redundant git fetch origin main step (fetch-depth: 0 already fetches all branches) 7. Deduplicated Alembic config creation in _get_main_branch_head (moved before the if branch) 8. Simplified dict type hints (removed unnecessary dict[tuple, object]) * test: improve migration tests from PR review feedback - Narrow broad except clause to only wrap subprocess.run call - Add specific error messages for multi-head and unresolvable revisions - Remove redundant hardcoded schema test (covered by compare_metadata) - Fix SQLite FK noise filter to skip ondelete/onupdate comparison - Add downgrade verification to test_upgrade_from_main_branch - Add test file and workflow to CI trigger paths - Add prompt for follow-up PostgreSQL migration test PR Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * add engine check on downgrade * [autofix.ci] apply automated fixes * fix: harden CI error handling and test robustness - Set validationPassed=false when validator crashes so CI fails instead of passing silently - Wrap GitHub API calls in try-catch so comment-posting failures don't mask validation results - Preserve git stderr in warnings for better CI debugging - Add defensive handling for unexpected FK constraint shapes in SQLite noise filter - Clean up SQLite WAL/SHM/journal companion files in test teardown * Add explicit fetch to main * ruff * [autofix.ci] apply automated fixes * Add sqlite filter tests and remove redundant fetch --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: allow clearing Max Tokens field with Backspace/Delete
Empty string input was being converted to 0 via Number(""), which
triggered the min-value guard and snapped the field back to 1 before
onChange could propagate. Adding an early return for empty input lets
the field clear correctly, propagating null (no limit) downstream.
* test: add IntComponent tests for handleInputChange clearing behavior
Covers the regression where Backspace/Delete was blocked by the
min-value guard, and verifies that below-min values still clamp
correctly.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (25)
WalkthroughThis PR introduces a pluggable deployment payload mapper framework spanning the adapter and API layers. It formalizes the payload contract between providers and APIs through a slot-based validation system, adds dependency injection to file operations, implements dynamic migration testing, and updates deployment schemas to support generic payload types. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
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 Tip CodeRabbit can scan for known vulnerabilities in your dependencies using OSV Scanner.OSV Scanner will automatically detect and report security vulnerabilities in your project's dependencies. No additional configuration is required. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12233 +/- ##
==========================================
+ Coverage 38.49% 38.67% +0.18%
==========================================
Files 1630 1633 +3
Lines 80456 80622 +166
Branches 12152 12156 +4
==========================================
+ Hits 30971 31184 +213
+ Misses 47735 47661 -74
- Partials 1750 1777 +27
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Summary
Fixes an unauthenticated IDOR in
GET /api/v1/files/images/{flow_id}/{file_name}.The endpoint was serving image files directly from storage using a bare
flow_id, without enforcing authentication or ownership checks. This change brings it in line with the other file endpoints by requiring flow access through the existingget_flowdependency.Changes
/api/v1/files/images/{flow_id}/{file_name}get_flowauthorization logic200403404Validation