Skip to content

Commit

Permalink
report(vulnerable-jslibs): tweak snyk link for highlighted matches (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish authored and brendankenny committed Sep 24, 2018
1 parent ce96d76 commit fed4a88
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class NoVulnerableLibrariesAudit extends Audit {
vulnCount,
detectedLib: {
text: lib.name + '@' + version,
url: `https://snyk.io/vuln/npm:${lib.npmPkgName}?lh@${version}`,
url: `https://snyk.io/vuln/npm:${lib.npmPkgName}?lh=${version}`,
type: 'link',
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('Avoids front-end JavaScript libraries with known vulnerabilities', ()
assert.equal(auditResult.details.items[0].highestSeverity, 'High');
assert.equal(auditResult.details.items[0].detectedLib.type, 'link');
assert.equal(auditResult.details.items[0].detectedLib.text, 'angular@1.1.4');
assert.equal(auditResult.details.items[0].detectedLib.url, 'https://snyk.io/vuln/npm:angular?lh@1.1.4');
assert.equal(auditResult.details.items[0].detectedLib.url, 'https://snyk.io/vuln/npm:angular?lh=1.1.4');
});

it('handles ill-specified versions', () => {
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/test/results/sample_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -2386,7 +2386,7 @@
"vulnCount": 1,
"detectedLib": {
"text": "jQuery@2.1.1",
"url": "https://snyk.io/vuln/npm:jquery?lh@2.1.1",
"url": "https://snyk.io/vuln/npm:jquery?lh=2.1.1",
"type": "link"
}
}
Expand Down

0 comments on commit fed4a88

Please sign in to comment.