-
-
Notifications
You must be signed in to change notification settings - Fork 150
Use a whitelist of commands for the upload #170
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
Conversation
Fix #165: Rather than signing commands on the server, the commands are hardcoded in commands.go, and the client sends the id of the command instead of the command itself.
This doubles as a security measure against malicious attacks
This ensure that a malicious user cannot inject arbitrary code in the commandline
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.
Intel boards are missing; I can see the benefit of this approach but the maintenance burden is HUGE
Please see the disclaimer at the bottom of this comment prior to reading the remainder of this comment. I read the conversations in Issue #165 and in this Pull Request. I think one compromise could be to add a switch (e.g. a checkbox or pair of radio buttons) to the agent, that the user can toggle between two states: When mode On the other hand, when mode The act of switching the mode from
I think this approach would make updating a white list (over time) less urgent than if the agent would only run commands that are on the white list. At the same time, I think it would keep more users safer by default. * Disclaimer: I haven't used the agent yet (I was evaluating it when I came across Issue #165 and subsequently decided not to install it). |
@matteosuppo Can you please tell me what the status of this pull request is? @mastrolinux pointed me to this pull request as something I can help with. Do you need something specific, or do you want me to try and take this over from you? |
@hannobraun we're still evaluating our options. The problem is that there are a lot of different commandlines. Another option would be to whitelist the programs that can be ran (which are basically avrdude, bossac, and few others) and keep the rest of the commandline free. Keep in mind that bashisms such as @gitname in extremes cases we could do that, but I'm not really a fan of adding complexity to the ui |
@matteosuppo we do have a working experiment that solves the issue to override config. I will show you more later today, we can probably make a PR about that and add what @gitname is proposing, which I think is a really good approach. |
fee3d17
to
b0b3b31
Compare
This approach is too dispersive, adding the new boards would result in an enormous whitelist |
Fix #165: Rather than signing commands on the server, the commands are hardcoded in commands.go, and the client sends the id of the command instead of the command itself.