Skip to content
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

Default to not accepting the creation of . prefixed folders? #330

Open
consideRatio opened this issue Oct 27, 2023 · 4 comments
Open

Default to not accepting the creation of . prefixed folders? #330

consideRatio opened this issue Oct 27, 2023 · 4 comments

Comments

@consideRatio
Copy link
Member

consideRatio commented Oct 27, 2023

I think having nbgitpuller create folders prefixed with . isn't relevant enough to be enabled by default for securiyt reasons. I think its a relatively easy way to create exploits if someone is baited to clicking a malicious nbgitpuller link.

Should we add configuration to make it disabled by default, forcing it to be made opt-in?

@mathbunnyru
Copy link
Contributor

mathbunnyru commented Oct 27, 2023

I'm so sorry, I haven't used nbgitpuller, can it create files in the home dir?

For example, can it create .bashrc in the /home/jovyan/?
Unfortunately, .bashrc might be sometimes missing in our images (because of mounting volumes and user renaming), so if this file can be created by nbgitpuller, it makes this vulnerability even worse.

@consideRatio
Copy link
Member Author

It can't i think initialize a file directly, but folders can be initialized with files in it.

@manics
Copy link
Member

manics commented Oct 27, 2023

Also worth noting that targetPath can be set to an arbitrary absolute or relative path, overriding the default git folder name, and allowing creation of directories outside the working directory. If for example you mounted an new empty volume to /home/jovyan, you could set targetPath=/home/jovyan.

@mathbunnyru
Copy link
Contributor

Also worth noting that targetPath can be set to an arbitrary absolute or relative path, overriding the default git folder name, and allowing creation of directories outside the working directory. If for example you mounted an new empty volume to /home/jovyan, you could set targetPath=/home/jovyan.

That's really unfortunate because this sounds even more dangerous now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants