* Add Excel diagnostics and helper classes for enhanced error reporting and automation - Implemented ExcelDiagnostics class for comprehensive error reporting, including detailed context for Excel operations. - Added ExcelHelper class to manage Excel COM automation with improved resource management and security checks. - Created project file for ExcelMcp.CLI with necessary dependencies and metadata. - Developed main program logic for command-line interface, including argument validation and command handling for various Excel operations. - Included detailed help and usage instructions for users, along with examples and requirements. * Add integration and unit tests for ExcelMcp CLI and MCP Server - Implemented integration tests for ScriptCommands and SheetCommands to validate VBA script operations and worksheet manipulations. - Created unit tests for argument validation and Excel file checks in the ExcelMcp CLI. - Added project files for test projects with necessary dependencies. - Developed integration tests for ExcelMcp Server tools to ensure proper functionality of resource-based commands. - Included cleanup logic in tests to manage temporary files and directories. * Update documentation for .NET 10 compatibility and workflow changes * Remove build and release workflows from GitHub Actions * Refine release strategy documentation for MCP Server, CLI, and combined releases * Apply Sbroenne prefix to all project namespaces, simplify CLI executable name, and implement .NET best practices (#1) * Initial plan * Apply Sbroenne prefix to all project namespaces and solution file - Rename ExcelMcp.sln to Sbroenne.ExcelMcp.sln - Update all CLI namespaces from ExcelMcp.* to Sbroenne.ExcelMcp.CLI.* - Add AssemblyName and RootNamespace properties to all projects - Fix using statements in CLI to reference correct namespaces - Update Program.cs to use CLI Commands instead of Core Commands Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Fix old repository and product naming references - Update Directory.Build.props: Product name from ExcelCLI to Sbroenne.ExcelMcp - Update Directory.Build.props: Repository URLs from ExcelCLI to mcp-server-excel - Update Program.cs: Repository links and branding from ExcelCLI to ExcelMcp.CLI - Update documentation: Replace ExcelCLI with Sbroenne.ExcelMcp/ExcelMcp.CLI - Update workflows: Fix executable name and help text validation - Update CONTRIBUTING, SECURITY, CLI, AUTHOR, COPILOT docs Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Complete project cleanup and NuGet best practices - Remove legacy ExcelMcp.Tests folder (not in solution) - Update TEST_GUIDE.md with correct test structure - Add PackageReadmeFile to CLI project (includes CLI.md) - Fix .NET version reference from 8.0 to 10.0 in Program.cs - Fix release workflow paths: net8.0 → net10.0 - Fix release workflow DLL names with Sbroenne prefix - Ensure all NuGet metadata follows best practices Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Add comprehensive naming review summary documentation - Document all naming convention changes - Provide migration notes for developers - List all best practices compliance items - Include before/after examples - Summary statistics of changes made Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Simplify CLI executable name to 'excelcli.exe' - Change AssemblyName from Sbroenne.ExcelMcp.CLI to excelcli - Update build-cli.yml workflow for new executable name - Update release-cli.yml with excelcli.exe references - Update all documentation (INSTALLATION, CLI, DEVELOPMENT, etc.) - Update Program.cs usage examples to use 'excelcli' command - Update NAMING_REVIEW_SUMMARY.md with new executable name Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Apply .NET best practices improvements - Add XML documentation generation to Core library - Add version information to Core library (2.0.0) - Enable deterministic builds for reproducible binaries - Enable package validation for NuGet packages (CLI and MCP Server) - Create comprehensive DOTNET_BEST_PRACTICES_REVIEW.md document All changes maintain backward compatibility and enhance professional quality. Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Update all documentation for simplified CLI executable name - Update CLI.md: Change zip file name and path references to excelcli - Update COMMANDS.md: All 80+ command examples now use 'excelcli' command - Update excel-powerquery-vba-copilot-instructions.md: All command examples updated - Update .github/copilot-instructions.md: All command examples and workflows updated All documentation now consistently references 'excelcli' as the executable name (156 command references updated). Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Refocus excel-powerquery-vba-copilot-instructions.md on MCP server - Changed from CLI command examples to MCP server conversational workflows - Updated title and introduction to focus on AI-assisted development - Replaced CLI commands with 6 resource-based MCP tools (excel_file, excel_powerquery, excel_worksheet, excel_parameter, excel_cell, excel_vba) - Added conversational workflow examples (Power Query refactoring, VBA enhancement, etc.) - Updated use cases to emphasize AI development vs scripted automation - Added MCP server installation and configuration instructions - Added example prompts for GitHub Copilot integration - Clarified distinction between MCP server (development) and CLI (automation) The file now properly guides users on using the MCP server for AI-powered Excel development workflows. Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Remove intermediary documentation files - Remove NAMING_REVIEW_SUMMARY.md (documented changes during PR, no longer needed) - Remove DOTNET_BEST_PRACTICES_REVIEW.md (review completed, current state documented elsewhere) - Remove .github/BRANCH_PROTECTION.md (setup guide, not needed for current state) - Remove .github/CODEQL_SETUP_FIX.md (troubleshooting doc, issue resolved) - Remove .github/SECURITY_SETUP.md (setup guide, security already configured) All removed files documented the transition process but aren't needed to document the current project state. Essential documentation remains: - README.md (project overview and quick start) - SECURITY.md (security policy) - docs/CONTRIBUTING.md (contribution guidelines) - docs/CLI.md, docs/COMMANDS.md (usage documentation) - .github/copilot-instructions.md (AI assistant integration) Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Add XML documentation for command interfaces and implementations * Fix GitHub workflow configuration mismatches and add prevention guidelines (#2) * Initial plan * Fix GitHub workflow configuration issues - .NET version and package naming Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Add GitHub workflows configuration management guidelines to prevent sync issues Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Enhance GitHub workflows: update CLI and MCP Server build paths, improve test output messages, and adjust dependency review settings * Update MCP Server and CLI project files for improved architecture support and documentation clarity
6.8 KiB
Security Policy
Supported Versions
We actively support the following versions of ExcelMcp with security updates:
| Version | Supported | Status |
|---|---|---|
| 1.0.x | ✅ | Active |
| < 1.0 | ❌ | Unsupported |
Security Features
ExcelMcp includes several security measures:
Input Validation
- Path Traversal Protection: All file paths are validated with
Path.GetFullPath() - File Size Limits: 1GB maximum file size to prevent DoS attacks
- Extension Validation: Only
.xlsxand.xlsmfiles are accepted - Path Length Validation: Maximum 32,767 characters (Windows limit)
Code Analysis
- Enhanced Security Rules: CA2100, CA3003, CA3006, CA5389, CA5390, CA5394 enforced as errors
- Treat Warnings as Errors: All code quality issues must be resolved
- Static Analysis: SecurityCodeScan.VS2019 package integrated
- CodeQL Scanning: Automated security scanning on every push
COM Security
- Controlled Excel Automation: Excel.Application runs with
Visible=falseandDisplayAlerts=false - Resource Cleanup: Comprehensive COM object disposal and garbage collection
- No Remote Connections: Only local Excel automation supported
Dependency Management
- Dependabot: Automated dependency updates and security patches
- Dependency Review: Pull request scanning for vulnerable dependencies
- Central Package Management: Consistent versioning across all projects
Reporting a Vulnerability
We take security vulnerabilities seriously. If you discover a security issue, please follow these steps:
1. DO NOT Create a Public Issue
Please do not create a public GitHub issue for security vulnerabilities. This could put all users at risk.
2. Report Privately
Report security vulnerabilities using one of these methods:
Preferred Method: GitHub Security Advisories
- Go to https://github.com/sbroenne/mcp-server-excel/security/advisories
- Click "Report a vulnerability"
- Fill out the advisory form with detailed information
Alternative: Email Send an email to: [maintainer email - to be added]
Subject: [SECURITY] ExcelMcp Vulnerability Report
3. Information to Include
Please provide as much information as possible:
- Description: Clear description of the vulnerability
- Impact: What could an attacker do with this vulnerability?
- Affected Versions: Which versions are affected?
- Proof of Concept: Steps to reproduce (if possible)
- Suggested Fix: If you have a fix or mitigation (optional)
Example:
Vulnerability: Path traversal in file operations
Impact: Attacker could read/write files outside intended directory
Affected Versions: 1.0.0 - 1.0.2
PoC: ExcelMcp.exe pq-export "../../../etc/passwd" "query"
Suggested Fix: Validate resolved paths are within allowed directories
4. What to Expect
- Acknowledgment: Within 48 hours
- Initial Assessment: Within 5 business days
- Status Updates: Regular updates on progress
- Fix Timeline:
- Critical: 7 days
- High: 30 days
- Medium: 90 days
- Low: Best effort
5. Coordinated Disclosure
We follow responsible disclosure practices:
- Private Fix: We'll develop a fix privately
- Security Advisory: Create GitHub Security Advisory
- CVE Assignment: Request CVE if applicable
- Public Release: Release patch with security notes
- Credit: We'll credit you in the release notes (if desired)
Security Best Practices for Users
MCP Server Security
- Validate AI Requests: Review Excel operations requested by AI assistants
- File Path Restrictions: Only allow MCP Server access to specific directories
- Audit Logs: Monitor MCP Server operations in logs
- Trust Configuration: Only enable VBA trust when necessary
CLI Security
- Script Validation: Review automation scripts before execution
- File Permissions: Ensure Excel files have appropriate permissions
- Isolated Environment: Run in sandboxed environment when processing untrusted files
- Excel Security Settings: Maintain appropriate Excel macro security settings
Development Security
- Code Review: All changes require review before merge
- Branch Protection: Main branch protected with required checks
- Signed Commits: Consider using signed commits (recommended)
- Least Privilege: Run with minimal required permissions
Known Security Considerations
Excel COM Automation
- Local Only: ExcelMcp only supports local Excel automation
- Windows Only: Requires Windows with Excel installed
- Excel Process: Creates Excel.Application COM objects
- Macro Security: VBA operations require user consent via
setup-vba-trust
File System Access
- Full Path Resolution: All paths resolved to absolute paths
- No Network Paths: UNC paths and network drives not supported
- Current User Context: Operations run with current user permissions
AI Integration (MCP Server)
- Trusted AI Assistants: Only use with trusted AI platforms
- Request Validation: Review operations before Excel executes them
- Sensitive Data: Avoid exposing workbooks with sensitive data to AI assistants
- Audit Trail: MCP Server logs all operations
Security Updates
Security updates are published through:
- GitHub Security Advisories: https://github.com/sbroenne/mcp-server-excel/security/advisories
- Release Notes: https://github.com/sbroenne/mcp-server-excel/releases
- NuGet Advisories: Package vulnerabilities shown in NuGet
Subscribe to repository notifications to receive security alerts.
Vulnerability Disclosure Policy
Our Commitment
- We will acknowledge receipt of vulnerability reports within 48 hours
- We will keep reporters informed of progress
- We will credit researchers in security advisories (if desired)
- We will not take legal action against researchers following responsible disclosure
Researcher Guidelines
- Responsible Disclosure: Give us time to fix before public disclosure
- No Harm: Do not access, modify, or delete other users' data
- Good Faith: Act in good faith to help improve security
- Legal: Follow all applicable laws
Security Contacts
- GitHub Security: https://github.com/sbroenne/mcp-server-excel/security
- Maintainer: @sbroenne
Additional Resources
Version History
| Version | Date | Security Changes |
|---|---|---|
| 1.0.0 | 2024 | Initial security implementation with input validation |
Last Updated: 2024-10-19
Thank you for helping keep ExcelMcp and its users safe!