Tighten ingress/egress controls #58
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally filed by @coilysiren on 2026-05-05T08:23:35Z - https://github.com/coilysiren/repo-recall/issues/54
Today repo-recall binds
127.0.0.1(no auth), shells out togit/gh, and makes outbound calls to FCM (opt-in push) plusghAPI. Reasonable for a personal-laptop tool, but the surface is wider than it needs to be: any local process can hit:7777, and subprocess construction is scattered across call sites.Three tiers, pick one:
Tier 1 - tighten what's there (~2-4h)
Command::newcall site. Confirm nosh -cwith interpolation, all args go through.arg().*, allow only explicit origins (ornullfor file-scheme MCP widgets).--mcp-onlyflag that skips the HTTP listener when the dashboard isn't wanted.Tier 2 - real fences (~1 day)
$XDG_RUNTIME_DIR(or$TMPDIRon Mac) with 0600 perms. Kills the "any process on the box" ingress.run_tool(Tool::Git | Tool::Gh, args). Reject anything else. Log invocations to a ring buffer for audit.Tier 3 - sandbox the process (~2 days)
sandbox-execprofile - filesystem read-only outside~/projectsand~/.claude/projects, network deny except FCM, no exec exceptgit/gh. Brew binary becomes a launcher that re-execs itself under the profile.ProtectSystem=strict,RestrictAddressFamilies,SystemCallFilter). Skip until there's a homelab deployment that wants it.Recommendation
Tier 2. Unix socket + subprocess chokepoint covers most of the upside without the launcher complexity of Tier 3. Tier 1 items are cheap enough to fold in alongside.
Out of scope
$TMPDIR, regenerable, not sensitive.