Skip to content

Commit

Permalink
fix: include package version in vulns lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
Moshe Pontch committed Oct 6, 2019
1 parent 2791798 commit 375402d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/snyk-test/run-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ async function runTest(

if (res.docker && dockerfilePackages) {
res.vulnerabilities = res.vulnerabilities.map((vuln) => {
const dockerfilePackage = dockerfilePackages[vuln.name.split('/')[0]];
const pkg = vuln.name.split('/')[0] + '-' + vuln.version;
const dockerfilePackage = dockerfilePackages[pkg];
if (dockerfilePackage) {
(vuln as DockerIssue).dockerfileInstruction =
dockerfilePackage.instruction;
Expand Down

0 comments on commit 375402d

Please sign in to comment.