Fix P0 security and data correctness bugs#79
Merged
Conversation
… report - Block unknown/unregistered tools in safety checker (was silently allowing) - Restrict paths to working directory when allowed_paths is empty (was permitting all) - Fix TTL unit mismatch: current_timestamp() now returns seconds instead of milliseconds, fixing cache entries expiring 1000x too fast (3.6s vs 1 hour) - Update tests to match new stricter security behavior Fixes 3 of the 12 P0 issues from CONSOLIDATED_BROKEN_IMPLEMENTATIONS_REPORT.md. Several other P0 items verified as already fixed or by-design. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
allowed_pathsis empty — was permitting access to entire filesystemcurrent_timestamp()returned milliseconds but TTL values are in seconds, causing cache to expire 1000x too fast (3.6s instead of 1 hour)Verification
Many other P0 issues from the report were verified as already fixed or by-design:
checkpointing.rs— already usestokio::spawnwithtokio::fsexecution.rsstdin — already usestokio::io::stdinasyncinteractive.rseditor — by design (reedline is synchronous, standard for CLIs)local_first.rsintegration — already integrated into agent executionchat_store.rsencryption — properly fails closed when enabledswarm.rsRwLock — intentional, documented: locks never held across await pointsTest plan
cargo test --lib -- safety::checker local_first— 280 passedcargo test --lib— 7374 passed, 1 pre-existing failure (test_repetition_multiple_tools_in_batch)🤖 Generated with Claude Code