mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-16 05:17:41 +02:00
Authenticate Boat initial checkouts with run-scoped Git credentials
Pass the existing workspace credential provider through computer realization separately from durable metadata, and supply its URL-scoped helper only to the clone subprocess. Verify authenticated clone behavior and credential non-retention. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
25c12848a2
commit
03542b0845
9 files changed
+87
-6
No files matched your search
@@ -113,6 +113,16 @@ function fixture() {
|
||||
};
|
||||
}
|
||||
describe("computer ownership", () => {
|
||||
it("passes checkout credentials transiently without retaining them in computer state", async () => {
|
||||
const f = fixture();
|
||||
await f.attach();
|
||||
const binding = await f.admit();
|
||||
const gitAuth = { configArgs: ["-c", "credential.helper="], env: { PAPERCLIP_GIT_TOKEN: "scoped-fixture-token" } };
|
||||
await f.service.realizeWorkspace({ ...f.scope, owner: binding.owner, projectId: "project", mode: "shared",
|
||||
repositoryUrl: "https://github.com/company/private.git", gitAuth });
|
||||
expect(f.backend.remote).toHaveBeenCalledWith(expect.anything(), expect.objectContaining({ action: "workspace", gitAuth }));
|
||||
expect(JSON.stringify(await f.repository.get(f.scope))).not.toContain("scoped-fixture-token");
|
||||
});
|
||||
it("explains an unavailable dev server without masking provider errors", async () => {
|
||||
const f = fixture();
|
||||
await f.attach();
|
||||
|
||||
@@ -767,6 +767,8 @@ finally:
|
||||
projectId?: string;
|
||||
taskId?: string;
|
||||
repositoryUrl?: string;
|
||||
/** Transient Git helper configuration; sent over stdin, never retained in the ledger. */
|
||||
gitAuth?: { configArgs: string[]; env: Record<string, string> };
|
||||
branch?: string;
|
||||
baseRef?: string;
|
||||
mode: "shared" | "worktree";
|
||||
|
||||
Reference in new issue
Block a user