-
Notifications
You must be signed in to change notification settings - Fork 317
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
Allow project manager to write files #9483
Allow project manager to write files #9483
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slightly worried about security concerns of this one. But this question probably relates to other endpoints as well
#### Parameters | ||
|
||
```typescript | ||
echo 'Hello World!' | project-manager --filesystem-write-path {path} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this safe against path traversal attacks? Can path be relative or absolute or both? I don't think we check if the user can call ../../..
etc in the path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The OS is responsible for checking the permissions when the process tries to access the filesystem. In this case, we allow writing to any file that has appropriate permissions.
We don't expose this endpoint to the running project-manager process through JSON-RPC protocol. This and other filesystem-related methods can only be called through the command line.
Pull Request Description
close #9360
Changelog:
--filesystem-write-path {path}
command allowing to write bytes from stdin to the provided pathImportant Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
./run ide build
.