Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Hudson » Changing PWD in a Builder
Changing PWD in a Builder [message #1690956] Wed, 01 April 2015 09:45 Go to next message
Kaz Nishimura is currently offline Kaz NishimuraFriend
Messages: 89
Registered: December 2014
Member
I am now planning to implement a feature in a Builder plugin to change the working directory to a subdirectory of the workspace before launching a command. Does Launcher.ProcStarter.pwd allow going out of the workspace by using ".." or an absolute path?

If so, I must implement some protection measure not to go out of the workspace by malicious job configurations. Is there any method in Hudson that I can use to check a path is inside the workspace?


Kaz Nishimura

[Updated on: Wed, 01 April 2015 09:46]

Report message to a moderator

Re: Changing PWD in a Builder [message #1691014 is a reply to message #1690956] Wed, 01 April 2015 15:12 Go to previous messageGo to next message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
There are two security envelop

- Envelop for the user working on the Client side (UI)
- Envelop for the execution environment

The former envelop is strictly sandboxed to be with in the Hudson home. But the second envelop is open with in the execution machine restricted only by the user credentials with which Hudson itself is running or the machine in which the slave agent is running,



Winston Prakash
Eclipse Hudson team
Re: Changing PWD in a Builder [message #1691675 is a reply to message #1691014] Thu, 09 April 2015 01:26 Go to previous message
Kaz Nishimura is currently offline Kaz NishimuraFriend
Messages: 89
Registered: December 2014
Member
If so, is there any answer to the second question? I would like only to allow chdir into a subdirectory of the workspace. Since FilePath may represent remote path, absolute path checking is not so easy IMO, especially on Windows nodes.

Kaz Nishimura
Previous Topic:Ignore failures of some configurations in a matrix project?
Next Topic:Deploy from Hudson-ci server to remote windows server
Goto Forum:
  


Current Time: Sat Oct 05 16:52:02 GMT 2024

Powered by FUDForum. Page generated in 0.03913 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top