#7892: Claude/setup agent firewall ww xsv
agents
stale
Cluster:
Security Enhancements and Fixes
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adds a “firewall” hardening layer around agent behavior/config: it disables runtime SOUL.md hot-swapping (`src/hooks/soul-evil.ts`), introduces a Tailscale-gated internal Config API (`src/internal/config-api.ts`), a unified config loader with API-first + disk fallback (`src/internal/config-loader.ts`), and a JSONL security event logger (`src/internal/security-logger.ts`). It also wires the loader into workspace template/bootstrap file creation (`src/agents/workspace.ts`) and adds tests for the new modules.
Key issues to address before merge are around the new secure config loader integration and test reliability: `workspace.ts` currently calls `loadConfigFile()` with docs template filenames that the loader can’t resolve (so the “secure” path won’t actually be used), the integrity-failure fallback guard is based on a substring that doesn’t match the thrown error messages, and config-api tests are likely to fail in environments without Tailscale because `getTailscaleBinary()` isn’t mocked even though exec is.
<h3>Confidence Score: 2/5</h3>
- This PR has meaningful functional changes, but there are a couple of high-severity correctness/testability issues that should be fixed before merging.
- Score is reduced due to (1) the secure config loader integration in `workspace.ts` appearing non-functional (wrong filename mapping) and (2) unit tests for the config API likely failing in CI because `getTailscaleBinary()` is still called even when exec is mocked. The remaining concerns are smaller correctness/robustness issues.
- src/agents/workspace.ts, src/internal/config-api.ts, src/internal/config-api.test.ts
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
**Context used:**
- Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8))
- Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13))
<!-- /greptile_comment -->
Most Similar PRs
#6512: Claude/setup open claw agent f v sqk
by franelcisco · 2026-02-01
83.7%
#15852: fix: pass agentId when resolving IRC session paths
by MisterGuy420 · 2026-02-14
82.4%
#9829: Fix MCP transport reconnect and SSE header handling
by mabengda · 2026-02-05
81.6%
#14871: Claude/audit codebase architecture 8a ql2
by MagnoliaLex · 2026-02-12
80.4%
#13833: Cursor/cloud agent 1770777372587 3zom0
by zhch158 · 2026-02-11
80.1%
#7346: Security: add hardening module and secure-bot extension
by AlphonseC · 2026-02-02
80.0%
#10676: Claude/authorize external access lbcnb
by zacharyjleach-stack · 2026-02-06
79.1%
#8546: Fix/config UI improvements
by RandomRaine · 2026-02-04
78.3%
#19560: docs: refactor agent workspace default location & bootstrap configu...
by ashinkuniyil · 2026-02-17
78.2%
#7316: fix: /chat dashboard performance
by felipcsousa · 2026-02-02
78.2%