fix: nightly hardening - MCP validate path boundary guard - #20
Open
mouse-value-add wants to merge 1 commit into
Open
fix: nightly hardening - MCP validate path boundary guard#20mouse-value-add wants to merge 1 commit into
mouse-value-add wants to merge 1 commit into
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.
Problem\nThe MCP tool accepted arbitrary filesystem paths and attempted to load them, while already enforced a home/cwd boundary. This mismatch allowed validation reads outside expected trust boundaries.\n\n## Approach\n- Reused existing guard in \n- Added the same boundary check to before \n- Returned a clear refusal message when the path is outside home/cwd\n\n## Verification\n- Ran full test suite:
RUN v2.1.9 /Users/mouse/.openclaw/workspace/nightly/you.md
✓ test/core/validator.test.ts (10 tests) 3ms
✓ test/parser/markdown.test.ts (11 tests) 3ms
✓ test/core/discovery.test.ts (13 tests) 6ms
✓ test/cli/wizard.test.ts (12 tests) 3ms
✓ test/cli/skill.test.ts (9 tests) 12ms
✓ test/cli/check.test.ts (4 tests) 8ms
✓ test/parser/loadFromUrl.test.ts (4 tests) 11ms
✓ test/core/parser.test.ts (16 tests) 15ms
✓ test/core/signals.test.ts (22 tests) 9ms
✓ test/parser/frontmatter.test.ts (7 tests) 3ms
✓ test/core/merger.test.ts (4 tests) 7ms
✓ test/parser/yaml.test.ts (12 tests) 11ms
✓ test/core/known-sections.test.ts (4 tests) 3ms
✓ test/cli/templates.test.ts (6 tests) 3ms
✓ test/cli/skill-status.test.ts (1 test) 12ms
✓ test/parser/timeout.test.ts (3 tests) 4ms
✓ test/mcp/server.test.ts (7 tests) 2ms
Test Files 17 passed (17)
Tests 145 passed (145)
Start at 01:58:42
Duration 670ms (transform 292ms, setup 0ms, collect 822ms, tests 113ms, environment 2ms, prepare 837ms)\n- Result: 17 test files passed, 145 tests passed\n\n## Risks\n- Some workflows that validated files outside home/cwd will now be refused\n\n## Rollback plan\n- Revert commit to restore previous behavior