All SendBox docs

SendBox · Contribute

Contributing to SendBox

Contributions are welcome. For larger changes, open an issue first to discuss the approach. The roadmap tracks planned work. Report security vulnerabilities privately as described in the security policy, not in issues or pull requests.

Source setup

Follow the source-build requirements, then fork and clone the repository and create a feature branch:

git clone https://github.com/YOUR_USERNAME/sendbox.git
cd sendbox
git checkout -b feature/my-change
make build

The toolchain is pinned in rust-toolchain.toml. Building the host binary does not provision a runtime or install a signed guest bundle; see installation for those steps.

Checks

Before opening a pull request for code changes, run:

make lint
make test
make release
make audit

make lint checks formatting and Clippy and compiles every standalone fuzz workspace with its committed lockfile. make audit requires cargo-audit. Runtime-specific live qualification needs a prepared host; see qualification and the individual runtime guides.

CI runs portable checks and build/install qualification in parallel on macOS and Linux, with fail-fast matrices. Rust dependency caches are isolated by toolchain, platform, lockfiles, and job task; every check still runs. Standalone fuzz workspaces share the root target directory in CI instead of recompiling their common dependencies into separate target directories. The cargo-audit executable is cached, but every run refreshes and checks the advisory database. The portable-check jobs also run the credential-free cold-start diagnostic harness's Python standard-library tests. Live VM qualification remains an explicit prepared-host check; see cold-start DNS diagnostics. The diagnostic tests explicitly select Python 3.15.1, rather than the runner's preinstalled python3. No third-party Python packages are required. This host-side selection does not change the standalone diagnostic workload image or add Python to production Rust guest images. Homebrew updater tests belong to the tap that owns formula updates, not this source repository.

CI preloads the exact Python release asset through GitHub's release-asset API using scripts/setup-ci-python.sh, with SHA-256 verification and bounded retries before the normal setup-python action selects it. The workflow passes its GITHUB_TOKEN so the request is not subject to the anonymous 60-requests-per-hour limit shared by runner IP addresses. The helper supports macOS arm64 and Ubuntu x64, including matching packages for Ubuntu 22.04, 24.04, and 26.04. Update the workflow version, helper version, asset IDs, and checksums together when updating Python.

Run the diagnostic harness tests locally without installing or starting SendBox; substitute python3.15 for python3 to reproduce CI's selected minor version. The release helper separately requires Python 3.11 or newer:

PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover \
  -s test-fixtures/dns-cold-start -p 'test_*.py'

The CLI integration suite also exercises release creation and same-version recovery using temporary local Git repositories, offline Cargo fixtures, and mocked GitHub commands. These tests never publish a release or contact GitHub:

cargo test --locked -p sendbox-cli --test release_script

Hosted Apple, Hyperlight, and qualification checks also cache Rust dependencies; qualification caches both its standalone workspace and the root CLI workspace. These caches restore on pull requests but save only on main, avoiding another set of large target caches for every PR. These jobs explicitly budget three workers on macOS and four on Linux, matching the standard public runners without reducing their existing CPU parallelism or changing the prepared self-hosted live gates. The Apple adapter spike, egress spike, production egress, and production exec workflows share CI's platform- and version-keyed cargo-audit executable cache. Cache hits skip only installing the audit tool, never the dependency audit or advisory database refresh.

Generic hosted x64 Linux jobs use ubuntu-latest; generic Apple-silicon jobs use macos-latest. Matrix os values and existing job names remain stable status-check identifiers; the separate runner field selects the current image. Version strings in those check names are not runner pins. Native Linux arm64 jobs retain ubuntu-24.04-arm, because GitHub has no documented ubuntu-latest-arm alias. Kernel-specific BPF, exec and egress live proofs keep their qualified Ubuntu 24.04 hosts, and prepared self-hosted gates keep their hardware labels.

Release CLI builds retain Ubuntu 24.04 for their glibc-linked Linux binaries. The macOS producer uses macos-latest but explicitly retains the existing MACOSX_DEPLOYMENT_TARGET=11.0 binary floor and verifies arm64/Mach-O metadata. This does not change the Apple runtime's macOS 26+ requirement. Packaging and publication jobs can follow the hosted aliases without relinking these bytes.

Guest artifact CI runs the two clean builds for each architecture in separate parallel jobs and compares their outputs before publishing the verified bundle. Changes to the shared egress crate also select this workflow because its DNS resolver is linked into the guest, even when no guest entrypoint changes. See guest artifact CI for cache boundaries and the automatic privileged BPF smoke tests.

For documentation-only changes, check examples, relative links, and heading anchors. Keep the root README focused on evaluating the project and starting a session; put detailed operational and architecture material under docs/ and link it from the documentation index.

Publishing releases

Maintainers publish tag-triggered releases with:

./scripts/release.sh VERSION

make release only builds locally. See publishing a release for prerequisites, version-bump review, CI, tags, and recovery behavior. After preflight checks, the script switches to main and pulls fast-forward-only before release operations. Retry a failed attempt with the same command and version; existing release tags are not moved or replaced.

Homebrew updates reuse the published archives and are owned by the existing tap; SendBox does not compile a separate Homebrew binary or write tap branches. Release builds cache Rust dependencies by toolchain/platform/lockfile and reuse each signed guest artifact for the host packages and publication. Native CLI tests and release builds run alongside the independent signed guest builds. Packaging waits for both and restores the tested CLI from a same-run, commit- and platform-specific archive, verifying its checksum and executable mode rather than compiling it again. These internal CLI archives keep the repository's default artifact retention for failed-job retries and are not included in the public release-* asset set. Clean guest-container builds and the existing macOS/Linux checks remain in place. See stable Homebrew updates for the pending central updater, native CI/review gates, activation, and recovery.