Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upPrevent external network traffic for builds and tests #336
Conversation
AndrewSpeed
added some commits
Oct 4, 2018
pietroalbini
requested changes
Oct 7, 2018
|
Thanks for the PR! I left two comments for a few minor things you need to fix, and you'll need to run rustfmt over the codebase to fix some formatting issues. This looks really good otherwise! |
| @@ -67,6 +67,7 @@ fn build( | |||
| CargoState::Locked, | |||
| quiet, | |||
| false, | |||
| false, | |||
This comment has been minimized.
This comment has been minimized.
pietroalbini
Oct 7, 2018
Member
Networking should also be disabled here, since build scripts are run during the build phase.
| @@ -102,6 +109,10 @@ impl<'a> ContainerBuilder<'a> { | |||
| args.push(limit.to_string()); | |||
| } | |||
|
|
|||
| if self.networking_disabled { | |||
| args.push("--network none".into()); | |||
This comment has been minimized.
This comment has been minimized.
AndrewSpeed
added some commits
Oct 7, 2018
This comment has been minimized.
This comment has been minimized.
|
Would you mind if I added the |
This comment has been minimized.
This comment has been minimized.
I'll test the changes locally and get back to you on the PR soon.
That would be awesome! If you write that you could mention that the CI requires both rustfmt and clippy to pass on stable, maybe with the commands to install them with rustup and run them. |
pietroalbini
approved these changes
Oct 7, 2018
|
This works great, thanks! |
AndrewSpeed commentedOct 7, 2018
This PR resolves #281 by disabling docker networking for instances of
run_cargowhere tests are being run, as this could be abused by crates under experiment.