mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-02-06 05:23:08 +00:00
Fix security and reliability issues identified in code review: 1. Security: Remove non-null assertions in credentials.ts - Add proper validation before returning credentials - Throw early with clear error messages showing which vars are missing - Prevents runtime failures with cryptic undefined errors 2. Reliability: Add pagination safety limits - Add MAX_PAGES limit (1000) to all pagination loops - Prevents infinite loops if API returns same cursor repeatedly - Applies to: cleanupOrphanedWorkflows, cleanupOldExecutions, cleanupExecutionsByWorkflow Changes ensure safer credential handling and prevent potential infinite loops in cleanup operations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>