mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
If _configure_git raised CalledProcessError before its `remote set-url` scrub, .git/config kept the tokenized auth URL (the project PAT) and _assert_no_pat_leak never ran. The except clauses raised WorkspaceError without removing the workspace, so the next ensure_workspace's health short-circuit (valid .git with HEAD + objects) skipped past the leak — mounting the agent on a workspace whose .git/config let it read+exfiltrate the PAT. Both clone-failure except clauses now rmtree the workspace before raising, so a half-configured clone is destroyed and ensure_workspace re-clones from scratch. TDD: 2 tests (configure-failure leak + timeout).