Start Debugging

security

60 posts · Page 1 of 6

2026-11-26 ai-agentscodexssh

How to Stop a Coding Agent Desktop App From Using Your Forwarded SSH Agent Keys on Remote Hosts

The Codex app inside ChatGPT Desktop links any forwarded SSH agent on a remote host to a stable socket that its long-lived app server and every agent command inherit. How the link works, how to check whether your keys are exposed, a dedicated ssh_config alias with ForwardAgent no and IdentityAgent none, why turning forwarding off does not cut a link that is still live, and how to scope keys with ssh-add -c, -t and -h when the agent really needs git.

How to Keep Secrets Out of .claude/settings.local.json When "Don't Ask Again" Saves a Token as an Allow Rule

Choosing "Yes, and don't ask again" on a Bash command with an inline token used to write that token into .claude/settings.local.json as an allow rule. What Claude Code 2.1.323 changed, how to find and clean rules that already hold a credential, how to tell if the file is tracked by git, and a tested PreToolUse hook that stops Claude from inlining tokens in the first place.

How to Let Sandboxed Bash Run Without Permission Prompts in Claude Code With sandbox.autoAllowBashIfSandboxed

Claude Code 2.1.324/2.1.325 flipped sandbox.autoAllowBashIfSandboxed to false, so sandboxed Bash commands prompt again. How to turn auto-allow mode back on with /sandbox or settings.json, what still prompts (deny and content-scoped ask rules, critical rm paths, env-prefix forms, plan mode, unknown hosts), how to keep the sandbox strict enough to trust, and how to pin the setting for an organization.

How to Stop Claude Code From Writing Outside the Repo With permissions.blockWritesOutsideWorkingDirectories

Set permissions.blockWritesOutsideWorkingDirectories to true and Claude Code 2.1.314+ makes Write, Edit and NotebookEdit refuse any path outside the working directories in every permission mode, bypassPermissions included. What it refuses, what stays writable, why allow rules cannot open it, how /add-dir and additionalDirectories do, what it does to worktrees, and how to pair it with the Bash sandbox so shell commands are fenced too.
Next