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

Purpose of safe_local_report_path? #377

Open
kiwiz opened this issue Jun 1, 2021 · 2 comments
Open

Purpose of safe_local_report_path? #377

kiwiz opened this issue Jun 1, 2021 · 2 comments

Comments

@kiwiz
Copy link
Contributor

kiwiz commented Jun 1, 2021

Relevant XKCD:

Hi there, I'm curious about what the path.include?("/.") check in safe_local_report_path is for. The reason I ask is because I'm currently populating the output into a JSON file located at REPO_PATH/.salus/salus.json, which triggers this condition.

Could the pattern be updated to "/..", which is less likely to be valid (I can submit a PR if so)?

@ghbren
Copy link
Contributor

ghbren commented Jun 24, 2021

Hi, a . in the file name along with other things could be used for security exploits.

Would it be possible for you to just update
REPO_PATH/.salus/salus.json to
REPO_PATH/salus/salus.json?

@joshuaostrom-cb
Copy link
Contributor

I think we would be open to mediating that check. We recently added a plugin support to Salus and mediating that check [so you can override as needed] may be an acceptable solution. Will check internally to confirm that and relay.

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

No branches or pull requests

4 participants
@kiwiz @ghbren @joshuaostrom-cb and others