Skip to content

Develop#94

Merged
sampleXbro merged 5 commits into
masterfrom
develop
Jul 8, 2026
Merged

Develop#94
sampleXbro merged 5 commits into
masterfrom
develop

Conversation

@sampleXbro

@sampleXbro sampleXbro commented Jul 8, 2026

Copy link
Copy Markdown
Owner

What does this PR do?

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Test coverage

Checklist

  • Tests written first (TDD)
  • All CI checks pass (pnpm test, pnpm lint, pnpm typecheck)
  • Changeset added (pnpm changeset) for user-visible changes

fengjikui and others added 5 commits July 8, 2026 01:12
…ete surfaces

Builds on @fengjikui's PR #93. Anchors containment at the project root — a
`.agentsmesh` boundary canonicalizes through a symlinked `.agentsmesh` and
cancels, so a symlinked parent still escaped — and extends the guard to every
remaining MCP filesystem surface:

- settings config reads AND writes (get/update config, permissions, hooks,
  ignore, mcp servers) via the readYaml/atomicWrite/safeConfigWrite choke points
- canonical list(); create() and delete() on canonical + skills
- read-before-write pre-reads (updatePermissions/updateIgnore append)

Hardening: fail-closed canonicalize (only ENOENT reconstructs), assert-before
existence probe (removes an out-of-project filename oracle), dangling-symlink doc
note, and it.skipIf(win) on all symlink tests (unprivileged Windows symlink()
throws EPERM on the windows-latest CI matrix).

Also drops the unrelated lessons.json trigger churn that rode in the original PR.

Co-authored-by: sampleXbro <55853222+sampleXbro@users.noreply.github.com>
…nment

fix(mcp): reject symlink path escapes
@sampleXbro sampleXbro merged commit fae4234 into master Jul 8, 2026
12 checks passed
@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.78049% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/mcp/handlers/settings.ts 96.42% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/mcp/handlers/canonical-factory.ts 97.82% <100.00%> (+0.12%) ⬆️
src/mcp/handlers/skills.ts 100.00% <100.00%> (ø)
src/mcp/writers/path-containment.ts 100.00% <100.00%> (ø)
src/mcp/writers/safe-config-write.ts 100.00% <100.00%> (ø)
src/mcp/writers/safe-read.ts 100.00% <100.00%> (+10.00%) ⬆️
src/mcp/writers/safe-write.ts 100.00% <100.00%> (ø)
src/mcp/handlers/settings.ts 99.21% <96.42%> (+0.10%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants