Skip to content

Commit 2cfe7b7

Browse files
doublegateclaude
andcommitted
feat: v1.8.0 - Breaking Changes Preparation & Deprecation System
## Summary Major release implementing v2.0.0 preparation infrastructure including deprecation warning system, migration preview tools, and compatibility mode for early v2.0.0 behavior testing. ## New Features ### Deprecation Warning System - 8 deprecation codes (DEP001-DEP008) covering all v2.0.0 breaking changes - Session-based warning tracking (no duplicate warnings) - Suppressible via CYBERCHEF_SUPPRESS_DEPRECATIONS environment variable - Integration with telemetry system for usage tracking ### Migration Preview Tool (cyberchef_migration_preview) - Analyze mode: Check recipes for v2.0.0 compatibility issues - Transform mode: Convert recipes to v2.0.0 format - Returns detailed diagnostics with fix suggestions - Supports batch analysis of multiple recipes ### Deprecation Stats Tool (cyberchef_deprecation_stats) - Track deprecated API usage in current session - Returns warned codes, total count, suppression status - Useful for migration planning and compliance ### v2.0.0 Compatibility Mode - Enable with V2_COMPATIBILITY_MODE=true - Preview v2.0.0 behavior before upgrade - Tool naming changes, enhanced error responses - Deprecation warnings become errors ## Breaking Changes Documentation - Comprehensive guide at docs/v2.0.0-breaking-changes.md - Covers: tool naming, recipe schema, error format, configuration - Migration examples and rollback procedures - FAQ section for common questions ## Test Coverage - 81 new tests (43 deprecation + 38 migration-preview) - Total: 563 tests across 15 test suites - All tests passing ## Files Changed - 5 new files (deprecation module, tests, documentation) - 7 modified files (version bumps, README, CHANGELOG) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 70e1f8d commit 2cfe7b7

12 files changed

Lines changed: 2421 additions & 22 deletions

CHANGELOG.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,49 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.8.0] - 2025-12-17
11+
12+
### Added
13+
- **Deprecation Warning System** (`src/node/deprecation.mjs`): Comprehensive runtime warning system for APIs changing in v2.0.0
14+
- 8 deprecation codes (DEP001-DEP008) covering tool naming, recipe schema, error format, configuration, arguments, recipe format, and meta-tool renames
15+
- Session-based warning tracking (warnings emitted only once per session per code)
16+
- Suppressible via `CYBERCHEF_SUPPRESS_DEPRECATIONS=true` environment variable
17+
- V2 compatibility mode that elevates warnings to errors via `V2_COMPATIBILITY_MODE=true`
18+
- Recipe analysis tools (`analyzeRecipeCompatibility`, `transformRecipeToV2`)
19+
- Utility functions (`getToolName`, `stripToolPrefix`)
20+
- **Migration Preview Tool** (`cyberchef_migration_preview`): New MCP tool for analyzing and transforming recipes
21+
- `analyze` mode: Check recipes for v2.0.0 compatibility issues with detailed diagnostics
22+
- `transform` mode: Automatically convert recipes to v2.0.0 format
23+
- Reports issues with severity levels (breaking/warning), locations, and fix suggestions
24+
- **Deprecation Stats Tool** (`cyberchef_deprecation_stats`): New MCP tool for tracking deprecated API usage
25+
- Shows which deprecations have been triggered in current session
26+
- Includes session duration, suppression status, and v2 compatibility mode status
27+
- Lists all available deprecation codes with details
28+
- **v2.0.0 Breaking Changes Documentation** (`docs/v2.0.0-breaking-changes.md`): Comprehensive migration guide
29+
- Tool naming convention changes (removing `cyberchef_` prefix)
30+
- Recipe schema format changes (Zod v4 validation)
31+
- Error response format changes (structured error codes)
32+
- Configuration system changes (unified config file)
33+
- Legacy argument handling changes (named object args)
34+
- Recipe array format changes (explicit operation objects)
35+
- Meta-tool renames (`cyberchef_bake` -> `bake`, `cyberchef_search` -> `search`)
36+
- Migration examples and FAQ section
37+
- **Test Suites**: 81 new tests for v1.8.0 features (total: 563 tests, all passing)
38+
- `tests/mcp/deprecation.test.mjs`: 43 tests for deprecation warning system
39+
- `tests/mcp/migration-preview.test.mjs`: 38 tests for migration preview tool and server integration
40+
- Increased from 493 tests (v1.7.2) to 563 tests across 15 test suites
41+
42+
### Changed
43+
- **VERSION**: Updated from 1.7.3 to 1.8.0 in `src/node/mcp-server.mjs`
44+
- **Server Startup Logging**: Enhanced to display v1.8.0 configuration options (V2_COMPATIBILITY_MODE, SUPPRESS_DEPRECATIONS)
45+
- **Meta-tool Deprecation Warnings**: `cyberchef_bake` and `cyberchef_search` now emit deprecation warnings when used
46+
47+
### Documentation
48+
- **Release Notes** (`docs/releases/v1.8.0.md`): Comprehensive release notes for v1.8.0
49+
- Updated README.md with v1.8.0 features and migration tools
50+
- Updated CLAUDE.md with v1.8.0 version references
51+
- Updated project roadmap to reflect Phase 3 progress
52+
1053
## [1.7.3] - 2025-12-17
1154

