Fixes #1430 Fix: windows security vulnerability and test failures#1424
Closed
Tahir-yamin wants to merge 1 commit intoaden-hive:mainfrom
Closed
Fixes #1430 Fix: windows security vulnerability and test failures#1424Tahir-yamin wants to merge 1 commit intoaden-hive:mainfrom
Tahir-yamin wants to merge 1 commit intoaden-hive:mainfrom
Conversation
- Security: Fixed path traversal vulnerability on Windows in security.py - Tests: Fixed credential tests to match optional Anthropic key design - Tests: Mocked subprocess.run in file system tests for cross-platform compatibility - Tests: Added mocked happy path for web search tool
PR Closed - Requirements Not MetThis PR has been automatically closed because it doesn't meet the requirements. PR Author: @Tahir-yamin To fix:
Why is this required? See #472 for details. |
Contributor
Author
|
Fixes #1430 Fix: windows security vulnerability and test failures |
This was referenced Jan 27, 2026
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.
Description
This PR addresses critical issues affecting Windows users and the reliability of the test suite. It fixes a potential sandbox escape vulnerability, resolves CI failures due to incorrect test assumptions, and enables cross-platform testing.
1. 🚨 Security Fix: Windows Path Traversal
/etc/passwdorC:\...) becauselstrip(os.sep)only checked for\on Windows, missing/.os.sepandos.altsepto prevent absolute paths from being joined incorrectly, avoiding sandbox escape.2. 🐛 Fix: Broken Credential Tests
test_credentials.pyasserted thatanthropicand other credential specs hadrequired=True. However,llm.pycorrectly defines them asrequired=False(optional). This causedpytestto fail for any fresh clone without keys.3. 🛠️ Fix: Cross-Platform Test Compatibility
test_file_system_toolkits.pyusedsubprocess.runwith Unix-only commands (e.g.,ls,tr), causing 10+ failures on Windows.unittest.mockforsubprocess.run. This simulates command output, making the tests faster, safer, and truly platform-agnostic.4. ✅ Enhancement: Mocked Tool Testing
web_search_toolto allow verifying tool logic without requiring real API keys in the CI environment.Type of change
How Has This Been Verified?
Ran full test suite on Windows 11 with Python 3.13.
Result: 205 passed, 0 failed. (previously 7 failed, 198 passed)
tools/tests/test_credentials.py- PASSEDtools/tests/tools/test_file_system_toolkits.py- PASSEDtools/tests/tools/test_web_search_tool.py- PASSEDtools/tests/tools/test_security.py- PASSED