New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elaborate on force clean checkouts #397

nhooyr opened this Issue Feb 6, 2019 · 1 comment


2 participants
Copy link

nhooyr commented Feb 6, 2019

By default Buildkite will reuse (after cleaning) a previous checkout. This may not be safe if building commits from untrusted sources (e.g. 3rd party pull requests). To force a clean checkout every time, set BUILDKITE_CLEAN_CHECKOUT=true in the environment.

Its not clear to me why building a commit from an untrusted source would be insecure when reusing a previous checkout.


This comment has been minimized.

Copy link

toolmantim commented Feb 13, 2019

Being able to place code into that directory, which might carefully take into account git clean rules, might mean that a file from a previous build might be included in a compiled binary for example. It's hard to describe all the attack vectors, but they're all part of the "cache poisoning" variety.

The ultimately "clean build" is an entire VM for each job, with no shared checkout cache. But we've included this instruction for people wanting to run third-party PRs from the other direction… starting with the standard agent setup.

I hope that clarifies things!

@toolmantim toolmantim closed this Feb 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment