Commit f40d22e
committed
feat: production hardening — encryption, whitelist security, integration tests, coverage, error handling
CRITICAL SECURITY FIXES:
- Encrypt stored credentials with AES-256-GCM (machine-specific key)
- Replace blocklist with whitelist-based command security
- Allowed commands: git, npm, node, python, ls, cat, grep, find, echo, etc.
- Unknown commands require explicit approval
- Blocked patterns: eval(), exec(), rm -rf /, curl|sh, fork bombs, etc.
CODE QUALITY:
- Remove ALL silent error swallowing (30 instances replaced with proper logging)
- Added logger imports to all files that needed them
- Removed placeholder files (state.json, mcp.json)
- Added vitest.config.ts with coverage thresholds (60% lines, 50% branches)
- Added @vitest/coverage-v8 dependency
TESTING:
- Created comprehensive E2E integration tests (41 new tests)
- Tests cover: tool executor, security whitelist, encryption, session manager,
settings manager, rate limiter, MCP manager, file lock, plugin loader
- Total: 403 tests across 13 test files, 100% pass rate
- Coverage enforcement in CI workflow
CI/CD:
- Updated CI to run tests with coverage
- Upload coverage reports as artifacts
- Updated release workflow with coverage step
All changes maintain backward compatibility.1 parent f2c350b commit f40d22e
File tree
30 files changed
+1303
-242
lines changed- .github/workflows
- dist
- bin
- providers
- sessions
- tools
- ui
- src
- agents
- bin
- core
- providers
- search
- security
- sessions
- tools
- ui
- tests/e2e
30 files changed
+1303
-242
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
37 | 44 | | |
38 | 45 | | |
39 | 46 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments