Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Use a whitelist of commands for the upload #170
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
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
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.