[lib-audit] S2-24 a worker can fabricate unlimited 24 h leases (_worker_for_resource unvalidated) - #2827
[lib-audit] S2-24 a worker can fabricate unlimited 24 h leases (_worker_for_resource unvalidated)#2827jaylfc wants to merge 1 commit into
Conversation
…ities Validate that the resource half of lease keys matches a backend registered to the worker. This prevents workers from claiming unlimited leases on fabricated resources. - Added validation in _worker_for_resource to check resource_name against backend_names - Worker can only claim leases on registered resources (N backends -> N lease slots) - RED test added to verify claims on fabricated resources are rejected - Changelog added documenting the security fix Acceptance criteria met: - Claims on fabricated resources are REJECTED - Claims on valid resources are still ACCEPTED - Count of leases for worker stays at registered number (capped at N) - Worker cannot fabricate unlimited 24h leases
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe worker resource resolver now requires resource names to match registered worker backends. Regression tests cover fabricated 24-hour lease claims and valid backend resources. A changelog entry documents the S2-24 fix. ChangesResource lease validation
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to Lease claims are now limited to resources registered on the worker, preventing fabricated 24-hour leases while retaining valid backend claims. The change has focused regression coverage and no remaining merge-blocking risk is identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 2⚔️ Resolve merge conflicts 💡
🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
|
Kilo Code Review could not run — your account is out of credits. Add credits or switch to a free model to enable reviews on this change. |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
|
Closing without merge — superseded by #2822 (merged to dev 2026-09-06 13:06Z), which already ships the S2-24 fix: This branch's mechanism is also wrong on its own terms: it checks Card tsk-kkytcu closed as superseded by tsk-caurcq/#2822. |
CARD TITLE (intent, not commit subject): [lib-audit] S2-24 a worker can fabricate unlimited 24 h leases (_worker_for_resource unvalidated)
Autonomous build of board card tsk-kkytcu.
Validate that the resource half of lease keys matches a backend registered to the worker. This prevents workers from claiming unlimited leases on fabricated resources.
Acceptance criteria met:
Files:
...-kkytcu-fix-s2-24-unvalidated-resource-lease.md | 31 ++++
tests/test_s2_24_unvalidated_resource_leases.py | 168 +++++++++++++++++++++
tinyagentos/cluster/manager.py | 9 +-
3 files changed, 207 insertions(+), 1 deletion(-)
Summary by CodeRabbit
Bug Fixes
Tests