fix: backport remaining security and runtime hardening updates#22
Merged
bitifirefly merged 4 commits intodevelopfrom Mar 22, 2026
Merged
fix: backport remaining security and runtime hardening updates#22bitifirefly merged 4 commits intodevelopfrom
bitifirefly merged 4 commits intodevelopfrom
Conversation
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
This PR completes the remaining high-value upstream backports in one batch.
1) Filesystem path-boundary security
startswith()path boundary checks withPath.relative_to()workspacevsworkspace_evilbypass shape2) Exec tool hardening + config enhancement
tools.exec.pathAppend(default empty)pathAppendthroughAgentLoopandSubagentManagerintoExecToolos.pathsepfor subprocess execution~home paths3) Allowlist/auth hardening
sender_id.split("|")) fromBaseChannel.is_allowedid|usernamematching only inside Telegram with strict shape checks4) Email dedupe stability improvement
Validation
ruff check ...(touched files)pytest -q tests/test_base_channel.py tests/test_tool_validation.py tests/test_exec_security.py tests/test_filesystem_tools_workspace.py tests/test_telegram_send_reply.py tests/test_email_channel.py tests/test_tool_domain_manager.pypytest -q(full suite)Result:
417 passed, 5 warnings