Summary
The Oz cloud-agent driver configures git/GitHub auth at runtime in app/src/ai/agent_sdk/driver/git_credentials.rs. setup_git_config() issues persistent git config --global writes (the url.<host>.insteadOf SSH->HTTPS rewrites, credential.helper store, and user identity), and the module also writes plaintext credential files directly under $HOME (~/.git-credentials, ~/.config/gh/hosts.yml). These are documented as one-time config with no cleanup.
Problem
On host-based / self-hosted execution (the oz-agent-worker direct backend, e.g. oz-local), these writes land in and persist in the real home directory: the insteadOf rewrites mutate ~/.gitconfig, and short-lived tokens are written in plaintext to ~/.git-credentials and ~/.config/gh/hosts.yml. In container backends this is harmless (ephemeral home), but on a host it pollutes and can clobber the real git/gh configuration. After warpdotdev/warp-agent-docker#109 lands, the driver becomes the sole writer of these entries across all backends.
Mitigation already in place
oz-agent-worker now sets GIT_CONFIG_GLOBAL to a per-task file for the direct backend, keeping the git config writes (including insteadOf) out of the real ~/.gitconfig: warpdotdev/oz-agent-worker#77. That mitigation intentionally does not cover the plaintext credential files, which still follow $HOME.
Proposed hardening
Move runtime auth to a git credential-helper mode (per the REMOTE-1370 specs) so the driver supplies/refreshes tokens on demand instead of writing persistent --global config and plaintext credential files. This would eliminate both the persistent global writes and the plaintext token files across all execution paths.
References
Filed via Oz.
Summary
The Oz cloud-agent driver configures git/GitHub auth at runtime in
app/src/ai/agent_sdk/driver/git_credentials.rs.setup_git_config()issues persistentgit config --globalwrites (theurl.<host>.insteadOfSSH->HTTPS rewrites,credential.helper store, and user identity), and the module also writes plaintext credential files directly under $HOME (~/.git-credentials,~/.config/gh/hosts.yml). These are documented as one-time config with no cleanup.Problem
On host-based / self-hosted execution (the oz-agent-worker direct backend, e.g. oz-local), these writes land in and persist in the real home directory: the insteadOf rewrites mutate
~/.gitconfig, and short-lived tokens are written in plaintext to~/.git-credentialsand~/.config/gh/hosts.yml. In container backends this is harmless (ephemeral home), but on a host it pollutes and can clobber the real git/gh configuration. After warpdotdev/warp-agent-docker#109 lands, the driver becomes the sole writer of these entries across all backends.Mitigation already in place
oz-agent-worker now sets
GIT_CONFIG_GLOBALto a per-task file for the direct backend, keeping the git config writes (including insteadOf) out of the real~/.gitconfig: warpdotdev/oz-agent-worker#77. That mitigation intentionally does not cover the plaintext credential files, which still follow$HOME.Proposed hardening
Move runtime auth to a git credential-helper mode (per the REMOTE-1370 specs) so the driver supplies/refreshes tokens on demand instead of writing persistent
--globalconfig and plaintext credential files. This would eliminate both the persistent global writes and the plaintext token files across all execution paths.References
app/src/ai/agent_sdk/driver/git_credentials.rs(setup_git_config,write_git_credentials)Filed via Oz.