@n0zer0d4y/vulcan-file-ops 1.1.4 → 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,60 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.1.6] - 2025-11-16
9
+
10
+ ### Fixed
11
+
12
+ - README.md Configuration Examples: Corrected all `--approved-folders` examples to use separate array elements instead of comma-separated strings within quotes. This fixes setup failures for users with spaces in directory paths.
13
+ - Before: `"C:/Users/username/projects,C:/Users/username/documents"` (breaks with spaces)
14
+ - After: `"C:/Users/username/projects", "C:/Users/username/documents"` (works with spaces)
15
+ - Added clear guidance for paths containing spaces in MCP configuration
16
+
17
+ ### Changed
18
+
19
+ - Updated all README configuration examples to use the correct array element format for better user experience
20
+
21
+ ## [1.1.5] - 2025-11-15
22
+
23
+ ### Added
24
+
25
+ - Comprehensive security audit documentation suite:
26
+ - `docs/SNYK_VULNERABILITY_AUDIT_2025.md` - Static analysis audit report from Snyk platform
27
+ - Validated 5/6 Snyk findings as false positives
28
+ - Fixed 1 finding (defense-in-depth path validation in rollback function)
29
+ - Created `.snyk` policy file to suppress false positives with justifications
30
+ - `docs/CVE_MANUAL_AUDIT_2025-11-04.md` - Manual CVE pattern analysis audit
31
+ - CVE-2025-54794/54795 pattern research and mitigation validation
32
+ - Identified and fixed critical `make_directory` vulnerability
33
+ - `docs/SHELL_COMMAND_AUDIT_2025-11-04.md` - Shell command directory bypass audit (retrospective)
34
+ - Documents November 2024 security fix for path validation in shell command arguments
35
+ - 419 lines of comprehensive test coverage
36
+ - `docs/SECURITY_TEST_SUMMARY.md` - Security test coverage documentation
37
+ - 2000+ lines of security-focused tests in `src/tests/`
38
+ - Explicit CVE tests for CVE-2025-54794, CVE-2025-54795, CVE-2025-53109
39
+ - Security annotations and JSDoc comments in `src/tools/write-tools.ts` for static analysis tools
40
+
41
+ ### Changed
42
+
43
+ - Reorganized vulnerability documentation with unique, descriptive filenames:
44
+ - Renamed `docs/VULNERABILITY_RESEARCH_FINDINGS.md` → `docs/CVE_MANUAL_AUDIT_2025-11-04.md`
45
+ - Renamed `local_docs/VULNERABILITY_RESEARCH_FINDINGS.md` → `local_docs/CVE_MANUAL_AUDIT_2025-11-03_DRAFT.md`
46
+ - Updated dates in audit reports to reflect actual creation/audit dates (Nov 3-4, 2025)
47
+ - Enhanced README.md Security Audit section with comprehensive audit report references
48
+ - Added "Latest Security Audits" section linking to all audit reports
49
+ - Updated CVE Protection Status with current security posture
50
+ - Clarified shell command directory bypass as fixed (November 2024)
51
+
52
+ ### Security
53
+
54
+ - Added defense-in-depth path validation to `performRollback()` function in `write-tools.ts`
55
+ - Re-validates paths before rollback operations
56
+ - Protects against edge cases where allowed directories might change during multi-file operations
57
+
58
+ ### Removed
59
+
60
+ - Deleted duplicate `VULNERABILITY_RESEARCH_FINDINGS.md` files from both `docs/` and `local_docs/` after proper renaming
61
+
8
62
  ## [1.1.4] - 2025-11-13
9
63
 
10
64
  ### Changed
package/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Vulcan File Ops MCP Server
2
2
 
3
3
  ![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?logo=typescript&logoColor=white)
