Use os.Root
for filesystem access
#33572
Labels
proposal/accepted
We have reviewed the proposal and agree that it should be implemented like that/at all.
type/proposal
The new feature has not been accepted yet but needs to be discussed first.
type/refactoring
Existing code has been cleaned up. There should be no new functionality.
At the moment, there are a couple of places, where we need to query the filesystem - especially for git data, customizations, templates.
Oftentimes, the places we need to query are user-supplied and must thus be sanitized.
Through the new
os.Root
in 1.24 we can now ensure that access is only possible in directories we want to access.As such, we should migrate all filesystem access to use
os.Root
wherever possible as a security measure.The text was updated successfully, but these errors were encountered: