Skip to content

feat/947 sandbox repo credential - #968

Merged
sabbour merged 13 commits into
devfrom
feat/947-sandbox-repo-credential
Aug 28, 2026
Merged

feat/947 sandbox repo credential#968
sabbour merged 13 commits into
devfrom
feat/947-sandbox-repo-credential

Conversation

@sabbour

@sabbour sabbour commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Stack created with GitHub Stacks CLIGive Feedback 💬

Mint run-bound repository credentials from immutable snapshots and provide them only to approved sandbox git or gh commands. Revoke credentials on release and orphan cleanup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3f94bc67-d29d-4d47-a8f7-5d99540c4b42
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3f94bc67-d29d-4d47-a8f7-5d99540c4b42
Comment thread apps/Agentweaver.Api/Sandbox/KubernetesSandboxExecutor.cs Dismissed
sabbour and others added 10 commits August 27, 2026 20:48
Launch credential-bearing git and gh commands directly, retain failed revocations for retry, and require approval for sensitive gh credential commands.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3f94bc67-d29d-4d47-a8f7-5d99540c4b42
Restrict credential-bearing Git to a child-free command and retry failed token revocations after claim cleanup.

Refs #947

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3f94bc67-d29d-4d47-a8f7-5d99540c4b42
Use the canonical destructive command list when sandbox YAML omits it, while preserving explicit policy overrides.

Refs #947

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3f94bc67-d29d-4d47-a8f7-5d99540c4b42
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3f94bc67-d29d-4d47-a8f7-5d99540c4b42
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3f94bc67-d29d-4d47-a8f7-5d99540c4b42
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3f94bc67-d29d-4d47-a8f7-5d99540c4b42
Refs #947

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3f94bc67-d29d-4d47-a8f7-5d99540c4b42
Refs #947

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3f94bc67-d29d-4d47-a8f7-5d99540c4b42
Reconcile each API replica's local credential registry with shared run and SandboxClaim state so releases and orphan cleanup on another replica trigger local revocation retries.

Refs #947

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3f94bc67-d29d-4d47-a8f7-5d99540c4b42
LaunchAgentHostPodAsync derived its own authoritative AgentHost
SandboxClaim name but never wrote it back to the run store, so
kata-exec-sidecar AgentHost runs always had Run.SandboxClaimName unset.
RunRepositoryCredentialLiveness only checks claim liveness when that
field is populated, so a replica that minted a repository credential
for an AgentHost run could never learn another replica had deleted its
claim, and the credential was never revoked.

Persist the claim name (and the real kata-exec-sidecar backend, now a
shared ExecutorBackendName constant instead of an inferred label) from
inside LaunchAgentHostPodAsync itself, immediately after the claim is
created or reclaimed and before any repository credential can be
minted. The write uses SetSandboxInfoAsync's existing non-destructive
partial-update semantics, and the deterministic claim-name derivation
means restart/reclaim always restores the same name.

Replace the prior unit test's manual SandboxClaimName injection with
an integration-style test that drives the real
LaunchAgentHostPodAsync claim lifecycle against a fake cluster,
asserts production code (not test setup) persisted the claim, then
simulates a second replica deleting that claim and proves the first
replica revokes its local token.

Refs #947

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3f94bc67-d29d-4d47-a8f7-5d99540c4b42
@sabbour
sabbour enabled auto-merge (squash) August 28, 2026 06:39
@sabbour
sabbour merged commit 4cc0cc3 into dev Aug 28, 2026
15 checks passed
@sabbour
sabbour deleted the feat/947-sandbox-repo-credential branch August 28, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants