Closed brettz9 closed 4 months ago
Perhaps it is beyond the scope of
eslint-plugin-security
, but I think the ESLint ecosystem deserves a focused config or plugin config which can make this concept of unignoringnode_modules
(and applying a relevant set of rules) salient and convenient for developers.
That might be the case, though I'm not sure if that fits with this plugin's purpose. On their own, using eval
or reassigning globals aren't necessarily a security risk. Linting code you haven't written also seems like a potentially confusing operation.
So, at the moment I don't see a compelling reason why such a config should exist in this plugin vs. starting your own specifically for this purpose.
Can code like eval
be used safely (or at a worthwhile cost)? Yes. But for the most part, there is a reason these rules exist, and it can be helpful to know that such code is being used. One can also add such files or projects to an ignore list if one deems it to be an acceptable risk, or disable that particular rule.
Some rules would most likely be too stringent to impose on others (though projects may vary in the risk they want to take--some might want to lint against dependencies using Node APIs like file system access, while others merely against intrusive operations).
But in using it, I have not found it confusing. In fact, I've been able to report bugs which were gratefully received. And no, I do not just report the issues without gaining some understanding of the code base.
But if this is not the home, that's fine. Thanks for your time.
Rule details
Check
node_modules
for common security issues generally undesirable even in dependenciesRelated CVE
XXXX
Example code
Participation
Additional comments
Perhaps it is beyond the scope of
eslint-plugin-security
, but I think the ESLint ecosystem deserves a focused config or plugin config which can make this concept of unignoringnode_modules
(and applying a relevant set of rules) salient and convenient for developers.Three particular challenges occur:
node_modules
.