Skip to content

runtime-cf: the container path has only ADR-0006's first chokepoint, not the capture-time redaction pass #109

Description

@debuggingfuture

ADR-0006 names two chokepoints, and apps/substrate/src/engine/git-scrub.ts implements both:

  1. scrubRemotesCommand — post-clone, rewrite remote.origin.url and drop credential / extraheader config.
  2. redactCapturedGitConfigCommand — a second pass over everything a capture would persist: every .git/config under the workspace including submodules', plus .git-credentials and .netrc.

The container path (packages/runtime-cf/src/sandbox-cf.ts) now has the first, as of #90. It has no counterpart to the second. Uncovered:

  • Submodule .git/config files, if gitCheckout recurses submodules — the post-clone scrub only touches the top-level remote. Unverified: whether the SDK's gitCheckout recurses, or configures a credential helper, was not confirmed during review.
  • ~/.gitconfig and ~/.git-credentials in the container's home, if anything writes them.
  • Anything a workload writes after the clone — git remote add, git config credential.helper store.

The substrate's second pass exists because it runs before a backup is taken to R2, and the container path has no equivalent snapshot step — which is why this is a smaller gap than it looks, not a live leak. But container filesystems are reused across executions (see the rm -rf ${targetDir} note in sandbox-cf.ts), so a credential a workload writes does outlive its run.

Worth either porting the redaction pass to run at the end of a container execution, or writing down explicitly why the container path needs only one chokepoint.

Raised by review on #90.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions