What are the best practices for securing a Meteor.js app, assuming that we have already taken care of CSRF attacks, have proper user input validation, removed auto-publish and insecure packages?
You seem to have done most of the stuff already.
Additionally:
check in all your Meteor methods, publish functions, & your allow & deny rules to ensure the data type and their structure is enforced so nothing else can cause damage. Using the audit-argument-checks package can help make you enforce strictness on this too.var keyword (as the variables may jump between users).collection.findOne(xx).yy (as this can crash and reveal information, you should check the document exists first).eval isn't used anywhere (I think that one should be obvious enough) - Especially with meteor since stuff run in eval such as a globally scoped variable, even from a project, can be accessed anywhere (which is goes against how the warehouse engine system works).services (in the users collection) to any client, only a subportion of it without the resume set. (This is sometimes done with 3rd party logins to expose more user info to the client, but it can reveal a bit too much).Not sure of any others, the main ones are removing the insecure and autopublish packages to make your own rules.
Sorry that doesn't look very nice, im not sure how to put a space underneath each item.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With