-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace hardcoded URL to advisory with a URL from audit response #110
Conversation
@@ -117,7 +117,7 @@ const report = function (data, options) { | |||
{'Package': advisory.module_name}, | |||
{'Dependency of': `${resolution.path.split('>')[0]} ${resolution.dev ? '[dev]' : ''}`}, | |||
{'Path': `${resolution.path.split('>').join(Utils.color(' > ', 'grey', config.withColor))}`}, | |||
{'More info': `https://nodesecurity.io/advisories/${advisory.id}`} | |||
{'More info': advisory.url ? advisory.url : `https://nodesecurity.io/advisories/${advisory.id}`} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is identical, but shorter and avoids repetition:
{'More info': advisory.url ? advisory.url : `https://nodesecurity.io/advisories/${advisory.id}`} | |
{'More info': advisory.url || `https://nodesecurity.io/advisories/${advisory.id}`} |
@@ -160,7 +160,7 @@ const report = function (data, options) { | |||
{'Patched in': patchedIn}, | |||
{'Dependency of': `${resolution.path.split('>')[0]} ${resolution.dev ? '[dev]' : ''}`}, | |||
{'Path': `${resolution.path.split('>').join(Utils.color(' > ', 'grey', config.withColor))}`}, | |||
{'More info': `https://nodesecurity.io/advisories/${advisory.id}`} | |||
{'More info': advisory.url ? advisory.url : `https://nodesecurity.io/advisories/${advisory.id}`} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{'More info': advisory.url ? advisory.url : `https://nodesecurity.io/advisories/${advisory.id}`} | |
{'More info': advisory.url || `https://nodesecurity.io/advisories/${advisory.id}`} |
@@ -30,7 +30,7 @@ const report = function (data, options) { | |||
l.sevLevel = advisory.severity | |||
l.severity = advisory.title | |||
l.package = advisory.module_name | |||
l.moreInfo = `https://nodesecurity.io/advisories/${advisory.id}` | |||
l.moreInfo = advisory.url ? advisory.url : `https://nodesecurity.io/advisories/${advisory.id}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
l.moreInfo = advisory.url ? advisory.url : `https://nodesecurity.io/advisories/${advisory.id}` | |
l.moreInfo = advisory.url || `https://nodesecurity.io/advisories/${advisory.id}` |
@@ -44,7 +44,7 @@ const report = function (data, options) { | |||
l.sevLevel = advisory.severity | |||
l.severity = advisory.title | |||
l.package = advisory.module_name | |||
l.moreInfo = `https://nodesecurity.io/advisories/${advisory.id}` | |||
l.moreInfo = advisory.url ? advisory.url : `https://nodesecurity.io/advisories/${advisory.id}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
l.moreInfo = advisory.url ? advisory.url : `https://nodesecurity.io/advisories/${advisory.id}` | |
l.moreInfo = advisory.url || `https://nodesecurity.io/advisories/${advisory.id}` |
Please PR this against |
By this PR, we can see a correct advisory URL in the "More info" field.