internal/sandbox: add package

Package sandbox is added to allow the worker to run go tools and
analyses in a sandbox.

This package exports the Run function, which can run any program
with arguments inside a sandbox.

The sandbox is established with gvisor's runsc program.
For more on gvisor, see https://gvisor.dev.

The testdata directory holds a minimal bundle for testing.

Because the test requires some setup, and must be run as root,
there is a Makefile that does all the work. Test this package
using `make`, not `go test`.

Change-Id: I797b711a087acc91932964c1b03e1352500a79e4
Reviewed-on: https://go-review.googlesource.com/c/pkgsite-metrics/+/464620
Reviewed-by: Jonathan Amsterdam <jba@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Julie Qiu <julieqiu@google.com>
Auto-Submit: Julie Qiu <julieqiu@google.com>
Run-TryBot: Julie Qiu <julieqiu@google.com>
12 files changed
tree: c37541c7bb9dd400c3b64e7432a45c6581df80ce
  1. cmd/
  2. devtools/
  3. internal/
  4. static/
  5. all_test.go
  6. checks.bash
  7. CONTRIBUTING.md
  8. go.mod
  9. go.sum
  10. LICENSE
  11. PATENTS
  12. README.md
  13. tools_test.go
README.md

pkgsite-metrics

This repository contains code that serves pkg.go.dev/metrics.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.

The main issue tracker for the time repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/pkgsite-metrics:” in the subject line, so it is easy to find.