-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat: add path validation for commit_files MCP tool #796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add validatePathWithinRepo helper to ensure file paths resolve within the repository root directory. This hardens the commit_files tool by validating paths before file operations. Changes: - Add src/mcp/path-validation.ts with async path validation using realpath - Update commit_files to validate all paths before reading files - Prevent symlink-based path escapes by resolving real paths - Add comprehensive test coverage including symlink attack scenarios 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
| resolvedRoot = await realpath(repoRoot); | ||
| } catch { | ||
| throw new Error(`Repository root '${repoRoot}' does not exist`); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CRITICAL: Time-of-Check-Time-of-Use (TOCTOU) Race Condition
The validation occurs here, but the actual file read happens later in github-file-ops-server.ts (lines 269, 305). Between validation and use, an attacker could replace a legitimate file with a symlink to a sensitive location.
Attack scenario:
// 1. Validation passes for legitimate file
await validatePathWithinRepo("src/config.js", repoRoot);
// 2. RACE WINDOW: Attacker replaces file
// rm src/config.js && ln -s /etc/passwd src/config.js
// 3. File operation reads /etc/passwd
const content = await readFile(fullPath, "utf-8");Recommendation: Use file descriptors with O_NOFOLLOW flag:
import { open, constants as fsConstants } from 'fs/promises';
// After validation, open without following symlinks
const fd = await open(fullPath, fsConstants.O_RDONLY | fsConstants.O_NOFOLLOW);
const content = await fd.readFile('utf-8');
await fd.close();CWE-367: Time-of-check Time-of-use Race Condition
| const validatedFiles = await Promise.all( | ||
| files.map(async (filePath) => { | ||
| const fullPath = await validatePathWithinRepo(filePath, REPO_DIR); | ||
| // Calculate the relative path for the git tree entry | ||
| // Use the original filePath (normalized) for the git path, not the symlink-resolved path | ||
| const normalizedPath = resolve(resolvedRepoDir, filePath); | ||
| const relativePath = normalizedPath.slice(resolvedRepoDir.length + 1); | ||
| return { fullPath, relativePath }; | ||
| }), | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CRITICAL: Redundant realpath() Calls - Performance Issue
validatePathWithinRepo() calls realpath(REPO_DIR) for every file in this Promise.all loop. For a 50-file commit, this means 50 identical filesystem operations resolving the same directory.
Performance impact:
- O(N) redundant operations where N = number of files
- Each realpath involves kernel syscalls (~1-5ms each)
- For 50 files: ~50-250ms wasted
Recommendation: Resolve repo root once before the loop:
const resolvedRepoDir = resolve(REPO_DIR);
const resolvedRepoRoot = await realpath(REPO_DIR); // Once, outside the loop
const validatedFiles = await Promise.all(
files.map(async (filePath) => {
// Pass pre-resolved root to avoid redundant realpath calls
const fullPath = await validatePathWithinRepo(filePath, REPO_DIR, resolvedRepoRoot);
const normalizedPath = resolve(resolvedRepoDir, filePath);
const relativePath = normalizedPath.slice(resolvedRepoDir.length + 1);
return { fullPath, relativePath };
}),
);You'll need to update validatePathWithinRepo to accept an optional resolvedRepoRoot parameter.
|
|
||
| describe("symlink attacks", () => { | ||
| it("should reject symlinks pointing outside the repo", async () => { | ||
| // Create a symlink inside the repo that points to a file outside | ||
| const symlinkPath = resolve(repoRoot, "evil-link"); | ||
| await symlink(resolve(outsideDir, "secret.txt"), symlinkPath); | ||
|
|
||
| try { | ||
| // The symlink path looks like it's inside the repo, but points outside | ||
| await expect( | ||
| validatePathWithinRepo("evil-link", repoRoot), | ||
| ).rejects.toThrow(/resolves outside the repository root/); | ||
| } finally { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing Test Coverage: Chained Symlinks
The tests validate single-hop symlinks, but don't cover chained symlinks that eventually escape:
repo/link1 → repo/link2 → repo/link3 → /outside/secret.txt
While realpath() should resolve this, there's no explicit test validation.
Recommended test:
it("should reject chained symlinks that escape the repo", async () => {
const link1 = resolve(repoRoot, "link1");
const link2 = resolve(repoRoot, "link2");
const link3 = resolve(repoRoot, "link3");
await symlink(link2, link1);
await symlink(link3, link2);
await symlink(resolve(outsideDir, "secret.txt"), link3);
try {
await expect(
validatePathWithinRepo("link1", repoRoot)
).rejects.toThrow(/resolves outside the repository root/);
} finally {
await rm(link1, { force: true });
await rm(link2, { force: true });
await rm(link3, { force: true });
}
});| * @returns The resolved absolute path (with symlinks resolved) if valid | ||
| * @throws Error if the path resolves outside the repository root |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation Inaccuracy: Return Value Behavior
The JSDoc states symlinks are "resolved," but the implementation has two different behaviors:
- Existing files (line 30-31): Returns
resolvedPathwith symlinks fully resolved viarealpath() - Non-existent files (line 47): Returns
initialPathwith symlinks NOT resolved
Suggested fix:
* @returns The resolved absolute path if valid. For existing files, symlinks are
* fully resolved to their targets. For non-existent files, returns the
* normalized path without symlink resolution (since realpath cannot resolve
* paths that don't exist yet).
Comprehensive Code Review - PR #796I've completed a thorough review using specialized agents for security, performance, code quality, test coverage, and documentation. Here are the key findings: 🔴 Critical Issues1. TOCTOU Race Condition (Security)The path validation occurs separately from file operations, creating a race window where an attacker could replace a validated file with a symlink. See inline comment on 2. delete_files Tool Missing Path Validation (Security)The
Impact: Arbitrary file deletion outside repository boundaries. Recommendation: Apply the same 3. Performance: Redundant realpath() Calls
🟡 High Priority Issues4. Symlink File Mode Handling
Recommendation: Use 5. Missing Test Coverage
See inline comment on 📝 Documentation & Code Quality6. JSDoc InaccuracyThe return value documentation doesn't reflect that non-existent files return unresolved paths. See inline comment on 7. Complex Error HandlingNested try-catch blocks (lines 30-53) swallow original error context, making debugging difficult. Consider extracting to separate helper functions and preserving error details. ✅ Positive Aspects
📋 Recommended Action ItemsMust fix before merge:
Should fix: Nice to have: Let me know if you'd like me to elaborate on any of these findings or help implement the recommended fixes! |
Bumps the github-actions group with 6 updates: | Package | From | To | | --- | --- | --- | | [anchore/scan-action](https://github.com/anchore/scan-action) | `7.2.2` | `7.2.3` | | [github/codeql-action](https://github.com/github/codeql-action) | `4.31.9` | `4.31.10` | | [anthropics/claude-code-action](https://github.com/anthropics/claude-code-action) | `1.0.28` | `1.0.29` | | [ruby/setup-ruby](https://github.com/ruby/setup-ruby) | `1.280.0` | `1.283.0` | | [updatecli/updatecli-action](https://github.com/updatecli/updatecli-action) | `2.98.0` | `2.99.0` | | [actions/setup-node](https://github.com/actions/setup-node) | `6.1.0` | `6.2.0` | Updates `anchore/scan-action` from 7.2.2 to 7.2.3 Release notes *Sourced from [anchore/scan-action's releases](https://github.com/anchore/scan-action/releases).* > v7.2.3 > ------ > > New in scan-action v7.2.3 > ------------------------- > > * chore(deps): update Grype to v0.104.4 ([#566](https://github.com/anchore/scan-action/issues/566)) [[[anchore-actions-token-generator[bot]](https://github.com/apps/anchore-actions-token-generator)]([https://github.com/[anchore-actions-token-generator[bot]](https://github.com/apps/anchore-actions-token-generator))]](https://github.com/%5Banchore-actions-token-generator%5Bbot%5D%5D(https://github.com/apps/anchore-actions-token-generator))%5D) > * chore(deps): bump `@actions/cache` from 4.1.0 to 5.0.1 ([#563](https://github.com/anchore/scan-action/issues/563)) [[[dependabot[bot]](https://github.com/apps/dependabot)]([https://github.com/[dependabot[bot]](https://github.com/apps/dependabot))]](https://github.com/%5Bdependabot%5Bbot%5D%5D(https://github.com/apps/dependabot))%5D) Commits * [`62b74fb`](anchore/scan-action@62b74fb) chore(deps): update Grype to v0.104.4 ([#566](https://github.com/anchore/scan-action/issues/566)) * [`e06814b`](anchore/scan-action@e06814b) chore(deps): bump @actions/\* ([#563](https://github.com/anchore/scan-action/issues/563)) * [`926d958`](anchore/scan-action@926d958) chore(deps): update Grype to v0.104.3 ([#565](https://github.com/anchore/scan-action/issues/565)) * [`097ccad`](anchore/scan-action@097ccad) chore(deps): bump peter-evans/create-pull-request from 7.0.11 to 8.0.0 ([#560](https://github.com/anchore/scan-action/issues/560)) * [`4413a5f`](anchore/scan-action@4413a5f) chore(deps-dev): bump eslint from 9.39.1 to 9.39.2 ([#564](https://github.com/anchore/scan-action/issues/564)) * See full diff in [compare view](anchore/scan-action@3c9a191...62b74fb) Updates `github/codeql-action` from 4.31.9 to 4.31.10 Release notes *Sourced from [github/codeql-action's releases](https://github.com/github/codeql-action/releases).* > v4.31.10 > -------- > > CodeQL Action Changelog > ======================= > > See the [releases page](https://github.com/github/codeql-action/releases) for the relevant changes to the CodeQL CLI and language packs. > > 4.31.10 - 12 Jan 2026 > --------------------- > > * Update default CodeQL bundle version to 2.23.9. [#3393](https://github.com/github/codeql-action/pull/3393) > > See the full [CHANGELOG.md](https://github.com/github/codeql-action/blob/v4.31.10/CHANGELOG.md) for more information. Changelog *Sourced from [github/codeql-action's changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md).* > CodeQL Action Changelog > ======================= > > See the [releases page](https://github.com/github/codeql-action/releases) for the relevant changes to the CodeQL CLI and language packs. > > [UNRELEASED] > ------------ > > No user facing changes. > > 4.31.10 - 12 Jan 2026 > --------------------- > > * Update default CodeQL bundle version to 2.23.9. [#3393](https://github.com/github/codeql-action/pull/3393) > > 4.31.9 - 16 Dec 2025 > -------------------- > > No user facing changes. > > 4.31.8 - 11 Dec 2025 > -------------------- > > * Update default CodeQL bundle version to 2.23.8. [#3354](https://github.com/github/codeql-action/pull/3354) > > 4.31.7 - 05 Dec 2025 > -------------------- > > * Update default CodeQL bundle version to 2.23.7. [#3343](https://github.com/github/codeql-action/pull/3343) > > 4.31.6 - 01 Dec 2025 > -------------------- > > No user facing changes. > > 4.31.5 - 24 Nov 2025 > -------------------- > > * Update default CodeQL bundle version to 2.23.6. [#3321](https://github.com/github/codeql-action/pull/3321) > > 4.31.4 - 18 Nov 2025 > -------------------- > > No user facing changes. > > 4.31.3 - 13 Nov 2025 > -------------------- > > * CodeQL Action v3 will be deprecated in December 2026. The Action now logs a warning for customers who are running v3 but could be running v4. For more information, see [Upcoming deprecation of CodeQL Action v3](https://github.blog/changelog/2025-10-28-upcoming-deprecation-of-codeql-action-v3/). > * Update default CodeQL bundle version to 2.23.5. [#3288](https://github.com/github/codeql-action/pull/3288) > > 4.31.2 - 30 Oct 2025 > -------------------- > > No user facing changes. > > 4.31.1 - 30 Oct 2025 > -------------------- > > * The `add-snippets` input has been removed from the `analyze` action. This input has been deprecated since CodeQL Action 3.26.4 in August 2024 when this removal was announced. > > 4.31.0 - 24 Oct 2025 > -------------------- ... (truncated) Commits * [`cdefb33`](github/codeql-action@cdefb33) Merge pull request [#3394](https://github.com/github/codeql-action/issues/3394) from github/update-v4.31.10-0fa411efd * [`cfa77c6`](github/codeql-action@cfa77c6) Update changelog for v4.31.10 * [`0fa411e`](github/codeql-action@0fa411e) Merge pull request [#3393](https://github.com/github/codeql-action/issues/3393) from github/update-bundle/codeql-bundle-v2.23.9 * [`c284324`](github/codeql-action@c284324) Add changelog note * [`83e7d00`](github/codeql-action@83e7d00) Update default bundle to codeql-bundle-v2.23.9 * [`f6a16be`](github/codeql-action@f6a16be) Merge pull request [#3391](https://github.com/github/codeql-action/issues/3391) from github/dependabot/npm\_and\_yarn/npm-minor-f1cdf5... * [`c1f5f1a`](github/codeql-action@c1f5f1a) Rebuild * [`1805d8d`](github/codeql-action@1805d8d) Bump the npm-minor group with 2 updates * [`b2951d2`](github/codeql-action@b2951d2) Merge pull request [#3353](https://github.com/github/codeql-action/issues/3353) from github/kaspersv/bump-min-cli-v-for-overlay * [`41448d9`](github/codeql-action@41448d9) Merge pull request [#3287](https://github.com/github/codeql-action/issues/3287) from github/henrymercer/generate-mergeback-last * Additional commits viewable in [compare view](github/codeql-action@5d4e8d1...cdefb33) Updates `anthropics/claude-code-action` from 1.0.28 to 1.0.29 Release notes *Sourced from [anthropics/claude-code-action's releases](https://github.com/anthropics/claude-code-action/releases).* > v1.0.29 > ------- > > What's Changed > -------------- > > * [Security] Fix HIGH vulnerability: CVE-2025-66414 by [`@orbisai0security`](https://github.com/orbisai0security) in [anthropics/claude-code-action#792](https://github.com/anthropics/claude-code-action/pull/792) > * fix: use original title from webhook payload instead of fetched title by [`@ashwin-ant`](https://github.com/ashwin-ant) in [anthropics/claude-code-action#793](https://github.com/anthropics/claude-code-action/pull/793) > * feat: add path validation for commit\_files MCP tool by [`@ddworken`](https://github.com/ddworken) in [anthropics/claude-code-action#796](https://github.com/anthropics/claude-code-action/pull/796) > * feat: custom branch name templates by [`@dylancdavis`](https://github.com/dylancdavis) in [anthropics/claude-code-action#571](https://github.com/anthropics/claude-code-action/pull/571) > * fix: add missing import and update tests for branch template feature by [`@ashwin-ant`](https://github.com/ashwin-ant) in [anthropics/claude-code-action#799](https://github.com/anthropics/claude-code-action/pull/799) > > New Contributors > ---------------- > > * [`@orbisai0security`](https://github.com/orbisai0security) made their first contribution in [anthropics/claude-code-action#792](https://github.com/anthropics/claude-code-action/pull/792) > * [`@dylancdavis`](https://github.com/dylancdavis) made their first contribution in [anthropics/claude-code-action#571](https://github.com/anthropics/claude-code-action/pull/571) > > **Full Changelog**: <anthropics/claude-code-action@v1...v1.0.29> Commits * [`1b8ee3b`](anthropics/claude-code-action@1b8ee3b) fix: add missing import and update tests for branch template feature ([#799](https://github.com/anthropics/claude-code-action/issues/799)) * [`c247cb1`](anthropics/claude-code-action@c247cb1) feat: custom branch name templates ([#571](https://github.com/anthropics/claude-code-action/issues/571)) * [`cefa600`](anthropics/claude-code-action@cefa600) chore: bump Claude Code to 2.1.1 and Agent SDK to 0.2.1 * [`7a708f6`](anthropics/claude-code-action@7a708f6) chore: bump Claude Code to 2.1.0 and Agent SDK to 0.2.0 * [`5da7ba5`](anthropics/claude-code-action@5da7ba5) feat: add path validation for commit\_files MCP tool ([#796](https://github.com/anthropics/claude-code-action/issues/796)) * [`964b835`](anthropics/claude-code-action@964b835) fix: use original title from webhook payload instead of fetched title ([#793](https://github.com/anthropics/claude-code-action/issues/793)) * [`c83d67a`](anthropics/claude-code-action@c83d67a) fix: resolve high vulnerability CVE-2025-66414 ([#792](https://github.com/anthropics/claude-code-action/issues/792)) * See full diff in [compare view](anthropics/claude-code-action@c9ec2b0...1b8ee3b) Updates `ruby/setup-ruby` from 1.280.0 to 1.283.0 Release notes *Sourced from [ruby/setup-ruby's releases](https://github.com/ruby/setup-ruby/releases).* > v1.283.0 > -------- > > What's Changed > -------------- > > * Add restriction and validation for download urls by [`@ntkme`](https://github.com/ntkme) in [ruby/setup-ruby#856](https://github.com/ruby/setup-ruby/pull/856) > * Add ruby-3.2.10 by [`@ruby-builder-bot`](https://github.com/ruby-builder-bot) in [ruby/setup-ruby#860](https://github.com/ruby/setup-ruby/pull/860) > > **Full Changelog**: <ruby/setup-ruby@v1.282.0...v1.283.0> > > v1.282.0 > -------- > > What's Changed > -------------- > > * Add ruby-4.0.1 by [`@ruby-builder-bot`](https://github.com/ruby-builder-bot) in [ruby/setup-ruby#859](https://github.com/ruby/setup-ruby/pull/859) > > **Full Changelog**: <ruby/setup-ruby@v1.281.0...v1.282.0> > > v1.281.0 > -------- > > What's Changed > -------------- > > * Generate test matrix dynamically by [`@ntkme`](https://github.com/ntkme) in [ruby/setup-ruby#854](https://github.com/ruby/setup-ruby/pull/854) > * Add truffleruby-33.0.0,truffleruby+graalvm-33.0.0 by [`@ruby-builder-bot`](https://github.com/ruby-builder-bot) in [ruby/setup-ruby#857](https://github.com/ruby/setup-ruby/pull/857) > > **Full Changelog**: <ruby/setup-ruby@v1.280.0...v1.281.0> Commits * [`708024e`](ruby/setup-ruby@708024e) Add ruby-3.2.10 * [`757ecf5`](ruby/setup-ruby@757ecf5) Give a proper name to CI jobs checking generated files * [`6963d48`](ruby/setup-ruby@6963d48) Use Regexp.escape to not need to manually escape (error-prone) * [`3fc6249`](ruby/setup-ruby@3fc6249) Match more strictly with \A and \z * [`b939495`](ruby/setup-ruby@b939495) Add restriction and validation for download urls * [`4fc31e1`](ruby/setup-ruby@4fc31e1) Add ruby-4.0.1 * [`675dd7b`](ruby/setup-ruby@675dd7b) Add truffleruby-33.0.0,truffleruby+graalvm-33.0.0 * [`5dd816a`](ruby/setup-ruby@5dd816a) Tweaks for the generated CI matrix * [`c2f29a7`](ruby/setup-ruby@c2f29a7) Generate test matrix dynamically * See full diff in [compare view](ruby/setup-ruby@d5f787c...708024e) Updates `updatecli/updatecli-action` from 2.98.0 to 2.99.0 Release notes *Sourced from [updatecli/updatecli-action's releases](https://github.com/updatecli/updatecli-action/releases).* > v2.99.0 🌈 > --------- > > Changes > ------- > > * Bump "`@types/node`" package version @[updateclibot[bot]](https://github.com/apps/updateclibot) ([#1015](https://github.com/updatecli/updatecli-action/issues/1015)) > * Bump "eslint-plugin-prettier" package version @[updateclibot[bot]](https://github.com/apps/updateclibot) ([#1016](https://github.com/updatecli/updatecli-action/issues/1016)) > * deps: update updatecli version to v0.113.0 @[updateclibot[bot]](https://github.com/apps/updateclibot) ([#1013](https://github.com/updatecli/updatecli-action/issues/1013)) > * deps(github/action): bump all dependencies @[updateclibot[bot]](https://github.com/apps/updateclibot) ([#1007](https://github.com/updatecli/updatecli-action/issues/1007)) > * Bump "eslint-plugin-jest" package version @[updateclibot[bot]](https://github.com/apps/updateclibot) ([#1002](https://github.com/updatecli/updatecli-action/issues/1002)) > * Bump "`@types/node`" package version @[updateclibot[bot]](https://github.com/apps/updateclibot) ([#1004](https://github.com/updatecli/updatecli-action/issues/1004)) > * Bump "jest" package version @[updateclibot[bot]](https://github.com/apps/updateclibot) ([#1003](https://github.com/updatecli/updatecli-action/issues/1003)) > * Bump "cross-env" package version @[updateclibot[bot]](https://github.com/apps/updateclibot) ([#1000](https://github.com/updatecli/updatecli-action/issues/1000)) > * Bump "eslint-config-prettier" package version @[updateclibot[bot]](https://github.com/apps/updateclibot) ([#1001](https://github.com/updatecli/updatecli-action/issues/1001)) > * Bump "`@types/jest`" package version @[updateclibot[bot]](https://github.com/apps/updateclibot) ([#998](https://github.com/updatecli/updatecli-action/issues/998)) > * Change trigger branch from 'main' to 'v2' [`@olblak`](https://github.com/olblak) ([#1011](https://github.com/updatecli/updatecli-action/issues/1011)) > * Bump "eslint-plugin-github" package version @[updateclibot[bot]](https://github.com/apps/updateclibot) ([#1006](https://github.com/updatecli/updatecli-action/issues/1006)) > * deps(updatecli/policies): bump all policies @[updateclibot[bot]](https://github.com/apps/updateclibot) ([#995](https://github.com/updatecli/updatecli-action/issues/995)) > > 🐛 Bug Fixes > ----------- > > * fix: updatecli workflows [`@olblak`](https://github.com/olblak) ([#1012](https://github.com/updatecli/updatecli-action/issues/1012)) > > 🧰 Maintenance > ------------- > > * Update Updatecli GitHub action workflow [`@olblak`](https://github.com/olblak) ([#993](https://github.com/updatecli/updatecli-action/issues/993)) > * deps: bump Updatecli GH action to v2.98.0 @[updateclibot[bot]](https://github.com/apps/updateclibot) ([#987](https://github.com/updatecli/updatecli-action/issues/987)) > > Contributors > ------------ > > [`@olblak`](https://github.com/olblak), [`@updateclibot`](https://github.com/updateclibot)[bot] and [updateclibot[bot]](https://github.com/apps/updateclibot) Commits * [`4fd2c16`](updatecli/updatecli-action@4fd2c16) Bump "`@types/node`" package version ([#1015](https://github.com/updatecli/updatecli-action/issues/1015)) * [`ade1a16`](updatecli/updatecli-action@ade1a16) Bump "eslint-plugin-prettier" package version ([#1016](https://github.com/updatecli/updatecli-action/issues/1016)) * [`d44bf53`](updatecli/updatecli-action@d44bf53) deps: update updatecli version to v0.113.0 ([#1013](https://github.com/updatecli/updatecli-action/issues/1013)) * [`a215c4f`](updatecli/updatecli-action@a215c4f) deps(github/action): bump all dependencies ([#1007](https://github.com/updatecli/updatecli-action/issues/1007)) * [`0f8a012`](updatecli/updatecli-action@0f8a012) fix: updatecli workflows ([#1012](https://github.com/updatecli/updatecli-action/issues/1012)) * [`097f2d5`](updatecli/updatecli-action@097f2d5) Bump "eslint-plugin-jest" package version ([#1002](https://github.com/updatecli/updatecli-action/issues/1002)) * [`1ef916e`](updatecli/updatecli-action@1ef916e) Bump "`@types/node`" package version ([#1004](https://github.com/updatecli/updatecli-action/issues/1004)) * [`cda4fa9`](updatecli/updatecli-action@cda4fa9) Bump "jest" package version ([#1003](https://github.com/updatecli/updatecli-action/issues/1003)) * [`3508de7`](updatecli/updatecli-action@3508de7) Bump "cross-env" package version ([#1000](https://github.com/updatecli/updatecli-action/issues/1000)) * [`8e0155f`](updatecli/updatecli-action@8e0155f) Bump "eslint-config-prettier" package version ([#1001](https://github.com/updatecli/updatecli-action/issues/1001)) * Additional commits viewable in [compare view](updatecli/updatecli-action@b846825...4fd2c16) Updates `actions/setup-node` from 6.1.0 to 6.2.0 Release notes *Sourced from [actions/setup-node's releases](https://github.com/actions/setup-node/releases).* > v6.2.0 > ------ > > What's Changed > -------------- > > ### Documentation > > * Documentation update related to absence of Lockfile by [`@mahabaleshwars`](https://github.com/mahabaleshwars) in [actions/setup-node#1454](https://github.com/actions/setup-node/pull/1454) > * Correct mirror option typos by [`@MikeMcC399`](https://github.com/MikeMcC399) in [actions/setup-node#1442](https://github.com/actions/setup-node/pull/1442) > * Readme update on checkout version v6 by [`@deining`](https://github.com/deining) in [actions/setup-node#1446](https://github.com/actions/setup-node/pull/1446) > * Readme typo fixes [`@munyari`](https://github.com/munyari) in [actions/setup-node#1226](https://github.com/actions/setup-node/pull/1226) > * Advanced document update on checkout version v6 by [`@aparnajyothi-y`](https://github.com/aparnajyothi-y) in [actions/setup-node#1468](https://github.com/actions/setup-node/pull/1468) > > ### Dependency updates: > > * Upgrade `@actions/cache` to v5.0.1 by [`@salmanmkc`](https://github.com/salmanmkc) in [actions/setup-node#1449](https://github.com/actions/setup-node/pull/1449) > > New Contributors > ---------------- > > * [`@mahabaleshwars`](https://github.com/mahabaleshwars) made their first contribution in [actions/setup-node#1454](https://github.com/actions/setup-node/pull/1454) > * [`@MikeMcC399`](https://github.com/MikeMcC399) made their first contribution in [actions/setup-node#1442](https://github.com/actions/setup-node/pull/1442) > * [`@deining`](https://github.com/deining) made their first contribution in [actions/setup-node#1446](https://github.com/actions/setup-node/pull/1446) > * [`@munyari`](https://github.com/munyari) made their first contribution in [actions/setup-node#1226](https://github.com/actions/setup-node/pull/1226) > > **Full Changelog**: <actions/setup-node@v6...v6.2.0> Commits * [`6044e13`](actions/setup-node@6044e13) Docs: bump actions/checkout from v5 to v6 ([#1468](https://github.com/actions/setup-node/issues/1468)) * [`8e49463`](actions/setup-node@8e49463) Fix README typo ([#1226](https://github.com/actions/setup-node/issues/1226)) * [`621ac41`](actions/setup-node@621ac41) README.md: bump to latest released checkout version v6 ([#1446](https://github.com/actions/setup-node/issues/1446)) * [`2951748`](actions/setup-node@2951748) Bump `@actions/cache` to v5.0.1 ([#1449](https://github.com/actions/setup-node/issues/1449)) * [`21ddc7b`](actions/setup-node@21ddc7b) Correct mirror option typos ([#1442](https://github.com/actions/setup-node/issues/1442)) * [`65d868f`](actions/setup-node@65d868f) Update Documentation for Lockfile ([#1454](https://github.com/actions/setup-node/issues/1454)) * See full diff in [compare view](actions/setup-node@395ad32...6044e13) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Summary
validatePathWithinRepohelper to ensure file paths resolve within the repository rootcommit_filestool by validating paths before file operationsrealpathto resolve symlinks, preventing symlink-based path escapesChanges
src/mcp/path-validation.ts: New async path validation utilitysrc/mcp/github-file-ops-server.ts: Updated to use path validationtest/github-file-ops-path-validation.test.ts: Comprehensive test suiteTest plan
🤖 Generated with Claude Code