-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
refs: #2 nodesecurity.io redirect and mozilla/fxa-profile-server#353 and related discussion on #fxa on IRC (job https://travis-ci.org/mozilla/fxa-profile-server/jobs/457024645).
Exit codes and filter matching would be unchanged, but when similar looking URLs show up in the audit JSON output we write to stderr something like:
"found the url 'https://www.npmjs.com/advisories/598' on .nsmprc line X did you mean 'https://npmjs.com/advisories/598' to match line Y from the audit JSON output?"
and suggest that they check both URLs resolve to the same advisory.
We can define "similar looking URLs" to 1) contain the same advisory ID and 2) have one of more of the following be true:
- domain differs between
nodesecurity.ioandnpmjs.com - protocol differs between
httpandhttps(also probably want to warn for http) - an optional
wwwsubdomain e.g. fromnpmjs.com/advisories/andwww.npmjs.com/advisories/
Unit tests would check that we make suggestions for:
https://nodesecurity.io/advisories/598andhttps://npmjs.com/advisories/598http://nodesecurity.io/advisories/598vshttps://nodesecurity.io/advisories/598https://npmjs.com/advisories/598andhttps://www.npmjs.com/advisories/598
and no suggestion for other URLs.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed