this post was submitted on 12 Dec 2023
56 points (85.0% liked)
Linux
48008 readers
1194 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
You have probably invested a lot of time and effort into this, so please take this as constructive criticism.
Your security systems are probably not going to be sufficient, for a whole number of reasons.
Script Voting
The general public is not able to appropriately audit shell scripts. This extends even to sysadmins and more technical people. The people who can properly audit scripts are a minority, and they may not even be amongst your user base. Anyone who gets a script that "does its job" is going to upvote it as fine, because they may not even be aware of its malicious side effects.
Scripts will naturally need to evolve over time, so script updates will be a normal part of your system. Will the votes reset for new versions? Is there anything stopping someone uploading farming votes with valid scripts, and then backdoor the script once it gets sufficiently popular?
Is there any form of vote manipulation prevention planned? If not, bad actors can create an army of accounts and upvote their malicious content. Can you remove a users votes if they are found to be acting maliciously? Will it even be possible for you to tell the difference between a naive user who doesn't understand the maliciousness of the script, versus an account actively increasing the rating of a bad package?
User Reputation
This seems easy to game as well. Upload a host of valid scripts, gain reputation, and then when ready, upload malicious scripts.
Collaboration
Allowing non-maintainers to edit and upload scripts seems like a wildly bad idea. There must be some level of maintainer approval for that right? Still will have the same issues, easy for someone to build trust on a script repo and then exploit it when it suits them.
None of these issues are unique to your site, pypi, dockerhub etc have all hit these issues in the past.
I think the only real answer is to have very strong human moderation, but I fear that if your site takes off, the workload will rapidly spiral out of control. Otherwise, interesting idea, Good Luck!
I wholeheartedly agree, yet this is the same for stuff like the AUR, every PPA, or even just blindly copy & pasting inductions from some blog - all of which are very popular. (Just to name some examples that are closer to what op wants to do).
I still wouldn't use scripts from a random dump site because they are just likely to mess up the os with junk and cruft that will be there forever. But fundamentally from a security point of few its not necessarily worse than what many are doing - simply because it doesn't get worse than blindly executing stuff from sources missing the reputation to justify trusting them.
Yup, there is a lot of prior art on how to get this wrong :(, and I dont know of any good solutions either. Curation and moderation are probably the best case, but arent bulletproof either.
I raised this not to kill OPs project, but to make sure they go into it eyes open. I personally would be very uncomfortable if my website was being abused to distribute malware, so they deserve to at least be aware of the risks.
I think one puzzle piece of improvement is flatpak:
In reality there's a plethora of problems obviously:
Thank you for the feedback. I think I will remove the voting system for now while I figure out of solution. I will probably not be adding the user reputation system, unless I figure out a way to do it without facing the problems you have mentioned. As for collaboration, I will add a feature allowing app maintainers to set whether or not non-maintainers can add scripts without maintainer permission. Thank you again for the feedback, it was very useful!
Have you considered some form of CI? I.e: Spin up a VM, run the script, reboot, report what changed? Might be a little expensive, but could help auditing?
I have, but I think it would be a bit too expensive on my VPS, but might use it if my site ever catches on. I have also considered using something like Try, but it isn't a full sandbox.
Very understandable. And from a security standpoint not necessarily indicitive of anything. A good malicious script would just check its environment first.
Would it know if it was a VM? I think KVMs can host only the kernel if I'm not mistaken
I think you can detect when your in a VM, not sure exactly how though. But they could even be checking for other environment factors, like network addresses, system language, or timezone details.
Maybe add a comment/review system (if you haven't already) in the meantime? Far from foolproof but better than nothing nonetheless.
It does have a discussion system at the moment where you can comment on a script, but there is no system to rate the script and have the total of all the ratings combined.