Conversation
|
🚅 Deployed to the nodebb-spring-26-clean-cod-pr-61 environment in Clean Code Team (nodebb)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The purpose of the Retire plugin is to help detect known vulnerabilities with installed JS plugins and libraries so that you would presumably update the packages for better security.
Pros
Setup was pretty easy, since Retire provides a CLI tool. It also provides a grunt plugin that I gave up using after trying to set it up with the existing NodeBB grunt infrastructure, but realistically, it should be possible. It's still being reasonably maintained, and has been adopted by large open-source tools like Burp.
Cons
I think that although the intention of the Retire is good, the initial output may be a bit overwhelming. Furthermore, updating packages sometimes isn't a trivial task, as updates may have introduced breaking interface/API changes. I also can't seem to find their documentation? (outside of simple installation)
Example output from github actions, truncated:

Something like the
Dependabotplugin may be better suited for this task, since it creates specific, actionable PRs that address each package vulnerability individually rather than just dumping all of the outdated packages at you at once.Questions for part B:
Retire is a js package scanner that alerts developers of any outdated packages with known seucurity vulnerabilities. (https://retirejs.github.io/retire.js/) It is available as a command line tool and a grunt plugin, among others.
static analysis
Known security vulnerabilities on packages installed with
require.the entire configuration options is as follows:
Likely as a check on every commit on every PR, since new vulnerabilities can show up anytime. It likely shouldn't be a blocking check (eg. should still pass even on alerts,) since there are a lot of existing errors as of now.
By nature of the plugin, there shouldn't be any false positives. There can, of course, be false negatives - no warnings does not necessarily mean no vulnerabilities. The CVE system has also received a lot of criticism in the past few years for tracking a lot of useless true positive security vulnerabilties that won't ever occur in production environments.