Skip to content

Trust injected CA certificate on sandbox startup#550

Open
scuffi wants to merge 2 commits intomainfrom
load-runtime-intercept-ca-cert
Open

Trust injected CA certificate on sandbox startup#550
scuffi wants to merge 2 commits intomainfrom
load-runtime-intercept-ca-cert

Conversation

@scuffi
Copy link
Copy Markdown
Contributor

@scuffi scuffi commented Apr 1, 2026

Summary

To support HTTPS egress interception, we must trust an injected CA certificate into external requests. This PR adds a blocking loader to fetch & trust this certificate during container server startup. In production, this certificate will exist at startup, so there should be minimal overhead introduced. The polling/blocking mechanism is for local development to ensure parity as the certificate cannot be assumed to exist at startup due to Docker API limitations.

Request Support

We are doing a 'best-effort' approach here by populating commonly used CA certificate environment variables, however, this approach is always going to be limited by packages or processes that ignore common system CA certificates, which we won't be able to intercept.


Open with Devin

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 1, 2026

🦋 Changeset detected

Latest commit: 441043a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cloudflare/sandbox Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 1, 2026

Open in StackBlitz

npm i https://pkg.pr.new/cloudflare/sandbox-sdk/@cloudflare/sandbox@550

commit: 441043a

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

🐳 Docker Images Published

Variant Image
Default cloudflare/sandbox:0.0.0-pr-550-441043a
Python cloudflare/sandbox:0.0.0-pr-550-441043a-python
OpenCode cloudflare/sandbox:0.0.0-pr-550-441043a-opencode
Musl cloudflare/sandbox:0.0.0-pr-550-441043a-musl
Desktop cloudflare/sandbox:0.0.0-pr-550-441043a-desktop

Usage:

FROM cloudflare/sandbox:0.0.0-pr-550-441043a

Version: 0.0.0-pr-550-441043a


📦 Standalone Binary

For arbitrary Dockerfiles:

COPY --from=cloudflare/sandbox:0.0.0-pr-550-441043a /container-server/sandbox /sandbox
ENTRYPOINT ["/sandbox"]

Download via GitHub CLI:

gh run download 23860614832 -n sandbox-binary

Extract from Docker:

docker run --rm cloudflare/sandbox:0.0.0-pr-550-441043a cat /container-server/sandbox > sandbox && chmod +x sandbox

@scuffi
Copy link
Copy Markdown
Contributor Author

scuffi commented Apr 1, 2026

/bonk review this PR

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Apr 1, 2026

UnknownError: ProviderInitError

github run

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Apr 1, 2026

@scuffi Bonk workflow failed. Check the logs for details.

View workflow run · To retry, trigger Bonk again.

@scuffi scuffi force-pushed the load-runtime-intercept-ca-cert branch from 57c223d to 441043a Compare April 1, 2026 16:59
@scuffi
Copy link
Copy Markdown
Contributor Author

scuffi commented Apr 1, 2026

/bonk review this PR

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Apr 1, 2026

UnknownError: ProviderInitError

github run

@scuffi scuffi marked this pull request as ready for review April 1, 2026 23:55
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

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.

1 participant