4
+ [![MCP Registry](https://img.shields.io/badge/MCP-Registry-blue)](https://registry.modelcontextprotocol.io/v0/servers?search=io.github.n0zer0d4y/vulcan-file-ops)
4
5
  ![MCP Dev](https://badge.mcpx.dev?type=dev "MCP Dev")
5
6
  [![MCP Server](https://badge.mcpx.dev?type=server "MCP Server")](https://modelcontextprotocol.io)
6
7
  [![MCP Server with Tools](https://badge.mcpx.dev?type=server&features=tools "MCP server with tools")](https://modelcontextprotocol.io)
@@ -8,7 +9,9 @@
8
9
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9
10
  [![MseeP.ai Security Assessment Badge](https://mseep.net/pr/n0zer0d4y-vulcan-file-ops-badge.png)](https://mseep.ai/app/n0zer0d4y-vulcan-file-ops)
10
11
 
11
- **Transform your desktop AI assistants into powerful development partners.** Vulcan File Ops bridges the gap between conversational AI (Claude Desktop, ChatGPT Desktop, etc.) and your local filesystem, unlocking the same file manipulation capabilities found in AI-powered IDEs like Cursor and Cline. Write code, refactor projects, manage documentation, and perform complex file operations—matching the power of dedicated AI coding assistants. With enterprise-grade security controls, dynamic directory registration, and intelligent tool filtering, you maintain complete control while your AI assistant handles the heavy lifting.
12
+ > **Secure User-Controlled High-Performance File Operations Server**
13
+
14
+ Transform your desktop AI assistants into powerful development partners. Vulcan File Ops bridges the gap between conversational AI (Claude Desktop, ChatGPT Desktop, etc.) and your local filesystem, unlocking the same file manipulation capabilities found in AI-powered IDEs like Cursor and VS Code extension like Cline. Write code, refactor projects, manage documentation, and perform complex file operations—matching the power of dedicated AI coding assistants. With enterprise-grade security controls, dynamic directory registration, and intelligent tool filtering, you maintain complete control while your AI assistant handles the heavy lifting.
12
15
 
13
16
  ## Table of Contents
14
17
 
@@ -58,7 +61,7 @@ This enhanced implementation provides:
58
61
  - **Advanced File Editing**: Pattern-based modifications with flexible matching and diff preview
59
62
  - **Flexible Reading Modes**: Full file, head/tail, or arbitrary line ranges
60
63
  - **Image Vision Support**: Attach images for AI analysis and description
61
- - **Directory Filtering**: Exclude unwanted folders (node_modules, dist, .git) from listings
64
+ - **Directory Filtering**: Exclude unwanted folders (node_modules, dist, .git) from listings as list_directory tool can bloat server output if these types folders, normally gitignored, are included
62
65
  - **Selective Tool Activation**: Enable only specific tools or tool categories
63
66
  - **High Performance**: Optimized search algorithms with smart recursion detection
64
67
  - **Security Controls**: Path validation, access restrictions, and shell command approval
@@ -206,7 +209,8 @@ Pre-configure specific directories for immediate access on server start:
206
209
  "args": [
207
210
  "@n0zer0d4y/vulcan-file-ops",
208
211
  "--approved-folders",
209
- "/Users/username/projects,/Users/username/documents"
212
+ "/Users/username/projects",
213
+ "/Users/username/documents"
210
214
  ]
211
215
  }
212
216
  }
@@ -223,7 +227,8 @@ Pre-configure specific directories for immediate access on server start:
223
227
  "args": [
224
228
  "@n0zer0d4y/vulcan-file-ops",
225
229
  "--approved-folders",
226
- "C:/Users/username/projects,C:/Users/username/documents"
230
+ "C:/Users/username/projects",
231
+ "C:/Users/username/documents"
227
232
  ]
228
233
  }
229
234
  }
@@ -241,7 +246,8 @@ For users running from a cloned repository (after `npm run build`):
241
246
  "command": "vulcan-file-ops",
242
247
  "args": [
243
248
  "--approved-folders",
244
- "/Users/username/projects,/Users/username/documents"
249
+ "/Users/username/projects",
250
+ "/Users/username/documents"
245
251
  ]
246
252
  }
247
253
  }
@@ -357,7 +363,8 @@ All configuration options can be combined:
357
363
  "args": [
358
364
  "@n0zer0d4y/vulcan-file-ops",
359
365
  "--approved-folders",
360
- "C:/Users/username/projects,C:/Users/username/documents",
366
+ "C:/Users/username/projects",
367
+ "C:/Users/username/documents",
361
368
  "--ignored-folders",
362
369
  "node_modules,dist,.git",
363
370
  "--approved-commands",
@@ -382,7 +389,8 @@ All configuration options can be combined:
382
389
  "args": [
383
390
  "@n0zer0d4y/vulcan-file-ops",
384
391
  "--approved-folders",
385
- "/Users/username/projects,/Users/username/documents",
392
+ "/Users/username/projects",
393
+ "/Users/username/documents",
386
394
  "--ignored-folders",
387
395
  "node_modules,dist,.git",
388
396
  "--approved-commands",
@@ -408,7 +416,8 @@ For users running from a cloned repository (after `npm run build`):
408
416
  "command": "vulcan-file-ops",
409
417
  "args": [
410
418
  "--approved-folders",
411
- "/Users/username/projects,/Users/username/documents",
419
+ "/Users/username/projects",
420
+ "/Users/username/documents",
412
421
  "--ignored-folders",
413
422
  "node_modules,dist,.git",
414
423
  "--approved-commands",
@@ -697,7 +706,8 @@ Execute shell commands with security controls
697
706
 
698
707
  **Output:** Exit code, stdout, stderr, and execution metadata
699
708
 
700
- **Security:**
709
+ **Security:**
710
+
701
711
  - At least one approved directory must be configured before executing shell commands
702
712
  - Working directory (whether explicit or default process.cwd()) is always validated against allowed directories
703
713
  - All file/directory paths in command arguments are automatically extracted and validated against allowed directories
@@ -853,7 +863,9 @@ This MCP server implements enterprise-grade security controls to protect against
853
863
 
854
864
  ### Security Audit
855
865
 
856
- This server has been audited against known vulnerabilities:
866
+ This server has been comprehensively audited against known vulnerabilities and static analysis findings:
867
+
868
+ **CVE Protection Status:**
857
869
 
858
870
  - ✅ CVE-2025-54794 (Path Restriction Bypass) - **FIXED**
859
871
  - ✅ CVE-2025-54795 (Command Injection) - **PROTECTED**
@@ -861,7 +873,34 @@ This server has been audited against known vulnerabilities:
861
873
  - ✅ CVE-2025-53110 (Directory Containment Bypass) - **PROTECTED**
862
874
  - ✅ Shell Execution Directory Bypass - **FIXED** (November 2024)
863
875
 
864
- For detailed security analysis, see [Vulnerability Research Findings](docs/VULNERABILITY_RESEARCH_FINDINGS.md).
876
+ **Latest Security Audits:**
877
+
878
+ - 📋 [Snyk Vulnerability Audit Report - November 2025](docs/SNYK_VULNERABILITY_AUDIT_2025.md)
879
+ - **Status**: 5/6 Snyk findings validated as false positives, 1 finding fixed
880
+ - **Risk Level**: LOW - Comprehensive path traversal protection verified
881
+ - **Static Analysis**: Snyk false positive rate 83% due to custom validation not recognized
882
+ - **Test Coverage**: 2000+ lines of security tests validate all protection measures
883
+ - 📋 [CVE Manual Audit - November 2025](docs/CVE_MANUAL_AUDIT_2025-11-04.md)
884
+ - **Status**: Critical `make_directory` vulnerability identified and fixed
885
+ - **Focus**: CVE-2025-54794/54795 pattern analysis and mitigation strategies
886
+ - **Date**: November 4, 2025 (Manual CVE Research)
887
+ - 📋 [Shell Command Directory Bypass Audit - November 2025](docs/SHELL_COMMAND_AUDIT_2025-11-04.md)
888
+ - **Status**: ✅ Fixed November 2024 (Retrospective documentation)
889
+ - **Issue**: Shell commands previously could access files outside approved directories via absolute paths
890
+ - **Severity**: HIGH (CVSS ~7.5) - Path traversal via command arguments
891
+ - **Fix Status**: ✅ FIXED - Path extraction and validation implemented
892
+ - **Test Coverage**: 419 lines of comprehensive tests, all passing
893
+ - 📋 [Security Test Coverage Summary](docs/SECURITY_TEST_SUMMARY.md)
894
+ - **Test Suite**: 2000+ lines of security-focused tests in `src/tests/`
895
+ - **CVE Tests**: Explicit tests for CVE-2025-54794, CVE-2025-54795, CVE-2025-53109
896
+ - **Coverage**: Path traversal, symlinks (129+ cases), command injection, shell bypass
897
+
898
+ **Security Architecture:**
899
+
900
+ - Multi-layer path validation (canonical resolution, boundary checking, symlink protection)
901
+ - Defense-in-depth with atomic operations and race condition prevention
902
+ - Directory whitelisting with prefix collision protection
903
+ - Comprehensive security annotations for static analysis tools
865
904
 
866
905
  ### Supported File Types
867
906
 
@@ -9,6 +9,10 @@ const ToolInputSchema = ToolSchema.shape.inputSchema;
9
9
  /**
10
10
  * Helper function to write file content based on file extension
11
11
  * Supports HTML conversion for rich formatting in PDF and DOCX files
12
+ *
13
+ * @security Path must be pre-validated via validatePath() before calling this function
14
+ * @param validPath - VALIDATED path (must have passed through validatePath())
15
+ * @param content - File content to write
12
16
  */
13
17
  async function writeFileBasedOnExtension(validPath, content) {
14
18
  const ext = path.extname(validPath).toLowerCase();
@@ -23,12 +27,14 @@ async function writeFileBasedOnExtension(validPath, content) {
23
27
  title: fileTitle,
24
28
  author: "vulcan-file-ops",
25
29
  });
30
+ // SECURITY: validPath pre-validated by validatePath() - safe from path traversal (CWE-23)
26
31
  await fs.writeFile(validPath, pdfBuffer);
27
32
  }
28
33
  else {
29
34
  // Fallback to simple text PDF for plain text
30
35
  const { createSimpleTextPDF } = await import("../utils/pdf-writer.js");
31
36
  const pdfBuffer = await createSimpleTextPDF(content);
37
+ // SECURITY: validPath pre-validated by validatePath() - safe from path traversal (CWE-23)
32
38
  await fs.writeFile(validPath, pdfBuffer);
33
39
  }
34
40
  }
@@ -39,22 +45,35 @@ async function writeFileBasedOnExtension(validPath, content) {
39
45
  title: fileTitle,
40
46
  author: "vulcan-file-ops",
41
47
  });
48
+ // SECURITY: validPath pre-validated by validatePath() - safe from path traversal (CWE-23)
42
49
  await fs.writeFile(validPath, docxBuffer);
43
50
  }
44
51
  else {
45
52
  // Fallback to simple text DOCX for plain text
46
53
  const { createSimpleDOCX } = await import("../utils/docx-writer.js");
47
54
  const docxBuffer = await createSimpleDOCX(content);
55
+ // SECURITY: validPath pre-validated by validatePath() - safe from path traversal (CWE-23)
48
56
  await fs.writeFile(validPath, docxBuffer);
49
57
  }
50
58
  }
51
59
  else {
52
60
  // Regular text file
61
+ // SECURITY: validPath pre-validated by validatePath() - writeFileContent adds additional atomic write protection
53
62
  await writeFileContent(validPath, content);
54
63
  }
55
64
  }
65
+ /**
66
+ * Process a single file edit request with validation
67
+ *
68
+ * @security All paths validated via validatePath() before file operations
69
+ * @param request - Edit request with path and edits to apply
70
+ * @param failOnAmbiguous - Whether to fail on ambiguous matches
71
+ * @returns Edit result with success status and diff
72
+ */
56
73
  async function processFileEditRequest(request, failOnAmbiguous = true) {
57
74
  try {
75
+ // SECURITY: Path validated against allowed directories, symlink targets checked,
76
+ // prevents CVE-2025-54794 (prefix collision), CVE-2025-53109 (symlink attacks)
58
77
  const validPath = await validatePath(request.path);
59
78
  const result = await applyFileEdits(validPath, request.edits, request.dryRun || false, request.matchingStrategy || "auto", request.failOnAmbiguous !== undefined
60
79
  ? request.failOnAmbiguous
@@ -171,7 +190,11 @@ async function performRollback(rollbackData) {
171
190
  for (const item of rollbackData.reverse()) {
172
191
  // Rollback in reverse order
173
192
  try {
174
- await writeFileContent(item.path, item.originalContent);
193
+ // Security: Re-validate path before rollback to ensure it's still within allowed directories
194
+ // Defense-in-depth: Even though paths were validated during edit, re-validate during rollback
195
+ // to protect against edge cases where allowed directories might have changed
196
+ const validPath = await validatePath(item.path);
197
+ await writeFileContent(validPath, item.originalContent);
175
198
  }
176
199
  catch (rollbackError) {
177
200
  // Log rollback failure but don't throw - we want to attempt all rollbacks
@@ -299,6 +322,12 @@ export async function handleWriteTool(name, args) {
299
322
  if (!parsed.success) {
300
323
  throw new Error(`Invalid arguments for write_file: ${parsed.error}`);
301
324
  }
325
+ // SECURITY: validatePath() enforces:
326
+ // 1. Canonical path resolution (path.resolve + path.normalize)
327
+ // 2. Allowed directory boundary checking (isPathWithinAllowedDirectories)
328
+ // 3. Symlink resolution and target validation (fs.realpath)
329
+ // 4. Parent directory validation for new files
330
+ // Prevents: CWE-23 (Path Traversal), CVE-2025-54794, CVE-2025-53109, CVE-2025-53110
302
331
  const validPath = await validatePath(parsed.data.path);
303
332
  await writeFileBasedOnExtension(validPath, parsed.data.content);
304
333
  return {
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@n0zer0d4y/vulcan-file-ops",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "mcpName": "io.github.n0zer0d4y/vulcan-file-ops",
5
- "description": "MCP server that gives Claude Desktop and other AI assistants filesystem superpowers—read, write, edit, and manage files like AI coding assistants",
5
+ "description": "MCP server for AI assistants: read, write, edit, and manage files securely on local filesystem.",
6
6
  "license": "MIT",
7
7
  "author": "Lloyd Barcatan",
8
8
  "homepage": "https://github.com/n0zer0d4y/vulcan-file-ops",