~/talk

Perfect Sandboxing in Bazel

Talkat BazelCon 2024 · 2024-10-14..10-15· [software-architecture, testing]
links:none on file
slides:none on file

Migrating a 20‑year codebase to Bazel exposes tools that use absolute host paths, so the Bazel sandbox is extended to detect external symlinked inputs (via new_local_repository), traverse symlink chains and automatically turn those inputs into bind mounts under the Hermetic Linux sandbox. A spidering tool emits .bzl graphs of shared objects and POSIX binaries, the sandbox recreates symlinks or overlays and the build becomes hermetic in practice, with examples needing as few as five mounts.

AI-written summary · about

  1. 0:00Sandboxing in Bazel
  2. 1:05Absolute paths break correctness
  3. 2:08How Bazel sandboxing works
  4. 5:41Correctness issue with absolute paths
  5. 6:44Fixing paths with repository rules
  6. 8:31Limitations of Hermetic Linux sandbox
  7. 10:39Tool consumption vs sandbox exposure
  8. 12:06Mounting absolute paths manually
  9. 13:13Extending Hermetic Linux sandbox
  10. 15:46Integrating changes seamlessly
  11. 17:58Practical usage and exemptions
  12. 18:40Modeling system dependencies
  13. 20:04Shared objects and binary dependencies
  14. 21:55Shell and POSIX dependencies
  15. 23:20Language package dependencies
  16. 24:24Takeaways and when to use
  17. 25:08Contrasting hermeticity methods
  18. 27:14Stronger guarantees without deep tool understanding
  19. 27:57Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.