How to Sandbox Ant Builds within Hudson -


I am using the Hudson Build system as a centralized, "sterile" build environment for a large company whose There is a very distributed development (from both a geographic and managerial perspective) to ensure that one goal is to create only one task of a source control tree and a build script (part of that tree). In this way, we can be certain that the code placed in the production environment actually generated from our source control system

Hudson has a complete set of specified rights to the user implementing himself on the Hudson server Ant script provided because we want to allow individual development groups to modify their construction script without admin intervention , We (1) would like a way to create a sandbox creation process to limit potential pitfalls due to a wrong builder script, and (2) avoid all games to include any malicious code in a build Could.

Here I think I want (at least for the ant, we are not using Maven / Ivy yet):

  • near the ant build script Only access to your workspace directory is
  • This can only be read from source tree (so that SVN update can be trusted and no other code is entered).
  • Perhaps some specific directories (ant distribution, JDK, etc.) may be allowed to read, which are required for building organs.

I can think of three ways to implement it:

  1. Write an ant cover which is used to prevent access to Java security models.
  2. Create a user for each build and assign the rights described above. Launch makes this user space in.
  3. Use the Linux "prison" to avoid the burden of creating a new user account for each build process ( Renewed ). Although I know a bit about them, but we will recently run our build on a Linux box with a RedHatEL distro.

Am I thinking about this problem right?

Update 2:

Update : This man is considered a prudent prison idea:

Update 2: Trust is an interesting word Do we think that any developer can do anything malicious? No. However, I am sure, with the developer-updated scripts, with the creation of 30 projects during one year, (1) accidental clubbing of file system areas outside the project area, and (2) there will be many examples of construction Corruption who take a lot of time to find out, do we trust to trust all of our developers? No. I do not trust myself at that level, to make sure it is.

Regarding malicious code insertion, the real goal is to be able to eliminate the possibility from the idea, if someone thinks that such a thing could be .

In addition, with control, developers can modify their own creation script and test them without fear of disaster. This will create "innovation" and higher levels of quality implemented by the manufacturing process (unit test execution, etc.).

It may be that you can change something, but if you can not trust the developers then your If there is a big problem, what can they do in your build machine?

You can go about this in a different way, if you can not believe what is going to run, you should work in the form of a build master to not only confirm changes in your SCMM. There may be a need for a dedicated person (individuals), but it can also execute the build.

Then there is a clear path of responsibility for the build to build the build and only to come from that build system.

Another option is to allow some resources such as firewalls, your SCM server, from outbound requests, and your other operating network resources such as e-mails, OS updates, etc.

This will prevent people from requesting to remove ant from ant. He does not create systems for resources under source control.

When using Hudson, you can set master / slave configuration and do not allow to be displayed on master. If you configure to become a slave in the virtual machine, it can be easily snapshot and restore again, then you do not have to worry about someone who makes the build environment messy. If you apply firewall to these slaves, then it should solve the needs of your isolation.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -