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

Use the new os.Root type #8103

Open
GiedriusS opened this issue Feb 12, 2025 · 5 comments
Open

Use the new os.Root type #8103

GiedriusS opened this issue Feb 12, 2025 · 5 comments

Comments

@GiedriusS
Copy link
Member

After upgrading Go, use the new os.Root type in places like the Receiver (tsdb.path), Compactor (conf.dataDir), Sidecar (tsdb.path) to prevent accidentally using some other paths.

@lavakush07
Copy link

Hi @GiedriusS ,

I’d love to work on this issue. Could you please assign it to me?

@GiedriusS
Copy link
Member Author

#8102 is a dependency that needs to be done first

@lavakush07
Copy link

#8102 is a dependency that needs to be done first

Hey @GiedriusS, would it be okay if I take on the #8102 issue? Or is it something that needs to be handled by the maintainers?

@Saumya40-codes
Copy link
Contributor

Compactor (conf.dataDir)

In compactor, can there be a case of accidental access of some other parts? as based on --data-dir flag we create are creating directories like compactor or downsample if they dont already exist.

Or is it to prevent any future modifications from accidentally introducing path traversal?

@GiedriusS
Copy link
Member Author

Yes, the point of using them is so that in the future accidentally we wouldn't introduce some vulnerability where someone with malicious input could create directories anywhere or do some other manipulations.

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

No branches or pull requests

3 participants