Menu

1 / 5

gVisor in CI: sandboxing untrusted code on GitHub Actions

DEV Community: kubernetes·Moep90·about 15 hours ago
#rgBVqB5a
#devtokubernetes#devto#dev#gvisor#runsc
Reading 0:00
15s threshold

If your CI executes code that contributors send you, a plain container is not

a boundary. Run it under gVisor with the network off and a read-only root

filesystem, keep a syscall trace, and treat everything else (timeouts, what

you mount in, your tokens) as separate problems. This is what the

kadet-hub gate does to compile contributor-supplied Kapitan generators ,

and the pieces transfer to any project that runs plugins, formatters, test

code or build scripts from a pull request.

The problem

A pull request that adds a generator ships Python that the gate has to run to

see what it produces. The same shape shows up anywhere CI runs contributor

code: a linter plugin, a pytest suite, a Terraform provider, a code

formatter. Once that code runs, in-language guardrails do not hold, because

the attacker writes the code and picks the API.

Three defenses that look like confinement are not.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.