LeoIannacone / npm2deb

tool to help debianize Node.js modules
GNU General Public License v3.0
46 stars 34 forks source link

Should not use the wiki for the database #85

Open gtklocker opened 7 years ago

gtklocker commented 7 years ago

Hi, thanks for npm2deb.

I noticed that every time it's pulling the db off the Debian wiki though which seems weird to me, considering that anyone can just edit the wiki. This means that anyone can just alter the behavior of npm2deb. Should we look into a more appropriate alternative?

Not sure if this has been discussed before, but I didn't find it anywhere.

pravi commented 7 years ago

@gtklocker I consider it as a good feature (anyone can revert any mistakes too). It is only used for mapping of exceptions in naming https://wiki.debian.org/Javascript/Nodejs/Database and currently wiki registration is set to manual (your email needs to be whitelisted).

gtklocker commented 7 years ago

@pravi it may be useful and flexible, I don't necessarily disagree. I haven't written or used this software for long enough to be the judge of that. But having it pull the database from the wiki every single time is kind of scary.

Even if the wiki users are vetted and everything, some random person can just break the software and it'll take a couple of hours in the very best case for someone to fix it. That's not how the model should work, and that's definitely not what I'm expecting when I'm running software installed from the original Debian repos. And we're still not discussing how a malicious third party could try to take advantage of this, and how this widely opens the attack surface of the program for no good reason.

Some ideas that come to mind are:

LeoIannacone commented 7 years ago

You can have the same behaviour (controlled source) if you apply some ACL to the wiki page: https://moinmo.in/HelpOnAccessControlLists

The idea of having it in a wiki page is that everytime you change the DB, you don't have to release a new version of the package.

gtklocker commented 7 years ago

@LeoIannacone I do realise the benefits, have a look at my first point on the comment above. I think it's a nice solution that allows contributions in a pretty clean way. :)

LeoIannacone commented 7 years ago

I see your point, I'm just saying that we can easily fix the security issue by making the wiki page writable only by few people.

gtklocker commented 7 years ago

This indeed fixes my main concern yeah (that someone can just break npm2deb). Let me know how you'd like to proceed with this and if I can help in any way 😄

LeoIannacone commented 7 years ago

@shanavas786 would you add the ACL to that page with a list of users we trust ?

shanavas786 commented 7 years ago

@LeoIannacone ok,