Running coding agents without handing them my credentials

Developers experimenting with AI coding agents are grappling with how to let them act on their behalf—running commands, calling APIs, accessing GitHub—without exposing long‑lived credentials. Many favor approaches like SSH key forwarding, TLS‑intercepting proxies, microVM sandboxes, and tools such as Lend, Docker Sandboxes, or fnox to inject secrets at the network boundary and enforce fine‑grained access control. Others argue these schemes can be security theater if agents still gain broad powers over the underlying services, highlighting an unresolved tension between safety, convenience, and truly least‑privilege designs.

Credential proxying vs. giving agents raw keys

  • Many tools aim to let agents act on behalf of a user without ever seeing long‑lived credentials (SSH keys, API tokens, browser cookies).
  • Approaches include SSH forwarding, HTTP(S) proxies that inject Authorization headers, and Docker/microVM secret-injection where a placeholder is replaced at the proxy layer.
  • Supporters stress: secrets don’t enter transcripts, logs, or agent sandboxes, reducing risk of leakage via prompt injection or storage.
  • Critics argue: if an agent can do everything a key allows, the security boundary is weak; it’s more “key hiding” than real access control.

Sandboxing strategies

  • Heavy use of Docker Sandboxes, microVM frameworks, and tools like microsandbox, smolvm, nono, yoloai, and other local jail/VM setups.
  • Typical policies: no filesystem, env, or credentials by default; restricted network egress; explicit carve‑outs for tools and hosts.
  • Some prefer separate physical machines (two‑laptop model) over VMs for clearer mental separation.
  • Others accept a lighter model: unprivileged local user accounts instead of full isolation.

Least privilege and fine‑grained access

  • Strong support for least-privilege tokens: read‑only, scoped to specific endpoints, repos, or domains; no destructive access unless explicitly accepted.
  • Some services lack granular tokens, forcing broad powers if an agent must be useful.
  • Tools like ACL‑enforcing HTTPS MITM proxies and service-specific wrappers aim to add finer-grained, deterministic policies on top of coarse APIs.

Skepticism about current designs

  • Several commenters doubt approval popups and “meat proxy” workflows, questioning whether users can make informed decisions at runtime.
  • Concerns that agents can often mint new credentials or escalate (e.g., via browser sessions) even if they never see the original key.
  • Others point out that many “security” schemes are complex and may be closer to security theater.

Divergent risk tolerances

  • Some run agents with almost unlimited local powers (root or full PowerShell, browser control) and report no issues, viewing strong sandboxing as paranoia.
  • Others are surprised by how many people do this, attributing it to convenience and laziness, and push for more disciplined, tool‑based isolation.