prepare_workspace (nisse-dev/src/nisse_dev/agent.py) clones the project with authenticated_url(...), which embeds the dev-agent token. git clone stores that URL as origin, so the token is written to the workspace's .git/config. On the bring-up box, /root/nisse-e2e/project/.git/config has it.
This contradicts git.py's own docstring ("The token is never written to disk in the repo config"). It also puts a credential where the executor and helper can read it with read_file or run_command, so it can end up in a transcript or a PR.
Fix: after cloning, git remote set-url origin <URL without credentials>. Fetches pass the token-bearing URL per call, as pushes already do. Existing clones are corrected at the next prepare.
Test: after a clone, a fetch or a push, .git/config doesn't contain the token.
Natural home: M1.3, which rewrites the clone and fetch path.
Found while planning M1.3.
`prepare_workspace` (`nisse-dev/src/nisse_dev/agent.py`) clones the project with `authenticated_url(...)`, which embeds the `dev-agent` token. `git clone` stores that URL as `origin`, so the token is written to the workspace's `.git/config`. On the bring-up box, `/root/nisse-e2e/project/.git/config` has it.
This contradicts `git.py`'s own docstring ("The token is never written to disk in the repo config"). It also puts a credential where the executor and helper can read it with `read_file` or `run_command`, so it can end up in a transcript or a PR.
**Fix:** after cloning, `git remote set-url origin <URL without credentials>`. Fetches pass the token-bearing URL per call, as pushes already do. Existing clones are corrected at the next prepare.
**Test:** after a clone, a fetch or a push, `.git/config` doesn't contain the token.
Natural home: M1.3, which rewrites the clone and fetch path.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE
Update after #90: the agent no longer keeps a workspace on its own host, and build VMs never receive the Gitea API token (D4, D7). Pushes use a key handed to that one push. This is still worth fixing for local bring-up on this box, and it belongs with the SSH workspace work.
Update after #90: the agent no longer keeps a workspace on its own host, and build VMs never receive the Gitea API token (D4, D7). Pushes use a key handed to that one push. This is still worth fixing for local bring-up on this box, and it belongs with the SSH workspace work.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Found while planning M1.3.
prepare_workspace(nisse-dev/src/nisse_dev/agent.py) clones the project withauthenticated_url(...), which embeds thedev-agenttoken.git clonestores that URL asorigin, so the token is written to the workspace's.git/config. On the bring-up box,/root/nisse-e2e/project/.git/confighas it.This contradicts
git.py's own docstring ("The token is never written to disk in the repo config"). It also puts a credential where the executor and helper can read it withread_fileorrun_command, so it can end up in a transcript or a PR.Fix: after cloning,
git remote set-url origin <URL without credentials>. Fetches pass the token-bearing URL per call, as pushes already do. Existing clones are corrected at the next prepare.Test: after a clone, a fetch or a push,
.git/configdoesn't contain the token.Natural home: M1.3, which rewrites the clone and fetch path.
🤖 Generated with Claude Code
https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE
Update after #90: the agent no longer keeps a workspace on its own host, and build VMs never receive the Gitea API token (D4, D7). Pushes use a key handed to that one push. This is still worth fixing for local bring-up on this box, and it belongs with the SSH workspace work.
🤖 Generated with Claude Code