1255
### Added

CLAUDE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ Guidance for Claude Code when working with this repository.
44

55
## Project Overview
66

7-
**CyberChef MCP Server** (v1.7.3) - Fork of GCHQ CyberChef wrapping the Node.js API into an MCP server. Exposes 300+ operations (encryption, encoding, compression, forensics) as AI assistant tools.
7+
**CyberChef MCP Server** (v1.8.0) - Fork of GCHQ CyberChef wrapping the Node.js API into an MCP server. Exposes 300+ operations (encryption, encoding, compression, forensics) as AI assistant tools.
88

99
| Metric | Value |
1010
|--------|-------|
11-
| MCP Version | 1.7.3 |
12-
| Tests | 493 (100% passing) |
11+
| MCP Version | 1.8.0 |
12+
| Tests | 563 (100% passing) |
1313
| Coverage | 74.97% lines, 90.39% functions |
1414

1515
**Focus:** MCP server (`src/node/mcp-server.mjs`), not the web app.
@@ -38,7 +38,7 @@ npm start # Dev server with hot reload
3838
npm run build # Production build
3939
npm run lint # ESLint (zero errors required)
4040
npm test # Core unit tests
41-
npm run test:mcp # MCP server tests (493 tests)
41+
npm run test:mcp # MCP server tests (563 tests)
4242
npm run test:coverage # Coverage report (thresholds: 70% lines/functions)
4343
npm run testnodeconsumer # Test CJS/ESM consumers
4444
```
@@ -131,5 +131,5 @@ git tag -a v1.x.x -F docs/releases/v1.x.x.md && git push origin v1.x.x
131131
| Guides | `docs/guides/commands.md` (MCP tools), `user_guide.md` (installation) |
132132
| Planning | `docs/planning/ROADMAP.md`, `docs/planning/phases/overview.md` |
133133
| Security | `docs/security/audit.md` |
134-
| Releases | `docs/releases/v1.7.0.md` (latest), `v1.6.2.md`, `v1.6.1.md`, `v1.6.0.md` ... `v1.0.0.md` |
134+
| Releases | `docs/releases/v1.8.0.md` (latest), `v1.7.3.md`, `v1.7.2.md`, `v1.7.1.md`, `v1.7.0.md` ... `v1.0.0.md` |
135135
| Internal | `docs/internal/tech-debt-analysis-v1.6.1.md` (project health: 8.9/10) |

README.md

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This project provides a **Model Context Protocol (MCP)** server interface for **
44

55
By running this server, you enable AI assistants (like Claude, Cursor AI, and others) to natively utilize CyberChef's extensive library of 463 data manipulation operations—including encryption, encoding, compression, and forensic analysis—as executable tools.
66

7-
**Latest Release:** v1.7.3 | [Release Notes](docs/releases/v1.7.3.md) | [Security Policy](SECURITY.md) | [Security Fixes Report](docs/security/SECURITY_FIX_REPORT.md)
7+
**Latest Release:** v1.8.0 | [Release Notes](docs/releases/v1.8.0.md) | [Security Policy](SECURITY.md) | [Security Fixes Report](docs/security/SECURITY_FIX_REPORT.md)
88

99
![CyberChef MCP Banner](images/CyberChef-MCP_Banner-Logo.jpg)
1010

@@ -56,6 +56,14 @@ The server exposes CyberChef operations as MCP tools:
5656
* `cyberchef_telemetry_export` - Privacy-first usage analytics (opt-in)
5757
* `cyberchef_cache_stats` / `cyberchef_cache_clear` - Cache inspection and management
5858
* `cyberchef_quota_info` - Resource quota and usage tracking
59+
* **Migration Tools** (v1.8.0): Comprehensive v2.0.0 preparation and migration assistance
60+
* `cyberchef_migration_preview` - Analyze recipes for v2.0.0 compatibility with two modes:
61+
- `analyze` mode: Check recipes for breaking changes with detailed diagnostics
62+
- `transform` mode: Automatically convert recipes to v2.0.0 format
63+
* `cyberchef_deprecation_stats` - Track deprecated API usage statistics
64+
- Shows deprecation warnings triggered in current session
65+
- Reports session duration, suppression status, and v2 compatibility mode
66+
- Lists all 8 deprecation codes (DEP001-DEP008) with details
5967

6068
### Technical Highlights
6169
* **Dockerized**: Runs as a lightweight, self-contained Docker container based on Chainguard distroless Node.js 22 (~90MB compressed, 70% smaller attack surface than traditional images).
@@ -68,7 +76,7 @@ The server exposes CyberChef operations as MCP tools:
6876
* **Advanced Features** (v1.7.0): Enterprise-grade capabilities with batch processing (parallel/sequential execution of up to 100 operations), privacy-first telemetry collection (disabled by default, no input/output data captured), sliding window rate limiting for resource protection, enhanced caching with inspection tools, and resource quota tracking (concurrent operations, data sizes). All features are configurable via environment variables with secure defaults. See [Release Notes](docs/releases/v1.7.0.md) for details.
6977
* **Enhanced Observability** (v1.5.0): Structured JSON logging with Pino for production monitoring, comprehensive error handling with actionable recovery suggestions, automatic retry logic with exponential backoff, request correlation with UUID tracking, circuit breaker pattern for cascading failure prevention, and streaming infrastructure for progressive results on large operations. See [Release Notes](docs/releases/v1.5.0.md) for details.
7078
* **Performance Optimized** (v1.4.0): LRU cache for operation results (100MB default), automatic streaming for large inputs (10MB+ threshold), configurable resource limits (100MB max input, 30s timeout), memory monitoring, and comprehensive benchmark suite. See [Performance Tuning Guide](docs/architecture/performance-tuning.md) for configuration options.
71-
* **Upstream Sync Automation** (v1.3.0): Automated monitoring of upstream CyberChef releases every 6 hours, one-click synchronization workflow, comprehensive validation test suite with 493 tests, and emergency rollback mechanism.
79+
* **Upstream Sync Automation** (v1.3.0): Automated monitoring of upstream CyberChef releases every 6 hours, one-click synchronization workflow, comprehensive validation test suite with 563 tests, and emergency rollback mechanism.
7280
* **Security Hardened** (v1.4.5+): Chainguard distroless base image with zero-CVE baseline, non-root execution (UID 65532), automated Trivy vulnerability scanning with build-fail thresholds, dual SBOM strategy (Docker Scout attestations + CycloneDX), read-only filesystem support, SLSA Build Level 3 provenance, and 7-day SLA for critical CVE patches. Fixed 11 of 12 code scanning vulnerabilities including critical cryptographic randomness weakness and 7 ReDoS vulnerabilities. See [Security Policy](SECURITY.md) and [Security Fixes Report](docs/security/SECURITY_FIX_REPORT.md) for details.
7381
* **Production Ready**: Comprehensive CI/CD with CodeQL v4, automated testing, and dual-registry container publishing (Docker Hub + GHCR) with complete supply chain attestations.
7482

@@ -101,17 +109,17 @@ For environments without direct GHCR access, download the pre-built Docker image
101109
1. **Download the tarball** (approximately 90MB compressed):
102110
```bash
103111
# Download from GitHub Releases
104-
wget https://github.com/doublegate/CyberChef-MCP/releases/download/v1.7.3/cyberchef-mcp-v1.7.3-docker-image.tar.gz
112+
wget https://github.com/doublegate/CyberChef-MCP/releases/download/v1.8.0/cyberchef-mcp-v1.8.0-docker-image.tar.gz
105113
```
106114

107115
2. **Load the image into Docker:**
108116
```bash
109-
docker load < cyberchef-mcp-v1.7.3-docker-image.tar.gz
117+
docker load < cyberchef-mcp-v1.8.0-docker-image.tar.gz
110118
```
111119

112120
3. **Tag for easier usage:**
113121
```bash
114-
docker tag ghcr.io/doublegate/cyberchef-mcp_v1:v1.7.3 cyberchef-mcp
122+
docker tag ghcr.io/doublegate/cyberchef-mcp_v1:v1.8.0 cyberchef-mcp
115123
```
116124

117125
4. **Run the server:**
@@ -252,6 +260,10 @@ CYBERCHEF_CACHE_ENABLED=true # Enable/disable caching
252260
# Resource Quotas (v1.7.0+)
253261
CYBERCHEF_MAX_CONCURRENT_OPS=10 # Maximum concurrent operations
254262
263+
# Deprecation & Migration (v1.8.0+)
264+
V2_COMPATIBILITY_MODE=false # Enable v2.0.0 behavior preview (elevates warnings to errors)
265+
CYBERCHEF_SUPPRESS_DEPRECATIONS=false # Suppress deprecation warnings
266+
255267
# Performance (v1.4.0+)
256268
CYBERCHEF_MAX_INPUT_SIZE=104857600 # Maximum input size (100MB)
257269
CYBERCHEF_OPERATION_TIMEOUT=30000 # Operation timeout in milliseconds (30s)
@@ -467,8 +479,8 @@ CyberChef MCP Server has a comprehensive development roadmap spanning **19 relea
467479
| Phase | Releases | Timeline | Focus | Status |
468480
|-------|----------|----------|-------|--------|
469481
| **Phase 1: Foundation** | v1.2.0 - v1.4.6 | Q4 2025 - Q1 2026 | Security hardening, upstream sync, performance | **Completed** |
470-
| **Phase 2: Enhancement** | v1.5.0 - v1.7.3 | Q2 2026 | Streaming, recipe management, batch processing | **v1.7.3 Released** |
471-
| **Phase 3: Maturity** | v1.8.0 - v2.0.0 | Q3 2026 | API stabilization, external tool integration, v2.0.0 | **Planning Complete** |
482+
| **Phase 2: Enhancement** | v1.5.0 - v1.7.3 | Q2 2026 | Streaming, recipe management, batch processing | **Completed** |
483+
| **Phase 3: Maturity** | v1.8.0 - v2.0.0 | Q3 2026 | API stabilization, external tool integration, v2.0.0 | **v1.8.0 Released** |
472484
| **Phase 4: Expansion** | v2.1.0 - v2.3.0 | Q4 2026 | Multi-modal, advanced transports, plugins | Planned |
473485
| **Phase 5: Enterprise** | v2.4.0 - v2.6.0 | Q1 2027 | OAuth 2.1, RBAC, Kubernetes, observability | Planned |
474486
| **Phase 6: Evolution** | v2.7.0 - v3.0.0 | Q2-Q3 2027 | Edge deployment, AI-native features, v3.0.0 | Planned |
@@ -533,6 +545,8 @@ Detailed documentation is organized in the [`docs/`](docs/) directory:
533545
* [**Security Audit**](docs/security/audit.md): Comprehensive security assessment
534546
* [**Security Fixes Report**](docs/security/SECURITY_FIX_REPORT.md): Detailed report of 11 vulnerability fixes (ReDoS and cryptographic weaknesses)
535547
* [**Security Fixes Summary**](docs/security/SECURITY_FIXES_SUMMARY.md): Quick reference for recent security improvements
548+
* [**v2.0.0 Breaking Changes**](docs/v2.0.0-breaking-changes.md): Comprehensive migration guide for v2.0.0 with deprecation codes, examples, and FAQ
549+
* [**Release Notes v1.8.0**](docs/releases/v1.8.0.md): Breaking changes preparation - deprecation warnings, migration preview tool, v2.0.0 compatibility mode
536550
* [**Release Notes v1.7.3**](docs/releases/v1.7.3.md): Reference documentation and v2.0.0 integration planning - 42 new documentation files, comprehensive security tool reference
537551
* [**Release Notes v1.7.2**](docs/releases/v1.7.2.md): CI improvements, test expansion, documentation updates - enhanced workflows, 150 new tests, corrected metrics
538552
* [**Release Notes v1.7.1**](docs/releases/v1.7.1.md): Repository cleanup and workflow enhancements - removed 88 unused files, enhanced upstream sync
@@ -617,7 +631,7 @@ All workflows use the latest CodeQL Action v4 for security scanning and SARIF up
617631
# Run all tests (requires Node.js 22+)
618632
npm test
619633
620-
# Run MCP validation test suite (493 tests with Vitest)
634+
# Run MCP validation test suite (563 tests with Vitest)
621635
npm run test:mcp
622636
623637
# Run MCP tests with coverage report
@@ -638,11 +652,11 @@ npm run lint
638652
```
639653

640654
**Test Coverage:**
641-
The MCP server maintains comprehensive test coverage across 13 test suites:
642-
- **493 total tests** covering all MCP server components (increased from 343 in v1.7.0)
655+
The MCP server maintains comprehensive test coverage across 15 test suites:
656+
- **563 total tests** covering all MCP server components (increased from 493 in v1.7.2)
643657
- **Coverage thresholds**: 70% lines/statements/functions, 65% branches
644658
- **Current coverage**: 74.97% lines, 74.97% statements, 90.39% functions, 71.62% branches
645-
- Test suites: coverage-improvement, errors, logger, mcp-server, real-server-handlers, recipe-manager, recipe-storage, recipe-validator, retry, server-integration, streaming, v1.7.0, validation
659+
- Test suites: coverage-improvement, deprecation, errors, logger, mcp-server, migration-preview, real-server-handlers, recipe-manager, recipe-storage, recipe-validator, retry, server-integration, streaming, v1.7.0, validation
646660
- Note: Coverage variation occurs as new features are added; mcp-server.mjs currently has lower coverage due to extensive integration code
647661

648662
## Contributing

0 commit comments

Comments
 (0)